Comment On Representative Table

"This is a small peek into the production database of one of our client's systems," writes Walter. "I wish I could say that this was an unused table, an isolated occurrence... or even that I had some other job prospects. But sadly, none of those are the case." [expand full text]
« PrevPage 1 | Page 2 | Page 3Next »

Re: Representative Table

2012-05-23 09:03 • by Steven (unregistered)
Duh. Everybody knows OCTOBER and NOVEMBER should be capitalized...
(zeroth?)

Re: Representative Table

2012-05-23 09:03 • by blip (unregistered)
<bill> Would you mind telling me in which month you were born?
<al> NO
<bill> We don't appear to have that value in our database - I'll add it.

Re: Representative Table

2012-05-23 09:03 • by tjb (unregistered)
select * from month where month = 'frist'

Re: Representative Table

2012-05-23 09:05 • by potNPan (unregistered)
+-------------+
| month |
+-------------+
| NULL |
| FRIST? |
| SCEOND |
| 4 |
| T |
| C |
| A |
| 8 |
| 15 |
| L |
| 16 |
| P |
| D |
| S |
| 23 |
| 42 |
| YES |
| |
| 0 |
+-------------+

Not Oracle

2012-05-23 09:06 • by TGV
Judging by the fact that both NULL and the empty string occur, I infer it's not Oracle. At least something is sane.

Re: Representative Table

2012-05-23 09:10 • by No Name (unregistered)
Sure, "DELETE FROM month" should fix the problem

Re: Representative Table

2012-05-23 09:11 • by bob (unregistered)
holy hell

Re: Representative Table

2012-05-23 09:12 • by RuBen (unregistered)
Well i can finally say I'm born T-32-198L

Re: Representative Table

2012-05-23 09:14 • by chooks
It's missing FILE_NOT_FOUND.

Re: Representative Table

2012-05-23 09:14 • by David (unregistered)
Data validation, DO YOU SPEAK IT?!

Re: Representative Table

2012-05-23 09:15 • by Peyote `Simon` Joints (unregistered)
Actually, I was born on the 11st of NULL, 2147483647 BC. This table looks fine.

Re: Representative Table

2012-05-23 09:15 • by Giq (unregistered)
"File Not found" is well known, valid month name, but is missing there.

Re: Representative Table

2012-05-23 09:24 • by ¯\(°_o)/¯ I DUNNO LOL (unregistered)
Not only is it missing FILE_NOT_FOUND, as previously mentioned, it is also missing the months of true, false, True, False, TRUE, and FALSE.

And also FAIL FAIL, FAIL FAIL, FAIL FAIL.

Re: Representative Table

2012-05-23 09:24 • by XXXXX (unregistered)
381700 in reply to 381697
Peyote `Simon` Joints:
Actually, I was born on the 11st of NULL, 2147483647 BC. This table looks fine.

It's just this kind of carelessness that shows why we should have a table of milliseconds->readable date strings.
-------------------------------------------------------------
00000000000000000000000000000000 | 1970-JAN-01 00:00:00.00000
00000000000000000000000000000001 | 1970-JAN-01 00:00:00.00001
00000000000000000000000000000002 | 1970-JAN-01 00:00:00.00002
etc.
etc.
etc.
------------------------------------------------------------

Re: Representative Table

2012-05-23 09:24 • by North Bus
381701 in reply to 381694
RuBen:
Well i can finally say I'm born T-32-198L
My goodness, what a coincidence. I just tried using a T-32-198L in a project, last week. It exploded, however.

Re: Not Oracle

2012-05-23 09:25 • by Zemm
381702 in reply to 381691
TGV:
Judging by the fact that both NULL and the empty string occur, I infer it's not Oracle. At least something is sane.


Judging by the mysql> prompt I'd say it's not Oracle also.

Re: Representative Table

2012-05-23 09:29 • by GWO (unregistered)
The real WTF is saying "none are", and not "none is". None takes singular verb forms.

Captcha: luptatum - The greatest werewolf jazz pianist of all time.

Re: Representative Table

2012-05-23 09:33 • by Nagesh (unregistered)
Probably is ain't being worse then meking code for luner calendar. When Pakistani entering burth month, often time is using Rahab or Shaban rather then May or June. Intarnationalization ain't being something to forgot.

Re: Representative Table

2012-05-23 09:34 • by dark Yuris (unregistered)
if month is purely informational and business logic does not depend on it - this is acceptable

Re: Representative Table

