Diet for nerds and computer programmers

Aero Ace biplane

John Walker, the founder of Autodesk, has written an interesting guide on health and weight loss, which is available for free online: The Hacker’s Diet.

Basically, the book focuses on the fundamental mathematical issues associated with weight loss and gain, and describes some useful techniques for transitioning to a lower weight. In particular, the moving average approach to measurement described seems quite valuable, insofar as it helps to separate the ‘signal’ of actual weight from the ‘noise’ of variation in things like water retention. The moving average generates a trend line that seems like it should provide more meaningful guidance than a scatterplot of individual data points, or even a simple curve fit to them.

The book also describes a 15-minute health regimen that ramps up in difficulty and is intended to serve as a minimum level of exercise for life.

The book is quite an unusual one, as health books go. For instance, it endorses frozen microwave dinners as a convenient way to get a predetermined number of calories. It also insists that exercise is not a critical weight loss strategy, and that some degree of suffering inevitably accompanies efforts to move closer to one’s ideal healthy weight. While I am sure people could take exception to this approach, it is good to have variety out there, and encouraging that tools are being created for the ever-larger number of people worldwide that are overweight or obese, and likely to suffer significant health risks as a consequence. Those who don’t want to mess around with Walker’s custom Excel files can use a web-based version of Walker’s approach at PhysicsDiet.com

Sustainable Energy – Without the Hot Air

David MacKay’s Sustainable Energy – Without the Hot Air is a remarkably engaging book; it has certainly kicked off and contributed to some very energetic discussions here. The book, which was written by a physics professor at Cambridge and is available for free online, is essentially a detailed numerical consideration of renewable forms of power generation, as well as technologies to support it, and to reduce total power demand. MacKay concludes that the effort required to produce sustainable energy systems is enormous, and that one of the most viable options is to build huge solar facilities in the world’s deserts, and use that to provide an acceptable amount of energy to everyone.

The book has a physics and engineering perspective, rather than one focused on politics or business. MacKay considers the limits of what is physically possible, given the character of the world and the physical laws that govern it. Given that he does not take economics into consideration much, his conclusions demonstrate the high water mark of what is possible, with unlimited funds. In the real world, renewable deployment will be even more challenging than it is in his physics-only model.

Here are some of the posts in which the book has already been discussed:

I have added relevant information from the book to the comment sections of a great many other posts, on everything from wind power to biofuels.

Even if you don’t agree with MacKay’s analysis, reading his book will provide some useful figures, graphs, and equations, as well as prompt a lot of thought. It is certainly one of the books that I would recommend most forcefully to policy makers, analysts, politicians, and those interested in deepening their understanding of what a sustainable energy future would involve.

Improving voicemail

While useful, voicemail is a flawed technology that can be improved in many ways. Three recent examples come to mind:

First, there is Apple’s visual voicemail. The improvement here is like the improvement between cassette tapes and compact discs: each message is an independent ‘track’ that can be treated as a unit. That is nicer than just having a single audio string to deal with, since you can see right away who called and jump to any message.

Secondly, there is the voicemail system of my VoIP provider. The nicest thing they do is provide an option to email you MP3s of your messages, which include caller ID to let you know who they are from. Now, I only call the actual voicemail number to periodically delete all the messages accumulating there.

Third, and neatest of all, is the transcription feature in Google’s forthcoming ‘voice’ product. Not only do you get to see who called, but you get an automated transcript. I am sure the voice recognition is far from perfect, but people seem to find it good enough to evaluate which messages need to be listened to, and which ones are just ‘call me back’ requests. To some extent, this even makes voicemail searchable, which is a neat trick.

While sound has character and authenticity to it, it is really a degraded form of communication, when it comes to simple searching and management. It is nice to see innovative ways to overcome the limitations of sound-based messages, while still retaining the original format, for those situations where you actually want to hear the message.

Preserving plastic history

Cracks in the roof of a bus stop

Over at Slate, there is an interesting article about art and chemistry: specifically, about the challenges involved in preserving artwork and historical objects that were made from fundamentally unstable plastics. As the article points out, this is an odd reversal of what most of the world is trying to do, namely eliminate plastic wastes that are proving far more durable than would be ideal. For instance, there is the worrisome North Pacific Gyre: a huge garbage patch in the deep ocean.

One interesting aspect of the Slate article is the assertion that some microorganisms can now digest plastics. This claim contradicts those made in Alan Weisman’s excellent book The World Without Us, in which he claims that such metabolic pathways had not yet evolved.

