[Ron's Note: Apples to Oranges was an app that used to be sold on the T-Mobile Sidekick/Hiptop family of smartphones. Sadly, the device (and the app) are no longer sold.

This was the first app I worked on for the Sidekick. The device needed a good unit converter, so I wrote one. It would update its conversions as you typed, and kept a history on-screen of your conversions, so it was easy to get multiple values converted.

I had originally given the app a way to update its currency data over the internet. At the time, though (late 2004), Danger & T-Mobile were uncomfortable releasing a third-party app that accessed the network. So I removed that capability and added a way for users to manually insert their own conversion rate. Some of the conversions, like converting seconds-since-1970, or decimal-to-hex, were quite handy for a programmer.]

 

Apples to Oranges

Apples to Oranges is a unit conversion application for the Hiptop (aka Sidekick) from Danger, Inc. Using this application, you can convert between different units and systems of measurement, such as Celsius to Fahrenheit, feet to meters, cups to tablespoons, or Euros to Canadian Dollars. Apples to Oranges also supports custom units, so if Apples to Oranges is missing your favorite units, you can create a custom unit and assign the conversion ratio you’d like to.

The Apples to Oranges manual and FAQs are available below too.

Layout

Apples to Oranges has a fairly simple interface, with one data entry field, a popup menu for the “from” units, and a popup menu for the “to” units.
An output field shows the result of the conversion, and a history area shows a history of the last seven conversions performed.

Built-in Units

Apples to Oranges has over 200 different units built in to the application. Let’s take a look at them:

Length

On the left, we see the “categories” of units. “Length” is selected, so to the right of Length we see a sub-menu with the different units for Length. Clearly you won’t often need to convert from angstroms to Astronomical Units, but hey, it’s there if you need to.

Currency

Apples to Oranges provides over a dozen currency conversions built-in, though the data taken is from late 2004. To update the conversions, you can enter your own values, taken from a currency exchange center or a web site like xe.com. Auto-updating currencies via the network unfortunately isn’t included with the currently shipping version of Apples to Oranges; for more on why this is the case, see the Apples to Oranges FAQs.

Speed

Many of your favorite speeds are built in, including miles per hour and kilometers per hour. Conversions for the “speed of light” and “speed of sound” constants are also included.

Volume

This is where many common cooking measurements are included, such as cups, tablespoons, pints, and teaspoons.

Temperature

Celsius, Fahrenheit, Kelvin, and Rankine fill out the built-in Temperature units.

Weight

Several Weight (or “Mass”) units are provided, including three different conversions for short, long, and metric tons.

Computer

Several common computer memory and speed terms are included, so that the conversion between bits and kilobytes is less confusing.

Base N

This is intended mainly for programmers, who need to convert to & from binary (base 2), hexadecimal (base 16), octal (base 8) and decimal (base 10). It’s also useful for converting among hex RGB values.

Prefix

This is for converting between different prefixes or suffixes. So if you have 1,000 centi-<something> and you want to convert to “mega-<something>” or “hundredths”, these units will help with the conversion.

Time

Converts among different measurements of time, like figuring out how many seconds are in one day. Constants are used for values which change (i.e. a year sometimes has 366 days).

Date

The “Date” units are for converting to and from “seconds since Januray 1, 1970 00:00:00″. This measurement is commonly used for timekeeping on computers, stored as a (typically large) number. A separate dialog is used for entering the date and time.

Mileage

Mileage conventions in the U.S. and Europe are fairly different, in that the U.S. measures mileage in “miles per gallon”, while Europe often uses “liters per 100 kilometers”. This is a trickier calculation than usual, as a higher “mpg” number equals a lower “L/100km” number.

Area

Several Area units are included, so that the always-fun “acres to square feet” conversion can be performed with ease.

Energy

Energy includes such units as “BTU”, “ergs”, “joules”, and fan-favorite “megatons of TNT”.

Power

More standard Power units are built in, like “horsepower” and “megawatts”.

Force

Over a dozen Force units let you convert between, say, “newtons”, and good old “dynes”.

Pressure

Included are variety of pressure units that have been used over the years, such as “inches of water”, “atmospheres”, “feet of head”, “kiloPascals”, and “pounds per square foot”.

Custom Units

In case your favorite units aren’t built in to Apples to Oranges, you can enter your own custom units. You can name your custom unit, assign it an abbreviation, assign it a conversion ratio to a built-in unit, and save it. (Saving your custom unit backs it up to Danger’s servers, just like your Address Book.)

Your custom unit then appears in the category sub-menu. Here’s an example of a custom Speed unit:

You can edit or delete your custom unit at any time. See the Manual below for more on how to create custom units.

Apples to Oranges Manual

Basic Conversion

Type in an input value, select your input & output units, and your answer will appear in the output area. Any changes to the input value are immediately reflected in the output value; no need to press return or “enter”.

Valid Input Characters

The input field can contain a negative sign (i.e. for temperatures), a decimal point, and/or an exponent. Exponents can be added at the end of a number with an ‘e’ or ‘E’.

Some examples of valid input values:

