I don't know if someone recalls that
Michael Jackson song "You are not alone" , the following part says "I'm here for you".
So what this have to do with programming..., well when you find your self working at code written with the minimum ever care , you will find your self singing "You are not alone , I'm coding here with you" and wishing that persons who wrote the code are listening and start writing their code with the idea that someone else will come later and try to enhance, modify that code.
I believe in this,the time spent in reviewing or investgating code can be cut off by 75% , if the code is:
1- Commented properly.
No one really like writing comments , its boring and consumes time speically when you are thrilled enough and ideas are born in your brian and code flowing out of your fingers, you won't waste your time typing what a class field is for , or what a method is really doing .
But this is not an execuze to avoid them , comments can saves alot of time when fixing ,reviewing code ,it saves person-to-person communication, it saves time spent digging into thousands line of code to understand what a class field means or doing.
2- Well structured.
Writing code is an Art , anyone can write code , but few persons can write pretty code that you enjoy reading it, and in turn will easily know how to fix it , without spending time flying between files, classes, methods.
3- Classes,methods,variables are problem domain specific.
When you face a problem at any thing in your daily life , for example you need to sort your book library , internally in your brain what terms you will be using when descrbing the solution to the problem you have? ideal you will use terms like "book, library, index,sort",
Why these terms why notthing else? Because these terms are from your problem domain.
And this is how code gets written.
A nice expirment to do is, get some bugged code in 2 versions, crappy version and well written version, and give each of these version to 2 different codes, and ask them to fix it, and watch the time taken by both.If someone will try this i would be happy to post their results here.