Fuck favoring cleverness over readability

  • 6
    While 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.
  • 3
    @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.
  • 3
    *Looks up from massive rails personal project

    Well fuck you too buddy!
  • 1
    Readability 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 ;)
  • 4
    clever readable code >>>>>>> anything else.
  • 1
    That depends
Add Comment