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
-
GCHQ2787yDepends how you look at it, sure using a loop instead of a load of if statements is better (in most cases).
If you have a short bit of code that does what a few lines of code could achieve then you might not have the readability which would be useful for anyone else that might look at the code later on.
Again it all depends on what it is but a lot of the time a few extra lines could be worth the readability -
Code should be maintainable by different developers. Therefore, go for clear code before short code always!
I only agree to this in regards if not repeating yourself, yet I curse a number if colleagues for their habit to have it all in one line. -
makarand6017y@AlpineLinnix I think by readability, @k0pernikus meant that if the code understandable to most coders. Its more like general idea of it.
However in my experience shorter lines of code generally mean hard to understand but not always, they can be easier sometimes too. -
inaba46257y@hashris that's what people mean when people say that. It doesn't mean make unreadable oneliners.
It's pretty much just kiss but reworded
Related Rants
-
CowboyBebop16"Don't give your 100%. Never. Once you gave, managers will start expecting more than that." - My mentor.
-
linuswillner15(Q: How much are you allowed to Google as a developer?) βYouβre allowed to Google as much as you want. Th...
-
ripbit18Never delete code immediately. Always comment it out first.
The key to write the best code is to write it in least lines.
rant
wk103