reasoning.page

Where I write my ramblings into the void and you close the page.

About RSS

← back

Code without fear. Sometimes?

There is a blog post written by Julia Evans about fear, and how it can make people worse programmers. I think that it is well known, and if not then it deserves to be; I have found it to be very useful advice.

There’s also a great talk that Gian-Carlo Rota gave at MIT which I think serves as an excellent corollary

There are two kinds of mistakes. There are fatal mistakes that destroy a theory; but there are also contingent ones, which are useful in testing the stability of a theory.

– Gian-Carlo Rota, “Ten Lessons I wish I had been taught

Rota was talking about mathematics, but I think this applies equally well to programming. Evans’ advice works extremely well for cases where you make small changes to a software system (if you have comprehensive automated tests1), but when making larger (and fundamental) changes the “dive in and hope for the best” approach can run into trouble. Instead, here, a more “fearful” approach involving a bit more high-level thought and testing can pay dividends before implementing anything.

I suppose a good rule of thumb2 is to worry much less about the small things and much more about the big things.

  1. I find it funny that although a good proportion of people who write software accept that the engineering standards in the software industry are substandard, adoption of more sophisticated testing approaches (where tests are automatically generated by a computer rather than human-written) hovers somewhere around the 0% mark (purely on anecdotal evidence).

    Dan Luu has written a blog post on this and Alex Weisberger writes a blog exploring how we can better test classes of applications common in the software industry. ↩︎
  2. Applicable not just to programming, but to many other areas of life. If you’re thinking “well, duh it’s such a generic statement”, I think there are lots of things which are very simple to understand conceptually but challenging to apply in the moment. ↩︎