Home / Hemingway's trick View Raw
04/28 — 2022
11.59 cm 1.6 min

Hemingway's trick

In A Moveable Feast, Hemingway writes:

I would stand and look out over the roofs of Paris and think, “Do not worry. You have always written before and you will write now. All you have to do is write one true sentence. Write the truest sentence that you know.” So finally I would write one true sentence, and then go on from there. It was easy then because there was always one true sentence that I knew or had seen or had heard someone say. If I started to write elaborately, or like someone introducing or presenting something, I found that I could cut that scrollwork or ornament out and throw it away and start with the first true simple declarative sentence I had written.

Programmers, like writers, are often asking the same question – where do I begin?

Hemingway’s solution for writing is to write ‘one true sentence’, which when transferred over to the context of writing software, translates to ‘one true test case’.

One can often start by implementing some complex feature, much like a narrative in prose, only to be discouraged later on as what was written either over or under shot the needs of the project. Best to start simple.

Write a failing test for the behavior that you desire, and then go from there.