Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@atheist I’d prefer not, in case he’s on the forum by chance…
But basically:
- creating an object
And then on a single line:
- object unpacking to assign a SINGLE value
- ternary operation
- creating an object with a single field (technically 2 objects, since it’s a ternary) so it can be unpacked in the parent object
- parsing a value in the created (“child”) object
E X T R E M E L Y R E A D A B L E -
atheist94933yI get you. My username used to be the same as my email, I changed it when I was bitching about my work a lot.
Related Rants
After noticing 4 operations in a single line, I comment a pr stating the line is not simple to read as there are many operations which can be, especially in the eyes of a junior, hard to read.
I proceed to suggest a better solution.
Colleague: “what??? How is this not readable??? Is it [op1], [op2], [op3] or [op4]? 🤷♂️”
I kindly explain this person that it’s not about the single operations, but the fact they are all on a line. Inside an object assignment.
Colleague: “you should learn stuff! (4 links to websites giving that snippet of code”
Ah yes, the oldie: “but other people are jumping off a cliff, why don’t WE do it???”
rant
wtf?
readability
bad colleagues