- 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 just found this section in a project I am working on. I guess using yes instead of true does save a keystroke but you know someone will set yes = false somewhere.
if (employeeID > 0) { bool yes = true; CaseDRODataRequest result = new CaseDRODataRequest();
} else return null;
Admin
And there ladies and gentlemen, is the real WTF. A developer who didnt bother taking the time to build a maintenance screen and would rather submit to the DBA a simple DATA change. Not a table change, or SP change, but data. WTF indeed.
Admin
You seem to work for small to medium companies only. In the real world of big companies (1000+ employees) you may NOT have:
This list is not exhaustive. The situation can be so bad that you might ask yourself why you go to that place for "work", as there is not a lot you can do. Intranet is not allowed (security), VB6 is not allowed, nor Access, nor Java nor who knows what. And so on, and so on.
So, before accusing people of being lazy or stupid, grab your own nose first and ask yourself if you really know all and everything about the business world outsidfe there.
Admin
This sounds ... familiar. While I convinced my boss on putting most of the "not-so-constant constants" on the DB, he did. But some other constants are defined in an interface, and not all of them are properly named.
I've found some useful, like ACTIVE_STATE, some typos (DATA_SORUCE), and the best gems being something like this:
public String AFOX = "AFOX";
Please note that the whole idea of having these constant stuff is to minimize rewrites in case the "magic codes" change. Which might lead us to:
public String AFOX = "OMFG";
Nice.
Admin
This post is ABOUT the grue.
Admin
I hope this is a joke and or bait, even if it is I'm going to byte nom nom.
Ummmm first off compile time constants for variable data? WTF! What is wrong with an XML shudder or flat text file and then sending sighup to your process (or have it pole for modification time on the file) and have it get all that stuff at runtime.... you know so minimum of downtime etc. Or if you are in .NET what is wrong with using something like SQLite I'm sure there must be a built in class for dealing with it? It's this kind of thinking that leads to this kind of WTF.
SCENE: Friday afternoon after a pub lunch.
MOTIVATION: Office politics knee jerk reaction - They wont let me do what I want without waiting for someone else (I'm losing control of my "workflow"), I will stomp my feet and do something reactionary without thinking so that it's faster and easier for me, screw the consequences.
CUE: WTF
Admin
Classy
(I might try it myself :P)
Admin
Therefore a > b reads as "a is greater than b".
Now, who's seen my banjo?
Admin
You start with the database, then write constants files? How very old-fashioned.
Admin
Congratulations, you have discovered the dumbest thing I've seen all week.
Admin
not true! that never happened! suck thumb
Admin
It also helps out in case at some point some crazy math genius comes up with a proof that 14 is actually 18.
While everyone else scrambles to catch up with this major revelation, these guys will be set.
They won't have to go through all of the code changing >= 14 to >= 18, instead just change public static String _GREATER_THAN_OR_EQUAL14 = ">=14"; to public static String _GREATER_THAN_OR_EQUAL14 = ">=18";
Admin
Shhh this person is sitting right behind me and calls himself "The team lead."
Admin
class _1641 ....
lol ...
Long time ago I saw C code like this: #define CLASS class #define IF if
...
Admin
kick the "team leader" into his ass ... ;-)
Admin
It is well-lit. You are likely to be eaten by an eurg.