Created
May 2, 2022 10:27
-
-
Save tuanpmt/4a955218f877fc34afeaddfa359e56c2 to your computer and use it in GitHub Desktop.
USE SEARCHABLE NAMES
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* BAD */ | |
for (int i = 0; i < 5; i++) | |
{ | |
s += (t[i] * 4) / 5; | |
} | |
/* GOOD */ | |
int realDaysPerIdealDay = 4; | |
const int WORK_DAYS_PER_WEEK = 5; | |
int sum 0; | |
for (int i = 0; i < NUMBER_OF_TASKS; i++) | |
{ | |
int realTaskDays = taskEstimate[j] * realDaysPerIdealDay; | |
int realTaskWeeks = (realTaskDays / WORK_DAYS_PER_WEEK); | |
sum += realTaskWeeks; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment