23.07.2024 - A comment on comments

Comments is a part of code that is not executed during runtime. It should be short, concise and necessary. Comment shall be deemed necessary whenever there is a gap between the story that may be described by code only and actual story. It should be cherry on top that adds value by giving more insight to the logic than the naming, formating and the structure. The overriding rule regarding comments should be - keep your code understendable to yourself and future maintainers(possibly you). Do not attach comments to poorly named variables, functions and modules. Try to include as much context as possible within naming and structure. There is a common practice to set comments ide colouring to same as bacground but it is possible to overlook some valuable comment in this case. i stole the title from the book(original author Cal Evans) regards gmarcin

Komentarze

Popularne posty z tego bloga

[WP] 23.06.2023 | subjects

15.07.2024 | simplicity

[WP] 05.06.2023 | angular-intro