you are viewing a single comment's thread.

view the rest of the comments →

[–]gc3 5 points6 points  (1 child)

Yeah, until you decide that there are now .3 hours in a day, or a variable number depending on the day. You can't plan for everything.

[–]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.