Refactoring

March 1st, 2010 by Colin Seaman

Recently I’ve been working with two clients who’s code was written and developed some time ago.  As I stepped through the code to understand what was going on in terms of processes clearly it was obvious how pieces of code could be improved to result in faster execution and lower CPU and memory usage to achieve the same result.

You will find that this is quite a common finding when either picking up your existing code or another persons code.  Whilst each developer has different ideas on how to acheive the goals set by the client, understanding how other developers meet these needs is often the hardest part of the job.  In the real world of Internet development, not much code is commented so its often down to your own logical mindset in calculating how things work (or are suppose to work).

Over my IT career I have picked up many developers code and continued to work on top of this.  The first thing that I ask myself is ‘will it be quicker to redevelop this?’.  In some cases, it is, and thus the client gets a more efficient code base in less time (and consequently less money).  However sometimes spending a bit more time to understand how other developers have worked a situation really pays off.  The ability to consider other people’s ideas and think outside your own logical mindset is a great asset for a developer to have.  We’re not right every time, so understanding ideas that other people have put forward in my opinion really pushes your skills forwards and allows you to easily adapt to future situations better.

Like any developer, I’m proud of the code that I have developed at the end of the project, but if you do have time (even after the project is fully paid up and complete), it’s definitely worth stepping over what you have done to better your own abilities.

Leave a Reply

Categories

Contact Us

info@colinseaman.com

Telephone: 07940 423446

Colin Seaman Consultancy Ltd. Registered in England and Wales. Company No. 07040812. VAT 980212830
Registered Office: Suite 1, Dubarry House, Hove Park Villas, Hove, East Sussex, BN3 6HP, United Kingdom