Skip navigation
Morning, bathrobe rant: comments
0:00 / 3:22

Morning, bathrobe rant: comments

Uncle Bob Martin

@unclebobmartin290K followers

Visit on X
908 likesDownloadOriginal post

67,280 views

Morning, bathrobe rant: comments

11 Comments

Comments from the original post on X (Twitter)

  • Eric S. Raymond's profile picture

    @esrtweet

    That line about "every comment you write represents a failure" reminds me of one of my design principles. if anybody needs to write documentation for your user interface, you are a shitty interface designer and should be ashamed. Good UI explains itself - it makes easy things easy and supports progressive discovery of the complex things through the interface itself.

    38 likes

  • MBS's profile picture

    @original_MBS

    MBS - Tom’s Computer [OUT NOW!] Listen now: #music #edm #MBS #crypto #vibes

    664 likes

  • Jose Canciani's profile picture

    @josecanciani

    Explain in comments that that is not obvious in the code. There are a lot of valid reasons to be verbose in comments. Here are some I can think of: - Explaining Design Decisions ("This loop is necessary because the callback has an internal optimization that performs better with sorted data, even though the final result does not need to be sorted"). - Explain Assumptions or Constraints ("This regex has been created for Mysql identifiers and won't work for other db engines"). - Show pitfalls or side-effects ("Modifying this constant will invalidate existing cached items, producing longer startups when coming out of maintenance"). - Explain Business Rules, not obvious to a developer ("We store amounts with 4 decimals -2 more than shown to the user- to be able to follow what local legislation defines as valid round operations"). - TODOs (we know we will change something, so we left some breadcrumbs for other developers to understand and to guide them in the right direction).

    23 likes

  • rolandsaven's profile picture

    @rolandsaven

    honestly, I think devs learn more from these rants than books

    16 likes

  • Philipp Blum's profile picture

    @Citrullin

    //Workaround: Talk to Harald. He knows the details. Harald doesn't work here any more. ᵀʰᵒˢᵉ ʷʰᵒ ᵏⁿᵒʷ

    14 likes

  • Ali Khaleqi Yekta's profile picture

    @YektaDev

    Comment is for the WHY. Code is the WHAT. If by looking at the what, you can't immediately guess the why, then you need a comment.

    10 likes

  • Philipp Blum's profile picture

    @Citrullin

    //Fixme: 1999-10-02 Very important part that needs to be fixed. ᵀʰᵒˢᵉ ʷʰᵒ ᵏⁿᵒʷ

    8 likes

  • 🐝🇬🇷's profile picture

    @bee_fumo

    You should do bathrobe reviews

    7 likes

  • Citizen of Mars's profile picture

    @csanyi_andras

    I am looking forward hearing a graphql rant! :)

    6 likes

  • rolandsaven's profile picture

    @rolandsaven

    u get this in a PR, what do you do?

    4 likes

  • Uncle Bob Martin's profile picture

    @unclebobmartin

    delete the class and rename CountryProps to Country.

    29 likes