Your Baby is Ugly

I’m not kidding, you have one ugly baby.

Its not your fault…well probably not your fault.

Did you drop him a lot in the first few weeks you brought him home?



I’ve never personally had this conversation with anyone,

::Two points

  1. Yes, I’ve seen this done on Seinfeld...if you haven’t watched Seinfeld go grab a copy of the complete series.  It still holds up.
  2. I actually did see someone tell somebody their puppy wasn’t sort of in the same vein as telling someone their child is ugly.  Needless to say, “awkward” doesn’t being to describe the mood the conversation took on.

I digress…::

I’ve never seen anyone tell a parent their child is ugly, however, when it comes to creating software, I advocate telling people who write ugly code that yes, indeed, your code child is ugly.

First, for those of you who don’t design software and write code for a living a little background on the parent/child relationship people have with their software.

Software, like children, requires massive amounts of time and energy.  You, as a designer/architect/coder, conceive the code, often times starting with little more than a blank page.  From there, you outline the basic functions of your code, you test your code to make sure it meets specifications, and you clean up your code to ensure it follows all of the best practices dictated by your company.  Hopefully, in time, when your code is completed you can send it off to play with all of the other code in the system.  With any luck, you’ve written a good piece of software that is well behaved, has good manners, and is robust enough to function for many years to come with very little maintenance.

However, with all of the work that goes into the code sometimes it just turns out ugly.

What is ugly code?  Ugly can be described in so many ways…it could be:

This is by no means a complete list, but a small sample of items I have run into in my career.

Like anything anyone spends any amount of time with people often grow attached to their output.  With such an attachment people do not take kindly to having that output being called ugly, be it real life children or code ‘children’.

However, as I have said, it must be done…

To their code children, not their real life children…. geez you are a monster.  I’m not sure you should continue reading this blog…

If you can control yourself and your urges for calling kids ugly please continue, we have much to discuss.  Otherwise, I bid you good day.

How you tell someone they write ugly code is up to you.  I don’t advocate sending a company wide email letting everyone know that Johnson can’t write a for loop to save his life, and he would serve the betterment of mankind if he never touched another keyboard.  No, that’s just mean.

Nor would I post their code on the refrigerator and write a large ‘F’ on top of it with a red sharpie…although humorous, after sending that first company wide email Johnson may get the impression of not only do you think he is a horrible coder, but you might not like him either.

No, I’ll leave the delivery of the bad news to the parent of the ugly code up to your discretion, but something must be said, because lets face it, that ugly code child is going to grow up and become your whole team’s responsibility.

Failing to correct ugly code when it is first generated leads to all sorts of problems and heartache.  Firstly, for you, you will likely be the one on call when the code begins to fail in your company’s application, and it will be up to you to fix it at 3am on Christmas Eve.  You will be up all night attempting to track down the module that is failing, and once you find it you will attempt to get something working as quickly as possible, because every second the system is failing your company is losing money.

This is no way to conduct a career…working under the gun to fix a problem, hopefully you didn’t cause.  Especially if it could be avoided by telling the original designer they created one ugly child, and you, for one, do not want to support it when it starts misbehaving and throwing a temper-tantrum.

I recommend several steps in approaching and telling someone they have just written some ugly code:

Lastly, put others at ease around you by inviting them to call your code ugly.  Separate yourself from what you have created and attempt to learn from their years of experience.  It’s the ability to take criticism and to learn from it that will help you grow in your career.