Friday afternoon, 4 PM, finanlly I made things working: I mean the program compiled and ran at the first time. So what did I do? I found there are some minor problems here and there, and I decided to correct them. Off I went to make those “important” changes. By 5 PM I completed the changes and now the code stopped compiling and to make things worse, I promised to my boss to give him/her a demo on Monday morning! Why would I put myself into this kind of situtation? Or don’t we all have those kinds of situation in our development life?
At least we could do one simple thing to avoid those kind of panic. Yes you may have guessed it correctly: save the working version of the code before move on. We call it source code control. On the serious side, I think the idea of “incremental development” is another way to avoid the problems I mentioned above. The idea is “don’t make drmastic change all at once”. Make incremental change (small change) one at a time, if possible. This way we could correct the error (if any) in the code one at a time, which is much easier than putting in tons of change at once, and later on find tons of problems. And then we have to go back and debug the code to fix the problems one by one. In the real world nothing works perfectly at the first time.