4 ms·
Reminds me of a simple implementation of a Prisoners and Boxes riddle that showed up in my YouTube feed where I had to add a comment so others (and eventually f
by de6u99er 4y ago
Reminds me of a simple implementation of a Prisoners and Boxes riddle that showed up in my YouTube feed where I had to add a comment so others (and eventually future older me) will understand what I did.
>// if one prisoner fails all are dead (1st try -> tries = 0)
https://gist.github.com/amalic/c107b5289d946b758418778a95fdce64#file-prisonersandboxes-java-L32 https://gist.github.com/amalic/c107b5289d946b758418778a95fdc...
That being said, it seems to be a junior software engineer issue where the brain isn't wired yet for "0-based" indexing. I don't hear such complaints from more experienced developers who have simply learned to appreciate it because like in my example above it is more intuitive to me.
I have added "and eventually future older me" above because I don't do much coding these days, and my career trajectory looks like it's going to be even less in the future.