Kieran France Kieran France is a programmer for IDRSolutions. He enjoys tinkering with most things including gadgets, code and electronics. He spends his time working on the the JPedal library and our internal test suite..

Read the code of others, but also read your own.

1 min read

Recently I have had the great fortune to find an old university project on a USB drive that I had thought I had lost some time ago. I decided to look over the code once again. It’s surprising what a difference time can make to your coding style. My style has changed dramatically since then.

Despite the changes I noticed, I also found some possible issues, inefficiencies and other flaws in the code that I would never let pass now. I also found some things cropping up in my code, things I have been using for years that I never think about. When I see it written down I skip over it. Looking at old code of mine made me think about these structures and techniques again. As I read more of the code I started to see ways of improving these techniques, making them faster, more robust, better.

Many people know the virtues of reading other peoples code, but I have come to realize that it is also important to read your own code. Not just in the following days or a month or two but after years. If you have access to older code, go back and compare it to your current code. Consider how you have achieved the codes objective.

How would you do it differently now?

Do you know anyway of improving your older code?

Have you forgotten about a technique or structure that would still prove useful?

 

I must admit that this may not work for everyone, but recently, going over some of my older code has helped me see problems in different way, and find solutions I wouldn’t have thought of before.

Give it a try, you’ll be surprised by what you can treat yourself.

Kieran France Kieran France is a programmer for IDRSolutions. He enjoys tinkering with most things including gadgets, code and electronics. He spends his time working on the the JPedal library and our internal test suite..

Leave a Reply

Your email address will not be published. Required fields are marked *