Writing Good Code

It might be tempting to say “good code is code that works,” and it is certainly true that the ultimate test of any code you write is whether it performs the desired tasks. However, there is more to good code, and any experienced programmer will tell you that code that works fine can still be “bad code.” How can this be?

Code is not a static thing that you write and then forget about forever. During the course of a project, you'll be testing and modifying code multiple times, so you'll be returning to code that you wrote a couple of days ago, last week, or even last month. Also, you may be using code written by others, just as other developers may be using your code. These are all excellent reasons for writing code that not only ...

Get Office® XP Development with VBA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.