2012-05-23 09:37 • by renewest
381706 in reply to 381703
GWO:
The real WTF is saying "none are", and not "none is". None takes singular verb forms.

Captcha: luptatum - The greatest werewolf jazz pianist of all time.


According to this source it's a little more complicated than that.

Summary: None can be singular or plural, unless it quantifies a singular or mass noun. Don’t believe anyone who says none has to be singular because it’s a contraction of not one. Both none of the meals is and none of the meals are are okay, and both none is and none are are okay. *None of the stuff are is ungrammatical, though.

Re: Representative Table

2012-05-23 09:40 • by TroelsL (unregistered)
Why on Earth would you even have a MONTH table anyway? In case "they" decide to change them?

Re: Representative Table

2012-05-23 09:45 • by ZPedro
Oh my God, it's full of WTFs…

It's "only" "missing": brillant, FILE_NOT_FOUND, septembruary, kajillion, and NOTIONAL_MONTH_AFTER_DECEMBER_FOR_INVENTORY_RECONCILIATION.

Re: Representative Table

2012-05-23 09:48 • by justsomedudette (unregistered)
381709 in reply to 381705
dark Yuris:
if month is purely informational and business logic does not depend on it - this is acceptable
To whom? Just because it doesn't break something doesn't make it right.

Re: Representative Table

2012-05-23 09:52 • by Kolja (unregistered)
maybe the inventor of this table even came from the future and saw that they already invented the months NULL, T, C and so on and it was decided to write NOVEMBER always entirely uppercase, then the software is just future save.

Re: Representative Table

2012-05-23 09:56 • by Gyxi (unregistered)
381711 in reply to 381707
That could make sense in some cases I guess if you want to use it for joining and do not want a 'magic number' in your database. Is Month=1 January or February. A 'Month'-table could tell you.

Re: Representative Table

2012-05-23 09:57 • by Fishcake (unregistered)
So.....is TRWTF that it took 0.04 sec to run the query?

Re: Representative Table

2012-05-23 10:02 • by Silent D (unregistered)
It's also missing rows for YES and YESVEMBER.

Re: Representative Table

2012-05-23 10:04 • by anon (unregistered)
381714 in reply to 381712
Fishcake:
So.....is TRWTF that it took 0.04 sec to run the query?


Well, to be fair, someone else was running "select * from YEAR" at the same time. You really don't want to know what that table looks like, but suffice to say it slows the DB down just a little bit.

Re: Representative Table

2012-05-23 10:04 • by random generic guy (unregistered)
381715 in reply to 381708
You forgot Smarch

captcha: tego
I'm thirsty, shall we to tego?

Re: Representative Table

2012-05-23 10:04 • by Dragnslcr
It's also missing Smarch.

Edit: Damn, beat me by under a minute.

Re: Representative Table

2012-05-23 10:05 • by kbiel (unregistered)
TRWTF is that even with an extra 16 months, they probably still missed most production deadlines.

Re: Representative Table

2012-05-23 10:07 • by Jan Doggen (unregistered)
Let me guess:
- The backdoor password is 3TCA12L4PDS7
- The answer to the secret question is NO

Re: Not Oracle

2012-05-23 10:10 • by Mcoder
381719 in reply to 381691
TGV:
Judging by the fact that both NULL and the empty string occur, I infer it's not Oracle. At least something is sane.


Is it NULL or is it the string 'NULL'?

Also, is that the empty string or are there some blank spaces for padding?

Re: Not Oracle

2012-05-23 10:13 • by An Old Hacker (unregistered)
381720 in reply to 381702
Zemm:
TGV:
Judging by the fact that both NULL and the empty string occur, I infer it's not Oracle. At least something is sane.


Judging by the mysql> prompt I'd say it's not Oracle also.


Win.

Re: Representative Table

2012-05-23 10:14 • by ufmace (unregistered)
NULL has always been my favorite month of the year! The NULL rising over the horizon early in the morning, the scent of the NULL in the air, why it just can't be beat!

Re: Representative Table

2012-05-23 10:15 • by An Old Hacker (unregistered)
381722 in reply to 381714
anon:
Fishcake:
So.....is TRWTF that it took 0.04 sec to run the query?


Well, to be fair, someone else was running "select * from YEAR" at the same time. You really don't want to know what that table looks like, but suffice to say it slows the DB down just a little bit.


And... the runner-up.

Re: Representative Table

2012-05-23 10:17 • by techpaul (unregistered)
Sorry missing Floopuary...

