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/

Created 4y | Jul 5, 2021, 3:21:36 PM


Login to add comment

Other posts in this group

How AI apps are like Google Search

Happy New Year! In this episode, Ryan talks with Jetify founder and CEO Daniel Loreto, a former engineering lead at Google and Twitter, about what AI applications have in common with Google Search. Th

Jan 3, 2025, 6:30:05 AM | StackOverflow blog
Developers want more, more, more: the 2024 results from Stack Overflow’s Annual Developer Survey

This year, technologies such as JavaScript and PostgreSQL remain most popular, Rust and Markdown remain most admired, developers are most frustrated by technical debt at work, and they don’t see AI as

Jan 1, 2025, 5:30:04 PM | StackOverflow blog
How developers (really) used AI coding tools in 2024

During the holidays, we’re releasing some highlights from a year full of conversations with developers and technologists. Enjoy! We’ll see you in 2025. https://stackoverflow.blog/2024/12/31/how-develo

Dec 31, 2024, 9:10:02 AM | StackOverflow blog
Breaking up is hard to do: Chunking in RAG applications

A look at some of the current thinking around chunking data for retrieval-augmented generation (RAG) systems. https://stackoverflow.blog/2024/12/27/breaking-up-is-hard-to-do-chunking-in-rag-applicatio

Dec 27, 2024, 4:50:04 PM | StackOverflow blog