Weighty Programming Problem - Embedded.com

Weighty Programming Problem

For the first time scientists have been able to observe the physical basis of memory. Short-term memories come from filaments that grow to strengthen neuronic cell walls. The growth of synapses between neurons yields long-term recollections.

So I figure that all the learning associated with programming, reading USENET, and surfing the web must create an awful lot of extra brain mass. When the scale accuses you of an additional five pounds, well, smile and realize that's simply an indicator of your extra smarts.

Or maybe not. A sobering article called “Fixing a Fat Nation” claims that sending e-mails for five minutes a day instead of walking to your colleagues' offices porks you up by an extra pound a year. I don't know about you, but I spend far more than those five daily minutes doing e-mail. Drink a single can of Coke every day and you may pick up eight pounds a year. The article doesn't talk about Twinkies, pizza, or any of the other essentials of software development, but the tone is clear: working in front of a computer is hazardous to your waistline.

The digital economy exacerbates the problem. Many of us work from home. I don't even have to get dressed or walk to the car most mornings. Just stumble out of bed, flip the coffee maker on, and about zero calories later plop in front of the computer, exhausted from the effort. Bits come streaming in from the high speed 'net connection. Heft a dictionary off the shelf? No way. That means standing up. It's faster and easier to click over to dictionary.com.

Have you ever noticed how well we design our offices? The phone, printer, and stereo are all within arm's reach. No need to move much to get to any vital resource. The astonishing efficiency of our personal spaces again minimizes energy expenditures and maxes secretarial spread.

The local gyms are full of folks sweating off those extra pounds, doing artificial exercise routines to atone for sedentary lives. In his 1940s book Fatu-Hiva: Back to Nature Thor Heyerdahl abandoned Western society and moved to a South Sea island to live a life of simplicity. He makes some funny comments about deskbound people rowing boats that go nowhere, riding stationary bicycles, and walking treadmills to make up for a life mediated by internal combustion engines.

But even 50 years after Heyerdahl's book, Americans still exercise little. Only some 15 percent tell pollsters they work out regularly. Most of us — including me — find the thought of jogging or any form of aerobic activity quite dreary. Given a choice I'll surf over to slashdot instead any day.

We're programmed to seek and stockpile calories for potential hard times. As “Fixing a Fat Nation” says, “the few people who truly overcome their body's natural desire to eat have a psychiatric disorder: anorexia nervosa.” So it's in our genes.

We can “eat better” but probably won't. Some pundits suggest banning junk food. I'm told the famous Atkins diet requires spurning caffeine. Without the sugar and coffee I'm toast. If these ideas catch on programming productivity will plummet.

I think I'll go for a walk. Right after this cookie and Coke.

Jack G. Ganssle is a lecturer and consultant on embedded development issues. He conducts seminars on embedded systems and helps companies with their embedded challenges. He founded two companies specializing in embedded systems. Contact him at . His website is .

Reader Feedback:

I enjoyed the recent piece on programming and waistlines, and how the two seem to be on the increase lately. :^)

I'm genetically predisposed to high cholesterol, something I inherited from my father. His father died at 50 of a heart attack. My father has had a number of preventive, heart-related medical procedures that are helping him avoid the same fate (he's almost 70 now). I can't imagine that at my age, he would have been without his father for almost 20 years already. (That explains a lot, but we'll get into that another time).

