I have been refactoring my accounting program that I have written in Haskell. Although I am new to Haskell, I have found that I am becoming increasingly more productive using it. I think I have surmounted, or about to surmount, the initial “My Brain Hurts” stage. I find myself writing code that is vastly more likely to be error-free, and vastly easier to modify and enhance. Haskell really looks like it will be my goto-language in future, if you will forgive the pun. My efforts at tinkering with a program that is ostensibly complete, insofar as any application is ever complete has led me to draw parallels with my recent readings on creative writers.
Creative writers rework their manuscripts, fixing scenes, improving their prose, and redrafting until they have a good quality product. Engineers keep working on a problem until they have something that is well-suited to its intended application. In other words, writers and engineers “hone” their output.
Now compare that to programmers, whereby if it passes all its tests, it is considered “done”. We should not be surprised that applications are so buggy when the focus is on programmer productivity than the quality of the code.