4
4.01
-4.01
4.01e-5 (i.e. 0.0000401)
-4.01e5 (i.e. -401000)

Note that when converting from Hex (Base 16), hex characters such as a (A) through f (F) become valid. Similarly, when converting from Binary (Base 2), only ’1′ and ’0′ are valid.

Copy Value/Expression/History

The main menu enables you to copy the value, expression, or history currently shown. To clarify:

  • “Value” means the number output
  • “Expression” means the expression on both sides of the equals sign, with units
  • “History” means the history of previous equations shown below the unit popups

Custom Units

To create a custom unit, select the “New Custom…” menu item available with most unit types. This brings up a dialog where you can enter your custom unit data.

Example: let’s say you’re talking with your piratey grandfather, and you’d like to add “fathoms” (1 fathom = 6 feet) as a custom unit. In the various fields, you’d enter:

1. Unit name: “fathom” (used in the popup menu)

2. Unit abbreviation: “fath” (abbreviation used to the right of the value)

3. Base unit: “feet” (the unit which your custom unit is based on)

4. Multiply/divide: “multiply”

5. Multiply/divide factor: “6″

The Sample equation in the dialog should read “1 fath = 6 ft”. Click “Done” and your custom unit is ready to use. Custom units appear below built-in units in menus. You can edit your custom unit at any time by selecting “Edit Custom”.

Note that for custom temperatures, you can also specify an amount to add to the result; the amount added can be negative, effectively subtracting.

Preferences

Rounding: choose how many digits to show to the right of the decimal. Note that trailing zeros to the right of the decimal are removed, so 4.100 would be displayed as 4.1.

History update: choose how long a value needs to remain unchanged before it should be written to the history. If you don’t want any values to show up in the history, choose “(never)”. To include every value calculated, choose “0″.

Sorting

Units can be sorted alphabetically, reverse alphabetically, from big to small, or from small to big. Units can also be sorted by category first, which means, for instance, that metric units are grouped separate from non-metric units. Custom units are sorted separately from built-in units.

More Info

For more information about Apples to Oranges, check out the Apples to Oranges FAQs.

For more information about units, including their histories, check out the excellent Units of Measurement site from the Director of the Center for Mathematics and Science Education at UNC Chapel Hill.

Haiku

What is ten knots in
kilometers/second?
Never would have guessed.

Converting minutes to days?
Unbelievable!
Is it time to fly?

Apples to Oranges FAQ

Questions:

With Answers:

 

Q. Are the currency conversion rates auto-updated?

A. Sadly no, the shipping version of Apples to Oranges can’t auto-update currencies over the network. An earlier version had this feature enabled, so that the user could click a button and have the application retrieve the latest currency data over the internet. However, Danger raised some concerns regarding network-aware applications (concerns of their own and of their carrier partners). Once Danger is set up to handle these, and the carrier partners are ready to sign on, we’ll hopefully be able to issue an updated version of Apples to Oranges with network-updated currencies.

Note that Danger has been extremely helpful in this process, and we’re positive that they’re working to enable network-aware applications. In the meantime, if you’d like to register your interest in network-updated currencies, drop us a line with the Feedback Form. We’ll summarize (and anonymize) the network-related feedback and present it to Danger, to show them that there’s interest (and money!) in releasing network-aware applications. Thanks for your help!

Q. You’re missing a unit I need to convert to/from, could you please add it?

A. Actually, you can add your own using the the “New Custom…” option in most type sub-menus. See the Custom Units section of the Apples to Oranges Manual for more info.

Q. What if I need to convert to/from units of a completely different type, like “illuminance”?

A. This is tougher, but you can actually fake a new type by using an existing type. For instance, say you regularly need to convert from lux to footcandles, as 1 footcandle equals 10.764 lux.
Create a custom unit for lux, and make it equal to 1 meter. Create a custom unit for footcandles, and make it equal to 10.764 meters. Whenever you convert from lux to footcandles (or vice-versa), the conversion ratio will be accurate.

It’s not ideal, but it works.

Q. Why can’t I create a custom unit for Base N or Date types?

A. These units aren’t standard “multiply by X and add Y” conversions, so they’re difficult to create custom units for. Hopefully the defaults satisfy your unit cravings.

Q. For non-metric units, does Apples to Oranges use English or American measurements?

A. This was quite a headache–do we really need three different definitions of a quart? Wherever possible, Apples to Oranges uses the most common American definition possible. If you’re taking measurements where the differences between different unit definitions play a big role, please create custom units which suit your needs. You’ll be much more certain that you’re getting the conversions that you’re after.

Q. What’s the difference between a “short ton”, a “long ton”, and a “metric tonne”?

A. A “short ton” is usually the ton referred to in America, and is equal to 2,000 pounds. A “long ton” is used in Britain, and equals 2,240 pounds. A “metric ton”, or “tonne”, equals 1000 kilograms, or about 2204 pounds. Good thing we’ve got three different definitions!

Thanks for reading! If you’ve got any questions or feedback on Apples to Oranges, talk to us with the Contact form. We read it all, really!

Leave a Reply

*

Anti-Spam Quiz: