- 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
"Please select a date" ==> presents list of times.
That's all that needs to be said. The fact that they are in an unordered order is almost neither here nor there.
Admin
"I'm not sure that's how percent works, but thanks for the alert." Yes. You were alerted that they do not know how to handle percents.
Admin
Re the date/time: I have been working at a big financial institution and was looking at a database table. I found a column day_of_week with an integer data type. I have checked the values and the numbers ranged from 1 to 31. I was puzzled and asked a colleague who said:"Erm, yeah, that one, someone made a mistake with the name there.".
Admin
Dang it. Wasn't fast enough to restate the obvious... :)
Admin
My French is a little broken, having not really used it since Grade 11 a few decades ago, but not as broken as in that recipe. Now was it trying to go from French to English or English to French?
Admin
The most difficult code I ever worked on was in Italian. Very fluid and verbose Italian. Every variable was named La this or Mi that. Il something or other. This was COBOL, so
MOVE IlNumeroCliente OF IlMaestroDell-input TO IdentificazioneCorrettaDelClienteDellaFattura OF IlRecordDeiDettagliDelCliente.
Which is when I realized that I didn't actually READ COBOL, I skimmed it and derived most of my knowledge from variable names in context.
Thankfully it was only a couple hundred lines we were re-engineering and as 2nd level support I just had to fix what the FE broke.
Admin
Regarding translations - was given some raw data to parse to try and work out what a long abandoned program was doing. Mostly straightforward apart from one column holding a single letter, about half the time it was N, the rest was mostly Y, with a few J & Os, possibly other letters. Finally discovered it was a Yes/No field if you spoke English, a Oui/Non field for French, a Ja/Nein for German, etc. Fooled by everything else being in English.
Admin
That's easy enough to understand, I think. You start with a date picker, you change it to a time picker.
To me it's the random order of it that's more interesting. The only thing I can think of is that the times are stored in a database. Now if the table was created and populated once, they'd probably still be in order. The fact that it's in a seemingly random order means that not only is the query not ordering the times, but that there have probably been row deletions and additional insertions in the table, and that's the part that really puzzles me.
Admin
Maybe the date/time values were where the weirdness came from? It made sense when displayed using "MMMM d, YYYY" format, but somehow you are displaying "hh:nn" format instead.
Admin
The order is not completely random. It's nearl erfect from 11:00 to 20:00 in half-hour steps, with a few exceptions:
I wonder of they have some kind of breaks at 11-12 and 16-17 and it messed up the ordering. 11:00 and 16:00 should have been missed out but instead appeared above. I'm still puzzled about both the presence and the placement of 11:30 though.
Admin
I can't think of a better description for that than "nearl erfect."
Admin
The Power of Now is a book by Tony Robins, so that is kind of close, but otherwise, yeah, I am not seeing it.
Admin
The time one is obvious. They need to know what values to use, so they grab time values from the last X entries, which probably has each time value at least once. These are put into a hash set, to make sure we don't get double ups, then put straight from there into a list.
Admin
Just be thankful it didn't have both Polish and Malay (I'm sure there are other combinations that also conflict, but these are two reasonably "mainstream" languages, spoken by ~50M and ~290M people respectively) where "T" (in fact, the entire word "Tak" could be used) would be "Yes" in one and "No" in another.
Admin
Suppose I want to fill a database with a list of times by quarter hour. Each row gets populated with one time choice, and of course my Super Elite MS Access will automatically assign each row a unique numerical ID, in, of course, numerical order. Then later my boss decides that I'm an idiot, and tells me to cut out the 15's and 45's and just keep the 00's the 30's. So I do this. I show him my work is done, and I go home. Then he re-sorts the list, just because. Easy! Or am I supposed to say, "brillant?"
Admin
I have no idea what that means,, so you're probably right!