• moe (unregistered)

    OMG. This post reminds me of two quotes:

    "He can compress the most words into the smallest idea of any man I know." - Abraham Lincoln (1809-1865)

    "When ideas fail, words come in very handy." - Goethe (1749-1832)


    captcha: poindexter - aka the post author's REAL name

  • moe (unregistered)

    oh yea, and I forgot ...

    FIFTY-FIST!!!!!!!

    captcha: muhahaha ... weird, i was just thinking that exact word .... this captcha thing is psychic

  • Inspired (unregistered) in reply to brian

    I am Sam, Yes, Sam I am, I code all day, To get my pay

    The code I write, Is urban blight It should not be, Because, you see...

    They want it fast, But hacks won't last, They say: outsource, In sad discourse...

    They get it fast, It doesn't last, Fix it they say, Do it the right way...

    I know best, Said the PHB, More than the rest, As you can see...

    So now it's done, With lots of luck, We cross our fingers, Saying What the fuck?

  • andy brons (unregistered) in reply to oGMo
    oGMo:
    We don't all write bad code. You may write bad code, and all the people you know may write bad code. But quite a few of us also write good code. And we don't just read this site to laugh... we read it to commiserate over the crap we have to deal with from people who are writing the crap code (or being crap managers, or doing whatever job they do so badly that it's absurd).

    If you're writing crap code, go find another job.

    hahahahahahahahahahahahahahaha

  • Eam (unregistered)
    JEFF!:
    If you're reading this, you probably don't need our help.
    You obviously don't read the comments here very often.
  • snoofle (unregistered) in reply to Eam
    Eam:
    JEFF!:
    If you're reading this, you probably don't need our help.
    You obviously don't read the comments here very often.
    Perhaps WTF coders are so used to omitting comments that they just spout off without even bothering to read the comments...
  • Cornered (unregistered) in reply to snoofle
    snoofle:
    In general, there is no recognition of "good software." There is only "finished" and "not finished."
    W. H. Auden said "A poem is never finished, only abandoned." I feel that way about my code.
  • BitBabe (unregistered) in reply to brian

    As someone who is a only a few years out of college myself, I see the problem in several main points:

    1. The opinion to the world (and many pointy hair bosses) that a "Software Developer" can develop "software" (ambiguous, eh?) - not realizing that is as big of a field as medicine. Doctor's aren't expected to be heart surgeons, brain surgeons, and pediatrics all at once! So why do we expect someone to write an embedded program, good SQL and web applet coding? I can write some kick ass c++, but ask me to write a complex SQL program and my code would look like half of these WTF's too!

    2. Fortunetly, most of the companies I applied for made all applicants take a test before even going on to the interview status - this should be a mandatory thing! Unfortunetly, we just hired my "replacement" (as I'm being promoted), and don't test - and no surprise, though his resume looked good, his English is terrible and he knows nothing (I have NO idea how he got a CS degree).

    3. The lack of training in a particular job to new employees. I was fortunate in my particular job to be put in a group with Senior Developers who taught me everything I know (yes, I have a CS degree, but in reality, that didn't teach much about real programming - OTJ training is EVERYTHING). However, I have interviewed for (and offered positions for) entry level jobs that I honestly told them in the interview I knew nothing about (Oracle, PHP, etc.), and asked, "Would I have a lead or someone to help me out while I learn"? Response came back, "Well we don't have anyone with time to do that, but you'll figure it out." Ok, I'm flattered, but then why are you offering me a job? Cr@p code, here we come...

    captcha: pinball - a game that can fascinate me for hours!

  • Alex Brown (unregistered)

    Looking around, I see poorly designed buildings, bad fashion choices, inefficient cars, bad music, bad TV shows, bad movies and corrupt politicians. Exactly why is the bad code surprising?

  • (cs) in reply to Alex Brown

    90% of everything is crud. -- Sturgeon's Revelation.

  • BitBabe (unregistered) in reply to BitBabe

    I suppose I should also add to #3 - you are probably asking "If you know nothing about this subjects, why are you applying for a job in them?"... My response is, I have tried to self teach myself, and know enough to write some fabulous examples that could be on this site. However, I am still learning and would love the OTJ training from some people who do know know what they are doing... like an "apprenticeship" like a former poster mentioned...

    captcha: bathe - something a few of my coworkers ought to do more often!

  • BitBabe (unregistered) in reply to BitBabe

    I suppose I should also add to #3 - you are probably asking "If you know nothing about these subjects, why are you applying for a job in them?"... My response is, I have tried to self teach myself, and know enough to write some fabulous examples that could be on this site. However, I am still learning and would love the OTJ training from some people who do know know what they are doing... like an "apprenticeship" like a former poster mentioned...

    captcha: bathe - something a few of my coworkers ought to do more often!

  • (cs) in reply to Gsquared
    Gsquared:
    In very few coding situations will a simple mistake result in loss of human life.

    If a doctor makes a mistake, it's very possible for someone to die. (How easy do you think it would be to accidentally put someone on a blood thinning agent who routinely uses aspirin for headaches? How does that mistake compare to using "=" for both assignment and comparison?)

    I write software that manages order sets for hospitals. If I get it wrong, then someone does get 300 grams rather than 300 milligrams of something. This can cause loss of life.

    Gsquared:
    If the architect of a large building makes a mistake, it's possible for hundreds of people to die when the building catches fire or collapses. How does that compare "select * from largetable1, largetable2" causing your network to suffer from bandwidth problems?

    And what of you are the one writing the CAD software that they rely on to build these buildings? Make one mistake and the whole thing comes down once it is actually built.

    Gsquared:
    Keep in mind also that doctors and lawyers and such have to spend a huge percentage of their income on various versions of malpractice insurance. <snip> (These were not doctors who messed up, they were doctors who paid higher insurance rates to cover the legal costs of other doctors who did mess up. That, after all, is what insurance is.)
    Read my first statement. It could have been the software and not the doctor that screwed up. In our field we are protected from the real world affects of our mistakes fairly often because the users end up taking the fall for it.

    For every argument there is a counter. Until software companies are held accountable for the software they produce they will not hire people with the credentials to write that software. Even with that, the credentials really don't mean much in a field that changes as fast as ours does.

    On the other hand, if software companies are held accountable, then they will pass that accountability down to us, the developers of that system. Ultimately we suffer, because we may have protested a decision but we were required to do it the way the company wanted. This could even be under the idea of "well that isn't our intended use so it won't be a problem" kind of issue until three years later that is the use it is put to. Things are so far out of our hands we have no way to be accountable.

  • htg (unregistered)

    Coming late to this discussion, so sorry if it is repeated ...

    "The only difference between us and them, in fact, is that we know when we're writing bad code."

    and some of us will write something like:

    // TODO: This is a hack, really we should twiddle the frongle and twizzle the schnarfff

    or

    // TODO: Hardcoded text string, should have these in a language file

    or

    /*

    • For the love of god don't use this code as a pattern in the future, I only had
    • 2 hours to implement this application so sue me for having unoptimised basic
    • code okay? */

    But many of the WTFs posted here are actually code that we would not write (well, those of us with a clue!). Failure to understand a platform's API for example (the typical .NET and Java WTFs) or Web Designer turned ASP/PHP/JavaScript coder horror. That doesn't stop the nameVariableMessupOf people though. Like that removeNumeric() that removed non-numeric. Argh. KILLLLLLL!!! Exterminate, Annihilate, Destroy!

    Now I'm going down the pub.

  • YodaYid (unregistered)

    Sometimes bad code comes into existence because of moving targets in a project. Any sort of major change can result in last minute hacks and convoluted glue code to get an almost working project out the door. Sometimes requirements change. I can't count the number of times I've worked on something as per a client's detailed instructions, and then the client said "Hmmm - now that I'm seeing it I don't like it." And you don't want to have wasted all that time (and now you just want to get the damn thing done), so you reuse what you have, possibly improperly. Whenever time is a constraint, there's a good chance even a good coder will do something regrettable but necessary. And there's a very good chance a mediocre programmer will do something awful.

  • YodaYid (unregistered) in reply to KattMan

    KattMan: Excellent points, but for most of us, the worst that can happen is lost revenue (for some of us, it could be a tremendous amount of lost revenue).

    I would absolutely say that for applications where people's lives are at stake, only the best, most disciplined, and most focused developers be allowed to work on them.

  • AndrewB (unregistered)

    I pretty much have to disagree with the major premise of this writeup. Yes, we all write code that is far from optimized. In fact, it would probably to be fair to say that the majority of our code is a fair distance away from an optimal solution. Our software is usually inefficient, our code usually repeated somewhere else, and our algorithms usually broken in some non-obvious way.

    But I've visited this site for 2 years or so, and there is simply no way that I would ever write any code remotely close to the sheer awfulness of what we see day-in-day-out on this site.

    There is a very clear divide between programmers featured in the code posted on this site, and the programmers who frequent the site: They don't have the logical thought process required to be a half-decent programmer. We do.

    So the premise of "We can laugh, but our own code is probably not much better" IMO, is bullSH.

  • snoofle (unregistered) in reply to YodaYid

    And all of these reasons, collectively, are why we will all have work for the rest of our lives, just not at one employer.

    I can't even count the number of times I've re-engineered some application over the years (at any given employer) because they wanted to upgrade from Pascal to C, or C to C++, or C++ to Java, or Java to Java+EJB, or to Web 2.0 to ...

  • Leibnitz27 (unregistered)

    ... and this is a wonderful paper to show the lack of clue ...

    "Unskilled, and Unaware of it".

    http://www.apa.org/journals/features/psp7761121.pdf

    CAPTCHA: darwin? Beautiful ;)

  • Alonzo Meatman (unregistered)

    The most difficult part of looking back on your old code is thinking to yourself, "Wow, I can remember when I thought that was a good idea."

    It's at once inspiring and scary - inspiring because you've since learned how to program better, scary because it makes you wonder how much of your recent code will elicit the same response a few years down the line.

    At the same time, if you never have this sort of experience, I think that's a sure sign that you picked the wrong career.

  • TFKyle (unregistered) in reply to oGMo
    oGMo:
    We don't all write bad code. You may write bad code, and all the people you know may write bad code. But quite a few of us also write good code. And we don't just read this site to laugh... we read it to commiserate over the crap we have to deal with from people who are writing the crap code (or being crap managers, or doing whatever job they do so badly that it's absurd).

    If you're writing crap code, go find another job.

    so you're saying you've never written any code that's crap? I dunno about everyone else but personally when I look at some of the code I wrote around 2-4 years ago I think "wtf, this code absolutely sucks", but at the time I didn't know any better.

    I guess it's just part of learning, as you learn more (or see some examples of bad code which looks quite similar to your own, that's a great moment for realizing your code sucks) you start to see flaws and stupidities in your existing code, I think learning new languages and trying out new ways of doing things helps this quite a bit.

    Perhaps if you haven't seen something like this in your code yet you haven't been coding long enough or looking into enough external code to see better ways of doing something, or possibly you're perfect as you say you are (but if that was the case wouldn't you be called $DEITY? :))

  • (cs)

    I hate you..!!!!

  • Obi Wan (unregistered) in reply to themagni

    The problem with this and other computer fields (Network Architecting in my case, as it's called today) is the skill levels are relative. Who can do it faster, better, cheaper? I'll take the user's perspective, since I USE security software. Sunbelt software's "Counterspy" has proven to be the least expensive and the most effective anti-spyware product - not counting freebies, or you get divide by zero errors on the comparison ;) - out there these days. It's not a resource hog, doesn't pummel you with pop-ups, but catches most of the threats before they can harm your computer. I manage ca. 85 stations at any given time in my company. Number of stations wiped and reinstalled because of SUSPECTED malware infections in the last 3 years: TWO. Webroot's spysweeper is a close second from what review and limited use I've put it through. Spybot use to rule back in 2002, but these days they're second-rate. And, on a different topic, I'm STILL looking for a tool that can REALLY handle rootkits after infection (mostly for the bit of consulting I do). Any suggestions (besides Russinovich's RootkitRevealer and F-secure's blacklight)? Things like being able to debug the code or enhance it at a later date - guidelines could be created for that, so when you inherit someone else's code it's at leastr READABLE and MAINTAINABLE. My 2 cents...

  • Your Name (unregistered)

    Jeff, I honestly mean this as constructive criticism. This is why I stopped reading your blog - completely irrelevant posts, and posts where you completely missed the point.

  • (cs) in reply to Ryan H
    Ryan H:
    Plain and simple, the barrier to entry for this profession is too low. No other respectable profession tolerates this much mediocrity. If one could go to school for 4 years as a political science major all the while teaching himself to write Java and land a job at a development shop, the system is broken. Nobody could go get a liberal arts degree and hang out a shingle that had "doctor" or "lawyer" or even "architect" on it. These people all had to study and pass BOK (body of knowledge) exams that prove they at least have half a clue what is going on. But no, not software developers. And the poorly educated developers of ole' have become the managers of today, interviewing and hiring the poorly educated developers of today. When we stop accepting mediocrity in this profession, it will become just that, a profession.

    Note: I'm sure some whiney poli-sci major who is a spectacular architect is going to gripe and groan about my post. All I'm saying is that I've seen more people without formal CS education from whom I'd like to revoke the authorization to develop software than not. Formal CS education isn't an indicator of developer competency, but it can be a predictor.

    Actually, I believe that you'll find that the majority of people who have bona fide Professional qualifications are, in fact, just as incompetent as us geeks. Lawyers, Doctors, Accountants, hairy-assed Web Designers ... these days, it's all the same. Although I wouldn't want a member of the Supreme Court designing my web site.

    And I've been through "formal" -- whatever that means; I presume you forgot to type "accredited" -- CS education. I have found it very useful. I did not at the time; in fact, it was very disappointing. However, of the forty or so "formalees" in my year, I wouldn't give you tuppence for more than, maybe, two or three of them. And even that is just a guess.

    Apart from the blonde with the big boobs, of course. She was worth thruppence any day.

  • (cs) in reply to Cornered
    Cornered:
    snoofle:
    In general, there is no recognition of "good software." There is only "finished" and "not finished."
    W. H. Auden said "A poem is never finished, only abandoned." I feel that way about my code.
    Then don't abandon it, you tit. Or else wear a Coding Condom (TM) in the first place.

    In fact, Attwood, given the po-faced premise behind today's "Worse Than FoxNews," is there any chance we can jump past the locale-based disaster that was "Free WTF Stickers!" and go right to the nub of the matter?

    Anyone else out there want to vote for Coding Condoms (TM(WTF))?

  • Something Like A Name (unregistered) in reply to BitBabe

    As a current student, I can only say that it's due to a culture of complicit incompetence. When I sit in the popular CS computer labs, it's not uncommon to hear a group of people agree that "yes, pointers to functions are too hard, and who needs them anyways?" or other similar tirades. I almost feel bad when my classmates tell me they didn't really understand an assignment proudly and I tell them that I didn't think it was unreasonable. Not everyone is like this, though: I am also a tutor for CS and see plenty of people who seek out help individually because they don't want to be stuck in a pit, although I should say that many more people are content thinking they know what they're doing when they can't tell their head from their ass.

    I'm not claiming competence in all subjects.. I stumble around like a blind pirate walking on metal grating when I am in English classes, but I'm there to learn, not there to bitch about how "I'm stuck in a general education class and I don't understand why that symbolizes this and blah blah blah".

  • hexatron (unregistered)

    Just a point: If you're playing poker and you don't know who the sucker is, you're it.

    If you write code and you don't EVER write wtf's, you mostly write wtf's. This is actually just a corollary of the basic principle: why does everybody else's shit stink so bad?

  • (cs) in reply to Ryan H
    Ryan H:
    Plain and simple, the barrier to entry for this profession is too low. No other respectable profession tolerates this much mediocrity. If one could go to school for 4 years as a political science major all the while teaching himself to write Java and land a job at a development shop, the system is broken. Nobody could go get a liberal arts degree and hang out a shingle that had "doctor" or "lawyer" or even "architect" on it. These people all had to study and pass BOK (body of knowledge) exams that prove they at least have half a clue what is going on. But no, not software developers. And the poorly educated developers of ole' have become the managers of today, interviewing and hiring the poorly educated developers of today. When we stop accepting mediocrity in this profession, it will become just that, a profession.

    This is, of course, how most 'professions', particularly medical, started out; the regulation and so forth came later. Be patient, and it will come. Of course, a lot of trained professionals are incompetent in their subject area, too.

    On this subject, I was a little unnerved at that recent US court case over the teacher who allegedly deliberately showed her students Internet porn; the 'expert witness' for the defence was a police officer who clearly had no clue as to what he was talking about. If I was charged with poisoning, say, I would hope that the state's expert witness was something a little better than a policeman who'd read a magazine article about homoeopathy once.

    Ryan H:
    Note: I'm sure some whiney poli-sci major who is a spectacular architect is going to gripe and groan about my post. All I'm saying is that I've seen more people without formal CS education from whom I'd like to revoke the authorization to develop software than not. Formal CS education isn't an indicator of developer competency, but it can be a predictor.

    The best programmers I've come across have mostly actually been maths and theoretical physics graduates.

  • (cs)

    This site has taught me a thing or 2. Before I started reading things here, I didn't understand SQL-Injection at all, didn't generally worry about security that much, and generally any code I made (which isn't often as I'm not a programmer) was shockingly unreadable.

    Since I've been reading here, I've turned around and now security is my priority. I avoid ugly hacks where possible, and make sure any I do need to use are done as cleanly as I can with plenty of testing. Sadly, I work for a government organisation, and the people in charge of our largest systems really need most of their work posted here :(

  • Jeff Atwood (unregistered)
    So the premise of "We can laugh, but our own code is probably not much better" IMO, is bullSH.
    But that's not the premise.

    We should be doing something beyond pointing and laughing. We should try to educate those blissfully unaware developers stuck in WTF-land, too. Actively engage the developers or teams who wrote that WTF code. Help them understand what WTF code is. Help them move a few rungs up the skill ladder so they can avoid writing WTF code in the future.

    A few of the commenters seem to think I am attacking WTF or the WTF community. I'm not. WTF is doing its part by highlighting the problem in an amusing way.

    Unfortunately, the types of developers who could benefit most from WTF simply do not-- and never will-- read this website. Individually, personally, we have to do more to reach out to these developers: mentoring, apprenticeship, user groups, peer pressure, code reviews, etc. Do whatever you can, whatever makes sense to you, but do something. Pitch in so the next poor sap won't have to deal with WTF code, or at the very least, can at least benefit from slightly less crazy WTF code.

    We owe it to the profession we all participate in. But more importantly, we owe it to ourselves.

    That's the premise.

  • Corporate Cog (unregistered) in reply to Gsquared
    Gsquared:
    I see a lot of "coding should have entry requirements like doctors or architects or engineers". I have to disagree with it in most cases.

    In very few coding situations will a simple mistake result in loss of human life. ... Keep in mind also that doctors and lawyers and such have to spend a huge percentage of their income on various versions of malpractice insurance. So much so that there have been problems with people leaving the medical profession or closing down clinics because they could no longer afford the insurance costs.
    ... And, even with all these safeguards (6 years in school and then more as an intern, high-cost insurance, government regulation of quality, etc.), you still get doctors who overproscribe various high-profit-margin drugs by factors as high as 700% ...

    Agreed. In the realm of life critical software, the standards are usually extremely high. They probably wouldn't be any higher under the circumstances prescribed by many here (they would just be much more costly).

    While there's bound to be wtfs no matter what kind of software is being written, most the wtfs I've read come from standard business software (and the wtfs in life critical systems will usually be balanced by an extremely rigorous QA process).

    Problematic software abounds, but it's no cause for government regulation.

  • (cs) in reply to snoofle
    snoofle:
    Eam:
    JEFF!:
    If you're reading this, you probably don't need our help.
    You obviously don't read the comments here very often.
    Perhaps WTF coders are so used to omitting comments that they just spout off without even bothering to read the comments...

    indeed. i'm not sure how many of the commenters even understood the spirit of the article. most proceeded to go right on being really negative about the bad code/developers/phbs/whatever/life they have to deal with.

  • Adam (unregistered) in reply to seline
    seline:
    Seriously, it was the right decision not to post this initially.

    Sometimes you gotta go with your gut and not second guess yourself.

    I agree, the tone just isn't WTF. I read this site for a laugh so at least make it funny...

  • Samsa (unregistered) in reply to Cornered
    Cornered:
    W. H. Auden said "A poem is never finished, only abandoned." I feel that way about my code.

    I'll second that. It's funny, I'd never really thought about it, but it's spot on.

    To the author of the article itself: don't take it so seriously! In every industry where things are made, things are made badly quite often because of a mixture of incompetence and hurry. Take a minute and ask a plumber or an electrician about the bad work he's seen others do, and had to work with - this is not an IT thing.

    When I see bad code, which is often, it doesn't actually cause me physical pain. In fact it's quite amusing, and I quite enjoy rebuilding these WTFs when I find them and see fit. It's quite satisfying.

    It would be nice if businesses and managers appreciated this sort of behaviour more and made budget available for it; I think a little re-education up there would be a good idea (but as always who are we to do it? What do we know about business? - and yes, that's sarcasm).

    But really, it's no big deal. I could be wrong but I think most professional software developers would agree that WTF code is generally a slightly irritating but actually often quite amusing phenomenon and the Daily WTF - sorry, WorseThanFailure - is a way of collecting this not as some tool for the mass-re-education of developers but more just to concentrate that amusement in one place. WTF code is always funnier and less painful when you aren't the poor chump working with it :)

    Anyway that few ideas -> many words criticism is getting progressively more applicable to this comment so I'll not go on. Let's just say I think of WorseThanFailure as a humorous site, it makes me laugh, I don't find it depressing. I think the author of this article takes life too seriously.

  • zzz (unregistered)

    One of the most obvious pieces of bad code is the captcha here. You'd think they'd replace the familiar list of words with something better, but no. Turn the funny stuff into something non-repeating and generated like xAy28VVZ.

    Since those are neither exciting or funny you'd get a lot less people repeating them.

  • w00t (unregistered) in reply to zzz

    That's funny zzz, the captcha on this comment is a random string of characters: "Papadimoulis"

  • V (unregistered)

    This article and the thread of comments it has spawned reminds me of one simple realization I have come to in my few short years(8) in this industry.

    There are 2 major paths for any "programmer":

    1. Designer: Designers deal with users and management and translate English to "logic" and transmit it to coders. The translation is often accomplished using a sixth grade foreign language introductory course education.

    2. Coder: produce something that the designer agrees to throw at the users and management.

    This line is seen, highly visible and accepted. There needs to be people that do both. The problem is the split in coders.

    2A) Code monkey: Great debuggers. Like a kid playing doctor wrapped from head to toe in gauze, code monkeys are great at taking a bug that the end user has reported and wrapping it in enough code to scare any doctor. These people are concerned with quantity(number of lines written, number of products released, number of bugs "solved"). The end result is the users' perceived bug has been replaced with something only a coder would recognize as a bug. The same methodology is used when "developing" new software.

    2B) Code artist: Horrible debuggers. Like a renaissance artist forced to paint your house eggshell white, code artists will explain the deeper meaning and solve structural problems with your house, make it more comfortable, more appealing, and you'll be awed and inspired by it. It won't be eggshell white and it wont be done in one day. New software, like any piece of art will have a central theme and lines that seem to mesh in some way that makes coders pause for a moment. To most people, it looks like "modern "art"" looks like to me.

    There are finer definitions and variations in those categories, but by and large, you know what I am talking about. It takes many colors to make that fine shade of gray we all cringe in horror about... released software. Let's be honest, the industry isn't in peril, it's simply that no one like the composition of their team(GIVE ME MORE MONKEYS!!!!) or the composition of the teams they look at.

    side thought: Most WTF's can be explained by which side of what line, the author, the submitter and the reader sit on.

  • CynicalTyler (unregistered)

    Am I the only one whose first thought was: "lighten up, man"?

  • PC Paul (unregistered) in reply to alostpacket
    alostpacket:
    indeed. i'm not sure how many of the commenters even understood the spirit of the article. most proceeded to go right on being really negative about the bad code/developers/phbs/whatever/life they have to deal with.
    Well usually they'd be posting their own mega-WTF solutions to the coding WTFs that we do (occasionally) still get to see here...

    They don't read the specs for the code properly, why would they read the article properly?

  • Boo (unregistered)

    Hey Alex, How about keeping hippy huggy-feely pricks like Atwood off your site, eh? I come here to read about other people's mistakes, not hear some tree-hugging touchy-feely bullshit from a guy that can't open his fucking eyes to the realities around him.

    -Boo

  • AC (unregistered)

    This wasn't funny or thought provoking. I think you should avoid such posts on this site.

    I did find the content linked to Don't Make Me Think, both funny and useful. Invite Steve Krug to post next time.

  • (cs) in reply to Boo
    Boo:
    Hey Alex, How about keeping hippy huggy-feely pricks like Atwood off your site, eh? I come here to read about other people's mistakes, not hear some tree-hugging touchy-feely bullshit from a guy that can't open his fucking eyes to the realities around him.

    -Boo

    Hmm. He seems rather more interesting than you, to be honest. Perhaps it is you who should be kept away?

  • (cs) in reply to Tom
    Tom:
    I write LOTS of bad code. Luckily peer code reviews, debugging, and testing find most of it before I check it in.
    I hope you are learning and write less bad code every week.
  • (cs) in reply to Jeff Atwood
    Jeff Atwood:
    ...We owe it to the profession we all participate in. But more importantly, we owe it to ourselves.

    That's the premise.

    But I don't owe it to the company I work for.

  • (cs) in reply to Cornered
    Cornered:
    snoofle:
    In general, there is no recognition of "good software." There is only "finished" and "not finished."
    W. H. Auden said "A poem is never finished, only abandoned." I feel that way about my code.
    Sheesh! Tell that to George Lucas and Bill Gates. For different reasons, of course.
  • blank (unregistered) in reply to V
    V:
    This article and the thread of comments it has spawned reminds me of one simple realization I have come to in my few short years(8) in this industry.

    There are 2 major paths for any "programmer":

    1. Designer: Designers deal with users and management and translate English to "logic" and transmit it to coders. The translation is often accomplished using a sixth grade foreign language introductory course education.

    2. Coder: produce something that the designer agrees to throw at the users and management.

    This line is seen, highly visible and accepted. There needs to be people that do both. The problem is the split in coders.

    2A) Code monkey: Great debuggers. Like a kid playing doctor wrapped from head to toe in gauze, code monkeys are great at taking a bug that the end user has reported and wrapping it in enough code to scare any doctor. These people are concerned with quantity(number of lines written, number of products released, number of bugs "solved"). The end result is the users' perceived bug has been replaced with something only a coder would recognize as a bug. The same methodology is used when "developing" new software.

    2B) Code artist: Horrible debuggers. Like a renaissance artist forced to paint your house eggshell white, code artists will explain the deeper meaning and solve structural problems with your house, make it more comfortable, more appealing, and you'll be awed and inspired by it. It won't be eggshell white and it wont be done in one day. New software, like any piece of art will have a central theme and lines that seem to mesh in some way that makes coders pause for a moment. To most people, it looks like "modern "art"" looks like to me.

    There are finer definitions and variations in those categories, but by and large, you know what I am talking about. It takes many colors to make that fine shade of gray we all cringe in horror about... released software. Let's be honest, the industry isn't in peril, it's simply that no one like the composition of their team(GIVE ME MORE MONKEYS!!!!) or the composition of the teams they look at.

    side thought: Most WTF's can be explained by which side of what line, the author, the submitter and the reader sit on.

    I can see you're the kind of programmer that codes first then patches the patches later, all while the original promises go undelivered. Perhaps that's eight years of repeating the same three months?

  • (cs) in reply to Brian
    Brian:
    Maybe YOU write bad code, but MINE is perfect!
    No, MINE is perfect!
  • Keith Ray (unregistered)

    Examining bad code and explaining how it can be better is a very helpful way of teaching. In fact, I wish WTF did more of the "how it can be better" bit.

    I think Code Smells, as described by Martin Fowler and Kent Beck in the book "Refactoring", Joshua Kerievsky in this book "Refactoring to Patterns", and on the C2 wiki and elsewhere on the web, should be part of the education of every serious software developer, along with Design Patterns and Refactoring.

    There is a value in showing bad examples and contrasting them with good examples -- they are much more concrete than abstract concepts like "cohesion", "coupling", "encapsulation", and so on.

  • (cs) in reply to YodaYid
    YodaYid:
    ...Whenever time is a constraint, there's a good chance even a good coder will do something regrettable but necessary. And there's a very good chance a mediocre programmer will do something awful.
    Yes, but a good coder will know when she is writing crap code and mark it with a //TODO: Fix this later comment, while the mediocre coder will create next weeks WTF. A good PM will also know this and put his best person on it to prevent the WTF from delaying the project even more as he tries random repairs until it works.

Leave a comment on “Guest Article: Our Dirty Little Secret”

Log In or post as a guest

Replying to comment #:

« Return to Article