Software Engineering: Work Your Code

I see too often code written by others that is not finished but running as production code. The programmer wrote the code, it “worked,” and she moved on to making the next thing “work.” Even for people like myself who have been writing code for nearly two decades, the first draft is just that – a draft.

I look at writing code like carving a statue from block of stone. The stone is the blank screen in your editor with the power of your preferred programming language waiting to start carving into it. The first few whacks at it will leave the stone still looking like a rock rather than the figure of beautiful mermaid swimming through a coral reef. That’s the same with your code. The first few attempts at making it “work,” are just the initial hammer strikes.

To build professional software that is polished and impressive, requires many iterations and much cajoling. The more experience you gain as a programmer, fewer iterations will be required.

And like an artist, a programmer needs to step back and look at the entire application and the systems it interacts with and see where things may be askew.

As the programmer rolls over the code, again and again, it begins to take shape and become coherent software that makes sense to the author and future programmers who will need to work on it and understand what’s going on.

Share Button