Best practices for writing code comments

While there are many resources to help programmers write better code—such as books and static analyzers—there are few for writing better comments. While it's easy to measure the quantity of comments in a program, it's hard to measure the quality, and the two are not necessarily correlated. A bad comment is worse than no comment at all. Here are some rules to help you achieve a happy medium. The post Best practices for writing code comments appeared first on Stack Overflow Blog.

https://stackoverflow.blog/2021/07/05/best-practices-for-writing-code-comments/

Létrehozva 4y | 2021. júl. 5. 15:21:36


Jelentkezéshez jelentkezzen be

EGYÉB POSTS Ebben a csoportban

One quality every engineering manager should have? Empathy.

Ryan talks with senior engineering manager Caitlin Weaver about how her childhood fascination with computers led to her leading CLEAR’s Cloud Infrastructure Engineering team, her experiences in DevOps

2025. febr. 21. 6:10:02 | StackOverflow blog
Research roadmap update, February 2025

An update to the research that the User Experience team is running over the next quarter. https://stackoverflow.blog/2025/02/20/research-roadmap-update-february-2025/

2025. febr. 20. 18:30:02 | StackOverflow blog
Why is it so hard for companies to protect your privacy?

Minh Nguyen, VP of Engineering at Transcend, joins Ryan for a conversation about the complexities of privacy and consent in tech, from the challenges organizations face in managing data privacy to the

2025. febr. 18. 6:10:05 | StackOverflow blog
Solving the data doom loop

Ken Stott, Field CTO of API platform Hasura, tells Ryan about the data doom loop: the concept that organizations are spending lots of money on data systems without seeing improvements in data quality

2025. febr. 14. 7:20:02 | StackOverflow blog
How to harness APIs and AI for intelligent automation

APIs have steadily become the backbone of AI systems, connecting data and tools seamlessly. Discover how they can drive scalable and secure training for AI models and intelligence automation. https://

2025. febr. 13. 17:20:06 | StackOverflow blog