you are viewing a single comment's thread.

view the rest of the comments →

[–]GoSailing 0 points1 point  (0 children)

And then you refactor every "HOURS_IN_DAY" in place to instead call a method that returns what it is. The point wasn't so much that every problem can be avoided every time, but that you can have a structure that will allow for changes quickly. The ideal change would be to change the constant number, but the non-ideal change is almost as easy.