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.
Latest posts by Kieran France (see all)
- How to use Cipher streams in Java - January 10, 2018
- Improved Shape Rendering with Soft Clipping - August 24, 2017
- 4 Hidden Features in Java 9 - May 30, 2017
- Why HTTP/2 Client in Java 9 is important - May 23, 2017
- PDF Portfolio support added to JPedal, so what are they? - April 4, 2017