- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I bet if they had unit tests, the one they wrote for this tested 6PM
Admin
Admin
The Scottish Bard is still the greatest:
Beautiful Railway Bridge of the Silv’ry Tay! Alas! I am very sorry to say That ninety lives have been taken away On the last Sabbath day of 1879, Which will be remember’d for a very long time.
etc... William Topaz McGonagall - The only poet I know to comment on civil engineering
Admin
I'd like to be the one who uses the security videos at his performance review: "See there? The video clearly shows that I was still hard at work at my desk at 9:00 PM every night, while your golden boy Dave in the next cubicle is shown leaving at 3:00 PM!"
Admin
Admin
When I was in high school and I was studying chemistry and physics, I thought the advantages of the metric system were obvious and overwhelming, and I couldn't understand why people didn't bite the bullet and switch.
Then I graduated from school and started living a real life. And I discovered that, for the average person going through his day to day life, the advantages of the metric system don't really make much difference. Sure, with metric it's easy to scale from small units to big units. So what? How often do I really want to know how many golf balls I would have to stack up to reach the Moon? Yes, it's easier to convert between centimeters and kilometers than between inches and miles. So what? How often do I want to convert between inches and miles?
Arguably, the standard system is superior for day-to-day use because the units were invented to be a convenient size. It's easy to work with small integers and simple fractions. I can grasp "2 cups" instantly in my head, faster than I can grasp "600 ml". And I find "1 1/3 cups" easier than "330 ml".
Yes, Americans have to remember 12 inches to a foot and 5,280 feet to a mile. Europeans have to remember all the prefixes, "centi", "milli", "deci", "deka", etc.
All told, I'd rather use metric. But on a scale of 1 to 10, it's like a 5 versus a 6, it's just not that big a deal. Or on a scale of 1 to 12, it's like a 6 versus a 7. :-)
Admin
(second response) Moot, because the original poster described a range which by any interpretation included both endpoints --- the first second of the first day and the first second of the second day --- which is incorrect.
Admin
For simple practicality, it makes sense that if we're going to divide time into am and pm, that we not further complicate the matter by adding special designations for midnight and noon that are only valid for a fraction of a second each day.
I don't care about technical definitions of what "am" and "pm" stand for, their astronomical significance, or the history of the terms. To keep the clock simple, I want 12:00 to be either am or pm, just like any other time.
Given that, it makes sense to call noon 12:00 pm and midnight 12:00 am. That maintains consistent transitions of the clock. 10:00 am is followed by 10:01 am. 11:00 am is followed by 11:01 am. So it's just easier if 12:00 am is followed by 12:01 am.
To put it another way, am/pm is a higher order amount than the hour. So it should change only as a "carry" when adding 1 to the hour.
Better still would be if instead of "12" we said "0" so it was a neat carry. At which point you might as well just switch to a 24-hour clock.
Or we could go metric and have 10 decidays to the day. Think how that would simplify time arithmetic!
Admin
Umm, you realize that no one says 1 inch = .08333 feet, we say that 1 foot = 12 inches. "12" is not a very difficult number to remember. Not obviously more difficult to remember than "10".
Admin
Admin
IMO the real fail was that Michael just checked the db timestamp and assumed there was no bug without ever even considering the fact that it might be the presentation layer that had a bug, not the db.
That is an egregious mistake in debugging...
Admin
Why do you say 1 cubic meter OF WATER = 1000 liters? I believe 1 cubic meter of sand, or 1 cubic meter of iron, or 1 cubic meter of chicken brains, all would also be 1000 liters.
And why is the celcius scale based on freezing and boiling points of water? Why not freezing and boiling points of fluorine? Or of glycol antifreeze? Okay, that scale is useful if you're working with water, but for anything else, it's just as arbitrary as Farenheit.
Admin
Of course it's not JUST the metric system. It's the metric system AND day-month-year versus month-day-year.
Admin
Most digital clocks don't show seconds either. And analog clocks show as much precision as you care to read into the movement of the hands.
But that's beside the point. The question was not, "What is the last time displayed for the day on such-and-such brand and model clock?" but "When does the day end?" I don't say that a foot is 11 inches because that's the highest number that appears on my ruler. (Or for you metric folks, that a meter is 90 centimeters because that's the highest number that appears on my meter stick.)
Admin
There's probably some law of nature about this. If a program works correctly in x out of a possible y total cases, you will test exactly x cases, and they will be the ones that happen to work.
Admin
At least Centigrade is based on two repeatable constants - you can measure (and manipulate) air pressure relatively simply to get the same answer twice.
Thus it is possible to calibrate your Centigrade instruments, far more accurately than your Fahrenheit ones.
Admin
Admin
Admin
Especially if 11 AM ends just two hours before 11 PM ...
Admin
Especially if 11 AM ends just two hours before 11 PM ...
Admin
So the real WTF is using volume, not the units of measurement? Your comment contradicts itself.
Admin
Presumably because it divides only by itself or one, which makes it really convenient. Yeah... convenient.
Addendum (2013-07-09 15:14): (with the obvious exception of binary of course, which genuinely is convenient)
Admin
Admin
stop being irrational
Admin
Technically, cellocgw is incorrect. The day ends at 23:59:59.999999999999... (keep adding nines until you get tired of it) You're only cheated out of 1/infinity of a second.
Admin
Now let's read the recipe ... three cups of water ... I'll use three grams. Three spoons of oil ... I'll use three grams ... why the didn't it work out?
Admin
Be nice to the poor Europeen feelings. It does bother them so when you remind them that the system of measurement they do go on about is just as arbitrary and baseless as any other. Take a minute and look up the original definitions of common SI units.
That's right, they're just as arbitrary, malleable, and bogus as anything else. But by gawd they just won't shut up about them.
Admin
Agreed. And that's the sum of my problems with the standard "system": it's not a system, it's a bunch of cups and bottles and barrels (and feet!) that people in the 1600s used to cook and sell grain. They were different from one country to the other (probably from one house to the other!) but tradition makes them endure till today so they had to be "standardized" and "systematized" so that all feet measured the same and all cups could hold the same amount of flour - which, in fact, they don't, so why call that amount of flour a "cup" at all?
If you are cooking, a cup is useful as a makeshift unit of measurement, and fractions of a cup are esay to visualize, but don't call it a system, call it a cup.
I can see what you mean, but I believe this comes entirely from your familiarity with the units. If you ask me how do I relate 2m to 1.678m, the answer to me is simple: by a little over 32cm, which I can easily visualize because these are the units I have been using my whole life.
You actually made this a little more evident to me when you mentioned decimeters - you see, they're part of the metric system, but we don't really use them much. We normally measure things in milimeters, centimeters, meters or Kilometers - decimeters, decameters and hectometers are not commonly used. So when you say 20dm, since it's not one of the units I commonly use, I have to first convert it to meters or centimeters before I can actually make sense of it. BUT, unlike converting from standard / imperial, in this case I just move the decimal point.
I do believe this is exactly that: bias, from habit. Your measuring cups are graduated 1/12, 1/6, 1/4, 1/3, 1/2, 3/4; our measuring cups are graduated 50ml, 100ml, 150ml, 200ml, 250ml. I'm as apt at juggling these numbers to get the amount I need as you are with your fractions, based on practice, habit and familiarity. If I'm somehow in the situation that I need to add 0.0833 liters of something to my recipe, I'll just add a little less than 100ml - I'm sure the end result will be acceptable.
In the end, to me it all comes to this: if I go to, for example, McDonald's, I wont ask for 300ml or 500ml of coke (or, say 16 US fl oz of coke). I'll ask for a small coke or a medium coke. I know what it means and they know what it means - but it doesn't mean "McDonald's small soda" should become an international standard of volume measurement outside of McDonald's.
Admin
But noooo... The day does not end at 24:00. It ends just before that.
Admin
Horses for courses. The sort of measuring system you use depends on your needs. If you're baking bread, you don't need precision - 2 to one flour to water, by volume, a small amount of yeast, a correct amount of salt (~1 tsp per loaf, or so). Mix well, let sit overnight, and bake in a Dutch oven (preheated to ~450 or 500 F)
If you're making pastries or cakes, you might want more precision. Use a good scale, keep track of what you do so your experiments are repeatable.
What's to worry about? Use the thing that works best.
Admin
In this "imperial vs metric" war, why did nobody mention that the problem is NOT the 1 foot = 12 inches conversion. The problem is the inconsistency: 1 foot = 12 inches, then 1 yard = 3 feet, then 1 mile = 1,760 yard... Numbers are completely random: how can you seriously build anything consistent there?
Not to mention reference points: 0 Celsius is clear: freezing point of water at normal pressure. (yes, "normal pressure" is part of the official definition and is itself well-defined.); 100 Celsius is the boiling point of the exact same element in the same conditions. 0 Farenheit is the freezing point of a mixture of water and ammonium chloride; then 32 F (why this value, exactly?) is the freezing point of water. I've even read the definition of Farenheit was based on three points (for a linear scale?) the third point being "the human body temperature". (whose? how is that a constant?)
Now, I could agree with a base 12 system, save for two points:
Admin
If you're going to calculate "hours after midnight or hours after noon" from a 24 hour time, that's a modulo. So the operator you want is %, as in
Admin
A mile is 8 furlongs, a furlong is 10 chains, a chain is 4 rods, and a rod is 5.5 yards or 16.5 feet. These date back to when map surveyors would measure land using actual metal rods and chains, hence the names. Three miles is a league, which is about how long you will walk in an hour's time.
It's arbitrary and stupid today, of course -- historical systems of measurement basically stem from one profession and then get generalized out to where they don't quite fit; hence different ounces for gold, for other solid objects, and for liquids, just to throw one example out there. Historically, there would be no need for conversion -- a goldsmith would use the Troy ounce and an apothecary would use a different one. How many pecks to a firkin? They're both volume units! Who cares? A peck is what you use when you're measuring vegetables and a firkin is what you use when you measure beer.
Anyway, Americans get a bad rep for this, but a lot of engineering projects are all SI these days. (SI is still arbitrary, of course, but it's at least less stupid). All of our scientists are using metric and it's been a requirement in most Federal government work ever since that time that the Mars Climate Orbiter turned into the Mars Climate Impactor. Check the nutritional information on food -- it's all milligrams and (kilo)Calories. The road signs are all still miles, of course; mustn't disrupt the proles, but really, who cares about that?
Admin
'Share and Enjoy'
Admin
Threads like this are fascinating. I'm betting very few people engaged in this discussion about measurement systems are actually reading anything they haven't seen before. They probably even realize this with some amount of frustration because "it's so simple, why doesn't everybody see my point of view?".
To me that leads to the conclusion that, regardless of what value these particular arguments have in terms of their appeal to logic, utility, or whatever, their presentation can have no impact on the current state of the discussion, therefore it is no use repeating them.
Given the frequency of aimless discussion threads like this one it seems this conclusion is either very uncommonly arrived at or is recognized and then ignored and I can't say I really understand why.
Admin
You mean like "clock arithmetic"?
Admin
Clearly we should all be using Planck units. I'm going to go have about 8e103 Planck Volumes of beer now.
Admin
Because cooking oil is less dense than water and you are intentionally misunderstanding the suggestion anyway.
Admin
And you have another off by one error. If you're in UTC, some days end at 23:59:60.
Admin
It's comment threads like this one that keep me reading The Daily WTF.
A piece on an abysmal piece of code (WTFs: not using the language's built-in function; no unit test--or any test; and blithely using the same value as a string, a number, and a string again on consecutive lines) generates a comment thread that almost immediately spins out of control, leaping into violent arguments about the cases required by different Latin prepositions, cooking recipes and the merits of the metric system.
Truly brillant, people! Bonuses all round.
Admin
The existence of leap seconds is easily the worst decision that any standards body has made in the past fifty years.
Admin
What about when $hour == 12? $hour % 12 == 0. Hey, at least it's right more often.
Admin
There where times where the measurements where dependent on the current king. The lenght of he's foot was the foot measurement and the lengt of his underarm was an el. Grain was measured with top and salt evend. Past dates and times can be challenging as every country changed from julian to gregorian on different years and dates. Time zones are intresting as they might shift different for different countries from year to year (Riyad: +3.07 1988 and 1989)
Admin
Admin
Not sure the poetry cited is actually by her or not, but Paula Nancy Millstone Jennings is an actual person who once sent poetry to Douglas Adams. He reviewed it in the cruellest way he possibly could, which sums him up as being a bit of an egotistical knob-head when it comes down to it.
Admin
Bad poetry , but nowhere near Vorgon level.
Admin
I've never seen anyone defend the imperial system before. Ever. In 24 years of life, including copious amounts of time spent on the internet, this is the first time. I don't know if I should be impressed or depressed. Probably a little of both.
I've also never seen someone just straight up not understand the metric system like this. What's 1/4 of 10? Are you serious?
Admin
It is if you're terminally thick, of course. Any adult human being with the remotest fragment of intelligence has no problem adapting to take advantage of changes to its environment. Anyone else deserves to suffer the consequences caused by that inability and not demand that the nimbler of intellect be forced into inefficient practices.
Admin
I know rite? 1/4 of 10 is OBVIOUSLY easy: 10/4.
Captcha: abico. I think you need to borrow my abicos to help you with your "mathses".
Admin
Imperial units are based on every day measures that easily map to a mental understanding of ergonomics and the world around you. Very helpful in the days when access to precise measuring tools was limited. They're still usefull today for building a quick guestimate of things:
1 inch = the length of one segment of your thumb 1 foot = the length of your forearm from your wrist to the crook of your elbow. Also approximately the length of your foot. Obviously sizes varies dramatically, so assume a normal adult male (which would have been relatively homogenous within a culture) 1 yard = the length of your stride, or half your armspan 1 mile = a 20 minute walk
You're right in that the relationship of the numbers is arbitrary, but so's the relationship of seconds to a day, days to a year, etc. It's all just based on observations of the world around us and not designed to fit a particular number system like metric.