Geek Stuff (9)

What is a Fitness Band?

A fitness band, in it's simplest incarnation, is a pedometer you wear on your wrist instead of on your belt and it doubles as a wristwatch. As you'll see, in more elaborate incarnations they can take on the role of diagnostics instrumentation for your body.

10k Steps

This is where it all started.

The origins of the 10,000-steps recommendation aren't exactly scientific. Pedometers sold in Japan in the 1960s were marketed under the name "manpo-kei," which translates to "10,000 steps meter," said Catrine Tudor-Locke, director of the Walking Behavior Laboratory at Pennington Biomedical Research Center in Baton Rouge, La.

Here's how that comes about. An average adult in the US walks about 4-6 steps a day. I get that pacing about the home office and whatnot. Here's what I didn't know up until I looked into this. Motions that don't make you "break a sweat" still count as exercise in some ways. For instance, they still burn calories and they still make your muscles work. They won't do much to enhance your capability, but they will do a lot to prevent further degradation from a sedentary lifestyle. After doing my normal thing of constructing tortuously elaborate spreadsheets I have calculated my calories per pace at 0.038 calories. It doesn't sound like much, but when you multiply that by 5000 you get 190 calories burned. By walking 10000 steps that's another 190 additional. Over the course of a week that's about 1400 calories or 1/3 lb in fat loss.

By getting off my ass for another 5000 casual steps I burn 1/3lb a week of fat. In the end, it's not a hard concept. It's just another way to say, "Don't be so sedentary" but this time it comes with a specific goal attached... 10k steps. That leads us to:

Gamification

From Wikipedia,

Gamification is the application of game-design elements and game principles in non-game contexts. Gamification commonly employs game design elements which are used in non-game contexts to improve user engagement...

That's a long-winded and geeky way to say, "make life fun like video games". In the case of the fitness bands, what they do is give you a simple goal -- walk 10k steps. Then they give you some way to see your progress towards that goal and a reward when you achieve it... a little happy face... a buzz on your wrist, whatever. The point is you get rewarded for success and human brains like that sort of thing. It's the same little reward you get when you check off a todo item in your task manager. This is the ultimate goal of fitness bands. Anything beyond this is smoke and mirrors unless your product says "Garmin" on it and cost a few hundred dollars.

Fitbit

Fitbit was the company who actually pulled this all together into a usable fitness band that was reasonably high quality and came with good software and a good software ecosystem. Not only do the various fitbit devices track your step count they also work (mostly reliably) to sync that count to your phone or computer and, from there to the fitbit community and beyond. Being able to sync into the larger data world becomes important for those who want more than just to "get fit". If you want to lose weight, you'll need to track what you eat AND what you burn. The best site by far (in my opinion) for doing so is MyFitnessPal. Fitbit syncs it's steps (and associated calorie counts) into MFP so that you can see at a glance how much you've eaten, how much you've burned, and how many calories you still have to go.

On the day shown, my initial weight loss goal was to eat 1570 calories. By mid-afternoon I had eaten 614 calories and exercised 469 calories for a "net eaten" of 145. And right there is another gamification reward you get for your stupid little fitness tracker lighting up with steps... If I wanted to, that 469 calories is enough for a bacon double cheeseburger at McDonalds. Your reward is food (or additional weight loss if you so choose).

For me (a numbers guy) there's another reward and that is knowledge. For the first time I feel like I'm running a diet and health plan for myself and my wife and I actually know, with some reasonable degree of precision, what's going on. The actual results are clearly visible in our newly baggy clothes and newly tight thighs. The washboard abs of my dreams still elude me but hey, it's only been three weeks! But you know what? My belly is just starting to hint that perhaps there's something washboard-ey under there.

Garmin

