- 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
Wow...I have nothing at all to say...
Admin
This makes my brain cry.
Admin
I see a lot of questions, but no answers.
Admin
SELECT wtf FROM tdwtf WHERE tdwtf.fun > 0
Admin
Against my better judgment, I browsed the code last night to a random file and read about the life of a coder not yet born, who would resurrect Visual Basic and visit horrors on the world without equal in history or myth. I believed every line. I have resolved to destroy the thing before allowing it to become an instrument of WTF.
(Props to anybody who gets the reference.)
Admin
Now this is a real WTF.
Admin
Admin
Admin
Nice try, but it's from a computer game called Myth II.
Admin
In other words, a swing and a myth?
Admin
Ladies and gentlemen, we've found it:
The Client-Side Stored Procedure!
Niiiice!
Admin
Dat ith tho thad.
Admin
Hah! This is just part of Bethesda trying to plant references to the word "Scrolls" referring to their games all over the internet to assist them in their trademark lawsuit against Mojang. No one calls it Elder Scrolls. They call it Daggerfall, Morrowind, or Oblivion or whatever. Nice try, Bethesda.
That, of course, is TRWTF :)
Admin
This is one reson for having defect preventon mtgs every week. If you have them, you will reduse eror in code.
Admin
There's your problem... you're looking at the wrong file.
Admin
I didn't get my money's worth.
Admin
"Elder Scrolls"? Entirely the wrong setting: It should have been "Lord of the Rings".
C'mon, you know the phrase: "And one [summoner] to rule them all."
Admin
Admin
Admin
Also, they clearly should have used enums where the SQL query was in the DescriptionAttribute for each enum... this post is bait
Admin
It is an exact description of this code's nature and behavior.
Admin
Why is everybody jumping on the management? They did exactly what they are supposed to do: Get the value for money for everything they spend. And it was not a bad deal IMO. They got Client Side Stored Procedures! So what if the app didn't do what it was supposed to? It did something else way much more awesomely.
Admin
People like this need to be shot in the face with a hammer. I'm so sick of having to deal with slop like this at almost every job I've had in the five-or-so years I've been a software developer. It seems hardly anybody ever takes a step back and thinks "Hm... there has got to be a better/easier way of doing X, let me take the time to find out".
Are we all that spineless to tell some uppity manager that Feature X will take an extra day or two in order to make sure that it won't collapse after a little while? Are managers that stupid to not understand the difference between short-term and long-term, and that long-term is what really matters for a business? That's freaking Business 101.
Admin
The real WTF is that the constants are all lowercase
Admin
I would say maybe the "developer" was a Ruby/Python fan (more so Ruby where the convention is_to_use_underscores) except:
Admin
Also, this is unfortunately the norm, at least from what I've seen at every new place I have worked (and currently work). The best thing to do is to not to try to be a hero. Just make sure all your new code is well written, and you should be alright... Unless you're maintaining it, then your basically fucked and we'll all pray for you.
Admin
I'm guessing their flagship web application crashed because the following query was executed:
SELECT username FROM users WHERE username = '';drop table users;--'
Admin
Not trolling, just tired of morons that can't see the forest through the trees. I've met and worked for so many people that IMHO shouldn't be allowed to run businesses at all since they have no sense of direction, no long-term goals and no idea of the concepts of long-term vs. short-term. It's rather disheartening, honestly. I'm not even a business major and I understand these things, presumably better than people who actually OWN businesses.
Admin
Bobby Tables, anyone?
Admin
Sigh. Managers don't understand, nor do they care to, the differences between "good code" and "bad code". They shouldn't have to; they just need to care about the bottom line. So if implementing some feature means that another feature should be fixed first, then just tell them the time it would take you to do so, without telling them the details. Do what you can within reason, and work toward your "perfect code" in pieces. Anything else is begging for an ulcer.
Admin
internal static string loadQueryString(string constName) { string myQuery = ""; switch (constName) { case "check_user_exists": myQuery = check_user_exists; break; case "get_user_record": myQuery = get_user_record; break; case "get_user_count": myQuery = get_user_count; break; // and 200+ more default: myQuery = constName; break; } return myQuery; }
FTFY
Admin
That is what I do. What boggles the mind is how somebody can't understand things put in plain terms: Not "good code" and "bad code" but more like "If we take x longer, we can easily add features in the future and have better maintenance" and "If we crank it out immediately, new features are going to be very hard to add and the application is going to be very poor longterm." Again, I'm not a business major but that seems like a cut-and-dried approach, yet most managers will choose the second option instead of the first.
Admin
loadQueryString() isn't enterprisey enough...
Obviously, the queries shouldn't be stored as const strings, but rather should be obtained from an SQL database with something like:
Admin
"I can spend time and money now to save even more time and money in the future. Or... I can look like a hero by saving time and money now and let the next guy worry about the higher cost down the road."
Admin
Having said that, there is a balance you want to maintain between over-engineering something that likely will never happen (or isn't worth the up-front development cost/time) vs. the "git 'er done" attitude which has the dendency to produce shit code.
Admin
I speek with my manger and he tell me it is more important to meke delivery of project before time. Noting else maters.
Admin
I call shenanigans, there is a comment in the code
Admin
Admin
Admin
Admin
Admin
Sounds like standard operating procedure of a typical terribad India code sweatshop.
Admin
SQL Injection dream
Admin
Admin
Admin
Admin
Better still, the Summoner in Chaucer's Canterbury Tales who IIRC was a syphilitic pederast. And of course his buddy the Pardoner, who "I believe was a gelding or a mare". Perhaps it was they who programmed this - but then again, back in the 14th Century they would have used FORTRAN.
Admin
Clearly a new meaning of FTFY, since all you've done is take stupid code and turned it into completely non-functional code.
Admin
Admin