|
This one is right up there with PARSECS_FOR_KESSEL_RUN.
I have lived with several Zen masters - all of them were cats.
|
|
|
|
|
yeah - but that's actually awesome
cheers
Chris Maunder
|
|
|
|
|
Awesome nonsense.
He might just as well have blurped something like making the run in less than 38 lightyears.
I have lived with several Zen masters - all of them were cats.
|
|
|
|
|
Come to think of it, are there any milliseconds in a Leap Second?
|
|
|
|
|
It depends if you measure them or not.
cheers
Chris Maunder
|
|
|
|
|
I can't be bothered with such fiddling small change.
|
|
|
|
|
Of course not. The logical name is: MILLISEC_PER_SEC_1000_SIC
... such stuff as dreams are made on
|
|
|
|
|
Chris Maunder wrote: MILLISEC_PER_SEC
American or UK Seconds?
Michael Martin
Australia
"I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible."
- Mr.Prakash One Fine Saturday. 24/04/2004
|
|
|
|
|
I once had a customer tell me, "I want this process time to be ten seconds. Ten German seconds. Not American seconds." We all laughed.
|
|
|
|
|
Daylight Saving seconds.
cheers
Chris Maunder
|
|
|
|
|
How fast is your product traveling? You might need a variable for it.
|
|
|
|
|
Check again - in France it may have an alternative value.*
*After all, they don't have a word for 'seventy', 'eighty', or 'ninety'
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
C'mon - quatre vingt dix rolls off the tongue!
(and it's the reason I can only count to 69 in French when I'm drunk. The maths gets too hard)
cheers
Chris Maunder
|
|
|
|
|
Chris Maunder wrote: rolls off the tongue!
(why did you go there?)
It brought to mind french cuisine, crawling off one's tongue (leaving a slime trail).
I hadn't expected this type of treatment from you!
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
It's easier in Switzerland, they use septante, octante, nonante instead of soixante-dix, quatre-vingts, quatre-vingt-dix.
In Belgium they use some bastardised version with septante, quatre-vingt, nonante IIRC.
|
|
|
|
|
Or, perhaps it's needed to differentiate in regions where they use an Imperial Second instead of a regular one.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
|
protects against people who see "Milli-" and think "1,000,000"
|
|
|
|
|
Relatively speaking, without it, how could you ever know that your MILLISEC_PER_SEC doesn't match mine?
|
|
|
|
|
I actually disagree; I often deal with code using second, milliseconds, microseconds and even nanoseconds, sometimes with more than one unit in a function. Having a const (of some sort) declares what conversion was intended.
|
|
|
|
|
A counterargument. Excellent.
My counter-counter argument, and the reason my brain popped:
I would always prefer to have something like
var timeInSeconds = X;
var timeInMilliseconds = timeInSeconds / 1000;
My point is that the 1000 is always 1000. The variables surrounding that should be the ones clearly named. The "1000" can never be anything other than 1000.
At least that's what I think.
cheers
Chris Maunder
|
|
|
|
|
Aaaaggghhhh, Magic Number.....
"It's supposed to be microseconds? Sh*t."
(Near accurate quote.)
|
|
|
|
|
<small pause>
OK. That argument I will accept in that the number may appear in more than one place, making refactoring painful.
Except, except, except: the calculation should only be done in one place:
var variable = ConvertToMilliFurlongs(X);
...
function ConvertToMilliFurlongs(furlongs)
{
return furlongs / 1000;
}
So if it's "Dammit, Janet. It should be microFurlongs" then you rename ConvertToMilliFurlongs to ConvertToMicroFurlongs and change the 1000 to 1000000. Everything's still clear.
cheers
Chris Maunder
|
|
|
|
|
|
So one hour, 3600 seconds, is 3.6 milliseconds.
|
|
|
|