Re:9 truths that computer programmers know that most people ...
by drannex on Sunday March 08, 2015 @03:29AM
(#9164915)
Wow, yeah rereading it, that made absolutely zero sense.
Update: Fixed the post, I wrote it at 4am, and just pulled that part from another source.
Re:9 truths that computer programmers know that most people ...
by EpicEng on Sunday March 08, 2015 @02:50PM
(#9166648)
...and re-reading mine, I probably should have left this bit out:
"Who wrote this exactly? An actual programmer? "
Re:9 truths that computer programmers know that most people ...
by wazari972 on Sunday March 08, 2015 @03:22AM
(#9164905)
starting counting at 0 is mainly because
start + index * offset
points to `start` when `offset` is 0 (ie, array indexing in C and other languages with 'direct' memory access).Any other reason?
Re:9 truths that computer programmers know that most people ...
by dmcg on Sunday March 08, 2015 @03:06AM
(#9164876)
I was thinking that his point here would be that we always have to consider the noop case, the empty list etc. But no, so this item ironically added nothing to the piece.
Re:9 truths that computer programmers know that most people ...
by neilk on Sunday March 08, 2015 @03:16AM
(#9164897)
There have been programming languages that counted from 1. It's more convenient IMO to count from zero but we could have had different conventions.
Re:9 truths that computer programmers know that most people ...
by jheriko on Sunday March 08, 2015 @03:09AM
(#9164883)
yeah, its a terribly misleading comment...
still he might be a programmer, just not a 'real programmer' - some kind of web dev or script kiddie, and therefore knows little or nothing about memory addressing
Um... yeah. Who wrote this exactly? An actual programmer? And what does binary have to do with it? I am a fan of 0-indexing, don't get me wrong, but certainly we don't do it for the sake of efficiency. If anyone knows better let me know, but as far as I am aware it has much more to do with a more natural expression of a set, as well as dealing with pointers whose first element lies 0 elements away.