The overall question of materials over long spans of time is certainly an interesting one. They have a huge impact on what we do and can know about history. For instance, much of what we know about ancient peoples comes from examinations of the garbage and artifacts they left behind: clues that can give insights into diet, contact with other groups, and much else besides.

The the amount of material and information being accumulated in the modern world is unprecedented, the plight of the plastics curator is another example of how much of it is ephemeral. Perhaps that is more true of information than anything else. When the plastics and metals and dyes of our optical disks, hard drives, and flash memory systems start to degrade and fail, an unprecedented amount of information is likely to be lost, from baby and wedding photos to documentation of historical events.

Ontario rethinking new nukes

Bridge sculpture at the University of Ottawa

Apparently, the government of Ontario is reconsidering its decision to build more nuclear power plants, due to concerns about cost overruns and the status of Atomic Energy of Canada Ltd (AECL). The province was previously planning to spend $26 billion over the next few decades, expanding and refurbishing nuclear reactors.

Apparently, the Ontario government has rejected foreign bids from France’s AREVA and the American Westinghouse corporation, but doesn’t have sufficient confidence in AECL to commit for sure at this stage. They want guarantees from the federal government, in order to proceed.

I am torn on the question of whether to support nuclear power. It is certainly more appealing than additional coal power, when all the risks of each are taken into account. That being said, nuclear has always benefitted from large direct and indirect subsidies. It isn’t clear whether that public money would be better spent on alternatives, such as renewable generation, an improved electrical grid, energy storage, or demand management. I also have serious doubts about the competence of AECL, as well as our government’s effectiveness in regulating and managing it. It would have been nice for a foreign corporation with domestic support from its own government and taxpayers had taken on some of the risk associated with the new projects, rather than leaving it all in Canadian hands.

As an aside, Canadian nuclear regulators have discovered that Canada’s existing CANDU reactors are more dangerous than previously appreciated. In the event of a coolant leak, the chain reaction inside them actually speeds up, instead of slowing down. This could lead to dangerous overheating if a serious leak isn’t followed by a rapid shutdown.

Getting Green Done

Morty looking unhappy, with hidden limbs

Auden Schendler’s Getting Green Done: Hard Truths from the Front Lines of the Sustainability Revolution fills an important niche in the overall discussion about climate change and building a low-carbon global society. As the director of sustainability for the Aspen Skiing Company, he has personal experience with pitching and sometimes executing green projects, including those involving efficient buildings and renewable energy. His book offers some valuable on-the-ground observations that are lacking in higher level discussions like that of David Mackay. While the detail is welcome, the book does sometimes lack a sense of the bigger picture. The language and tone can also be annoyingly jocular, at times.

The most useful information in the book concerns the hurdles that exist to getting green projects done, even when they are well justified on the basis of lifecycle cost analysis. The initial investment is always larger, both in terms of time and complexity, and there are real risks associated with deviating from normal practice. Policymakers could clearly benefit from more direct discussion with the people who are ‘closest to the action’ and actually responding to policies when making their choices. In the end, Schendler sees a huge role for government: putting minimum standards into codes, providing financing to get projects going, and restricting the ways in which corporations can act while pursuing profits.

Schendler also weighs in on the value of individual actions, highlighting how only societal changes have the capacity to overcome climate change. Even so, personal actions are important for establishing credibility, which translates into some of the influence required to drive bigger changes. As a practical discussion of successes and failures, rather than a higher level theoretical work, this book is worth the time of those concerned with dealing with climate change.

Pondering smartphones

Sasha Ilnyckyj in a cemetery

Soon, I will probably be switching cell phone plans, and possibly phones and providers as well. I am considering getting an internet-enabled phone, and pondering the various associated options. The most appealing phones are the iPhone and the HTC Android phone, followed by the Nokia smartphones. Using the first two would mean switching to Rogers.

In terms of the phone itself, I definitely prefer a physical keyboard to Apple’s error-prone on-screen version. That said, it would be nice to have a phone that was also an iTunes compatible iPod replacement… Does anybody have an HTC Dream or direct experience with a working one? I am curious how they compare with the iPhone for web browsing, email, and instant messaging.

I definitely don’t want to get locked into a three-year contract, so I am considering buying an unlocked phone as inexpensively as possible, then getting a one-year smartphone contract from Rogers. That way, if I move outside Canada, or get into a financial circumstance incompatible with expensive data plans, I won’t have to pay a massive fee to get out of the contract.

Effective attack against Total Position Progression (TPP) master keys

A lot of businesses and institutions rely upon master key systems, in which most keys can only open one lock, but one key can open all of them. The latter sort of keys are usually held by security personnel, superintendents, etc. One common approach to achieving this with pin tumbler locks is to put two cuts in each pin stack, instead of the usual one. That allows several different possible keys to align the cuts along a shear line, allowing the lock to be opened.

