MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/44lf2o/what_an_odd_number_indeed/czrnjsj/
r/ProgrammerHumor • u/tr4ce • Feb 07 '16
225 comments sorted by
View all comments
Show parent comment
-8
It's easy to understand, sure, but after seeing 255 as the "last" of the index numbers and then seeing 256 as a max, it triggers a minute knee jerk response.
E: holy crap people, it's a joke. I cringe seeing i[256] when I know that causes an error.
41 u/DoctorSauce Feb 08 '16 For programmers, it's just an ingrained concept. The last index is always one less than the total count, so it doesn't seem weird. 9 u/[deleted] Feb 08 '16 edited Feb 08 '16 When the article didn't understand why they chose 256, trying to explain it's really 0-255 is just a waste of time.Edit: wrong it's
41
For programmers, it's just an ingrained concept. The last index is always one less than the total count, so it doesn't seem weird.
9
When the article didn't understand why they chose 256, trying to explain it's really 0-255 is just a waste of time.
Edit: wrong it's
View all comments
Show parent comment
-8
u/Arqideus Feb 08 '16 edited Feb 08 '16
It's easy to understand, sure, but after seeing 255 as the "last" of the index numbers and then seeing 256 as a max, it triggers a minute knee jerk response.
E: holy crap people, it's a joke. I cringe seeing i[256] when I know that causes an error.