Tag

code comments

1 views collected around this technical thread.

Test Development Learning Exchange
Test Development Learning Exchange
Mar 1, 2025 · Fundamentals

How to Write Effective Comments and Docstrings for Python Functions

This article explains the importance of good comments and docstrings in Python, describes the basic syntax for single‑line, multi‑line, and docstring comments, and provides ten practical examples illustrating various annotation techniques and their typical use cases.

Best PracticesPythoncode comments
0 likes · 9 min read
How to Write Effective Comments and Docstrings for Python Functions
Java Tech Enthusiast
Java Tech Enthusiast
Nov 17, 2024 · Fundamentals

Types and Best Practices of Code Comments

Effective code comments fall into nine categories—six recommended types such as function, design, why, teacher, checklist, and guide comments, and three to avoid (trivial, debt, backup)—and using the right kind improves readability, maintenance, and AI‑assisted understanding of software projects.

Best Practicescode commentscoding standards
0 likes · 7 min read
Types and Best Practices of Code Comments
Continuous Delivery 2.0
Continuous Delivery 2.0
Sep 29, 2024 · Artificial Intelligence

Four Practical Tips for Using Cursor AI Effectively

This article presents four actionable techniques—clearly stating requirements, requesting code comments, invoking the Composer with Command/Ctrl + I, and configuring AI rules in Settings—to help developers maximize productivity when working with the Cursor AI coding assistant.

AI codingCursorDeveloper Tips
0 likes · 4 min read
Four Practical Tips for Using Cursor AI Effectively
Go Programming World
Go Programming World
Jul 21, 2024 · Fundamentals

Chinese Copywriting Guidelines: Formatting Rules for Code Comments, README, and Documentation

This article introduces the Chinese copywriting guidelines, explaining why spaces between Chinese and English, numbers, units, and punctuation matter, providing concrete examples and best‑practice rules, and showcasing the autocorrect CLI tool and language libraries that can automatically enforce these formatting standards.

CLI toolChinese copywritingautocorrect
0 likes · 16 min read
Chinese Copywriting Guidelines: Formatting Rules for Code Comments, README, and Documentation
Ant R&D Efficiency
Ant R&D Efficiency
Jul 17, 2023 · Fundamentals

Best Practices for Writing Java Comments

Effective Java commenting follows a clear hierarchy—using single‑line, block, and Javadoc styles—while aligning comments with code, inserting blank lines, and limiting redundancy, so that each comment explains intent, summarizes complex sections, documents parameters, and aids maintainability without overwhelming the source.

Best PracticesJavacode comments
0 likes · 15 min read
Best Practices for Writing Java Comments
Laravel Tech Community
Laravel Tech Community
Feb 21, 2021 · Fundamentals

C/C++ Commenting Guidelines and Best Practices

This article explains the importance of comments in C/C++ code and provides detailed guidelines for file, function, variable, spelling, and TODO annotations, including examples and best‑practice recommendations to improve code readability and maintainability.

Best PracticesC++code comments
0 likes · 6 min read
C/C++ Commenting Guidelines and Best Practices
政采云技术
政采云技术
Sep 27, 2020 · Frontend Development

Writing High‑Quality Maintainable Code: A Guide to Clear Annotations

This article explains why comments are essential for code readability and maintenance, describes the syntax of comments in HTML, CSS, JavaScript and other languages, shows practical shortcuts, special tags, real‑world examples, and recommends VS Code extensions for writing consistent, useful annotations.

CSSJavaScriptVS Code extensions
0 likes · 16 min read
Writing High‑Quality Maintainable Code: A Guide to Clear Annotations
vivo Internet Technology
vivo Internet Technology
Aug 21, 2019 · Frontend Development

Best Practices for Writing High‑Quality JavaScript Functions: Naming, Comments, and Robustness

The article advises front‑end developers to improve JavaScript function quality by adopting clear, English‑style names, using consistent prefixes for visibility, writing informative comments such as JSDoc, and applying defensive programming techniques—including default parameters, try/catch, and granular promise error handling—to create maintainable, robust code.

Best PracticesJavaScriptcode comments
0 likes · 17 min read
Best Practices for Writing High‑Quality JavaScript Functions: Naming, Comments, and Robustness
360 Quality & Efficiency
360 Quality & Efficiency
Sep 20, 2016 · Fundamentals

Should You Add Comments to Your Code? – Insights from Refactoring

This discussion post examines whether code should be commented, citing the book *Refactoring* and emphasizing that needing comments often signals the need for refactoring, while good variable names can serve as implicit documentation, and stresses the importance of clear interface comments.

Best Practicescode commentscoding standards
0 likes · 2 min read
Should You Add Comments to Your Code? – Insights from Refactoring
Architecture Digest
Architecture Digest
Jul 25, 2016 · Fundamentals

Why Comments Can Be Harmful and How to Adopt a Zero‑Comment Policy

The article argues that comments often degrade code readability, identifies two common comment‑related problems—poor naming and overly long methods—and proposes a zero‑comment approach that relies on accurate naming, short methods, and self‑describing code, illustrated with C# examples.

Best Practicesclean codecode comments
0 likes · 7 min read
Why Comments Can Be Harmful and How to Adopt a Zero‑Comment Policy
Qunar Tech Salon
Qunar Tech Salon
Feb 28, 2016 · Fundamentals

My Commentary on Code Comments

Through a collection of humorous and often pointless code comment examples, the article examines how developers use annotations—ranging from cryptic references to overly detailed narratives—to convey (or obscure) intent, highlighting best practices and pitfalls in writing effective code comments.

Best Practicescode commentshumor
0 likes · 8 min read
My Commentary on Code Comments
Art of Distributed System Architecture Design
Art of Distributed System Architecture Design
May 28, 2015 · Fundamentals

10 Controversial Programming Opinions and Their Lessons

This article compiles ten provocative programming viewpoints—from the primacy of using your brain over rigid best‑practice checklists to the limits of unit testing—offering practical reflections on mindset, learning, tooling, and design that can sharpen any developer’s approach.

Best Practicescode commentsdeveloper mindset
0 likes · 6 min read
10 Controversial Programming Opinions and Their Lessons
Baidu Tech Salon
Baidu Tech Salon
Nov 12, 2014 · Fundamentals

Top 10 Funniest Code Comments from StackOverflow

The article showcases the top ten most memorable and humorous code comments harvested from a StackOverflow discussion, ranging from sarcastic warnings and epic motivational messages to absurd exception handling and playful macros, illustrating how developers inject personality into code while inviting readers to share even funnier examples.

Best PracticesStackOverflowcode comments
0 likes · 3 min read
Top 10 Funniest Code Comments from StackOverflow