What Programmers Can Learn From Writers
As a beginning programmer, I listened to everything my peers said. The strangest was programmers couldn’t write English. I didn’t believe it until I saw it for myself—again and again.
I didn’t understand how this could be, since I didn’t have any problems writing. And then I did. When immersed in a large complex program, I had trouble switching from code to words.
Over time, I realized programming and writing used the same creative area of the subconscious. When that part of the brain is preoccupied with one, there’s no room for the other.
Writing and programming have much in common. Most notable is the advice given to novices by many great writers: steal from the best. And keep stealing until you find your own voice.
Beginning programmers need to steal for a practical reason: it solves problems quickly. Since the code you steal is never exactly what you need, you learn how it works by modifying it.
But there’s a more important reason for both writers and programmers to steal from the best. It refines the ability to discern quality. It’s how we climb onto the shoulders of giants.
Another tip from writers is to kill your darlings. Don’t be enamoured of a clever phrase (or line of code) if it detracts from the whole. Don’t put your ego above the integrity of the work.
As I said last week, programming and writing are both practical arts. How do you become more skilled in the practical? The same way you get to Carnegie Hall: practice, practice, practice.
The worst mistake beginning programmers (and writers) can make is not to admit when they don’t know. Look it up. Ask. Use validation software (and grammar and spell checkers).
The big difference between writing and programming is in the pudding. You know when a program works, when it does what you intended—and when it doesn’t. Writing, not so much.