I've just read an excellent post by Peter Hallam, he works on the C# compiler at Microsoft. He looks at the amount of time professional developers spend writing new code, modifying existing code and understanding existing code. How much time do you think you spend on each of these activities? I wouldn't have guessed the correct figures which are:
Writing new code: 5%
Modifying existing code: 25%
Understanding code: 70%
I instinctively think that I spend most of my time writing existing code, but that's really not true. I'm currently working on building a guidance automation package, an entirely new product, but I've probably been spending the vast majority of my time reading the documentation and reading the code in the Service Factory GAT to understand the GAT framework. And this is on a new product. I once spent two and a half years of my life maintaining a huge buggy spaghetti code base, during that time I probably spent 99% of my time trying to understand existing code and the remaining 1% making small changes.
These figures strongly reinforce my belief that the number one imperative for professional software developers is writing easy to understand maintainable code, even if it doesn't perform as well and even if it takes longer to write. Think about it, if I spend five times as long to write a well factored domain model based application verses someone who uses all the visual studio tools to hack together something with datasets, no tiers and business logic spread throughout, I only have to make a small dent in the understanding code time in order to dramatically improve my productivity and the productivity of those poor unfortunate people who have to maintain my code long after I'm gone (from the project that is, not like dead. I really hope I outlive my software creations:)
I'm going to store Peter Hallam's blog in my top blog posts list so that next time someone argues that refactoring, layering or writing a proper domain model is taking too much time I'll have some great figures to back me up.