Chapter 70. The Haiku Approach to Writing Software

Mitch Seymour

Haiku is a traditional form of Japanese poetry that follows a specific set of rules. Haiku are designed to evoke deep emotion or understanding by using only three lines and a fixed number of syllables. For example:

First autumn morning the mirror I stare into shows my father’s face.

Murakami Kijo

As my experience as a software engineer grows, I have found myself writing better software by approaching it as I would a haiku. Here are some of the lessons I’ve learned along the way.

Understand the Constraints Up Front

When we build software, we must often operate within a narrow set of constraints. The constraints may include the business requirements, the technologies at our disposal, the skill set or bandwidth of the team, and the time we’re given for actually creating the software.

Whether you’re writing a haiku or software, if you ignore or don’t understand the constraints of the project, you will have trouble producing what you set out to create. Instead of ignoring the constraints, aim to create something powerful or beautiful within them.

Start Strong Since Early Decisions Can Impact the Final Product

There’s a lot of freedom in the initial stages of a project. Many engineers approach a new project in the way a painter might approach a blank canvas. They lay down some initial, wild brush strokes in the codebase ...

Get 97 Things Every Data Engineer Should Know now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.