Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D digitec-wiki
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Digitec
  • digitec-wiki
  • Wiki
  • smells and heuristics comments

smells and heuristics comments · Changes

Page history
rcabral created page: smells-and-heuristics-comments authored Mar 22, 2014 by Rene Cabral's avatar Rene Cabral
Hide whitespace changes
Inline Side-by-side
smells-and-heuristics-comments.markdown
View page @ 629ed3e0
......@@ -18,6 +18,31 @@ __C2: Obsolete Comment__
A comment that has gotten old, irrelevant, and incorrect is obsolete. Comments get old quickly. 1t is bestnot to write a comment that will become obsolete. If you find an obsolete comment, it is best to update it or get rid of it as quickly as possible. Obsolete comments tend to migrate away from the code they once described. They become floating islands of irrelevance and misdirection in the code.
__C3: Redundant Comment__
A comment is redundant if it describes something that adequately describes itself. For example:
```java
i++; II increment i
```
Another example is a Javadoc that says nothing more than (or even less than) the function signature:
```java
/**
* ®param sellRequest
* ®return
* ®throws ManagedComponentException
*/
public SellResponse beginSellitem(SellRequest sellRequest)
throws ManagedComponentException
```
Comments should say things that the code cannot say for itself.
---
......
Clone repository
  • alpha beta testing
  • browser testing
  • camtasia licenses
  • code delivery processes
  • coding practices
  • css and sass coding standards
  • database schema standards
  • dependency management
  • development environments
  • digitec agile process
  • digitec gitlab styles
  • digitec software promises
  • digitec spec process
  • gitlab administration
  • gitlab issues tags
View All Pages