## Tip Calculator is simple? Not really

Admit it, as a developer, we all assume tip calculator is simple. There are probably hundreds of tip calculator apps on Android and iPhone. We made our tip calculator app simply because it is a good app to start. We have a new design of this app a couple of months ago.  It looks cool and very functional. I thought we are done with it, until one day, a guy named Sean left a comment on our app, saying “Can’t add 9.95+1.00(=10.94?) 10% tip”. I didn’t really pay much attention until I grab my tipcal app and did exactly what Sean said. I entered 9.95 as the bill, adjusted tip percentage to 10%, the app shows \$1 as tip but the total is 10.94 which is wrong.

My first thought is it is a rounding error. After debugging, I realized it is not the case. 10% of 9.95 is 0.995, so total should be 9.95 + 0.995 = 10.945. If it rounds, it should still be 10.95, not 10.94. It turned out the root reason is when doing 9.95 + 0.995 in computer word, the result is 10.944999999999999. After rounding it becomes 10.94, not 10.95 as expected.

I downloaded a few other popular tip cal apps, on Android and on iPhone. To my surprise, all of them have the same error. See below. It is very common for developers to do it this way. We were trained to keep the precision at the maximum during the intermediate steps and only round at the final step. That’s why all apps have the same error. However from user point of view, 9.95 + 1 = 10.94 is wrong. Even it is just one cent difference, developers have no excuse for it.

And here is our tip cal app after fixing the bug. Thanks Sean.

## Square Footage Master Tutorial

Square Footage Master is a must-have app for realtors, house buyers, and contractors who need to measure houses, yard or office square footage (or square meters). You can get an accurate result without using any other tools. No tape ruler? No problem. The app comes with a camera ruler (as the one in the Advanced Ruler Pro app) and a body ruler that are very easy to use. It will also save the measurement to the memory card or you can send it to yourself or someone else by email.

Preparation:
———————–
You can use the app with a tape ruler or a laser ruler. But the true convenience comes from the built-in camera ruler and the body ruler. In order to use these two rulers, some preparations are required.

For the camera ruler, you need to measure two values and input to the settings. First, it is the camera height. When you use the camera ruler, you stand straight and hold the phone at the height such that the camera is at your eye height. We need to know the camera height. Secondly, it is the camera to wall distance. Usually you lean against the wall when you take the measurement, which means the measured length is from the camera to the other wall. However what you need is the wall-to-wall distance. If we know the camera-to-wall distance, we can automatically add it to the measured length which will give you the wall-to-wall distance. For both values, you can lean against a wall and ask someone using a real tape ruler to measure the camera height and camera-to-wall distance then input to the settings page.

It is a good idea to use the body ruler when the measured distance is not on the ground (such as counter top size) or or it is too short (such as a hallway width). So please take the time to measure the different body dimensions. For example, to measure the step length, you can put a tape ruler flat on the ground, starting the tap head, walk normally for 5 steps, take the reading then divide it by 5. This will give you a more accurate step length.

Usage:
———————–
You can click on the “Start a whole house measurement” to start a new project. It will bring you right to the room measurement page.

You give the room a name, specify the room category (level 1, 2 or outside or non-living area, we will use it to give you square feet for different category), then you can use the camera ruler or the body ruler.

To use the camera ruler, tap the length on the shape you want to measure, tap the camera button, you will see the camera preview is showing. Now lean against the wall, put the camera at the eye height, tilt the phone to aim the root of the wall on the other side and tap the aiming scope. Now you will get the measurement from the camera to the other wall. Just press “Back” key on your phone, the measurement value (after adding the camera-to-wall distance) will be will be recorded. To use the body ruler, tap the length to measure, tap the body ruler button, a dialog will pop up asking you how many steps or hand spans or strides. Choose the body ruler you prefer and type in the number. You can use decimal, such as 2.5 hand spans.

If you already knew the length using other types of ruler, just tap the edit box and enter the value. You can input things like “1 1/8 ft”,”5.3 m”,”138 cm”. No matter your default unit setting is U.S. or metrics, we  will convert them to your default unit.

On the room measurement page, you can select different room shapes. The shape diagram will tell you which lengths to measure in order to calculate the area. You can flint left or right to choose a different shape.

Once all required lengths are recorded, you will see the area above the shape diagram. Now just press DONE button to go back to the room list page.

On room list page, you can click on the ADD button to add another room. After you finish all the rooms, press DONE, it will prompt you to save it. You enter a unique name for this measurement (such as the address of the house) and the measurement will be saved.

Again on the room list page, you can click on the top title where it says Total Living Area to change to a different category. For example, you want to find out the total living area on the second level, just click on the title, select “Living Area – Level 2”, the total living area of level 2 will be displayed. You can also do it for all the yards or non-living area etc. However in order to use this feature, you need to specify the category for each room when you take the measurement.

Go back to the home page, you can click on the “Open a whole house measurement” to see any measurements you saved. They are sorted alphabetically. Single click on the measurement will take you to the room list page. Long click on it will bring up a menu to choose actions such as “Delete”, “Rename”, “Send”.

On the home page, there is also a button called “Measure one room”. If you just want to measure a room without saving, you can use this button. The screen is the same as the measure a room page except it doesn’t have a cancel button.

Already eager to give it a try? Get your android phone and download it from Android Market. Here is a QR code for your convenience that will lead you right to the Android Market link of Square Footage Master.

If your country doesn’t support Android Market yet, you can pay \$2.99 to yingwentech@gmail.com using PayPal and we will send the apk file to your email.