正在加载视频...
视频加载失败
Morning, bathrobe rant: comments
11 条评论

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.

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

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).

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

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

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.

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

You should do bathrobe reviews

I am looking forward hearing a graphql rant! :)

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

delete the class and rename CountryProps to Country.
