Skip to content

Comments - Explain Yourself in Code #25

@jnguyen095

Description

@jnguyen095

Don’t comment bad code—rewrite it!

  • Which would you rather see? This
//Check to see if the employee is eligible for full benefits
if ((employee.flags & HOURLY_FLAG) && (employee.age > 65))

Or this?

if (employee.isEligibleForFullBenefits())

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions