How many bad developers are there in the world?

As I was reading today’s “Daily WTF” I could not help but wonder about
how many really bad developers are out there in the market place. The
following snippet was submitted to D-WTF after being found in some
production code:

public boolean checkFalse(Boolean bool)
{
if (bool.booleanValue() == Boolean.FALSE.booleanValue())
{
return Boolean.FALSE.booleanValue();
}
else
{
return Boolean.TRUE.booleanValue();
}
}

Ok, the average coder knows that this entire function
can be replaced with if (bool) {}. So, who are these people that spend
their time writing functions to replace built-in language logic? Why
are they employed? Who is interviewing them and giving them work in the software arena?

6 thoughts on “How many bad developers are there in the world?

  1. Miki Watts

    From my experience, this kind of code usually originates from people who took economics or similar courses in university or college, and think that they know how to write code. Fast forward a few years later, and that’s the result.

  2. Rob Garrett

    Maybe, but I’ve also seen developers with a BSc in Computer Science produce code like this. I guess software engineering is like any other profession – there are those that take pride in their work and do a good job, and those that either don’t know or don’t care.
    <br>
    <br>

  3. http://

    &quot;Let him who is without sin cast the first stone …&quot;
    <br>
    <br>I don’t see anything wrong with this (if it works) … Sure, this developer could have easily done a google search to find a better approach.But would that have made him/her a better developer. What I see from this code is someone who was thinking outside of the box. Which is a good sign that this person will eventually mature into solid developer.
    <br>
    <br>I think the bad developers are those who COPY code without even taking the time to understand why it works …
    <br>
    <br>If we all just think back to when we were writing our first apps then we would better appreciate code like this. I wonder how many of those apps are still in production and are still being used?

  4. Rob Garrett

    G-Bickham,
    <br>
    <br>First of all, I was not the first one to cast the stone, if you read Daily WTF (or even know what it is), heck if you just read my post again you’ll see that I am passing further comment to a rant that someone else has already posted.
    <br>
    <br>Secondly, how can you say there is nothing wrong with this code? The developer is obviously unaware that you can perform a simple boolean comparison, without the need to write a helper function and/or a wrapper class for built in boolean types.
    <br>
    <br>Okay, there may be a good reason why the developer wrapped a built in language type and requires this method to compare the internal value. Why not just return the value of bool.booleanValue() and do away with the condition?
    <br>
    <br>So let me get this right, your suggesting that we can chalk up bad code, such as the example above, to beginners luck? Unfortunately code like this is in production today, which is why 50% (or more perhaps) of the market is awash with crap software.

  5. http://

    The function itself is very simple so can be easily inlined which means no function call overhead. for example:
    <br>int square(int x)
    <br>{
    <br>return x * x;
    <br>}
    <br>
    <br>Is in no way inefficient.
    <br><a target=”_new” href=”http://blogs.msdn.com/ericgu/archive/2004/01/29/64644.aspx”>http://blogs.msdn.com/ericgu/archive/2004/01/29/64644.aspx</a&gt;
    <br>
    <br>A good programmer profiles if they want performance, assuming/guessing isn’t allowed because of how much happens behind your back. Better to write easy to understand code with good algorithms then care about the number of function calls.
    <br>
    <br>Look here for an example of inlining you may not have expected:
    <br><a target=”_new” href=”http://blogs.chimpswithkeyboards.com/jonshute/archive/2004/05/17/156.aspx”>http://blogs.chimpswithkeyboards.com/jonshute/archive/2004/05/17/156.aspx</a&gt;
    <br>
    <br>Without seeing any other code this person wrote or knowing anything about them isn’t it possible that they had extra time so thought they would obfuscate their code for fun?

  6. http://

    Is it possible the developer built that code because of frustration ?
    <br>I just can’t imagine that even a bad developer wouldn’t see the
    <br>performance loss.
    <br>

Comments are closed.