News for hackers. Stuff that matters.
Re:It Takes 6 Days to Change 1 Line of Code by Macha on Sunday July 16, 2023 @12:38PM (#36748868)
On this example:

    if not something:
        # Unhappy case
    else:
        # Happy case
To:

    if something:
        # Happy case
    else:
        # Unhappy case
This is the exact kind of rule that some people feel needs to be applied globally and will run into conflicts with rules like "put the shorter case first" so people aren't having to keep multiple cases in their mind at once.

In short it's a preference masked as a best practice, and putting it under the same kind of "oh we should change it for the boy scout rule" logic as things like "Maybe let's not have 1000 line methods" is the exact kind of performative review being complained about.

Re:It Takes 6 Days to Change 1 Line of Code by Tainnor on Sunday July 16, 2023 @01:21PM (#36749394)
I don't see anything wrong with giving a feedback such as "I would find it easier to understand if it was written lile this...". I'm just stating my preference and if the author agrees (which sometimes happens), or if they don't care, they can change it, otherwise they may also ignore it.
Re:It Takes 6 Days to Change 1 Line of Code by RadiozRadioz on Sunday July 16, 2023 @03:12PM (#36750448)
And sometimes the unhappy case is simply more "important". It's nice when code reads like prose, and matches how you'd describe something using natural language. Perl has the `unless` statement for exactly this purpose. This pattern isn't inherently bad, sometimes it's just what you wanted to say.
Re:It Takes 6 Days to Change 1 Line of Code by morelisp on Sunday July 16, 2023 @03:54PM (#36750808)
Check out this guy who thinks it's objectively bad to have 1000 line methods.