I've just started a new job and one of the things my new boss talked to me about was code longevity.
I've always coded to make my code infinently extensible and adaptable. I figured that if someone was going to change my code in the future then it should be easy to do.
But I never really had a clear idea on how far into the future that should be.
So my new boss told me not to bother coding for anything more that 3 years into the future and his reasoning was that technology changes, programs expire etc.
At first I was kinda taken aback and thought he was a whack job but the longer I think about it the more I'm warming to the concept.
Does anyone else have an opinion on how far into the future you should code to?
You should code to the specifications, nothing more, nothing less. If the specifications make provisions for 30 years, you code for 30 years. If the specification gives provisions for 3 months, the same applies.
Just remember though, you also should code for your own sanity. All the code you create should achieve 3 things:
Code to be replaceable - This is just good practice in my opinion. The more replaceable you are in your coding, the better code you produce. This provides a bit of a reverse situation - the more replaceable you make your code, the more valuable you make yourself.
Code to be productive - Reuse, reuse, reuse.