Hacker News new | ask | show | jobs
by unsnap_biceps 304 days ago
multiple ways of doing something isn't inherently bad.

For example, if you want to set a variable to the number of seconds in seven hours, you could just set the variable to 25200, or you could set it to 60 * 60 * 7. The expanded version might be clearer in the code context, but in the end they do exactly the same thing.

2 comments

Your math equation turned the asterisks into italics.
Whoops, fixed. Thanks for the note
hold on, why would you have 7 hours?

dont you mean a week? 60 x 60 x 24 x 7 ?

or at lest 8 hours?

7 hours is just odd

The goal was to pick an arbitrary number that wasn't well known. There was no intention behind the specific value chosen.