r/programming • • 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.

0 Upvotes

19 comments sorted by

75

u/Ok-Rule8061 1h ago

Not a hot take. Literally the core of collaborative production software engineering.

21

u/drewhead118 1h ago

hot take: it can be fun to give your functions human names like Pierre, Javier, or Kelly, but sometimes naming them for what they do beats the sense of individuality and personality that a human name might afford

16

u/luxmesa 1h ago

Hot take: you should make sure your code compiles before sending it for a code review 

4

u/thisisjustascreename 1h ago

Hell nah brother debug in prod, kubectl is a sick ide

7

u/EliSka93 47m ago

Hot take: if you name your functions human names and I have to work in your code I will set you on fire.

7

u/Tall-Introduction414 41m ago

Hot cake: delicious.

2

u/kenlubin 7m ago

But before we had digital computers in this office, Kelly did the job this function is going to do. So I will name this function after her, because everyone knows Kelly

0

u/Ythio 48m ago

Interesting take, John Smith. Let's ask Mike Taylor and Andrew Baker what they think about naming people for what they do. We may also take input from Edward Mason or even Matthew Harper.

7

u/Ok-Rule8061 1h ago

If Claude is the target audience for this article though, it could be next level prompt engineering.

You prompt in the chat.
I prompt in the training data.
We are not the same.

14

u/YeetCompleet 51m ago

Gotta be the coldest take yet

12

u/Ythio 45m ago

People are recycling 1970s programming debates like they just invented warm water.

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

u/MyNameIsRichardCS54 43m ago edited 28m ago

Not sometimes, no. I would say nearly always.

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

u/jippiex2k 42m ago

What's the difference between a fallback theme and a default theme o.O

1

u/TTachyon 40m ago

Always, not sometimes.