Archive for December, 2005
Losing weight with GNUplot
Posted on December 25, 2005, under general.
Last summer, myself and Noirin went to Manhattan, and had a brilliant time, If you havn’t seen it already, we kept a travel blog of the whole thing, and I’m sure we’ll go back there at some stage.
As amazing and exciting as it was, the many tasty meals, donuts, hot-dogs and even (yum) baked Alaska that New York had to offer did some serious damage to my health. Although I don’t normally over-eat (at least according to my Doctors), I’ve never been slim, and I’ve probably been in the clinically overweight since I was 15 years old. After New York, I weighed in at 112 Kg (17.5 stone/245 lbs), which is into the obese range for my height of 190 cm (6′ 3″). So I decided to do something about it.
Having done Physics in College, I’ve always been a bit mystified by the whole weight-loss industry, because the figures never seem to add up to me. Terms like Calories and KiloJoule mean very specific things, and the conservation of energy principle is something I’m more than prepared to give the benefit of doubt. And yet, when you add the numbers up the value of exercise is absurdly small, but it’s nearly always key.
My fitness levels are o.k., I cycle and walk quite a lot and can walk or cycle for hours a day without any problem, I can even out-run most people my age, and my physical strength is o.k. too. So whenever I’ve done the numbers I’ve always figured that I’d need to devote many hours a day to exercise in order to have any meaningful affect. After all, just one donut is about the same an hour of cycling, for crying out loud. How am I supposed to find that time?
Well, after doing some initial reading, I discovered that there are some factors which cause me problems. I was eating things in the wrong order, meaning that although I had a fine calorie-per-day count, I wasn’t giving my system a chance to digest it properly. Spending 3 nights a week in Trinity College also meant that I was generally eating late, quite often I’d have 1500 calories of food after 10:30pm, which is just insane, and probably caused my insomnia too. I wasn’t putting on weight in general though, so I just had to lose it, which was something positive.
From cutting out any snacks and completely overhauling my lunch, I lost just over 6Kg (14 lbs/1 stone) in two months, which isn’t bad. But then I did some more research, and came across the excellent book: The Hacker’s Diet. This book is a no-nonsense approach to the subject, and explains it all in terms of process control and energy conservation. Things that make sense, and it really does work. More or less since I read it, I’ve been following it, and have lost even more weight. Here’s the GNUPlot:
I update that graph on a daily basis (when I have measurements) and for reference: Apachecon US 2005 starts on day 40. Right now I weigh just under 91Kg (201 pounds/14 Stone 4 pounds), and for the first time I’m way actually in the healthy weight range. I’ve lost 19 Kg (42 pounds/3 stone) and 12 cm (5 inches) from my waistline too, and my XL t-shirts now look ridiculous on me. And there are other changes too, I’m surprised to find my watch dangling loosely on my arm and frequently find it on the underside of my wrist (wasn’t expecting that), cycling is a lot easier now (since the engine has higher power/weight ratio) and my centre of mass has moved too, which I can actually notice leaning back on a chair.
It’s bizarre, but it feels really good. Still, there’s more to go, my target weight is 77Kg (170 lbs / 12 stone, 2 lbs) , which I should be able to reach within the next 3 months, but I’m well over half-way there, and already feeling pretty good for it. It absolutely improves just about every aspect of your life, I’m even sleeping a lot better.
The weird thing is, I have so much leeway in the planning, that I can still frequently eat out on the spur of the moment, and have horrendously unhealthy meals, and still lose weight. As long as I account for it, and take action, it all works.
The approach from the book has been working well for me, too well in fact, my rate of loss has been too fast, and I’ve had to add supplements to my diet. Since I haven’t really been feeling hungry, it just goes to show what a little organisation and planning can do. I also really like the systematic approach to measurement taking and plotting which the book includes. Most books recommend you weigh yourself once a week, to avoid the noise of daily water changes.
This is a load of crap. Measurements are the bread and butter of science, and more is always better than fewer. So I’ve been making daily measurements and plotting using the weighted average method outlined in the book. I had been working on a system based on the Mean Value Theorem, but the simplistic weighted average is working out just fine, so I think I’ll stick with that. I’ve been working it out by hand and have a very simple shell script to produce the graphs, using Excel would have been a bit to burdensome.
If you ever feel like losing weight, I can highly recommend the book, and along with abother book or two on good nutrition (which it really doesn’t cover) you should be set to go. Best of all, the whole thing is free and on-line! Do consult a Doctor though, it can be easy to leave yourself with some nutrient deficiencies, and they’ll be able to advise you on what rates are healthy and what else you may need to take into consideration. I’ve definitely learned that the principle of understanding all of a problem in order to solve it definitely applies just as much to your own body as with anything else. Once I found out in what ways your body can actually be entirely predictable, and that it isn’t just a huge vague biological process with unpredictable outcomes it becomes a lot easier to have some confidence that your exertions of will-power will actually have a definable, measurable, effect.
I already had the fitness part in place, so that it’s more dramatic, but all the same, it’s amazing what some understanding can achieve. Now let’s see how Christmas and the New Year go.
Justin Mason is a God
… at least according to Tim Bray.

