Some powers of 2, times 3:
32 * 3 = 96
64 * 3 = 192
256 * 3 = 768
Numbers of seconds:
60 - one minute
3600 - one hour
86,400 - one day
604,800 - one week
31,536,000 - one year (365 days)
The Sumerians apparently had a base 60 number system. 60 is an awesome number with factors of 2, 3, 4, 5, 6, 10, 12, 15, 20, and 30. It can be evenly divided in a lot of convenient ways.
Numbers of hours:
24 - one day
168 - one week
8760 - one year (365 days)
Weird numbers that pop up here and there in video settings:
640 - 128 x 5
480 - 640 x 3/4
1280 - 640 x 2
720 - 360 x 2, but also 1280 x 9/16 (note that 9/16 is 3/4 squared)
1920 - 640 x 3
1080 - 360 x 3 (1920x1080 are the standard "1080p" or "Full HD" resolution)
I recommend using constants or something descriptive for these instead of just putting these raw numbers in your code. However, it's useful when debugging to see "86400" and automatically say "Hmm, that's how many seconds are in a day".
I saw a news story about a software bug - don't remember which one - but the journalist mentioned that the issue occurred at the seemingly random number of "256". Again, it's obvious to us that it's a byte overflow error.
Any others you can think of?
• • •
Missing some Tweet in this thread? You can try to
force a refresh