Feb. 6, 2022, noon

PinkLetter - Manage complexity with shitty code

PinkLetter (odone.io)

Welcome to my PinkLetter. A short, weekly, technology-agnostic, and pink newsletter where we cultivate timeless skills about web development.

My Ramblings This Week

How many times have you coded the same stuff?

You know, things like authentication, authorization, mailers, etc.

Unless you are coding yet another todos application, a complex feature is due to appear on the board. It normally comes with a mix of constraints like:

  • Legacy code.
  • Limited budget.
  • New domain.
  • Performance budget.

And if you are coming from a streak of straightforward tickets, you could start panicking a bit: it looks like there’s no viable solution that satisfies all the requirements!

The best way I found to tackle such tickets is to spike like hell, first on the whiteboard, then with shitty code:

  • Spike a naive implementation.
  • List all (non-trivial) issues that needs solving.
  • For each problem, generate several solutions without getting attached to any and discuss the tradeoffs.
  • Pick the most promising solution and spike it.
  • If the spike gives you confidence, move to the next issue; otherwise, try the next best solution.

Maybe there isn’t a viable solution given the constraints. But would you rather discover it in the first few days or after deploying super elegant and tested code that doesn’t work as expected?

Elsewhere on the Web

I’d share with you the usual 3 links. But I thought you would prefer 218 links: all killers, no fillers!

Timeless Software Wisdom

You just read issue #84 of PinkLetter (odone.io). You can also browse the full archives of this newsletter.

Brought to you by Buttondown, the easiest way to start and grow your newsletter.