BSG Industries Amalgamated
The Tyranny of the Best Practice
by Patrick R. Vecchio 9/16/2025

Jefferson Memorial in Washington, DC

A Bit of History

When I lived in Washington, DC I liked to visit the Jefferson Memorial. It’s like a temple of thought - on a peninsula jutting into the tidal basin with a dome on top surrounded by pillars. Inscribed inside the rim of the dome is a quote from Jefferson.

“I have sworn upon the altar of God eternal hostility against every form of tyranny over the mind of man.”

The words struck a chord with me because I’ve always felt a need to question everything and in doing so, I feel like I’m fighting tyranny over the mind of man. Or maybe I’m just a pain in the ass and I’m using some dead guy’s words to back my way into justifying my prickliness. Either way, I don’t like the term “best practice”.

Best According to Who?

As someone who questions everything, I can’t just accept someone else’s idea of a best practice. I need to understand the thought that went into it so that I can incorporate it into my internal knowledgebase and apply it where appropriate.

Best Practice as Gospel

Once upon a time, I submitted a Pull Request that included some unit tests (sigh oh, unit tests, I’ll deal with you in a future post). One of the reviewers rejected my pull request because I didn’t follow the AAA best practice in my unit tests. You should know that I’m from New Jersey, so needless to say, some tables came pretty close to being flipped that day.

For those unfamiliar, the AAA best practice is the practice of putting comments in your code that spells out the sections of a unit test - Arrange, Act, and Assert like so:

{@html `  // Arrange
  const a = 1;
  const b = 2;
  const expectedSum = 3;

  // Act
  const sum = a + b;

  // Assert
  console.assert(sum === expectedSum, "1 + 2 did not return 3");`}

Question Everything

First of all, is there another way to do unit tests besides set it up (Arrange), do something (Act), and make sure it did it correctly (Assert)?

Understand the Intent of the Best Practice

So, stepping off of my high horse for a minute, the idea behind the AAA best practice is to improve readability. I get it, and I’m a fan of readability. It’s a good thing to strive for and I’m a big proponent of it having inherited some pretty unreadable codebases.

Does It Apply to This Situation?

In my case, I was testing a bunch of model transformations which was pretty straightforward - create some data, transform it, ensure all the values appear in the transformed model. Does it apply? Sure, but only as a suggestion, not as a reason for rejecting the whole PR.

Conclusion

Don’t blindly follow best practices. Understand their intent, learn what you can from them, and apply them when they apply to the situation. Consider this, for lack of a better term, (gag), a best practice for best practices.