A paper by Matt Blaze, from AT&T Labs – Research, describes a relatively simple attack that foils such master key systems, allowing anyone with an ordinary key, some blanks, and a file to copy the master key without ever seeing it. Basically, the approach is to start with the non-master key, then test each pin for another value that still produces a working key. Working through pin-by-pin, you can identify where the second break lies for each pin. From that, you can file or cut yourself a key that will open all the locks in the system. Using a bit of basic math, this process can be optimized and the number of blanks and key modifications required reduced.

It’s a neat attack for a number of reasons. It doesn’t require any exotic equipment or exceptional technical skill. Nor does it require breaking into anywhere, or compromising or tricking anyone. What it does do is provide a skilled attacker with a cheap means to render a much more expensive security system ineffective, requiring the replacement of all the master locks to correct for the failure (and not just with new master locks of the same kind, which would be vulnerable again). It is also neat insofar as it demonstrates what is effectively a mathematical attack against a physical system.

It is quite possible that this attack could allow somebody with legitimate access to one unit in a group (an office, a self-storage locker, a university residence room, etc) to gain access to all others, in a way that would be hard to detect and expensive to counteract.

Weaknesses in Wiegand

Mica Prazak under an umbrella

In the past, I have identified some problems with biometrics as an element in security systems. On the Wired website, there is a relatively old article describing an attack against electronic physical access control systems, developed by Zac Franken. It exploits the fact that the commonly used Wiegand protocol – used for communication between readers and access control databases – does not perform proper authentication between the access token, reader, and database system. As a consequence, if it is possible to gain physical access to the communication wires, an attacker can record a valid exchange between a real token and the database, then replicate it to grant themselves access. It doesn’t matter if the token is a keycard, a key, or a retinal scan.

The hardware required apparently costs around $10. In addition to allowing an unauthorized user to gain access, the system can also lock out all legitimate users once the attacker is inside.

What this exploit really demonstrates is how successful security requires that every element of a system be robust against exploitation. You could spend thousands of dollars on the best biometric scanners available, only to be foiled by a simple workaround of this type.

A renewable energy plan for the UK

Hangers for clothing

At the end of the non-technical portion of his book, David MacKay estimates what it would take to renewably power the United Kingdom, switching forever away from unsustainable fossil fuels. With one possible approach, he reckons that it would require the following:

  • 52 onshore wind farms: 5200 km2
  • 29 offshore wind farms: 2900 km2
  • Pumped storage: 15 facilities similar to Dinorwig
  • Photovoltaic farms: 1000 km2
  • Solar hot water panels: 1 m2 of roof-mounted panel per person. (60 km2 total)
  • Waste incinerators: 100 new 30 MW incinerators
  • Heat pumps: 210 GW of thermal energy pumped
  • Wave farms – 2500 Pelamis, 130 km of sea
  • Severn barrage: 550 km2
  • Tidal lagoons: 800 km2
  • Tidal stream: 15 000 turbines – 2000 km2
  • Nuclear power: 40 stations
  • Clean coal: 8 GW
  • Concentrating solar power in deserts: 2700 km2
  • Land in Europe for 1600 km of HVDC power lines: 1200 km2
  • 2000 km of HVDC power lines
  • Biofuels: 30 000 km2
  • Wood/Miscanthus: 31 000 km2

In total, this adds up to about 300 gigawatts (GW) of energy for transport, heating, buildings, and everything else. What this suggests is that, if you want to maintain population density at levels similar to now along with per capita energy use, you need to turn entire densely populated countries into energy factories even with nuclear and ‘clean coal.’ While he doesn’t estimate costs for the last two, his ballpark estimate for building all the rest are about £870 billion. That number may well be an overestimate, since the costs for many of the technologies are extrapolated from a few pilot facilities.

That may seem like a staggering amount of money and land. On the money side, however, it must be borne in mind that the UK is currently spending £75 billion per year on imported energy. That means the whole conversion would cost as much as about twelve years of continued fossil fuel use, at prices similar to now. The land use change may be a far bigger barrier. Making the UK into a renewably-powered country requires devoting a considerable portion of its total land area to that purpose. That’s a lot of spoiled views and local resistance to overcome.

He offers five other energy plans for the UK, based on different balances of technology. He also has energy plans for Europe, North America, and the world as a whole. To make the figures add up, they all require either nuclear, massive solar farms in the desert (600 by 600km), or both.

Countries are going to need to make some hard choices about population size, energy use, and the maintenance of land for agriculture, wildlife, and human enjoyment.