Write code that is easy to delete, not easy to extend.

Programming is terrible is one of my favourite blogs about engineering. Tef is obviously well read and a seasoned developer. I love going down the rabbit whole of papers his writing references.

He recently released a post that resonated well with me. Especially the sentiment that you shouldn’t get locked down to an abstraction prematurely.

Write code that is easy to delete, not easy to extend.

Becoming a professional software developer is accumulating a back-catalogue of regrets and mistakes. You learn nothing from success. It is not that you know what good code looks like, but the scars of bad code are fresh in your mind.

Perhaps I’m biased by being self taught, but I’m in 100% agreement. It’s two fold:

  1. Reading a book never compare to past experience when it comes to preemptively steering your self around potential pitfalls. When you start out, you should focus on churning out as many projects as possible.
  2. You learn nothing from success is true in most meaningful endeavours in life.

My point today is that, if we wish to count lines of code, we should not regard them as “lines produced” but as “lines spent” EWD 1036

I love this!