OK, it's really NOT magic, but you can check out the app here in its current beta form.
ARuler interprets how far away an object is from the phone and can incorporate that information in its calculation of distance. With a physical stick or tape to measure, you'd have to place the ruler right up against what you're measuring. This way; however, if users can get an object or distance in view of their camera, the app can adjust measure it even if you can't quite reach it yourself.
A surface would still have to be flat to be measured, but augmented reality can make measurement a lot more immediate. It's also a lot easier to always have on hand than a physical tape measure. If they're not expecting to need one, most people don't carry one around, you know?
Whether you're trying to build something, create art that needs to be a specific height and width, or order furniture that actually fits in the space you have, ARuler seems like a handy tool. Not to mention, it's one of those, "Why didn't I think of it first?" ideas too, so excuse us while we go kick ourselves.