I agree completely, this is usually the driving principle when coding, I don't spend a lot of time with premature optimization in terms of making the code run as fast as possible, etc but if I am face with an issue where I realize I haven't thought something through in terms of maintainability or ease in extending the code for similar purposes I know I will need sometime in the near future then I have no problem spending a lot of time thinking through these problems. In my opinion, this is really what pushes one to become a better developer as the time spent thinking about this sort of issue pays off later when a similar issue comes up again and the solution is already second nature.