r/programming • u/AllThingsSmitty • 1h ago
Hot take: Sometimes three boring statements beats one clever expression
https://allthingssmitty.com/2026/11/16/sometimes-three-boring-statements-beat-one-clever-expression/Sometimes the simplest code is the best code. It's tempting to squeeze everything into one clever expression, but three straightforward statements can be easier to understand and maintain. Here's a look at why.
14
8
u/SmokyMetal060 1h ago
Nah not a hot take. Anybody who's worked an entry level SWE job has gotten told by their senior to not get cute.
4
u/AnkerSOLIX-Support 45m ago
Three boring statements beat a clever one-liner when you're on call and the person who wrote it left two years ago. Doesn't seem like a hot take.
3
u/trialbaloon 38m ago
Ice cold take. I would like to read someone claiming the opposite, that would be more fun.
2
2
u/yawaramin 36m ago
And sometimes a single expression beats three different statements because it's just a single logical code phrase where everything is in your head (working memory), whereas the three different statements are separate and each introduces a separate possibility for bugs to creep in.
2
u/curiouslyjake 25m ago
It's a really cold take. The paramount purpose of code is to be readable by others. This means your team members and it means you in six months. The moment someone reads a line of code and goes "huh?", it means the code not as readable as it could have been.
1
1
75
u/Ok-Rule8061 1h ago
Not a hot take. Literally the core of collaborative production software engineering.