News for hackers. Stuff that matters.
Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by haburka on Friday August 11, 2017 @05:29PM (#14994476)
Liking zero indexed lists is such a dumb programmer meme. Lists are for humans to read and therefore should use the natural numbers, which start at one. Arrays are zero indexed because the first item of the array starts with zero offset.
Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by wongarsu on Friday August 11, 2017 @07:13PM (#14995158)
>Lists are for humans to read and therefore should use the natural numbers

Depending on who you ask, the natural numbers do contain zero. Notably ISO 80000-2 is of that opinion. In university, half my professors included 0 in the natural numbers, half excluded it.

For lists, starting them at 1 makes sense, but I would argue that's purely because that way the words "first", "second", "fiftieth" etc. line up with the numbering. It has nothing to do with human consumption.

For example floor numbers are made for humans too, but the European scheme of labeling floors -2, -1, 0, 1, 2, 3 makes much more sense than leaving out 0, leading to awkward -2, -1, 1, 2, 3, 4. Years are made for humans too, but most people are confused about the ordering of years because having the year -1 followed by year 1 just seems weird and makes date math difficult (for humans).

Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by Dylan16807 on Saturday August 12, 2017 @12:07AM (#14996407)
To be fair to floor labels starting with 1, I have never seen a floor with a negative number.
Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by pwdisswordfish on Sunday August 13, 2017 @10:42AM (#15003077)
You haven't been around much, then.

The seven-segment display inside the elevator in my former dormitory labelled the ground floor as '0', and the one below as '-1'. There was also a voice announcer, but I don't remember what it said on floor -1; I didn't go there often.

Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by curun1r on Friday August 11, 2017 @06:51PM (#14995027)
And it's because of dumb non-programmers that we have 12am immediately following 11pm. If we were to, instead, recognize the beginning/middle of the day as 0, the am/pm transitions would be sensible.

Starting at 0 is almost always correct, teaching people to start counting at 1 isn't. Why do we continually come up with convoluted workarounds simply because we educate children incorrectly?

Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by gbl08ma on Friday August 11, 2017 @07:11PM (#14995145)
I believe that hours going up to 12 instead of going 0 .. 11 is because you can't quite hear a bell strike zero times, no?
Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by dpkonofa on Friday August 11, 2017 @08:21PM (#14995545)
Although that's kind of a clever response, most bells have a chime to alert you to the hour change so it would just be the chime without the counted bell strikes. Better yet, since 0 would always be the start of a new day, make the strikes do some kind of awesome song.
Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by njharman on Friday August 11, 2017 @07:47PM (#14995360)
Wat? There are 24 hours in a day 1-24 or 0-23, pick your poison. But 100% Fuck halfday, 1-12 bullshit.

P.S. Also fuckoff non-UTC time.

Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by leesalminen on Friday August 11, 2017 @08:45PM (#14995640)
I wish we could all schedule things on UTC time. I've been part of 10 person meetings across 4 time zones and scheduling sucks. Inevitably someone assumes a meeting is scheduled in their local time.
Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by manyxcxi on Friday August 11, 2017 @09:02PM (#14995721)
You don't have to be in UTC, but having your clock set to 24 hours still makes it a lot easier.

After a year of daily meetings with people on the east coast (of the US), London, Hamberg, and Brasilia from the west coast of the US I just moved to 24 hours and found it much easier to mentally calculate everyone's respective times- as long as I could keep the offsets squared away.

Screw daylight savings.

Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by nucleardog on Friday August 11, 2017 @11:16PM (#14996251)
It's even worse when you don't observe DST but basically everyone else does.

I can't even keep the offsets squared away since they shift a couple times a year.

Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by Spooky23 on Friday August 11, 2017 @08:23PM (#14995556)
Fuck hours. There's only 1440 minutes a day. No time for hour conversions.
Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by powercf on Friday August 11, 2017 @05:43PM (#14994578)
> Lists are for humans to read and therefore should use the natural numbers, which start at one.

https://en.wikipedia.org/wiki/Peano_axioms#Formulation

To address the content of your post: I agree, but humans aren't purely logical devices created by Dr. Noonien Soong, and we do enjoy playing with things and joking about.

Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by pwdisswordfish on Sunday August 13, 2017 @10:18AM (#15002998)
Peano axioms can just as well be formulated with 1 as the smallest natural number, with little consequence as to the expressiveness of the resulting theory.

Not that there aren't mathematical reasons to start counting with zero, but this isn't a very strong one, at least not without further elaboration.

Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by inopinatus on Friday August 11, 2017 @08:38PM (#14995610)
Since we're picking all the nits and talking about definitions like the natural numbers rather than common parlance, then may I observe that sequential lists are using ordinal numbers, and the set of ordinals derived from natural numbers definitely does start with zero, in this case it being the minimum element of the ordinals of non-zero cardinality.
Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by kuschku on Friday August 11, 2017 @07:16PM (#14995177)
Hours go 0:00 to 23:59

Elevators use 0 for ground floor, negative for basements, and positive for upper floors.

Just two examples of zero indexed lists in real life.

Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by pklausler on Friday August 11, 2017 @09:31PM (#14995834)
And sometimes to 23:60.
Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by joshontheweb on Friday August 11, 2017 @08:28PM (#14995576)
I found it interesting to see that building floors in Australia are zero indexed. The first floor there is what Americans would call the second. Not sure why they chose to do it that way but it works fine in the real world.
Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by cyphar on Friday August 11, 2017 @10:48PM (#14996150)
That's not the case in all Australian buildings. Usually we call the ground floor "ground floor" (which you could argue is 0-indexed), and the floor above it is "the first floor". But there are a lot of buildings that follow the American style of "the ground floor is the first floor".

We also don't use negative numbers, basements are prefixed with a B, so B1 is like -1.

Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by InitialLastName on Sunday August 13, 2017 @08:41AM (#15002671)
Due to hills, many of the buildings at my American university were 2 indexed: Due to hills, the apparent ground floor was usually labeled "2nd Floor".
Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by pacaro on Friday August 11, 2017 @08:30PM (#14995583)
The U.K. does the same. Starts with ground floor, then first
Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by femto113 on Friday August 11, 2017 @06:43PM (#14994980)
Ever been in an elevator in Europe?
Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by _asummers on Friday August 11, 2017 @10:10PM (#14995976)
My recollection is that arrays are zero indexed because time shared compilers were too slow to do the arithmetic shift in the compilation phase. I can't find a good citation offhand though.
Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by fapjacks on Friday August 11, 2017 @07:50PM (#14995381)
Oh, thanks for deciding that for us.
Re:I Fell Victim to a $1,500 Used Camera Lens Scam on Amazon by Hnrobert42 on Friday August 11, 2017 @08:14PM (#14995510)
I like it even more now.