Weight Reduction
This post is about my personal challenges with weight, and managing it in light of a metabolic disorder. None of it is meant to be self indulgent or congratulatory, and I promise there are some geeky bits near the end for those patient enough to wade through the content or who want to skip to the end. Sorry for being boring, but not for being me. On with the story:
Back in the day I could have been considered a "bean pole." I was highly athletic, and though moderately muscular any of the definition was overshadowed by being wiry (though I eventually outgrew the designation "gangly," thank heavens). This is back when I could afford to be so physically active, and before the effects of the McArdle's disease steadily clamped down on the stamina. More importantly, it's when I was also getting sufficient rest to compensate for the effects of the activity I pursued regardless.
I got married, and gained the requisite 10-15 lbs. that generally comes with it, simply due to a change in lifestyle - eating more frequently, and in the company of others on a schedule of well prepared food rather than "when it suits me" and consisting of "whatever's around." Even with that gain though I was smack in the middle of the Healthy band of the BMI (though individual results vary depending on body type, I'm fortunate to be a good match for the algorithmic archetype). That weight stayed steady for another year.
Then: The Desk Job. In the interest of advancing my career and furthering the capabilities and savings of our family, I changed from the more free-form telecommuting gig to one that met those requirements but also required standard office attendance. I have no issue with the work, or with good work ethic, but I had been liberally making use of the telecommute arrangement to rest as necessary in order to recover from the day's strain. With the desk job, that luxury was forfeit. Ignorant of the specific nature of my disorder at the time, I didn't realize how disastrous this would be.
Seated at the console, plugging away on the code (Object Pascal cum Delphi RAD environment for MS IIS ISAPI filters on the MetaStorm e•Work product) I found myself wearied as usual, but unable to deal with it. I compensated by being exceptionally stubborn, and when that fell short, supplemented with anything available to increase my blood sugar (I was also drinking a lot of water, which I attributed to the poor transition from Washington's temperate and moist environment to the Utah dessert two years before - but probably only half of what I now know would be required. Whatever the case, whenever Rachelle called I seemed to be in the bathroom). This latter strategy came with predictable side effects, and in the course of five months I put on some 40 pounds.
The rapidity of weight gain was certainly off-putting and distressing, especially as the combined weight of the entire supplemental caloric intake during this time didn't seem to be adequate to account for the change. I did my best to stabilize and cut back on the snacks, suffering through the stupor instead, and plunging into another round of medical inquiry to find out why I was so tired so I could hopefully do something other than eat to manage energy levels - these of course were ineffectual. Later, changes in jobs, the production of very very cute children, and general demands of the conditions of life slowly edged the weight upward until finally peaking at about 250 lbs. (113kg), at the same time that the last vestiges of regular physical activity (Kishindo martial arts) feel by the wayside.
I was frustrated, to say the least, but also largely to blame - by putting myself and my needs very last, I was doing myself this dramatic (and visible) harm until it interfered with my ability to continue to serve my family. I was so bogged down, waking up exhausted (and frequently nauseous), barely pushing through the day, and repeating. Minor gains in understanding, not necessarily of my condition but my reaction to it, gave me some latitude for correction and over the course of about 2-3 years managed to move from 250 back down to about 220.
The most recent improvements have come from a very complete comprehension of the condition and my situation. The management strategy I'm pursuing now allows me to walk that thin line between capacity and injury, and to retain cognizance throughout even the long days (with few exceptions). Combined with that, I've been able to leverage the inability to utilize stored glucose energy to maximize natural ketosis (the same condition the Atkins and other low-carb diets attempt to induce artificially) and consume stored lipids instead - this time without the crippling side effects causing near-comatose stupor. This means that from the first day of the diet I've been able to realize dramatic results, as detailed below:
The weight log starts in late January, testing out the Wii Fit I'd gotten the family for Christmas (but was unable to play with myself, having been separated from them). Return visits to the family explain the infrequent initial measurements, followed by my more permanent return in lat March. Throughout April and May I was completing my research into the effects and side effects of McArdle's before finally establishing the current regimen. This failed to produce any effects on the weight though, so I sought out the advice of my buddy Joel - the most successful dieter I've ever seen. Over the course of a year his appearance completely changed, to the point that when we were re-united for a get-together I recognized his wife, and wondered who the heck was with her. Thus was born the references to the "Sexy Sexy Joel Diet" (as the diet belonging to and responsible for Sexy Sexy Joel, as opposed to the old Joel).
His secret? Has nothing to do with all of those "By following these X simple rules!!1!" ads that are all over the internet, nor with fad products, "cleansing," etc. He wasn't even exercising - just following the old Weight Watchers™ formula for calculating caloric intake in terms of points (calories / 50 + ( grams of fat / 12 ) - ( min{ grams of fiber, 4 } / 5 ) ) and his allowance for consuming them. Using a calculator and log on his iPhone he followed the simple principles over time to great effect.
I adopted the same pattern, and am pleased to report that, per the graph above, have dropped 32 lbs. in the course of just over 3 months. At this rate I have another month and a half or so to meet my long term goals, after which I can settle into a maintenance pattern. Looking at the trend line it's very slowly leveling out. It also has that cyclical up-tick I'm at a loss to explain - though I also admit that I haven't gone into an in-depth analysis for them yet, as they are inconsequential to the average / long view.
For the geekiest bits: the point system, whatever its failings, works. In order to make sure all measurements are taken consistently, they've all been done within the same hour of the day, in the same general outfit (light sweats, t-shirt), immediately following my carefully metered exercise (metered to avoid undue metabolic or toxic distress) in the morning before any kind of intake. This does mean that I've artificially skewed the measurement to the lowest point in a day's fluctuation, but given that I'm moving 10-15 lbs. of water though my system throughout the course of a day it makes sense to take a low baseline, since the peak water retention will fluctuate unpredictably (or according to parameters and timings I'd rather than make explicable by mapping when there's an easier solution). Doing it the same way every day is what makes the biggest difference in collecting the samples, which allow me to apply a general trend analysis instead of a specific margin of error per day. All measurements have been taken on the Wii Fit in order to keep the analysis consistent and to provide a log of the output as well, which I have carefully transcribed and reproduced above using Perl's GD::Graph module.
I have several other observations as a result of the experience, mostly regarding psychology and sociological trends, which I'll save for another time. For now I'm excited for the day when I can stabilize enough to buy new pants (which I'd rather only do once, an account of being a cheapskate). Also, while it's true that I may have an unfair advantage due to the super-charged ketosis, Joel's experience demonstrates the viability of the approach without such an inside track (a track, I might add, that is not worth the side effects if it can be avoided).
Bon (pétit) apétit!
Persistence
Not too long ago I was fortunate enough to pick up an iPod Touch (bonus had come in from last year's work). The device has been remarkable, smaller than it looks and packing a nice little portable media punch. It also happens to be a fairly robust mobile computing platform, as evidenced by the strength of community development for the device even prior to the release of the official SDK. Being a developer myself, I was intrigued enough to give that part of it a shot.
Rather than put together an Intel hacintosh or risk the wrath of my wife by messing with her new Intel iMac (used for her wedding photography) as required to run the X Code IDE/SDK, I decided to use Jiggy's JavaScript based framework and IDE. While this surely introduces some functional limitations and performance overhead, it was also a very painless way to slap together a proof-of-concept to get a good idea of the problem space I was approaching.
Given that the device contains a set of accelerometers (used by the iPod/iPhone user interface to determine landscape and portrait layout), I thought it would lend itself well to a Persistence of Vision hack - which is to say, using a thin portion of the display, flash certain bits of it on and off as the device is shaken back and forth. The flashes correspond to certain spaces of the visual field during the swipe, and as a result of the mechanics of the human eye (which takes roughly 1/60 of a second to clear out the stimulus) appears to create many little spots floating in the air which can be used to write letters, display images, etc.
I first encountered the effect at a novelty store when I was about 9, when I saw a clock which consisted of a sturdy base and a spring-loaded wand which, when flicked, would flash it's LEDs as at waved back and forth and created the illusion of floating time. While several devices have picked up the gimmick since then, I've never actually bothered to own any of them. Now that the opportunity was right in front of me with a low barrier of entry, why not give it a shot?
First came the math. Working with my wife we were able to determine that a good hand-wave average was roughly 16", making a full cycle (back and forth) every 1/2 second or so (11 over 5 seconds). In order to achieve sufficient resolution to be able to display any letter of the alphabet discernibly, while still keeping the overall number of cells sufficiently low (so as to have low logical and processing requirements) we chunked this 16" section into 6 letters per wave, with each letter broken into 5x6 segments. 6 letters per wave is pretty low, but the idea was to have a word persist only through a single wave - as soon as the accelerometer detected a significant shift in direction it would load the next word, allowing sentences to be spelled out sequentially.
( 6 letters * 5 columns = 30 columns ) / 16" / 0.25 sec (single wave phase) = 120 columns / 1 second, or 120hz switching. In order for a line to pass through 1/2" of space during the course of a single wave, it would need to be on for only 0.008333... seconds. That's for a perfect line - I would of course be switching a region rather than a mathematical construct, so I would in theory need to divide that 120th of a second by the width of the region in order to achieve the target resolution. I fudged this part, and for the sake of the proof-of-concept development decided to have the region correspond to the width of the column itself - 1/2" square, which means that if everything worked perfectly a total of 1" would be illuminated, a 1/2" of virtual overlap with itself (area of continual brightness) giving a linear fall-off to either side. So the letters would look a little fat and maybe just a touch blurry - but that's acceptable to start with.
However: most displays only refresh at a rate somewhere between 70-90hz. If I'm trying for 120hz it means that each cell would fall quickly out of sync, ending up only partially drawn or have some frames of display skipped altogether (compounded by the actual switching rate of the LCD). The second component of the problem is the brightness of the display itself - in order to sufficiently invoke that perceived persistence of stimulus, a certain intensity is required. If intensity is not available contrast may be substituted, but this means it will only ever work in a darkened environment.
Despite the math working against me I decided to give it a go. Setting the interior timer to 120hz is easy enough, but I suspect the time to navigate the DOM logic to the desired cells and switch their states runs slower than that anyway, plus whatever overhead the Jiggy framework required to assist in doing that. I set up the code to follow this plan, draw a column of cells and switch them over the course of fractional sections to the different mapped columns which comprised an entire letter table (in this case a letter is an array of 5 different numbers 0-63 which corresponds to a 6-bit binary display indicating which cells to turn on and off - makes for very tight book-keeping and rapid addressing, and binary logic is just fun anyway so why not?). My test consisted of letters A through E sequentially set up in memory in a per-wave array (all in a single wave) with events tacked to the accelerometer which would catch significant departures from one direction to the next and determine whether that array was being walked forward or backward, even capable of reversing mid-display.

And it almost worked. In the end I had to simplify the display to at most 2 letters, and it only works if 1) the room is dark and 2) one covers the persistent battery-level display at the top of the screen (otherwise it wrecks the PoV effect). Photographing this is especially difficult when one is both the photographer and demonstrator, compounded by doing it in a dark bathroom shot "through the mirror" without being able to effectively test the composition. In the end I got a few good shots and many not-so-good - shown here are 2 images (ISO 80 f/2.0 @ 1/25 sec, the display simplified to just the letter 'A') combined and slightly enhanced for contrast. This shows the difficulty of keeping in sync with the animation - something that with enough tuning of the accelerometer event code and a steadier hand would become easier, but which I don't plan to pursue due to the aforementioned global limitations. The predicted linear fall-off is visible, as are the very slight gaps between vertical blocks on the display.
Overall I'm very pleased with the exercise: it taught me more about a really fun toy, gave me a chance to play with some simple science, and allowed math to Save the Day. Everything worked almost perfectly the first time and I come out richer in knowledge for the effort. The fact that any of this at all pleases me just reinforces the fact that I'm in the right line of work - I'm pretty sure most of the world would find this pretty dull. Hurray for geeks!
