This shows you the differences between two versions of the page.
| — | blog:2021:08:30:2021-08-30_-_on_code_comments [2021/08/30 09:09] (current) – created basz | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== 2021-08-30 - on code comments ====== | ||
| + | recently, while [[https:// | ||
| + | |||
| + | > Don't comment bad code -- rewrite it. | ||
| + | |||
| + | while i did [[blog: | ||
| + | |||
| + | * bad code shall not be commented, but rewritten. | ||
| + | * existing comment may hint you that it might be a bad code. | ||
| + | * comment does not necessary mean that the code is bad. | ||
| + | * there are places where comments are needed, as it's hard/ | ||
| + | |||
| + | another quite from Brian K. that i love is: | ||
| + | |||
| + | > Do what you think is interesting, | ||
| + | |||
| + | here are [[http:// | ||
| + | |||
| + | and remember -- by the end of the day, there are only 2, truly difficult issues in IT: | ||
| + | |||
| + | - cache invalidation | ||
| + | - naming things | ||
| + | - off-by-one errors | ||