this post was submitted on 08 Dec 2023
627 points (96.3% liked)

Programmer Humor

37192 readers
779 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
(page 3) 48 comments
sorted by: hot top controversial new old
[–] nickwitha_k 2 points 2 years ago

I do not like ternaries or null coalescing. In my opinion, it is a bit too terse, in a manner that harms code readability, debuggability, and maintainability.

When code goes into production, always assume that it will se a failure at 4am, with a new guy working on-call, who has never taken a CS bootcamp, much less an actual university course. Being clever and unnecessarilly saving a handful of lines is all fun and games until they are told to call the code's author because noone wants to deal with your clever code in the middle of the night.

[–] juli@programming.dev 0 points 2 years ago

I hate it.

It's like:

The tree is green, if it's summer. If it's summer, the tree is green.

I like the second much better.

[–] 30p87@feddit.de -1 points 2 years ago

Except there's literally no change in performance as a normal compiler will treat those the same. It just looks nice and trim down the time an experienced dev reads and understands the code by around 200ms.

load more comments
view more: ‹ prev next ›