DEV Community

Discussion on: Valuable Tips for Junior Developers

Collapse
 
l0uiscouture profile image
Louis Couture β€οΈπŸ³οΈβ€πŸŒˆπŸ‡ΊπŸ‡³βšœοΈ

code should strive to be self documented. At least according to agile principle.

Clean code also tells you that your code should be self explanatory, that you could read code like one reads a text

Collapse
 
memattchung profile image
memattchung

I agree, that under ideal situations, code self documents. However, some of the best code bases I've seen are sprinkled with comments β€” lots of them. I like stating the pre and post conditions of my functions. Also, I like explaining the reasoning behind the module I'm building as well. Not only what it does, but what it doesn't do as well.

Cheers,
Matt Chung
@memattchung