The problem with comments - Uncle Bob #cleancode #programming #programmingtips #coding

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Code should explain itself. Comments should usually answer the question "why" in more complex situations.

jf
Автор

but... that's not the problem of comment, but the problem of developer who changed the code but did not modify the comment associated with it.

null-stress
Автор

When you onboard new developers, ask them to read comments and ask about anything that looks fishy. But mostly, use a language with a strong type system that allows developers to better express their intentions so the compiler can check them.

ClearerThanMud
Автор

What does that say about code review & professionalism?

JohnKerbaugh
Автор

Bollocks, comments tell you what the dev wanted the code the do, the code does what it does. When they don't match, you figure out what it actually needs to do and fix both.

MathewBoorman
Автор

There is no problem to leave comments. Let people do whatever they want.

notfund
Автор

code is always self explanatory.. it's just with comments it takes you 2 hours to understand instead of 2 days

dagoberttrump
join shbcf.ru