Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
c3r38r170162232dWhile I understand what you meant, not all "clever" code is unreadable. And if it is, the clever programmer will make use of one of those things called comments.
@c3r38r170 And there's performance and safety to factor in.
Yeah "premature optimization is evil", but PREEMTIVE optimization isn't always evil.
High throughput sorting & transforming/reducing is an example where optimizing preemptively can pay off.
For example when you have a system which handles billing, and you know up front that it's going to need to calculate taxes and merge certain amounts, and sort line items by date for a billion invoices, introducing some smart indexing/caching system could pay off. You know the requirements and tradeoffs, so you can probably already build some performance increasing mechanisms into the service.
Also, if readable code increases the chance of bugs, well fuck that.
A great example of that is race conditions: Not locking data resources is of course easier to read — but writing fixes to repair corrupted data is much worse than building data safety into your code.
AleCx042463332d*Looks up from massive rails personal project
Well fuck you too buddy!
IntrusionCM470732dReadability is important.
Cleverness is sometimes point of view.
It's hard to tell. I know people who still don't understand that maayyyybeee a generator makes more sense than that convoluted if else dramalama thingie trying to build an array ;)
devdiddydog43431dclever readable code >>>>>>> anything else.