The last bit of overview is to talk about Garmin's products because honestly, that's pretty much what all the cheap fitness bands claim to do. The difference is that the Garmin products actually do it. By the time you've dumped around $600CAD into a fitness band you've got a system which is really capable of measuring your body fairly accurately and reporting out all manner of things including recovery rates, stride optimizations, workout goals, and it goes on and on. The Garmin units are able to do all this because they use a LOT more sensors (typically the wrist device, a chest band for heart rate measurements, and a "foot pod" for stride information. This is what you buy when you are serious about training for something like a triathlon and you have money to burn. These devices aim to do what an Olympic coach would do and, with limitations, they do a pretty decent job of it.

I mention the Garmin units because all of the nifty features you were hoping for in the mid-range units really work there. That makes the mid-range units nearly pointless.

Inexpensive Fitness Bands

In case you hadn't heard, everything is manufactured in China nowadays. That includes fitness bands. These devices range from $13 CAD to about $50 CAD and, for the most part, will all do what you need (step count) from the hardware level. It's the software that almost all of them fall apart on. Before I link to the individual reviews, I want to go over the list of features you'll commonly see and my impression of them:

Call and SMS reminders: (aka notifications). I find this feature worth the $13 all by itself. My wife is hard of hearing. That means calling her on her cell phone is an exercise in futility. She simply won't hear it. She does, however, feel her wrist buzzing. I can see this feature also being useful for people who can hear fine but are in noisy environments like city streets.

A watch: OK yeah, it bears mentioning. You're going to be wearing this thing on your wrist all day. It's a watch and that's handy. Even nicer, it's a watch that always knows the correct time and date.

A pedometer: They count steps. You can figure accuracy is within about 10% in my experience. That means it's plenty good enough for the average sedentary person who wants to "get more fit". It is not good enough if you're training for a race.

They monitor your sleep: I find this fascinating information. You can see how well you slept because they monitor your motions throughout the night. The downside is you have to wear something in bed (ewwwwww). And, if you're my wife who hates light at night, they have a tendency to turn into "little fire flies" on our wrists. Still though, both she and I wake up in the morning excited to see what our sleep looked like.

Alarm clock: For those of us who sleep with someone else, a silent alarm clock which wakes me up but not my partner is also worth $13CAD all by itself.

Beyond here it gets very sketchy:

They monitor your heart rate. Sure they do. Under some circumstances and some times. Really, they can only monitor your heart rate when you're mostly relaxed. Sweat seems to interfere with the optical sensors and my wrist band was reporting 88 beats per minute on the elliptical trainer. The chest strap was reporting a much more reasonable 155. My fitness band had been doing pretty well up until I started to really sweat. This still has some utility. If you look for one which continuously measures your heart rate you can get a good solid resting heart rate measure while you sleep. Resting heart rate is one of those key indicators of overall cardiovascular health. What they won't do is measure your heart rate while you're working hard which means they won't accurately estimate your calories either.

Blood Oxygen. Same story.

Blood Pressure. Same story.

Sedentary reminder. Ok yeah... but honestly if you're making your 10k steps daily then you're probably not finding all that much time to be totally sedentary.

What you will find, like me, is that all the units do pretty well at the first 5 items and whatever they do with the last 4 hardly matters since the accuracy simply isn't going to be there. Where they live or die is in software. Accordingly, you can save money on the fancy features that probably won't work well anyway and just focus on getting a cheap fitness band with good software. This is why I think there are only 3 prices for fitness bands:

$25: I'm enough of a geek to figure this out and I don't need the FitBit community. I can work with the MyFitnessPal community instead. China is your friend.

I can't be the only one who's thought that the built-in fonts are nice but might not work for a given application. In this case, I was workign to create a grunge, hand-sketched sort of look. I needed a typewriter font.

With a bit of googling I found an appropriate opensource font with valid licensing terms.

Now, let me stop here a moment and go over that... with valid licensing terms. Specifically, that means you must be licensed to use the font on a server not simply your desktop!

Now, let's assume you are clean on licensing. In my case the license simply stated that I couldn't sell the font so I'm good to go. But the next problem was getting the truetype font on my system into some sort of usable format for the web. This is known as a webfont and despair not because fontsquirrel has the answer for you. There, you can upload a font or fonts and generate a webfont kit all set to go... almost.

Go to fontsquirrel and generate your font.You can leave all the options at default. When you're done, download the font zip file.

Edit the generated font family namesThis is the step that got me. Themler called my font "Veteran Typewriter". Fontsquirrel called it "veteran_typewriter". Yup, so no dice on any font loading. I used the chrome console to inspect the element and find exaclty what themler called it. Then I edited the stylesheet.css file to make the accordingly.

In Themler: The edited stylesheet.css:

The last step is to link that stylesheet into your web site.There are several ways to do this but how I did it was by going into the themler settings and adding the link statement into "Additional Head HTML".

The link statement I hear you say? Take a look at the directory in which you extracted the fonts. You'll find a <fontname>-demo.html file. Go ahead and view that in your browser. It not only shows you your font but also how to install them. Take a look at the 4th tab over and you'll find the link statement conveniently written there for you.

Well this one had me stumped for quite a bit. I tried several different editors and all of them were totally willing to ignore the content styling from the front-end. This sounds like a minor issue but with a dark background and light text it could become problematic fast. This solution works, at a minimum, for JCE and probably many other MCE variants.

Create or edit a stylesheetMy tools, by default, create an editor.css stylesheet. That's neat but it doesn't have the required items to style the editor content.

Find the body selectorNote, mine had more than one. You might want to just put your own down at the bottom.

Over the weekend I was working on setting up phpList, a newsletter program, for Victoria AM Association. The problem for them was communication to members and friends. The largest mail list they have was about 650 names and tools like Shaw webmail don't allow a single send of that size. Shaw's SMTP servers also disallow such mass mailings.