2

A clever code that works but is difficult to understand or a well written commented code that’s easy to understand but does not work ?

Comment below:

Comments
  • 4
    If you're doing something clever with the code that's not very intuitive but haven't commented it then that makes you an asshole.

    But if it doesn't work it's useless, unless you want to say that not doing its job is a feature and not a bug.
  • 2
    Useless code is the worst imo.
  • 4
    @halfflat You inspired me to make the fastest function: void fast(){}
  • 0
    If it doesn't work, remove it.

    Difficult to understand is something that can be changed.

    Document, simplify or add tests for clarification and add a hint regarding the tests to the documentation.
    L
  • 1
    Define "clever"
  • 1
    for(; iptrs < end; (*float)*(iptrs++) += 10.0);
  • 1
    @12bitfloat Egads! I cannot un-see!
  • 0
    YouTube uncle Bob / clean code.

    This comes up somewhere in part 1.
  • 0
    This feeling when you have deployment on Monday, tests isn't finished on Friday and you haven't approvals. Saturday evening, you've got approval but in common way you shouldn't read your company email during weekend...

    No profits...

    Ehhh... Sometimes I think that client sucks :/
Add Comment