Simplify, simplify

"Our life is frittered away by detail...simplify, simplify" - Henry David Thoreau

Generative AI models are good at generating code, generating words, generating more and more stuff. Is it meaningful or necessary?

There are plenty of articles, essays and memes expressing frustration with reading AI-generated content that has not demonstrated that the purported author has given it any thought beyond the prompt. I recently ran a meeting with my team to discuss our team agreements on AI use in code reviews. We had a digital whiteboard, color coded post-it notes and ten minutes to write our thoughts and suggestions. The most repeated sentiment was that as a team, we wanted our colleagues to read ai-generated output and use their judgement to determine whether it is something that needs to be addressed.

At the same time, many people have difficulty expressing themselves in an appropriate way and are using whatever tools that are available towards that goal. I recall a scene from one of my favorite childhood novels, "She, the Adventuress", where the protagonist is told that most people don't have any use for poetry beyond greeting cards. For many people, writing is a utilitarian task and there's no special enjoyment to be found in crafting elegant letters, essays and articles. So if AI can help relieve the burden of that task then, full speed ahead right?

Even if you consider yourself more of a greeting card fan than a poetry enthusiast, I believe there is still an element of human taste and judgement involved. After all, most people don't just walk into a store's greeting card aisle, grab the first card they see and walk out. We generally think of the following:

  1. Who am I buying the card for?
  2. What is the occasion that is being commemorated?
  3. What is the feeling that I want to convey?

I think the same approach should be applied when using generative AI to generate writing (and, honestly, code).

For example, I have a list of things I do not like to read in AI-generated pull request (PR) descriptions. For example:

  1. The description is too long!
  2. The description contains too much code! That's what the diff is for.
  3. The description doesn't focus on the things that reviewers need to be aware of.

More and more code is being written by AI everyday. There are a lot of people rethinking the utility of code reviews altogether. However, while they are still a software engineering convention, I think developers need to establish a sense of taste. In the context of PR descriptions, this is what I think is the most useful to write and to read:

  1. What is this change?
  2. Why is this change being made?
  3. What is the impact of this change?
  4. Is there anything not in this change that should be considered at another time? (Optional)

On a related tangent, when it comes to reviewing AI-assisted code, here are the things that will result in a change request from me:

  1. This code is doing too much: scope creep, risky refactors.
  2. This code isn't doing enough: not meeting story acceptance criteria
  3. A stated assumption about the system or user experience is incorrect.
  4. That test is not testing what it claims to be testing.
  5. This test is brittle: making assertions on implementation vs behavior/outcome that can and will change.
  6. "No, we have food at home": there's existing code that can be reused instead of reinventing the wheel

So before you run someone's pr through a /code-review skill and post the results, ask yourself, what matters to you? What is good? What is bad?

Develop your sense of taste.

Then simply, simplify.