Skip to Main Content
Some people feel that "getting" object-oriented programming is a difficult, time-consuming process. Many of the cornerstones of OO programming benefit other programming paradigms as well. Even if we are writing shell scripts or batch files, we can use these techniques to great advantage. There are many aspects to writing good code, but most of these hinge on a single underlying quality: flexibility. Flexibility means that you can change the code easily, adapt it to new and revised circumstances, and use it in contexts other than those originally intended. Most of the important lessons to be learned about object technology - how to avoid many common mistakes and keep code flexible - can be summed up into one sentence: keep it DRY (don't repeat yourself), shy, and tell the other guy. We describe what that means and how we can apply these lessons to all good code, not just OO code.