Category: Refactoring

Code Smell – Bad Smell in Code : Understanding Temporary Field 0

Code Smell – Bad Smell in Code : Understanding Temporary Field

Some of the TEMPORARY FIELDS to clarify the algorithm like as below public DayDate getNearestDayOfWeek(final Day targetDay) { int offsetToThisWeeksTarget = targetDay.index – getDayOfWeek().index; int offsetToFutureTarget = (offsetToThisWeeksTarget + 7) % 7; int offsetToPreviousTarget...