Anyway, one of the main components of cholesterol I grapple with are triglycerides. My triglyceride level (*man* that's hard to type fast!) is always elevated, which according to the doctor is because I don't get enough exercise. I eat a reasonably modest diet (although I don't deny myself much when traveling, in case you haven't noticed), so my fat intake isn't a problem.

What IS my problem, and what few seem to realize is a HUGE problem, is that high sugar intake drives up triglyceride levels, which in turn drive up cholesterol levels (cholesterol is a catch-all term for a number of substances), which increases your risk of heart disease even if you eat very little fat or cholesterol at all. I didn't realize this until recently. Most people don't get this at all.

Body nutrition is complicated, but the current understanding goessomething like this. Triglycerides are a main component of what fuel sour body at the cellular level, so you always need some around. They aren't fat, but they tend to look like it mechanically— especially their ability to clog things up. So high levels are bad, because the stuff sticks around rather than getting burned up, just like sludge in an engine's oil pan gunks up the works if you let it sit there.

[OT: the analogy even holds when trying to deal with the problem. To clean up your oil pan, short of disassembling the engine you have to change your oil a *lot*. To clean up your bloodstream after years of high cholesterol abuse, you have to drive your cholesterol level really low for a number of years. Problem is, it's easier done with oil changes than with cholesterol. Safer, too.]

Digestion seems to convert consumed sugars to triglycerides, and not to fat as many believe. (The reason is known, but I haven't learned it yet). That's how someone like me can consume 2000+ calories a day, sit on my ass, and not get (all that) fat. Instead, I work up huge stores of triglycerides in my bloodstream, and they just wander around like sno-cone vendors at the ballpark, looking for hungry cells to feed. Until they get stuck somewhere, like at the edges of popular hangouts like the veins in my heart and neck.

The challenge is that “low-fat” labeling doesn't mean anything to someone like me. In fact, it's a kind of warning label. To fix what ails me I need to find foods that are low in carbohydrates *and* fat,and most low-fat foods are still very high in calories because in many cases, the fats have simply been replaced with carbohydrate-based starches that look just like sugar chemically, and therefore contribute to my problem rather than help it.

Read the labels carefully, you often find that you're better off *not*eating the “low-fat” version of a food. Tragic, but true.

Let's digress into some thermodynamics and control theory for a minute. I'm not spontaneously combusting or weeping sugars through my pores (last I checked, anyway), so all those triglycerides must be going somewhere. Where?

The triglycerides that don't clog something up do eventually get burned. Precious few are consumed by my daily energy needs, the rest get torched when my body cranks up its insulin production to get rid of them. This part I don't really understand yet— especially what the byproducts of this reaction are.

The “control circuit” that drives insulin production is an integrator,and doesn't do much until the problem is getting extreme. This lets you “carbo-load” in advance of activities you know will be strenuous,but won't let things get too far out of whack if you overdo your preparations or don't work as hard as you were expecting.

Now, what's the problem with an integrator? Yup, it tends to overshoot once it takes control. And what happens when your blood sugar level drops because you've produced too much insulin? You get hungry, and you head for the vending machine. And what do you find there? More sugar. And thus, the cycle repeats itself.

[Know that sound you get when you squirt lighter fluid on a burning fire? I think of that every time I pop the top on a Pepsi, because I imagine that's what I'm doing to my bloodstream by drinking it].

To make matters worse, trying to break this cycle by resisting the urge to eat makes the cravings worse, which makes it likely that you'll over correct at the next meal by eating more. In a sense,you're just integrating the error signal now, rather than smoothing out the whole model. Think Thanksgiving here.

The solution? First off, understand what's going on (like I'm trying to do), so that when your body tells you something (“I'm hungry!”) you know how to listen (“Shut up, it's only an integrator error!”).

Live religiously by the 1/3's rule: get 1/3 of your calories from fats, carbohydrates, and proteins. If you have to violate the rule,then short carbohydrates first (if it's going to be a single-meal problem), then carbohydrates *and* fats (if it'll go on for a day or more).

Eat high-fiber foods. I know it's cliche, but it makes sense even apart from its other, more well-known benefits. Foods that are high in fiber tend to be lower in sugars and fat. And even when they aren't, they digest more slowly and thereby avoid dumping a slug of energy all at once into your bloodstream for your blood-sugar integrator to deal with.

Read labels. Lots of labels. It's all there— fats, carbohydrates,proteins, etc. This is one thing Our Government is doing really well for us. Its almost shameless how (a) the labels scream that most of the food on the shelf at the store is pure shit, and (b) people don't seem to care. But I suppose you can't legislate that away.

Separate the concepts of food and entertainment. In many cultures,food is just a refueling stop demanding no more ceremony than a trip to the gas station to fill up the car. How can one can base their diet on healthy, simple things without going crazy? By meeting their emotional needs elsewhere, like in a satisfying round of intercourse(vocal or otherwise) after dinner. Sex, or clogged arteries?

Does this mean that a trip to the restaurant is out? Nope. just think of it in the same way you would think of a trip to a concert, or to the Embedded Systems Conference. Oh, and that you're skipping dinner at home because food will be served there. If you're doing everything else right, the short-term effects of eating a really crappy (but tasty!) meal out will go unnoticed. Really.

I'm starting small, I'm replacing my Pepsi intake with tea. The Atkins-unapproved caffeine is harder to regulate that way, but i'd rather deal with that than heart disease in a few years.

Bill Gatliff

Thanks for your thought-inspiring article.

Look at what kids *eat* these days. I cannot stomachmuch of their convenient, fast food. I prefer aquality, home-cooked meal, such as a pot roast withcarrots, potatoes, and gravy.

Sometimes technology allows both convenience andquality. I bought a pressure cooker. Now I canprepare a roast or split pea soup in a few minutes.

I think the compact audio disc is an example of bothconvenience and quality. And speaking of audioquality, most people don't seem to be *able* to detectthe difference in sound between a CD and MP3. Too badfor those of us born with sensitive ears, tongues, oreyes.

But not always.

How long will MP3 be the rage? What will replace it? Probably something with even more convenience andquality.

Now if I could only find a drive-thru place thatserves pot roast…

ron welte

Well, there are a few things that responsible employers can do. Here in Sweden, technical companies (employing engineers) pretty much all offer subsidized gym cards to their employees. Most companies also organize some team sports (soccer or land hockey or tennis or whatever). Putting a basket of free fruits on the coffee table helps reduce the need to eat candy. But the coffee is free and flows plentiful. But no free sodas (mostly due to the tax system: coffee is very special, sodas are a taxable fringe benefit).

On the organizational side, it is necessary to make sure that employees only work their regulated eight hours per day and use their five weeks of vacation each year. This will avoid burnouts and increase employee health and thus productivity.

Taking care of your personell is a necessary part of attracting good people and running a modern competitive company!

Jakob Engblom
PhD Student

JACK REPLIES: I've long thought that Europe is very enlightened in giving employees long vacations. Here in the USA 2 weeks is the norm, which simply isn't enough.

The obesity issue really is a big problem that probably shouldn't be taken so lightly. The “expanding waistline” problem is only scratching the surface of a far more reaching epidemic in America. My biggest concern is with the state of our children and adolescents who have eschewed hide and seek and kickball with the neighborhood kids for the latest Xbox or PlayStation game. No doubt that their Internet-surfing, connected parents are setting the example. I wouldn't suggest giving up snacks, but perhaps making a daily walk or bike ride with the family isn't too much to ask.

Lesley Wallace
The Young & Roehr Group

At our company we have a semi-weekly basketball lunch. Several employees play basketball and sweat off some of those calories. The exercise really seems to loosen up brains as well as the other muscles. The competition is also an outlet for any stress that may have built up between coworkers.

Senior Engineer

JACK REPLIES: Brilliant! Doing something active is also a great way to lift one's spirits when you're down. I find regular walks help me dispel the winter blues.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.