The Problem with Outsourcing

Posted by Paul on April 26, 2013

When considering a new web project, it can be tempting to look for the lowest price, which often means outsourcing to a developing country. 

Unfortunately even if you can deal with the communication problems, you can still end up with code that looks a bit like this:

outsourcing-quality-big.jpg

So what's wrong with this code?

  1. Starting at the top, the dark green text is code that's commented out. If it's not being used, it should either be deleted or at the least commented out in the PHP so that it isn't being sent to the browser all the time even though it's redundant.

  2. <div class="spacer"> these are very rarely necessary. If you know what you're doing with CSS, you can achieve the same effect a lot more elegantly and with a lot less code. It wastes bytes sent to the browser, increases the chances of bugs and generally is just unnecessary code.

  3. The classes on the next div (highlighted) are some of the worst code I've seen. The developer has tried to apply a "float left", size 15 text and dark gray colour all with separate classes. It might not be obvious why this is so bad but in general, CSS is designed to make it so that with as few classes as possible, you can give your website a consistent look and feel and control the design of all elements on the page without embedding that styling information in the HTML. So instead of these 3 classes the design of this text should be applied in the stylesheet itself. It's a bit like building a car and having a different key to unlock the boot, the door and start the engine - it's just not efficient and these things should be done with one solution.
     
  4. Next we can see an inline style - in this case a margin-top of 20px. Inline styles are just bad CSS.

  5. Now some comments with spelling mistakes: "Requiest" and "qoute" - okay so it doesn't really matter in a comment but it's just sloppy like the code.

  6. The next div has a display of "none". So it's not shown to the user at all. It makes you wonder if it's hidden and then some JavaScript comes along and shows it as a popup but the lack of an ID or class means that JavaScript wouldn't have a way to identify this and therefore it probably serves no purpose. It should be deleted.

So all of these things are hidden to users and only a web developer can tell that they're bad just like only a mechanic can tell that your car's engine is in need of some TLC but code like this is likely to cause a lot of problems, have more bugs and be much harder (if not impossible) to upgrade.

In Conclusion?
Make sure that your web developer or web development company writes good, clean code!

blog comments powered by Disqus