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
- 26 Comments
JustAnotherRando@lemmy.worldto World News@lemmy.world•Andrew Tate ‘raped and strangled us’ - women tell BBCEnglish7·10 months agoHank and John Green are pretty good role models, I’d say.
JustAnotherRando@lemmy.worldto Games@lemmy.world•Recommendation engine: Downvote any game you've heard of beforeEnglish2716·11 months agoBopl Battle is a hilarious party game for up to 4 people. The rounds go really quick so it’s a great game to play with friends when you have a limited amount of time, but the fun doesn’t wear out fast either.
JustAnotherRando@lemmy.worldto Games@lemmy.world•Recommendation engine: Downvote any game you've heard of beforeEnglish6·11 months agoDude I loved that game back in the day. So many great mods for it too
JustAnotherRando@lemmy.worldto Technology@lemmy.world•Bitcoin is Stupid and Does Not Deserve an Emoji (blog post)English7·11 months 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 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 Games@lemmy.world•Bethesda Is Charging $7 For A New Starfield Mission, And Players Are UpsetEnglish7·1 year agoThe thing with those is that, while it was a small amount of content, it wasn’t just a mission, each was about an hour of repeatable content that was fairly fun to farm. At $2, they actually still felt worth it with as much fun as B2 was. If they had asked for like $10 each, people would have flipped out.
I’m not a Starfield player, but I would bet this is not even close to as good of a value proposition.
JustAnotherRando@lemmy.worldto Linux@lemmy.ml•Linux Mint Will Hide Unverified Flatpaks in Software Manager4·1 year agoIs the token not keyed to a specific source? I would have expected it to operate similarly to an SSL cert, where part of the verification process is that the source is the correct origin that the token belongs to - so if someone just lifted a valid cert to put into a malicious one, it would catch anything from changing a single character in the project name to changing the repository host (i.e. GitHub to GitLab)
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.
Olives exist to be pressed and processed for oil. Olive oil is delicious, but I can’t stand olives themselves.
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 GazaEnglish6·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.
Really? I have no idea who that artist is. Is it someone I’ve just forgotten about from when we were younger?
JustAnotherRando@lemmy.worldto Technology@lemmy.world•Texas Attracted California Techies. Now It’s Losing Thousands of Them.English2·1 year agoIndiana actually has some very nice state parks, and the Hoosier National Forest is quite pleasant as well
JustAnotherRando@lemmy.worldto Technology@lemmy.world•Broadcom continues to kill off VMware productsEnglish4·1 year agoYeah, VMWare has too much competition in all spaces to pull moves like this and get away with it. In the Enterprise space, depending on environment, Proxmox, RHV, Hyper-V (though that’s apparently losing support in 2031), Citrix and I think a couple of others (haven’t been heavily involved in that area in a while so don’t know what else is big now). And in the consumer/power user space, most of the above still work fine, for free, along with things like Virtualbox and ESXI just for starters.
JustAnotherRando@lemmy.worldto Technology@lemmy.world•Former Microsoft developer says Windows 11's performance is "comically bad," even with monster PCEnglish11·1 year agoI don’t have many complaints when it comes to Windows 10. About the only thing I really have an issue with is the damn notification center, but apparently not enough of a problem to do anything about it.
Tanning beds also used to be a HUGE thing. The people that really frequently went to get a tan have much more leathery skin.
Another good one, entirely browser based, is https://learngitbranching.js.org
They felt like it? Their brain worded the thought using “his or her”?