He’s also got a photo of a seemingly disinterested me;

… getting a demo of the dtrace stuff. In fairness, dtrace is really impressive, and a few of us httpd committers hope to add dtrace inspection points to Apache over the coming months, it looks really useful. Matty has already done some really useful work in this regard over here, where you’ll find mod_dtrace and some other interesting examples. They should be taken with a pinch of salt though, Matty isn’t quite getting how pools work and some of his examples misinterpret what’s going on, but still it’s excellent work all the same.
I thought Tim’s keynote was actually very good, but I found one part of it really dissapointing. Their raw numbers on the Niagara system were totally bogus, he quoted a figure of 25,000 requests/second from the box, both in the presentation and the article, but it’s really not. It can do way way better. We had a close look at the system and found amongst other things that the httpd was a 32-bit build, which was a bad start, and as Tim points out the benchmarking was being done with ab from a laptop. Since our dual Itanium box can push 25,000 reqs/second in its sleep, I’m guessing their Niagara box can easily push at least 4 times that number, especially with the event MPM. It maxed at 290 Mbit/second too, which is quite low (despite what Tim might think). Just last week we shipped 1.2Gbit/sec in production without actually noticing much at all, so again I’d say the Niagra box can at least quadruple that kind of number. Of course it’s great that the numbers were wrong in the conservative direction, the opposite of the usual corporate PR.
The guys mentioned that they have some detailed Specweb stats, so it’ll be neat to see those. The platform did really “feel” fast (by which I mean responsive), not the usual sparc sense of treacle-like slowness, and dtrace really is an amazing utility. I know I’ll be looking very very seriously at the platform, and I already like their low-end X64 boxes as an alternative to Dell. So I have to agree with God, Sun really have made a gigantic sea-change, and it is kind of mind-blowing. Good stuff!
Update: I’ve applied for a free box from Sun for 60 days, to benchmark it myself, thouroughly.
@ Apachecon US
Apachecon US is starting in earnest now, and so far it’s great. The hackathons on Saturday and Sunday went well, with something like 80 committers tapping away. We made some progress on mod_ftp, some httpd stuff and I have some apr examples build system stuff sitting around to commit now. It was surprisingly productive. Yesterday myself and Justin had lunch with Cory Doctorow, which was really productive and he’s helped us out with a great amount of contacts and advice for Digital Rights Ireland. We also got a brief mention in this keynote, which is very cool. There are already over 450 attendees registered too.

