Skip to content

Today's Card

Software engineering and other thoughts.

Tag Archives: clean code

Don’t put cusswords in your code.

They’ll come out at the wrong time and appear to the wrong people.

Posted byfooyayJune 30, 2020July 14, 2020Posted inUncategorizedTags:clean code, professionalismLeave a comment on Don’t put cusswords in your code.

Method names should resemble the domain.

It’s always best to use business words to describe what a method is doing.

Posted byfooyayJune 26, 2020June 14, 2020Posted inUncategorizedTags:clean codeLeave a comment on Method names should resemble the domain.

Methods shouldn’t depend on prior method calls.

You want your code to be more loosely coupled, so it doesn’t break later.

Posted byfooyayJune 25, 2020June 14, 2020Posted inUncategorizedTags:clean code, loosely coupledLeave a comment on Methods shouldn’t depend on prior method calls.

Name booleans carefully.

Give them names that suggest a binary outcome.

Posted byfooyayJune 19, 2020May 16, 2020Posted inUncategorizedTags:boolean, clean code, variablesLeave a comment on Name booleans carefully.

Variable names should describe what, not how.

Leave the how to the implementation.

Posted byfooyayJune 18, 2020May 16, 2020Posted inUncategorizedTags:clean code, naming, variablesLeave a comment on Variable names should describe what, not how.

A variable should have one purpose.

Don’t overload variables into multiple meanings.

Posted byfooyayJune 17, 2020May 16, 2020Posted inUncategorizedTags:clean code, refactoring, scopes, variablesLeave a comment on A variable should have one purpose.

Don’t modify input parameters.

It will lead to unexpected results later.

Posted byfooyayJune 15, 2020May 16, 2020Posted inUncategorizedTags:clean code, refactoringLeave a comment on Don’t modify input parameters.

Write shorter routines.

Studies have shown that longer and more complex routines are subject to error and more expensive to maintain.

Posted byfooyayJune 12, 2020May 16, 2020Posted inUncategorizedTags:clean code, complexity, simplicityLeave a comment on Write shorter routines.

A variable’s name should correlate to the size of its scope.

The larger the scope, the harder it is to fully understand.

Posted byfooyayMay 29, 2020May 10, 2020Posted inUncategorizedTags:clean codeLeave a comment on A variable’s name should correlate to the size of its scope.

Posts pagination

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