正在加载视频...

视频加载失败

Morning, bathrobe rant: comments

67,194 次观看 • 1 年前 •via X (Twitter)

11 条评论

Eric S. Raymond 的头像
Eric S. Raymond1 年前

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 的头像
MBS1 年前

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

Jose Canciani 的头像
Jose Canciani1 年前

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

rolandsaven 的头像
rolandsaven1 年前

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

Philipp Blum 的头像
Philipp Blum1 年前

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

Ali Khaleqi Yekta 的头像
Ali Khaleqi Yekta1 年前

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.

Philipp Blum 的头像
Philipp Blum1 年前

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

🐝🇬🇷 的头像
🐝🇬🇷1 年前

You should do bathrobe reviews

Citizen of Mars 的头像
Citizen of Mars1 年前

I am looking forward hearing a graphql rant! :)

rolandsaven 的头像
rolandsaven1 年前

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

Uncle Bob Martin 的头像
Uncle Bob Martin1 年前

delete the class and rename CountryProps to Country.

相关视频