Honestly, I think there's a little something to this submission beyond the "Ha ha, lots of people made typos that could cause big problems" factor. A public repository like GitHub makes checks for common errors like this really easy . Would it be feasible for GitHub or the community to automatically recognize broad classes of these likely errors and notify the authors? How sophisticated could that sort of tool become…
GitHub search for 84600 seconds. Oops.
41–50 of 64 posts
Re: GitHub search for 84600 seconds. Oops.
#42[deleted]
Re: GitHub search for 84600 seconds. Oops.
#43Earlier quoted context omitted.
I liked this one: SECONDS_PER_23_5_HOURS = 84600
That is a very common value to use when you want something to either occur a bit more than once a day, or time out in a bit less than a day.
Re: GitHub search for 84600 seconds. Oops.
#44Re: GitHub search for 84600 seconds. Oops.
#45HN Challenge: name a scenario in which defining a constant as 86400 is better then defining it as (60 * 60 * 24). Or, are there languages where you can't declare a constant with a multiplication expression?
> are there languages where you can't declare a constant with a multiplication expression? obviously PHP. php > const X = 1; php > echo X; 1 php > const Y = 1 * 2; Parse error: parse error, expecting `','' or `';'' in php shell code on line 1 php > echo Y; Y
Re: GitHub search for 84600 seconds. Oops.
#46Re: GitHub search for 84600 seconds. Oops.
#47Earlier quoted context omitted.
I liked this one: SECONDS_PER_23_5_HOURS = 84600
That is a very common value to use when you want something to either occur a bit more than once a day, or time out in a bit less than a day.
This is in languages I use with less robust date logic, of course.
Re: GitHub search for 84600 seconds. Oops.
#48Re: GitHub search for 84600 seconds. Oops.
#49Earlier quoted context omitted.
I liked this one: SECONDS_PER_23_5_HOURS = 84600
That is a very common value to use when you want something to either occur a bit more than once a day, or time out in a bit less than a day.
Re: GitHub search for 84600 seconds. Oops.
#50[deleted]
I'm not a php coder any more, but at least blame php for it's actual faults, not for something pulled out of thin air.