We web designers often think of code as being a tool by which design is created — but there’s actually a design aspect to code itself. Designer-friendly code is significantly easier to optimize, to maintain, and to extend than messy code — which means that you can put more energy into building that code into something awesome.
There are three aspects of code design that make your code “designer-friendly” — insofar as you’ll appreciate having your own code neat, and if someone else happens to need to use your code later, they’ll be grateful to you as well.
I’m not talking about the ability to duplicate the effects of the entire piece of code — in this case, I’m talking about slowly building yourself a library of code ‘modules’ that you can and will re-use over and over again. If, for example, half of the projects that you do require some sort of random number generator, write one really good ‘module’ of random number generator code and then reference it whenever you need an RNG. If you do a lot of the same kinds of work, you’ll find that this kind of code not only helps you meet the System Architecture requirement, but shortens your turnaround time considerably as well.
No code lasts forever — but if you can write your code in such a way that it is maintainable, your code’s lifespan will increase significantly. This is actually assisted significantly by using the same sort of ‘module’ concept above: if your code largely consists of a core code that constantly references modules to perform it’s function, then when a new piece of tech comes out or a security hole pops up that requires a code change, you can change it once in the relevant module and then populate it out to all of your projects that utilize that module.
I’ve yet to come across a language whose code cannot possess all three of these attributes — and designing with them in mind benefits that project and all of your future projects as well. Consider designing designer-friendly code, and Friend yourself like Facebook.