- 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 would believe this is C#.
Admin
COUNT(*) could be better yet ....use COUNT(1) instead...
Admin
(oooh - did someone just call Oracle a real database? Burn the heretic!)
Admin
Even better, the "That Mitchel and Webb Look" version
In a company headed for oblivion with a revolving door for the hapless and hopeless, who is left to uphold the truth and fix the cock-ups of the last tosser who got the sack?
It's the SURPRISING ADVENTURES OF SIR SIMON CHICKEN-CAESAR!
Addendum (2008-03-29 00:03): My apologies to Mr. Mitchell
Admin
With Jed ? Never.
Admin
It's interesting that the guy apparently didn't like arrays yet used an array to store the returned data from the sql query when he could have just stored the returned COUNT() as an int.
Admin
I'm sick of all you CS snobs with your "iterations" and your "arrays" ... everybody knows that structured programming is dead. Get over it.
;-)
Admin
When does it hit that if it ran in 3 seconds afterward, its a given that he didn't pull the whole table anymore.
Admin
The C++ way would be to use templates. plus the wondrous ## abilities of the pre-processor.
Obviously.
Admin
pfft...that looks like excel code to me.
Admin
Well, I agree that abbreviating things is not always the best solution. That's why I would just use function calls instead of macros and templates, and write:
out( "" + getTotals("Company1",11,2003) + "" ); out( "" + getTotals("Company2",11,2003) + "" ); out( "" + getTotals("Company3",11,2003) + "" ); ...
, and then listen to my coworkers complain about density and complexity of my code. I understand that this code is much harder to get into, but once you do it's much easier to maintain. All you have to realize is that because of the repetition this code is not as complex as it seems. To understand what's happening you only need to interpret the first line, and then diff it in your mind with other lines. Our brains are suprisingly good at diff:ing things, but nobody seems to use it. :)
Admin
Can we try that again with a list-comprehension?
Admin
Is there no-one else out there who is a fan of Grandaddy and thought of Jed the robot from The Sophtware Slump?
Admin
//Comment about Irish Girl
Admin
Admin
Where's the WTF? The guy wrote an honest bunch of code that works, without resorting to some fancy workarounds for lazy programmers...
(That's the usual argument in my company when WTFs like this are exposed...)
Admin
Admin
I totally believe this, only the code does not work and the subset that works has horrible performance. I look forward to seeing some WTFs written by your non-lazy coworkers.
Good point. We have to give him credit for that. Admittedly, that's like giving Charles Manson credit for lawful parking, but, hey, it's better than nothing.
Admin
Admin
When your productivity is measured by how many lines of code you produce in a day, this is a good method for being more productive then your co-workers. If I got paid $1 per line of code, I'd never use loops or arrays! I'd hope to get assignments like: "sort this list of 100 elements!" and my answer would be "Manual Bubble sort!!" cha-ching!
Admin
And for sure it's not the same Jed as John E. Davis, i.e. the author of the JED text editor (and slrn, etc.)
Admin
That impression is very ... impressive :)