It absolutely should not have been named zeroth() because the reasoning for that is purely pedantic and ignores WHY arrays are 0 indexed. It’s not like the people in the early days of writing programming languages were saying “the zeroth item in the array” - they would refer to it using human language because they are humans, not machines. Arrays are 0 indexed because it’s more efficient for address location. To get the location in memory of an array item, it’s startingAddress + (objectSize * index). If they were 1 indexed, the machine would have to reverse the offset.
Function/Method names, on the other hand, should be written so as to make the most sense to the humans reading and writing the code, because the humans are the only ones that care what the name is. When you have an array or list, it’s intuitive to think “I want the first thing in the array” or “I want the last thing in the array),” so it makes sense to use first and last. That also makes them intuitive counterparts (what would be the intuitive counterpart to “zeroth”?).
- 0 Posts
- 13 Comments
JustAnotherRando@lemmy.worldto World News@lemmy.world•Andrew Tate ‘raped and strangled us’ - women tell BBCEnglish7·1 year agoHank and John Green are pretty good role models, I’d say.
JustAnotherRando@lemmy.worldto News@lemmy.world•Neo-Nazi Ex-Trump Dinner Guest Rages At Trump For Admitting He Lost — ‘You Deserve To Be Charged!’0·1 year agoI think it could serve that purpose (and honestly has to some degree), but the big thing that I didn’t consider when I was young was that a lot of people just want to hate (or to convince others to be focused on hate), and will find spaces to spread and amplify that hate. I underestimated the capacity and drive of those that would spread fear and anger.
JustAnotherRando@lemmy.worldto News@lemmy.world•Neo-Nazi Ex-Trump Dinner Guest Rages At Trump For Admitting He Lost — ‘You Deserve To Be Charged!’0·1 year agoIf it makes you feel any better, when I was young, I thought the Internet would bring the world together since you could sit and have a conversation with people all over the world with different perspectives, and befriending those from different walks of life would help break us out of small-town small-mindedness where everyone “not like us” is scary…
Yeah, I might have been a bit too optimistic with that one.
JustAnotherRando@lemmy.worldto Technology@lemmy.world•Bitcoin is Stupid and Does Not Deserve an Emoji (blog post)English7·1 year agoPretty sure people have been shitting on AI pretty heavily as well, partly for those reasons (but also for several others).
JustAnotherRando@lemmy.worldto World News@lemmy.world•Tenacious D’s Newcastle show postponed after comment about Trump assassination attemptEnglish3·1 year agoYup, I expect they’ll lay low for a while (Jack’s got plenty of other stuff to focus on, and I’m sure he doesn’t want any of his other work impacted by blowback).
JustAnotherRando@lemmy.worldto World News@lemmy.world•Tenacious D’s Newcastle show postponed after comment about Trump assassination attemptEnglish7·1 year agoThat definitely feels like Jables had a “come on man, you can’t say that shit in public” moment with KG. I wouldn’t be surprised if they lay low for a while on the band and focus on other stuff until this blows over.
JustAnotherRando@lemmy.worldto Fediverse@lemmy.world•Just a reminder we are the future of social media.English0·1 year agoHey, I also was a Joey user. I am pretty tech savvy (I’m a software dev and a former sys admin). I’m not a Linux daily user though, so I still understand that out of place feeling. Like I have used Linux for things, but after working on my computer all day for work, I don’t exactly want to deal with roadblocks or tinkering on my computer in the evening.
I have also noticed that I spend less time scrolling on here than I did on Reddit, which is a good thing for me. It’s a place where I can satisfy that itch without getting lost in scrolling of posts or comment sections for hours.
JustAnotherRando@lemmy.worldto Technology@lemmy.world•It looks a lot like VMware just lost a 24,000-VM customer • The RegisterEnglish9·1 year agoYeah, this is one scenario where the principles in F2P games like MOBAs applies to the business world. Focusing only on the top X companies and losing that market share has a cascading effect where it’s harder to find competent administrators, it’s harder for those administrators to find support online (which then means they have to call for the support they pay for - which while good in the short term for VMWare, is frustrating for the customer, and means that the extra money they’re charging has to partially be used to cover techs to provide said report). The little fish in a market like this help to provide what is essentially free troubleshooting online via stack overflow etc. And giving that market share to competitors gives them the cash flow and experience to build a support system online and improve their product, and then win over the big fish.
JustAnotherRando@lemmy.worldto Technology@lemmy.world•First human brain implant malfunctioned, Neuralink saysEnglish14·1 year agoWhen a company stops supporting devices like this, the devices and their documentation and code should be required to enter the public domain. It should not be allowed for assistive devices to become e-waste stuck in a patient’s body.
JustAnotherRando@lemmy.worldto Technology@lemmy.world•First human brain implant malfunctioned, Neuralink saysEnglish24·1 year agoThis is also why regulatory agencies have been systematically crippled over the last 40 years or so. Damn near every sector has had their regulatory agencies crippled by some combination of reducing authority, underfunding, and understaffing. When the agencies work, the message is “see, we don’t need those regulations anymore because we’re taking care of things fine on our own,” and when they stop working, the message is “we shouldn’t be spending money on these agencies! They don’t do anything anyway!”
JustAnotherRando@lemmy.worldto World News@lemmy.world•Turkey stops all trade with Israel over ‘humanitarian tragedy’ in GazaEnglish1·1 year agoI learned about the Armenian genocide as well as the ongoing struggles of the Armenian people because of System of a Down. Pretty sure if it wasn’t for that band, I would have never heard about it.
They felt like it? Their brain worded the thought using “his or her”?