DEV Community

Discussion on: Commenting Code | Good Practices

Collapse
 
sargalias profile image
Spyros Argalias

Completely agree. I consider "comments as documentation" good. They make the project easier for developers to work with because glancing over the documentation is much faster and easier than reading through the code.

On the other hand, I think "Inline commenting" is bad. That's used when the code needs explaining because it's difficult to understand.

They're different things.

Thread Thread
 
joelbonetr profile image
JoelBonetR 🥇 • Edited

Sure! I'm talking just about the usual documentation above each function/method that defines the required information to work with this provided function/method without making you read the current implementation 😄