GitHub search for 84600 seconds. Oops.
31–40 of 64 posts
Re: GitHub search for 84600 seconds. Oops.
#32Or, are there languages where you can't declare a constant with a multiplication expression?
Re: GitHub search for 84600 seconds. Oops.
#33Re: GitHub search for 84600 seconds. Oops.
#34[deleted]
Re: GitHub search for 84600 seconds. Oops.
#35A day is not always 24 hours. http://en.wikipedia.org/wiki/Daylight_saving_time
Re: GitHub search for 84600 seconds. Oops.
#36I wonder if Github will ever reconsider allowing bots [0]. There are bunch of things like this that would be cool to have pull-requests automatically generated for. Security fixes would be another place where I can see bots helping to fix common mistakes. [0] http://www.wired.com/2012/12/github-bots/
Maybe we can create a resource of common typos in numerical constants that would auto-detect by edit distance? But I suppose most people willing to check a resource like that probably already double check their arithmetic. (That said, I've probably had this exact bug somewhere in my coding history, so no shame.)
Re: GitHub search for 84600 seconds. Oops.
#37HN 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?
Re: GitHub search for 84600 seconds. Oops.
#38HN 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?
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;
YRe: GitHub search for 84600 seconds. Oops.
#39HN 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?