Skip to content

Today's Card

Software engineering and other thoughts.

Tag Archives: comments

Comments should discuss the current functionality.

Don’t let your comments ramble on about the past or future.

Posted byfooyayFebruary 24, 2021February 23, 2021Posted inUncategorizedTags:commentsLeave a comment on Comments should discuss the current functionality.

Don’t use comments as version control.

Instead, use version control software, like git.

Posted byfooyayFebruary 19, 2021February 11, 2021Posted inUncategorizedTags:comments, gitLeave a comment on Don’t use comments as version control.

Avoid comments at the end of a code block.

Your block is probably too big.

Posted byfooyayFebruary 18, 2021February 11, 2021Posted inUncategorizedTags:comments, simplicityLeave a comment on Avoid comments at the end of a code block.

Comments cannot enforce types or usage.

Use code for this.

Posted byfooyayFebruary 16, 2021February 11, 2021Posted inUncategorizedTags:commentsLeave a comment on Comments cannot enforce types or usage.

Don’t repeat code logic in the comments.

Logic should appear in only one place.

Posted byfooyayFebruary 11, 2021February 9, 2021Posted inUncategorizedTags:clean code, commentsLeave a comment on Don’t repeat code logic in the comments.

Make the robots talk.

Your unit tests should convey more information.

Posted byfooyayOctober 29, 2020September 30, 2020Posted inUncategorizedTags:comments, errors, testing, unit testingLeave a comment on Make the robots talk.

Go to the source.

The code tells the true story.

Posted byfooyayOctober 14, 2020September 29, 2020Posted inUncategorizedTags:comments, documentationLeave a comment on Go to the source.

Add comments to explain ideas.

Some things are not obvious from self-documenting code.

Posted byfooyayAugust 25, 2020August 1, 2020Posted inUncategorizedTags:clean code, commentsLeave a comment on Add comments to explain ideas.

Kent Beck’s Rules of Simple Design, #2

The code must express the intent of the programmers.

Posted byfooyayAugust 6, 2020July 1, 2020Posted inUncategorizedTags:clean code, commentsLeave a comment on Kent Beck’s Rules of Simple Design, #2

Look out for comments at the end of a block.

They may seem helpful, but they’re also a bad sign.

Posted byfooyayJuly 2, 2020June 16, 2020Posted inUncategorizedTags:clean code, comments, simplicityLeave a comment on Look out for comments at the end of a block.

Posts navigation

1 2 Older posts
Today's Card, Create a website or blog at WordPress.com
  • Follow Following
    • Today's Card
    • Join 40 other followers
    • Already have a WordPress.com account? Log in now.
    • Today's Card
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar