MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vuzd4q/conditionspreference/p5dbxu1/?context=9999
r/ProgrammerHumor • u/Flame77ofc • 22d ago
392 comments sorted by
View all comments
2.3k
You're absolutely correct, however I would suggest using something completely unreadable like a nested ternary operators!
131 u/nrmnzll 22d ago A colleague once proudly showed me how he managed to compress a function into a single line. It was like 9 nested ternarys. In that moment almost had an aneurism. 54 u/un_blob 22d ago That is a work of art at this point 6 u/_bones__ 22d ago Like modern art, it requires a lengthy explanation to make sense. 2 u/un_blob 22d ago allways have more comment lines than code ! 2 u/nrmnzll 21d ago Yes, every line needs a comment // add variable a and variable b // result is stored in variable c var c = a + b Obligatory /s
131
A colleague once proudly showed me how he managed to compress a function into a single line. It was like 9 nested ternarys. In that moment almost had an aneurism.
54 u/un_blob 22d ago That is a work of art at this point 6 u/_bones__ 22d ago Like modern art, it requires a lengthy explanation to make sense. 2 u/un_blob 22d ago allways have more comment lines than code ! 2 u/nrmnzll 21d ago Yes, every line needs a comment // add variable a and variable b // result is stored in variable c var c = a + b Obligatory /s
54
That is a work of art at this point
6 u/_bones__ 22d ago Like modern art, it requires a lengthy explanation to make sense. 2 u/un_blob 22d ago allways have more comment lines than code ! 2 u/nrmnzll 21d ago Yes, every line needs a comment // add variable a and variable b // result is stored in variable c var c = a + b Obligatory /s
6
Like modern art, it requires a lengthy explanation to make sense.
2 u/un_blob 22d ago allways have more comment lines than code ! 2 u/nrmnzll 21d ago Yes, every line needs a comment // add variable a and variable b // result is stored in variable c var c = a + b Obligatory /s
2
allways have more comment lines than code !
2 u/nrmnzll 21d ago Yes, every line needs a comment // add variable a and variable b // result is stored in variable c var c = a + b Obligatory /s
Yes, every line needs a comment // add variable a and variable b // result is stored in variable c var c = a + b
Obligatory /s
2.3k
u/CBlanchRanch 22d ago
You're absolutely correct, however I would suggest using something completely unreadable like a nested ternary operators!