| « Prev | Page 1 | Page 2 | Page 3 | Next » |
|
select 'FRIST' as FRIST
|
|
I would find the management attitude intoletartable.
|
|
Captcha: toletarting
No way!! |
|
Can't wait to see how he validates email addresses.
|
Looks like using proper grammer was something he did NOT overdo |
|
How in the world would this run the same as real code? Maybe they just don't care about performance.
Uh oh... the database server is down, can't do any more date/time functions. |
|
OMG. When does the hurting stop?
|
Re: Slightly OverSQL'd
2009-11-04 09:24
•
by
Roxanne
(unregistered)
|
Yeah, that's an alternate spelling of "tarting up". As in, "tarting up the code". Putting on red lipstick and dark eye makeup, spraying on gallons of cheap perfume, squeezing into a tight skimpy outfit. Apparently, tarted up code is very popular with management. |
Re: Slightly OverSQL'd
2009-11-04 09:24
•
by
Nice try
(unregistered)
|
What's grammer? Is it anything like grammar? throw new TooManyLayersOfPedantryException |
Re: Slightly OverSQL'd
2009-11-04 09:24
•
by
Ouch!
(unregistered)
|
To pick a nit: It's a matter of spelling, not grammar. And you've slipped in a typo, too. |
Re: Slightly OverSQL'd
2009-11-04 09:31
•
by
tim
(unregistered)
|
throw new TooManyLayersOfPedantryException ..........................................^ Error at line 1 col 43: ";" expected |
Re: Slightly OverSQL'd
2009-11-04 09:32
•
by
My Name?
(unregistered)
|
You obviously have not yet seen their 'real-code'. |
Re: Slightly OverSQL'd
2009-11-04 09:36
•
by
anon
(unregistered)
|
Seriously, how can you even type that? |
Re: Slightly OverSQL'd
2009-11-04 09:37
•
by
highphilosopher
(unregistered)
|
So you're saying (to quote a previous day's commenter)... Management likes their code the way they like their women... 12 years old, undocumented, and apparently tarted up??? |
Re: Slightly OverSQL'd
2009-11-04 09:38
•
by
Swa
(unregistered)
|
maybe their business logic or UI layer is so fucking bloated that the additional latency of throwing this snippet at a SQL server can be neglected? this, of course, will only be valid until the SQL server runs into performance issues. as for you database down comment? chances are you can't do jack shit in their app if the database is down anyway. Captcha: vereor: truer than the truth. |
|
Sadly, I am all too familiar with applications that use SQL to do string parsing, complex mathematics, etc.
|
|
If you have a hammer, everything looks like a nail...
|
|
At least he used parameters instead of concatenating it
|
|
Note: I submit all of my comments with grammar and spell check options disabled.
Is it a form of recursion when someone points out a grammar or spelling error in a post when their replying post also has a spelling or grammar error? |
i think you mean hammar (when in rome..) |
|
C'mon... you made that up. Or maybe this guy is an abstract/surreal artist who likes to add "flavor" to his code.
But I think you made that up. Its too bizarre, even for TheDailyWTF. |
|
Why? Without any sarcasm I'ld be very interested in his/her motivation.
|
Re: Slightly OverSQL'd
2009-11-04 09:51
•
by
Jim
(unregistered)
|
|
Don't worry it won't even IF(DATE(?) <= DATE(?)
|
|
bool FirstIsLowerOrEqual (int i1, int i2)
{ std::string test = "if [ $i1 -le $i2 ]; then echo first; else echo second; fi"; std::ostringstream cmd; cmd << "i1=" << i1 << "; i2=" << i2 << ";" + test; return ! system ("test `ssh some.where /bin/sh -c '" + cmd.str() + "` == first"); } |
Ah, but Hamar is in Norway, not Italy... |
FTFY |
Muphry's Law. |
Re: Slightly OverSQL'd
2009-11-04 10:07
•
by
Brian
(unregistered)
|
I don't know. You tell me. Someone is singular, thus the pronoun referring to someone should be singular as well, such as his, her, or his/her. |
|
intoletartarance- adverse reaction to the gluten contained in dessert pastries.
No, I didn't have anything to add to TFWTF. |
|
Awesome, I might use this pattern to farm out all our mathematical routines to the database. Databases do maths, don't they?
PS. Not a word about "maths", OK? I'm English, you're American, get over it already. |
Re: Slightly OverSQL'd
2009-11-04 10:20
•
by
methinks
(unregistered)
|
"grammEr"? Well well well, if this is not a classic (or rather clbuttic) case of Muphry's Law ( http://en.wikipedia.org/wiki/Muphry's_law ) (do not confuse with Murphy's Law!) ;oP With regards to content, however, you are correct - dude can't spell "too" or can't tell the difference between "to" and "too"... What he needed, was a proper crammer (what you probably meant in the first place ;o)) |
Re: Slightly OverSQL'd
2009-11-04 10:20
•
by
Peter
(unregistered)
|
Or you can use the widely-accepted (albeit sometimes deprecated) convention of using "their" as a neuter singular adjective or determiner (not pronoun). |
|
I wish I could say I hadn't seen that kind of code before, unfortunately I can't; I have found many examples of it in code written by my predecessor. Usually he wanted to compare two dates; as far as I can tell it never occurred to him that .NET might be able to handle that itself perfectly well.
|
Re: Slightly OverSQL'd
2009-11-04 10:24
•
by
methinks
(unregistered)
|
No. Error at line 1 col 43: "(" expected
|
Re: Slightly OverSQL'd
2009-11-04 10:26
•
by
My Name?
(unregistered)
|
Error: You haved commented off topick! SCNR |
|
Termination date is way too late.
|
|
At least he knows how to use PreparedStatement!
It would have been even more hilarious if this piece of code would be written by concatenating pieces of SQL, making it potentially vulnerable to SQL injection attacks. |
|
I can relate
|
|
Awful, just awful!
He didn't even use a stored procedure! |
Actually I had a good laugh at the first version, as it was formatted like
Then I started to wonder how you can have more than one layer of pee... |
Re: Slightly OverSQL'd
2009-11-04 10:41
•
by
SR
(unregistered)
|
Stored procedures are not the answer. Stored procedures are the question. The answer is "No". Please ignore any grammer errors in this commentent. |
Re: Slightly OverSQL'd
2009-11-04 10:42
•
by
Manager who uses too much time developing instead of managing
(unregistered)
|
When you got a hammer, everything is a nail my friend. |
Re: Slightly OverSQL'd
2009-11-04 10:42
•
by
SR
(unregistered)
|
Many layers of yellow snow? |
Re: Slightly OverSQL'd
2009-11-04 10:50
•
by
Laws Murphy
(unregistered)
|
Only if he hasn't gone a Viking! |
Re: Slightly OverSQL'd
2009-11-04 11:05
•
by
Foo
(unregistered)
|
sounds like fun.. i could use some good village pillaging to improve my mood |
FTFY. |
Re: Slightly OverSQL'd
2009-11-04 11:43
•
by
anonymous
(unregistered)
|
|
why! for the love of god why!
|
Re: Slightly OverSQL'd
2009-11-04 12:06
•
by
rulez
(unregistered)
|
Apparently this implementation was a trade-off towards his Nazi Java colleagues. |
Re: Slightly OverSQL'd
2009-11-04 12:12
•
by
adiener
(unregistered)
|
Nice, but you have an unterminated single quote in there. |
| « Prev | Page 1 | Page 2 | Page 3 | Next » |