DEV Community

Discussion on: Valuable Tips for Junior Developers

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

memattchung profile image

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.

Matt Chung