Smart Mistakes Are the Worst

Tuesday, May 22 2018 in architecture

When writing bad code, playing smarter sometimes gives the worst results.

Tangled Confusion

The developer writes code all over the place; the changes conflict or cancel each other and leave the situation as broken as before.

Elegant Conceit

The developer solves everything with a single crummy function. For example, it builds a list of items from scratch every time instead of loading it from a database.

Correcting this mistake takes a lot more work, because the right logic is entirely absent, but a lot of code depends on that single bad function. It’s a case of the wrong abstraction. Is this laziness or perverse genius?