See Dilbert for January 8th 2003 !!!

This has been a known month for so long you think they would have remembered that one

Re: Representative Table

2012-05-23 10:28 • by RichP
381724 in reply to 381712
Fishcake:
So.....is TRWTF that it took 0.04 sec to run the query?


The table was not cached in memory, so it took 0.01 sec to execute.

MySQL then took 0.03 seconds to try to determine WTF happened to corrupt the month table so horribly.

Re: Representative Table

2012-05-23 10:34 • by Brian (unregistered)
Feature Request 985823: Please add month: Febtobuary

Re: Not Oracle

2012-05-23 10:38 • by iwoas (unregistered)
381726 in reply to 381702
It may be a batch file called select.bat preceded by prompt mysql$g.

Re: Representative Table

2012-05-23 10:48 • by SB (unregistered)
Having a look up table for commonly used data is a good idea, but yeah there is some legacy data in there that needs a cleanse.

You could export this to xml and then load it in the cache of the application.

Re: Representative Table

2012-05-23 10:54 • by Toolbag (unregistered)
381729 in reply to 381707
TroelsL:
Why on Earth would you even have a MONTH table anyway? In case "they" decide to change them?

In fact, they can change.

You may not remember these old times, when the French tore down monarchy and decided to stand for a "Republic" thing. Well, they also decided to change days and months for almost 14 years.

Weeks were ten days long, months were 3 weeks long, and added 6 days to make it even with Earth rotation.

You may check "Republican Calendar" on wikipedia and laugh about how we French are lame, I grant you this right.

However, never assume months are granted :)

Re: Representative Table

2012-05-23 10:59 • by Coyne
381730 in reply to 381700
XXXXX:
Peyote `Simon` Joints:
Actually, I was born on the 11st of NULL, 2147483647 BC. This table looks fine.

It's just this kind of carelessness that shows why we should have a table of milliseconds->readable date strings.
-------------------------------------------------------------
00000000000000000000000000000000 | 1970-JAN-01 00:00:00.00000
00000000000000000000000000000001 | 1970-JAN-01 00:00:00.00001
00000000000000000000000000000002 | 1970-JAN-01 00:00:00.00002
etc.
etc.
etc.
------------------------------------------------------------


Not fine grained enough...it needs to be nanoseconds, these days. Be sure to provide for expansion to picoseconds (at least).

Re: Representative Table

2012-05-23 11:00 • by Matteo (unregistered)
TRWTF is that it's missing OCTEMBER clearly.

Captcha: luptatum: latin derivation of wolf. maybe.

Re: Representative Table

2012-05-23 11:01 • by Beorn (unregistered)
It misses Apples.

Re: Representative Table

2012-05-23 11:04 • by Jeremy (unregistered)
381733 in reply to 381700
XXXXX:
Peyote `Simon` Joints:
Actually, I was born on the 11st of NULL, 2147483647 BC. This table looks fine.

It's just this kind of carelessness that shows why we should have a table of milliseconds->readable date strings.
-------------------------------------------------------------
00000000000000000000000000000000 | 1970-JAN-01 00:00:00.00000
00000000000000000000000000000001 | 1970-JAN-01 00:00:00.00001
00000000000000000000000000000002 | 1970-JAN-01 00:00:00.00002
etc.
etc.
etc.
------------------------------------------------------------
Not a good idea. For one thing, who is going to pay people to type in all that data? For another thing, any project that large is bound to have some errors. I suggest whittling this down to just whole seconds, which would reduce the effort considerably. If you really need milliseconds somewhere, you can always interpolate.

And, while I haven't bothered to write the code, my highly experienced programmer instincts suggest there might be an opportunity for recursion in there somewhere.

Re: Representative Table

2012-05-23 11:07 • by Coyne
Up with anarchy! Define your own month! I happen to like month "Puce", personally.

Re: Representative Table

2012-05-23 11:08 • by iToad (unregistered)
Is the spiffy ASCII art formatting a feature of MySQL or -God help us-, was it embeddeded within each record in the table, so it would print out like this when queried?

Disclamer: I don't know anything about MySQL.

Re: Representative Table

2012-05-23 11:10 • by Vortico
They would have been better off using RegEx.

Re: Representative Table

2012-05-23 11:11 • by Weps
381737 in reply to 381735
28 rows in set (0.04 sec)

wow....
« PrevPage 1 | Page 2 | Page 3Next »

Add Comment