- 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
This reminds me of an old cow-orker.
Whenever I showed him something, he watched intently, took copious notes and, sometimes, even recorded the instructions to tape!
That alone is not the issue. No, the issue came when he tried to apply what he recorded in "The Real World"(tm).
If, in the process of carrying out the instructions, if something unexpected happened, even if the screen had a huge red flashing warning saying "WARNING! Pressing Enter will erase this system and all conected subsystems!", if his instructions said "Press Enter..."
Yup. He would.
Admin
Some RDBMSs accept dates such as 2006-10-00 (beginning of October) and will happily use such dates to perform accurate calculations and ranges in queries.
If a database really wanted to, it could perform a calculation of Sept 31 => Oct 1 on the fly.
Although from a programming point of view, you're better off forcing the user to think twice about what the hell he's entering.
Admin
Maybe I'm the king of France.
Maybe you're my long lost twin brother.
Maybe, maybe, maybe;
What kind of date math are you suggesting where this would arise? If a person is hand-computing this, they certainly won't come up with 9/31. And even the most basic date class, should know how many days are in a month and add days appropriately.
I can't believe this many posts have been made because it was uttered that Sept. 31 is not a valid date. I love being pedantic as much as the next guy but you people need to cut it out.
sincerely,
Richard Nixon
Admin
That sounds familiar. I used to work at a mechanical testing lab. One of our major tools is a load frame: basically, a hydraulic press with sensors to report on the load and deformation of whatever we were squashing or stretching. Normally, the deformation sensor output would fluctuate by about 0.001% strain, and since strain measurements in the test are supposed to be monotonically increasing, I'd set up the software to simply ignore any output drops of less than 0.01%. One day, though, the output started fluctuating by about 0.5% -- an amount far greater than the signal level. The company that made the sensor couldn't find anything wrong with it: on their calibration system, it worked perfectly. I couldn't find anything wrong with the software.
One of the other technicians found the problem by hooking an oscilloscope to the electrical mains. It turned out that one of the tools out in the machine shop, an EDM cutter, was generating huge amounts of noise on all three wires, and our test system was sharing a ground circuit with it.
Admin
<font face="Times New Roman">
</font><font face="Times New Roman" size="3">Snoofle never said the instructions weren't wrong, so don't put words in his mouth. He was simply pointing out that the testers were jackasses to waste time. How the fsck long were they going to sit there being paid with tax money? Slackers.
</font><font face="Times New Roman" size="3">ok
dpm</font>
Admin
I'd wager to say there were more comments about my September 31st problem than the original DailyWTF post.
Sorry, didn't mean to cause this kind of a hubbub. I admit it was an oversight on my part in keeping my regexp too simplified, assuming users would refrain from entering dates that didn't actually exist.
You just have to wonder at what point it becomes wasteful to try to prevent user errors that shouldn't happen in the first place. The user should have some responsibility for entering information appropriately. But then again it's like the old saying goes, try to make a system idiot-proof, they'll just make a better idiot.
Admin
That reminds me of something.
This story might not be a big WTF if some background information was considered regarding the UNION. Not the operation of sets, but the guys work with you and, in some special cases, get in the way of the management of your company.
My dad works in an air-craft component assembly line as a quality inspector. His tools include a pen, a small mirror on a retractable stick, and a notepad. If he's about to do anything that requires any tools other than the 3 listed above, he's in violation with the contract.
In the same place he is working now, there has been a case where the inspector saw a loose screw, he documented it, and helped the technician to tighten it up. The technician found out about it and made a formal complain to the union, stating that this inspector was endangering his job. The technician actually won the case and the inspector received a warning letter of some sort.
Yeah, in places where Union gets in the way of management at every possible turns, this should not be a WTF.
But seriously, instead of fixing the small problem on sight, by going through all the paperwork and let the issue passed up and then back down on the hierarchy, it really doesn't save money and ultimately the union members will suffer for the loss and waste of resources in the process, I really don't see how the Union protects the workers in cases like this.
Then again, some people just need to create some sense of superiority on the things they do in order to survive... but that's just me.
Admin
I worked for a large Mfg. firm writing db apps in Clipper (yes, it was THAT long ago) and doing whatever else they needed me to do at the time. Our Lan was all BNC with a span between 2 large tin buildings about 30' up in the air running from roof to roof through a steel pipe suspended between the buildings by some wire.
We had a big thunderstorm move through and an indirect hit sent enough of a charge through the suspended cable to take out 9 workstations with damage ranfing from fried NIC's to burning quarter sized holes through some very expensive Compaq computers!
I was tasked with finding something to lessen the damage should this ever happen again and I came up with some nifty BNC supressors that mount betwin the NIC and the BNC "t" that had a Ground wire that went on the closest ground. I was going around to all our systems installing these and was prevented from simply screwing the Ground wire to the nearest ground because only a Union Electrician could do that! Fine. I installed the supressors on ALL the computers and informed my boss when I was done and he turned the job of grounding them to the shop steward.
A month or so goes by and we have another thunderstorm. Guess what happened? Yup. The same damned thing as before because the Union Electrician hadn't gotten around to hooking up ANY of the ground wires!
Admin
Oh, don't get me wrong, user input validation is absolutely critical because of the possible ambiguities that can result from inputs of September 31st. What I was refering to is the internal, intermediate representations during some date manipulations. For example, if I set up a date struct to have Sept. 3 and I want the date that is 5 days before that, there will be an intermediate representation of Sept. -2 before the normalizing step that will result in Oct. 29. User input and output should ALWAYS be normalized to make sense to the user.
Admin
Unfortunately for you, the hexadecimal system isn't random, nor was it generated on-the-fly. And even if it was, substituting arbitrary symbols for values (so as to emphasize the relationships) is exactly what algebra does. Would you say algebra is random?
Admin
He he... See my recent blog entry about this. I apologize for the plug; I'd copy the text here, but it's too long.
Admin
<FONT face=Tahoma>This reminds me of a
talestory I've heard:A certain hospital room was thought to be jinxed because every patient on that room mysteriously died everytime the clock strikes 11pm. Doctors were alarmed and sought help from police, investigators, paranormal experts, etc...
They checked the nurses attending to those patients, the medications that were issued, equipments used, presence of lost spirits, etc... But found no faults...
This happened again and investigators decided to stay in that room and see for themselves if someone (or something) really killed the patients occupying the room...
10:30pm, Everything looks normal...
10:45, Still nothing unusual...
10:55, Not even a wierd noise...
Finally, the clock stroke 11... investigators watched in horror as the janitor came in and started pulling respirator plugs from their sockets in order to plug-in his vacuum cleaner...
Scary...
</FONT>
Admin
/dqn/ on 4-ch.net, I think becauseitswinter might too. Currently 1993-09-4756 04:31
Time hard to validate properly, weird days such as Februrary 30th will cause havoc. Leap seconds? Daylight savings times moving around?
Admin
Time doesn't exist. That is to say time as in space time doesn't exists, therefore space-time itself doesn't exists.
We live in the ever unfolding present. Our perception of time is merely the interpretation of patterns of matter-energy (the everystuff oft confused with space-time, which I prefer to call chi cause it's easier to say). The presence of these memory structures manifests itself in thought as time, but as thought is confused perception, this manifestation is merely an illusion.
You lose, but don't get upset, this is the best possible outcome in the best possible universe.
Admin
HeroreV, you're a dick. You missed the point completely. Go read about IEEE floating point standards compared to previous attempts at floating point representation if you dont get what he's saying...
Also, so the phrase "a length of time" is referring to a physical dimension?
argumentitive wanker...
Admin
10: connect wires
20: read around 60V
30: unplug wires from voltmeter
40: friendly ask $STUPID to hold them a second...
50: ...
Reminds me of a screw-up i saw once in a HW design.
A serial line connection on board was using one wire and was keeping bits like gov keeps tax euros.
They did not find out why and tried to fix it by using a crc and error recovery protocol over the line. When i looked at the boards and asked for the syncronisation between the devices i was told by the hardware guy that they ran on the same clock, so no sync was needed. Well, each chip had it's own nice shiny oscilator, driving several MHz into the chip as well as into any other thing nearby.
But since they were all labeld the same, no sampling errors were to expect, or were they???
Admin
You're all mad. There is no such date as 31st September! The calendar is a construct invented by human beings and it doesn't contain 31st September. Any computer that asks for a date is modelling the calendar and again it shouldn't be happy with 31st September. It's pseudo-philosophical nonsense to argue otherwise.
Admin
A high-impedance voltmeter may be able to see 60V, and that 60V may cause sensitive electronics some problems, but if it was going to cause any sort of problem in every day use, then there'd be hazard warning labels on every appliance in your house, and you'd never be allowed to pick up an electric kettle without using rubber gloves.
Admin
We all know, this is a most common problem and the reason for that is in most cases the cleaning maid who just needs a wall socket to plug in her vacuum cleaner and doesn't bother at all with those WTFy "Off Limit" restrictions cause she just has to do her job. This case happened frequently in the server room at my university. We learn about that: Just have always enough free plug sockets over all your server room! Or let the geeks do the cleaning.
Admin
WTF are you talking about? The internal RC oscillator? That's not a "screw-up", thats a "change your line of work you dont even grasp the basics".
Admin
The real WTF is a hospital were the intensive care unit is vacuum cleaned at 11 in the evening. Patients should rest.
Admin
Yes, the instructions were wrong but the tester should have read the next line, not seen what it said he should have expected and filed a bug, not sat around doing nothing.
Admin
Oh, but that's September 31, 2006. Weren't we discussing how there was no September 31, 2005?
Maybe 2006 is a September-31-leap kind of year.
Admin
Classic, Absolutely, Classic! I usually don't make it to 10 either (one-Mississippi, Two-etc.)
p4
Admin
I can imagine how February 30th would cause havoc, but when was the last time we had a February 30th? I mean, we're not talking about B.C. dates here, we just need to go back to 1993 in our date computations -- and by 1993, the Berlin Wall had come down, and the Web had been invented, right?
Admin
Reading your response actually made me say WTF.
I know my opinion makes me look like a lazy programmer, and if we were talking about a secure multi-user system I'd agree with you.
But in the case I was referring to, the task was simply to fulfill some quality assurance requirement to have a website that can track information. I've done stuff like this in the past, no one ever uses them.
Furthermore I was restricted by time (which apparently doesn't exist, according to other posts) and by available funding. This was a project done on overhead with no customer backing, so I was told to whip it together as fast as possible. For the field in question, 99.9% of the time the users would go with the default value which was today's date, but I was told to leave it editable in case they needed to change it.
Someone did change it, and used a day that didn't exist. Whatever their intent was, whether it was Oct 1 or Sept 30, is irrelevant. I had to revisit this project weeks later and spend an hour tracking down this bug and fixing it. So instead of a nice, simple regexp, I have a few nested if statements over a dozen lines all because someone didn't know that 30 days hath September.
I'm just saying that you can only go so far to prevent user error. If someone meant to type 9/4/2005 and accidently hit the 1 to make it 9/14/2005, there's nothing you can do to fix that.
Admin
3 lies of software:
- Simply
- Only
- Temporal
If somehome ask you for some code, and use 2 of these, run!. .run for the hills!, and never look again.
Mate, your code whas poor, admit it and live with it. Is not like you will suffer ethernal pain or something.
Admin
Heh. Well, at least now he can charge for the repair.
Admin
Unfortunately for you, you missed my point, but you made a solid effort. I was not saying hexadecimal was random. I was saying that Sep 31 is a random, made up date. Therefore, converting 11 to a random representation in something made up and coming up with "dog poop" was a better analogy.
Read slower and sound out words if you get stuck.
Admin
"$dog poop,grass,bicycle,garbage can dollars" is redundant. You've set such high posting expectations for yourself, Mr. Nixon that I expect much better. Get your game face on please. :)
Admin
You mean, he wins. We all win!! He now has correct information and is a better person because of it ;^).
We are all now extremely enlightened - I feel like having one big group hug. Now if we all could simply warp into the realm of subspace where September 31st does exist, we'd all be happy campers.
Or we could simply stay with the realm of elitist antagonists bouncing barbs full of attitude back and forth for simple entertainment.
CAPTCHA is "captcha".
Admin
Not as bad as your spelling and punctuation though.
I suppose my first mistake was to put out an example of something I'd screwed up in the past. But you caught me, I did in fact screw it up. Nevermind the fact that in my first response I admitted to my mistake. Don't worry though, you've taught me that next time I should anonymously post comments that point out the flaws of others while not being comfortable enough with my own previous mistakes to actually contribute something to the conversation.
Congrats to you, you won teh internets.
Admin
Admin
You're being such a dick over this... Come on, both of you hug and exchange bytecode.
Admin
Users at my firm depend on this interpretation of dates. E.g. they know that today is 9/25/2006, and they know that they want to enter a date 10 days from today. It is less effort for them to enter 9/35/2006 than it is to do the mental arithmetic to translate that to 10/5/2006. Why would they do that arithmetic when the computer is so much better at it? This way they save a small amount of time, and when they do this hundreds of times a day that translates to a significant productivity gain, which is really the point of all this IT stuff.
Admin
LAZY_USER_DONT_TYPE_OCT5
+ PROGRAMMER_WRITES_CODE_FOR_CASE_SEP35
= BRILLANT!
CAPTCHA = random
Admin
Users are never lazy. Programmers are, all too often. It's the task of a programmer to make programs that allow users to work as easy and fast as possible. If "9/35/2006" is what they need to accomplish this goal, who are you to refuse that?
You should never underestimate the hidden costs of a user interface that causes the users more work than necessary. If a routine job takes 2 seconds longer and the users does it 100 times a day, and you have 20 people working with that program, that's more than one hourly wage (say $30) wasted per day; it sums up to $7000 per year.
Admin
Why not?
Looks perfectly valid to me, just needs to be normalized.
Admin
Reminds me of something I read about in Albuquerque, New Mexico. Seems that most of the traffic lights were set to just go on a timer late at night, regularly switching the traffic flows. However, one traffic light had an incorrect timer, so instead of changing every 30 seconds, it would change about every 4 minutes. After this was pointed out, the traffic engineers said that it really didn't matter. They were asked, quite reasonably, why it didn't matter. They answered by asking a question:
"Let's say you are driving, late at night, and get to a red light. What do you do if it hasn't changed to green within 30 seconds?"
"I'd look left and right, and then run the red light!"
"You see, it doesn't really matter what the actual timing is set to."
CAPTCHA = pacman (should have been WoW, but I'll accept pacman)
Admin
-90 degrees is NOT the same as 270 degrees. If you are on circle it is, but degrees is used for many other measurements based on trig. Plot out a sin wave, and you will notice that -90 degrees has the same value on the 'y' axis, but is in a different place on the 'x' axis. (I suppose some wise guy will now plot this with different axis)
This is sometimes important. Radio is a sin wave with distortion added, subtract the sin wave, and the distortion is the signal. (This is very simplified, and not the common way of looking at radio)
Admin
He wanted to write that, but there was a Trojan on his computer that prevented it.
No, it is not. Every definition is, by convention. Every proposal to create or alter a definition ought to be sensible and useful.
The conventional understanding of the "day of month" concept is that it is an integer between (inclusive) 1 and the length of the month in question. If no year is known, the maximum length of the month (e.g. 29 for February).
So your new-fangled way to do "un-normalized" dates comes with a proposal to alter our definition of "day of the month". Since this involve some serious effort, the change should rather be worth that effort. But it's not.
(In the following, I assume that your suggested new definition of "day of the month" is "an integer".)
First, your definition is not useful, for several reasons:
Second, your definition is not sensible, because it can only be safely used when the reference year is know. How do you normalize January 40,000? There is no unique answer. The simple fact is that in our calendar, a date is not properly modelled as a sum of offsets to some imaginary date (let's say January 1, 1 CE). How many programmers have been burned by the false and disproven assumptions that:
Too many. But although it's possible to envision more sensible calendars than the Gregorian one we use, your definition of "day of the month" does not even attempt to fix the underlying issues with said Calendar. Instead, it just pretends they aren't there to haunt us. In short: Your suggested definition of "day of the month" requires a great amount of effort to adopt, it is logically flawed, and it is not useful. There is absolutely no reason for us to use it.
Admin
Maybe they realized that the machine which repeats old WTF's was turned off... and turned it back on again this morning? ;)
Admin
Ah... Well if you want to see why a system shouldn't accept bad dates like that one...
We had a weird problem with one of our reports. The data was in a MySQL server, but when transferring the whole thing to PostgreSQL, postgres just barfed.
After hours of checking out the scripts and trying everything for the umpteenth time ... we found it.
Someone had actually put one of the requisition dates as "April 31,2006".
And MySQL let that happen. No, not May 1, 2006. The thing was actually stores as 2006-04-31 in the database.
Admin
Frankenstein is the name of the doctor, not the monster!
Admin
Mate, this is thedailywtf we're talking about. You could replace every other post with just the string "*sneer*" and nobody would even notice the difference.
Moderator's note: I would, trust me.
Admin
he still would've had to go voer and plug it in b/c it was "off limits" to everyone except the three techs who were all on vacation...
my monitor didn't start up once. i called IT and ordered another monitor. As he was bringing it up, i figured out it actually wasn't plugged in all the way on the monitor side (not the box side).
whew! i'm sure he got some laughs out of it, but if he had found it, you'd be reading about me in some random wtf comment...
Admin
God no, that's where the "watching over the shoulder comes in". Or the chance to jump in and say "You need to do this undocumented step" now, and then fix the documentation.
Admin
The real WTF here is that they set the profit margin so low that you probably didn't get paid for this. If someone wants to pay me hundreds per hour to consult and all I have to do is re-plug in the system, i'm good. If I have to do that for free, after wasting 2 hours... not so good.
Admin
"Do you think it would be acceptable for someone to send you a birthday party invitation for November -347, 2007?"
Yes.
Admin
Exactly - it's crap. Could anyone seriously think a user would deliberately enter September 31 when they meant October 1 and expect the software to know what they meant. On the other hand if your trying to be smart and/or funny - don't give up the day job