- 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
Backstory for The Insurance Plan!
Admin
there's no problem in the world that can't be fixed with hardcoded ducttape solutions!
Admin
Oh god, please use dashes instead of hyphens.
Admin
A cunning fix.
TRWTF is going into a tailspin at seeing a 2000-line file with a page of documentation at the top. That's level 1 stuff.
Admin
TRWTF is that one store in amongst a chain using a shared database system is able to make changes like this without intervention of head office. Give end users the option and eventually someone will click it, no matter how bad the consequences. Why do stores even need it in the first place?
Admin
I like how he uses contains and not equals to check the category name. Of all the countless ways this fix is bad, at least if they change the category name to "ALCOHOLOL" they're safe!
Admin
No doubt, 2000 lines is common :) . I got a 45,000 line class file with around 1200 methods, all of which were named like
Project_Web_Admin_AddUser_btnSaveClick ..... Project_Backend_ProductCategories_Calculations_SumTotals
would have been soooooooooooo easy to even write a processor that would have broken it up into folders, namespaces and individual class files, but someone else was primarily in charge, and we were sunsetting it
Admin
TRWTF is this line:
"She obviously still had her cellphone handy"
Because in Germany 'a cellphone' is called 'a handy' (whoever came up with that idea didn't have the slightest grasp of the english language, I think). So for me, this reads like "She obviously still had her cellphone cellphone". Or maybe "her handy handy"? Or better yet, she had her handy cellphone?
Admin
Given the context, the fact that those 2 items were special cased isn't all that bad, but TRWTF is that he didn't add a comment explaining WHY he special cased them.
Admin
Hannes,
the fact that you are misunderstanding this sentence is not a failure the author made. In german the sentence makes sense at all.
Directly translated it ends in: "Sie hatte ihr Mobiltelefon offensichtlich trotzdem griffbereit,..."
Admin
And this is how you become part of the problem instead of the solution.
Admin
Considering the known conditions: pressure to fix, time til next release, not knowing the code I consider this a damn good contribution.
Admin
2000 lines is nothing, I once started a gig in the mid 90's and their mac client was built in 1 single .c file, 29,000 lines long, with a single main event loop function that was 14,000 lines long, indented so far in the middle you had a paginate sideways just to see text. The dev tool (Codewarrior) could barely manage edits at the end of the file.
Admin
In fairness, this was throwaway code for which a replacement was due quite soon.
Admin
Will be released in 3 weeks? DON'T BELIEVE IT. Not until it's up, running, and accepted. Some projects are perpetually N weeks away from release ... they'll be N weeks away from release many months from now, too. Chances are that this fix will cause some poor coder to commit suicide a year from now...
And the worst part of it is that Stuart, may he be flogged to within an inch of his life for his sins, hasn't left a comment explaining to the poor future SOB exactly what the hell is going on, and why these particular hard-coded values are in here. If you've got to do it, and sometimes you do, ALWAYS leave a comment!!!
Admin
TRWTF is Miranda thinking she has to go to the "mandatory" circle-jerk.
"No, I'm going to fix the problem that is currently bringing our business to a halt. Or maybe find a different job. Not sure yet."
Admin
Actually, you can now by beer and wine in some Wawas, Sheetzs, and Turkey Hills in PA. Some supermarkets have been approved to sell beer and wine without a restaurant as well. And there are some laws around being able to sell PA beer, wine, and liquor with a limited or production liquor license.
Admin
... didn't need to. A fix was coming in ~3 weeks. ;-) ;-) (nod, nod)
Admin
You may be confused, as "handy" is not just a German word. In English it means to have something within easy reach, i.e. it is convenient to access.
Admin
I have "faith" in his hacky fix.
Admin
While in NJ, you can't even pump your own gas, let alone buy any scrap of ethanol in anything except a liquor store or restaurant.
Admin
Mandatory Company Fun Day is mandatory. Failure to attend will result in termination.
You really think Miranda had a choice?
Admin
No, they said "no excuses." Probably because somebody had already tried causing a crisis to get themselves out of the circlejerk.
Admin
Any company where your manager responds to "I need to skip out on the team building exercise to fix this problem in production" with "no, attend the team building exercise and get the contractor who isn't part of the team to do it for you instead" is a company you should start thinking about extricating yourself from.
I mean, I've seen it. And part of the reason that consultants tell them that they need to have "team building" exercises that become "mandatory team building exercises" is generally because management is highly dysfunctional, but nobody on the consulting team is getting paid for telling them that the real problem is with the managers.
Admin
TRWTF is for Miranda to rope in Stuart before going to that team building event. NO! That's a rookie mistake to make. The way to do it is to just go to the team building excercise event as requested and calmly let the bomb blow up. THEN, you explain that you couldn't fix the company's money-making machine for days due to that specific event that corporate had made strictly mandatory without exceptions. Let corporate justify this. This will be extremely hard for corporate to do, because they can only show some vague principles for it that are abstract and thus difficult to grasp, whereas the fact that all the points of sale in the country can't sell anything for days is very specific, very costly and very easy to grasp. The powers will flatly blame corporate. Goodbye, stupid mandatory excercise, not just for now, but forever.
Admin
Oh, pure naive Peter! The manager will quickly respond demanding to stop inventing excuses when your job is to get critical things fixed. What do you mean, "I was at a mandatory meeting elsewhere" -- you ALSO have to fix this! No I don't know how, it's up to you, I value creativity. You just don't have good team spirit built... and not doind your job!!!
Admin
While the exact scenario isn't familiar, a client of ours is a major gas station chain with similar shenanigans-y processes, so this is hitting close to home. ;)
Related-ish anecdote: I once had to write a SQL procedure that converted some source system's Store table into a sane, normalized(-ish) format for our data warehouse (and keep full history, w/versioning, and all that data warehousing jazz). Part of this involved converting the Store table's "Alcohol" field (a VARCHAR that had values like "Beer", "Beer / Wine", etc.) into a series of BIT columns. Blah blah, design, whatever.
The Minor WTF: the Alcohol field was presumably manually-keyed in, because one particular store allegedly sold "Bear Wine." There is still a line of SQL in our production system that sets the "Beer" flag to 1 if the source table's Alcohol column contains either "Beer" or "Bear".
It's far from the worst thing I've had to write, but it makes for a fun story. Or maybe TRWTF is there's a convenience store somewhere that sells bears. Hard to tell these days.
Admin
The "solution" indicated was what is called a "field expedient". The bigger problem is that this "field expedient" will become the normal course of action for probably the lifetime of the application.
"OK, what is so special about store 924", I can hear it now.
Admin
Somewhat related story from my consulting days (i.e. related to the "mandatory team building" stuff)...
I started consulting for a company as temporary replacement for an employee on maternity leave. Second day on the job my immediate boss came in and announced that everyone had to attend the mandatory weekly meeting in 10 min. Apparently this was an eye-rolling affair that went on for 3-4 hours some weeks as everyone was expected to participate in the process.
I told the boss I would be happy to attend, as they were paying me by the hour and 4 hours of drinking coffee and eating donuts at their expense sounded just fine to me. I think my words were "sure, I don't mind drinking coffee and eating donuts for 4 hours on your dime. Or, I could just stay here and work on what you are paying me to do."
I was immediately excused from that and all subsequent meetings.
The best part? It was a lovely, quiet 4 hours to concentrate on actual work. Best 4 hours of the work week!!!
Admin
Wow, and I thought my 10000 line class was bad...that's at the point where the Java compiler I was using in 2000 would break, the compiler would report that the errors were taking place one line above the actual error in the code.
Admin
This. I had a contract once where I was never told that these outings were mandatory. One of my days stuck babysitting the clusterfuck (they called it "triage" - aptly named in retrospect) fell on the day of a company picnic. The decision was an easy one because A) contractors weren't paid for this time and B) I needed a break from the high school cafeteria mentality of the lunch room anyway. Of course, three to four weeks later, I'm suddenly "not a team player." So while I agree with Peter's suggesting to just let it crash without roping in "Stuart," "Miranda" absolutely should be planning an exit strategy because blame will be shifted down to her eventually.
Admin
Nice!
Admin
"Handy" is just a loanword derived from cellphones being handy telephones. It's not really a German word at all. Much like Japan, Germany has a lot of weird loanwords thanks to American occupation.
Admin
"Handy" and "a handy" are quite different ideas entirely.
I expected 50 comments demanding to BRING BACK MANDATORY FUN DAY!
Admin
Forgot the part where the entire fix is broken three years down the line when store 924's state repeals the blue laws regarding alcohol sales.
Admin
oh yeah? stored procedure, 45,000 lines, multiple nested cursors.
Admin
Mmmmm, Dresser-Wayne 4-line LCD CAT. I used to program code to talk to those things, back in the days when real men still wrote code in assembly language. I still even have a few ROM dumps somewhere. I don't think anyone ever used those things in 4-line mode, because 2 lines had kind of become standard. They were also the best for desk work, since the terminal part comes out separately.
Our best WTF was an IPC message format that used 0xFF for field separators. We literally trashed Ethernet cards when they had an 0xFF in the MAC, never mind that the MAC was always the last field in the message that had it. But that was over on the PC side, in someone's VB6 code. I was writing glorious 6809 assembly language. If you ever get a gas pump receipt with a 4-digit number labeled TRACE, that's probably descended from the code I worked on. (it's the temporary internal transaction ID for the system)
QR codes? Fucking millennials. We had support for a good old 1D barcode scanner in the terminal, and it worked great for receipt-printed coupons.
Admin
let him who is without sin cast the first stone
Admin
I was responding to someone who I understood had understood "handy" in its German interpretation, so I was speaking from that viewpoint.
Or were you just being pedantic? Yes, it's a loanword, but it's still part of the German language. It's the word used in German to describe a cellphone, mobile phone, et cetera. Is there any more appropriate German word for such a thing? In fact, by that logic, aren't most words in English not actually English words, because most of them are loanwords from other European languages?
Admin
Herr Hannes, Sie sind ein Trottel :)
Admin
This also means that ANYONE can just delete EVERYTHING in the DB
Admin
There is always the possibility that Miranda was really, really, really looking forward to attending her Mandatory Fun Day, but knew how desperately sad and uncool she would sound expressing delight about dumping a tedious and irksome maintenance / bugfix task upon her poor sap of an underling and swanning off on a jolly that involves things like making up limericks about her cow-orkers, competing in tasks to transport something amusing and pointless from one place to another with arbitrary and idiotic constraints, and playing blind-man's-buff in the buff. Lemme tell you, I used to love that sort of free day off, when it was all so fun and cool and fashionable.
Admin
let her who is without sin use cos instead
Admin
In code that is going to be phased out in three weeks?
Admin
In code that is planned to be phased out in three weeks but might not be.
Admin
More like let he who is without sin use -d/dx(cos(x)) instead
Admin
Furry trash.
Admin
Funny coming back after such a long time. But I just want to hand out some "woooosh"es to everyone who replied to me.
Yes, I know what that sentence "she had her cellphone handy" means. I just thought it was funny that "cellphone" translates to "Handy" in german. That's all.
Admin
Fast-forward to 2037. The pressure's on to make all company software compatible with the Unix epoch workaround before January, 2038 rolls around. And some HPC stares at the screen and says, "What the hell is this about store 924?"