On Friday I went into downtown San Diego and spent a few hours at LISA (interupted by the World Cup draw) and the Gaslight district before heading out to a great music store way out in the suburbs. Cool place. The weather here is amazing, and it’s as hot as any Irish summer every lunch time. Considering this is December, I have to wonder what this place gets like in the middle of summer. The Navy docks are huge, and it can be a bit surprising to a suddenly see 5 stories of submarine cruising past.
Hello from San Diego
I’m in the Sheraton now, seems nice. It’s warm here, though it got dark earlier than I was expecting. Still, nice to see lots of palm trees and some nice pacific waters. Hopefully Apachecon will go very well! Some exploring to do tomorrow, looks like a fun city with plenty to offer!
Digital Rights Ireland Launch
Yesterday, following a recommendation from Sarunas and a pointer to the facilities of Newark airport from Sarah I went ahead and bought a 60GB iAudio X5. It plays ogg, MP3s, movies, will show text files, has a built-in FM radio, does voice recording and has a lot of all-round nice features that, so far at least, I’m very happy with.
This morning, brand new iAudio X5 in hand, I walked into work with a skip in my beat listening to Alison Krauss, Dolly Parton and some Kate Rusby tracks. I’ve paid for every piece of music I listened to at least once. Yet listening to these tracks, brightening my morning start, probably involved breaking the law. This is ludicrous. And yet, that’s how Irish Copyright law is structured.
And this isn’t anywhere near the most ludicrous law we have on our statutes. Ireland has the unenviable distinction of having the most draconian data retention legisilation in Europe.
For these reasons and more, Digital Rights Ireland held its formal launch today. It was well-attended and well-received, and hopefully this will serve as a great start to our efforts to influence change in all of the areas which affect our Digital Rights.
Our chair, TJ McIntyre, was interviewed by Pat Kenny, and you can hear the interview (about 1:30 in), we also made the 6.1 news and watch out for us in tomorrow’s papers.
A tale of three cities
Well, five actually. This going to be a mad week, I spent today in Nuremburg, which is really amazing right now. It’s got acres and acres of Christmas Markets with lots of cool stuff (no worries HEAneters, 1 Kilo of Lebkuchen are on the way). In addition to having lots of nice craftsy Christmas things, it also has an innovative range of excellent and tasty ways to kill yourself. Half-metre hot-dogs (mmmm), waffles with oodles of syrupy chocolate and cream, deep-fried hash-browns (who would have thought it was possible to add to the yumminess of hash browns), huge half-pounds of sausage meat and beef put between some gorgeous bread, all so so good.
Back here in Munich, I picked up one of those naff-but-cool boot-shaped cups for Gluhwein, courtesy of Noirin, and we went to see yet more Christmas markets (is there no end!). Noirin also got me a really nice new tie, which I’ll be wearing on Monday, avoiding real work and doing interviews (which is kind of odd, considering I’ve never once worn a tie when I’ve been on the other side of an interview). I’ll be in Dublin until Wednesday, when I’ll get to go to the IE-NOG meet-up. Then off to Newark, before the final leg to San Diego. 5 cities, 9 timezones and 8,000 Km in 4 days is a bit extreme. But hey, going from -6 C to a balmy 20 C isn’t going to be so bad.
Based on Colin’s and Brian’s recommendations, I’ve picked up a pair of acive noise-cancelling PXC300’s, which so far have done a great job on my flights. Now I’m trying to find a good portable music player. I’m in a few minds about it, I’d like to buy it in the US and benefit from the exchange rate right now, but that’s 18-hours of flying time in. uggh. Also, all of the players that support ogg are over-priced ugliness. iPods are gorgeous, but don’t play ogg, though I may just end up having to crack on that one. I might compromise and get something in Newark. Anyone know what Newark airport is like in that regard? I’ve only ever used JFK.
Apache httpd 2.2.0 released
After 3 years of cumulative work and 10 years to the day since the release of Apache 1.0.0, we’ve released Apache httpd 2.2.0, here’s the announcement, and the list of major new features.
This version of Apache httpd has been burned in on pretty major sites, so here’s to hoping it gets some good reviews. Happy Birthday Apache!