Physics deals with an interesting concept called a href=”http://en.wikipedia.org/wiki/Entropy”entropy/a that measures the state of disorder in a closed system. a href=”http://en.wikipedia.org/wiki/Second_law_of_thermodynamics”The second law of thermodynamics/a looselly states that over time a closed system will become more disorderly and chaotic if nothing is done to prevent it. If you haven’t been to your basement for a while you can go down there and see for yourself that this is true: Things have become more disorderly and chaotic over time. And you will have to put in some work to get things back in order.br /br /Code is the same – if you don’t do something to actively prevent it the chaos and disorder of your code will increase when you work on it. This is why a lot of old code is a mess, nobody has worked actively to keep the entropy low.br /br /Preventing entropy in your code is fairly easy, and it’s a good habit to get into. Whenever you write new code for a project make sure you lower the total entropy of the system by beautifying or simplifying something in the codebase. It doesn’t have to be the code you’ve just been working on – the key is to lower the entropy of the whole system.br /br /If you work actively to keep the entropy of your code low it age gracefully.