Programming is always a team activity
So you've written a bit of code. As time passes and you haven't touched parts of it for a while, they'll start to fade from memory, and if you need to know them again, you'll need to refresh yourself on them.
A week after you wrote a function, you may be a bit hazy on how it works. Six months down the line you might've forgotten all of the function's details. Three years later, you might have forgotten about the existence of the entire module.
Down the line you're no longer that person who knew the details of the code. The more time since you looked at a piece of code, the more it is like you're reading someone else's code.
So the entirety of your work on that code is more like a team effort than an individual one - your current self writing code for, and collaborating with, your future selves.
With the exception of simple, throwaway programs -- this is why you should always write code for others to read, even if you're writing something that no one else will ever need to touch.
No comments:
Post a Comment