Tom Ritchford
2 min readAug 15, 2021

--

I enjoyed this. But I think you missed the mark, at least for the long-term.

I started programming in the 1970s, and I still program almost every day, for fun if I'm not getting paid to do it.

If you don't burn out in the long run, It is because you systematically try to keep perfecting my craft every time you write code.

Early on, I believed that trying to be clever in code was expressive and I cared about "styles".

But I changed completely.

Now I want my code to be as clear and simple and to exhaustively avoid or at least manage sources of error.

I am seeking elegance by writing code that is so clear that it almost erases my own style. It is my substantiated belief that simple, clear, unrepetitive code is more likely to be correct as it is obviously correct.

Sometimes in the early phases of design of a new feature, I go through half a dozen variations. Which code belongs as free functions? Which code should be methods and on which objects? Is this name exactly right, where should I divide the code into modules?

Then, at a fairly early stage, I comment everything "enough" so that anything non-obvious is explained without getting too chatty.

All this takes a little longer. but the advantage is that all the names are clear, the APIs are free of footguns, and I have strong automated testing, so I can very quickly make iterations as other people use the product.

So once I have this it's intoxicating - I can move like the wind and generate as much work in a day as would have taken me a month to do in 1981, thanks mostly of course due to the amazing languages, tools and machines we have today, but also because I've invested a lot of thought early into making everything slick for myself.

https://github.com/rec

https://github.com/rec/tdir

https://github.com/rec/wavemap

--

--

No responses yet