But we tested it



  • After a major release where other folks spent a lot of time hacking (rather than planning first, then coding), we are inevitably getting a slew of bug reports. 

    Last night, I encountered this:

     

    class x {
    private boolean flag = false;
    ...
    public boolean trySomething(...) {
    boolean flagg = false;
    // do stuff here, possibly setting flagg to true
    return flag;
    }
    }

    And then elsewhere:

     

      if (new x().trySomething(...)) {
    //do something critical
    }

    The users were complaining that something critical wasn't getting done. The guys who wrote it insisted that there was no way that could be happening because "we tested it".



  • I know some code monkeys who define testing as "checking if it builds without errors (but nevermind the warnings)".



  •  But we tested it! Twice!



  • jokes aside, this is a good example of why software development is hard. You are developing a new method for some important feature, and you find a class property named flag. You don't want to touch it because you don't want to dig into hell. So you name your new variable flagg and then, after a while you make a typo or someone later see the "return flagg" and thinks that's a typo and changes it. Whatever happens, your only bad decision, was making a mistake when naming a variable and now your business is loosing tons of money. The hardest thing in software development is naming variables, objects, functions, etc.



  • I know.  It's so hard to name things, like "localFlag".

    Naming things so that they can be used properly is not hard.  Naming them so that nobody will complain about your choice is hard.  Luckily, that doesn't make software development hard.



  • @ubersoldat said:

    The hardest thing in software development is naming variables, objects, functions, etc.
    I can echo this.

    For me, naming things properly is very important.  Unfortunately, I happen to be not very good at it, so I get variables named slut and methods named poorlyNamedMethod.

    Both of those examples were committed to version control.

    I am shamed.



  • @belgariontheking said:

    I get variables named slut

    Was this a double-ended queue by any chance?



  • @belgariontheking said:

    @ubersoldat said:

    The hardest thing in software development is naming variables, objects, functions, etc.
    I can echo this.

    For me, naming things properly is very important.  Unfortunately, I happen to be not very good at it, so I get variables named slut and methods named poorlyNamedMethod.

    Both of those examples were committed to version control.

    I am shamed.

    No need to, the variable gets passed around right? slut totally fits.  When I was a student my projects tended to have totally random variable names in different languages, two month after being done I had no idea what the "clever" parts of the code did



  • Of course, if you stay up too late coding, you get weird variable names that make you say WTF the next day... like "datas2" - yes, I actually did this once, because see, I had some FooData objects or whatever, so I collected them into a list, naturally calling it "datas"... and then I needed ANOTHER list of them, so it became "datas2"!



  • The importance of correctly naming things - yet another similarity between the practice of programming and magic


    Get the name wrong and who knows what you'll end up invoking?



  • If I ever work with anyone from thedailywtf, remind me to point them to a standards document and tell them to get peer reviews.



  • @Sutherlands said:

    If I ever work with anyone from thedailywtf, remind me to point them to a standards document and tell them to get peer reviews.


    You do realise that half of us come here to get validation that we're not the worst programmers in the world? The other half come just to troll.



  • @Watson said:

     But we tested it! Twice!

     

    It failed on both tries, and yet we delivered, cause, hey, we tested it!

     



  • @pjt33 said:

    @Sutherlands said:

    If I ever work with anyone from thedailywtf, remind me to point them to a standards document and tell them to get peer reviews.


    You do realise that half of us come here to get validation that we're not the worst programmers in the world? The other half come just to troll.
     

    There's no overlap then?

     



  • @pjt33 said:

    You do realise that half of us come here to get validation that we're not the worst programmers in the world?

    It doesn't work for Bridget99 who is, in fact, the worst programmer in the world.



  • @pjt33 said:

    @Sutherlands said:

    If I ever work with anyone from thedailywtf, remind me to point them to a standards document and tell them to get peer reviews.


    You do realise that half of us come here to get validation that we're not the worst programmers in the world?
    Well I'm not going to give it to you after this thread.



  • @ubersoldat said:

    jokes aside, this is a good example of why software development is hard. You are developing a new method for some important feature, and you find a class property named flag. You don't want to touch it because you don't want to dig into hell. So you name your new variable flagg and then, after a while you make a typo or someone later see the "return flagg" and thinks that's a typo and changes it. Whatever happens, your only bad decision, was making a mistake when naming a variable and now your business is loosing tons of money. The hardest thing in software development is naming variables, objects, functions, etc.

     I dont have a problem:  var0001, var0002, var0003....

    Seriously I worked for a brief time with a client, years ago, where they kept a paper logbook of all functions which were given alphanumeric names "J04TS34W2Q" based on a set of charts in the book. You filled out a form for each function, they calculated the name of the function, and put your sheet in the book.



  • @blakeyrat said:

    It doesn't work for Bridget99 who is, in fact, the worst programmer in the world.

    Second worst, surely.



  • @TheCPUWizard said:

    Seriously I worked for a brief time with a client, years ago, where they kept a paper logbook of all functions which were given alphanumeric names "J04TS34W2Q" based on a set of charts in the book. You filled out a form for each function, they calculated the name of the function, and put your sheet in the book.
    I would be highly surprised if they didn't have trouble retaining people.

    Seriously, GAH!



  • @Scarlet Manuka said:

    @blakeyrat said:
    It doesn't work for Bridget99 who is, in fact, the worst programmer in the world.
    Second worst, surely.
    I'm not sure who you're implying is worse than Bridget.  And don't call him Shirley.



  • @Sutherlands said:

    @Scarlet Manuka said:

    @blakeyrat said:
    It doesn't work for Bridget99 who is, in fact, the worst programmer in the world.
    Second worst, surely.
    I'm not sure who you're implying is worse than Bridget. And don't call him Shirley.

    He's talking about that crazy guy who they poke with sticks in the other forum. The problem is, he's not actually a software developer, he's a hobbiest. Bridget99 is a "professional".



  • @blakeyrat said:

    He's talking about that crazy guy who they poke with sticks in the other forum. The problem is, he's not actually a software developer, he's a hobbiest.

    Hobby, hobbier, hobbiest!  Hey, it works!




  • @blakeyrat said:

    @Sutherlands said:

    @Scarlet Manuka said:

    @blakeyrat said:
    It doesn't work for Bridget99 who is, in fact, the worst programmer in the world.
    Second worst, surely.
    I'm not sure who you're implying is worse than Bridget. And don't call him Shirley.

    He's talking about that crazy guy who they poke with sticks in the other forum. The problem is, he's not actually a software developer, he's a hobbiest. Bridget99 is a "professional".
    \

    According to his biography he is a "professional" as well, (at about the same level as Bridget99).

    Taken from here.



  • SpectateSwamp, FTW!


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.