Thursday, December 29, 2011

A New Proposed Calendar System

Richard Conn Henry has proposed a new rational calendar which recently popped up in the press. I agree that our current calendar system is a perennial headache and could definitely use improvement. But I don't think Henry's proposed changes are drastic enough to address the root problem.

The fundamental challenge any earth calendar system faces is that the rotational period of the earth does not evenly divide its orbital period. There is not a whole number of days in a year. That means even the best calendar system is forced to use leap days or, in Henry's case, leap weeks. So I say, if we want the most convenient calendar possible, why not address the source of the problem?

According to Wikipedia there are 365.256363004 days (= 8,766.15271 hours) in one of earth's rotations around the sun. It would be ideal to have 364 days in a year as this is close to the current number and is evenly divisible by 4, allowing us to have 4 months corresponding to natural seasons, each with 91 days. To achieve having 364 days in a year, it is merely necessary to slow the earth's rotation to 8,766.15271 / 364 = 24.0828371 hours per day.

This decrease in earth's rotational speed is surely achievable using our current technologies, if only governments are willing to put their support behind it. I think the cost of this initial work is more than offset by the benefit of psychological well-being afforded to software engineers and anyone else who has to work with calendar math.

Thank you.

Thursday, May 27, 2010

What's the Fucking Difference: gigabit gibibit gigabyte gibibyte

Computer hardware manufacturers sometimes use SI prefixes (kilo, mega, giga etc.) improperly. That's because most people are familiar with these SI prefixes from science class in school, and they are usually close to the multipliers they actually represent. For instance, kilo means 1,000, and manufacturers often use the term kilobyte (KB) when they actually mean 2^10 = 1,024 bytes.

So, big deal, you say -- that's only a difference of 24 bytes. But as disk drives and memory capacity get bigger and we move into the tera and peta range, the difference is going to matter more. It's important that you know what these prefixes are supposed to mean. Sometimes manufacturers use them incorrectly, sometimes not. It's up to you to check that you're getting what you think you're getting.

Here, I'll cover the basics, using the prefixes you will most likely encounter.

These are SI prefixes and their corresponding multipliers:
kilo - 1,000
mega - 1,000,000
giga - 1,000,000,000
tera - 1,000,000,000,000

These are binary prefixes and their corresponding multipliers:
kibi - 2^10 (2.4% greater than 1,000)
mebi - 2^20 (4.9% greater than 1,000,000)
gibi - 2^30 (7.4% greater than 1,000,000,000)
tebi - 2^40 (10% greater than 1,000,000,000,000)

When it comes to computer hardware, you're most often going to see these prefixes conjoined with bits and bytes. You should be familiar with the common abbreviations for these terms. Here they are for the prefix giga, but it's analogous for every other prefix:

Gb: gigabit
Gib: gibibit
GB: gigabyte
GiB: gibibyte

Remember, a byte is 8 = 2^3 bits. That means, in terms of bytes:
A gigabit (Gb) is 1,000,000,000 bits = 125,000,000 bytes
A gibibit (Gib) is 2^30 bits = 2^27 bytes = 134,217,728 bytes
A gigabyte (GB) is 1,000,000,000 bytes
A gibibyte (GiB) is 2^30 = 1,073,741,824 bytes

That's it. That's the basics. It's easy, right? For more details and information about larger prefixes wikipedia is always helpful. Also, this well-written article by the IEC talks more about what you can expect from disk drive versus memory manufacturers.

Thursday, December 28, 2006

Hello World

HELLO, WORLD!