Sunday, 30 March, 2003

Bicycling Science

Considering the material, Bicycling Science by Frank Rowland Whitt and David Gordon Wilson is a surprisingly good read.  The book is exactly what the title implies—a study of the science behind bicycling, including human power generation, bicycle physics (wind resistance, friction, wheel physics, braking, etc.), and mechanics and mechanisms (power transmission).  The book includes chapters on the history of bicycles, unusual human-powered machines, and a look into the future of human-powered machines.  My only complaint with the book is its age.  It was written in 1980, so all of the advances in materials science and other innovations of the bicycle aren't included.  Nonetheless, the basic science of bicycling hasn't changed in 100 years, so most of the information is still relevant.

Many of the discussions explain the limiting factors not only of bicycling or human powered machines, but of power generation in general.  It's interesting to note, for example, that if you double your speed, you cube the power requirement.  As I've pointed out before, the primary impediments to motion on the ground are wind resistance and rolling friction.  Power transmission on the bicycle itself is surprisingly efficient—in the 95% to 98% range.  But the human body's efficiency is in the range of 23% to 28% efficient.  That is, only about one-fourth of the energy you expend is converted into useful work, making a person on a bicycle approximately 25% efficient—about the same as an automobile.

The book is well-researched, and full of charts, tables, and figures that illustrate the authors' points.  The writing is slightly more formal than I'd prefer, but not dry by any means.  If you're at all interested in the science behind bicycling, you should read this book.

Thursday, 27 March, 2003

Adam Osborne, R.I.P.

My friend Randy Schafer over at EarthLCD sent me this link today.  Adam Osborne, computer author and pioneer of the first portable computer (see my December 4, 2001 entry) passed away on March 18.  Osborne quite possibly could have owned the portable computer market, but made the fatal blunder of announcing a "new and improved" version months before it was ready.  Buyers decided to wait, and the company collapsed.  That wasn't his only mistake, but it was perhaps the biggest.

EarthLCD, by the way, is the place to go if you need an LCD.  If you need an LCD and controller for a home or small work project, you probably can't beat the price and selection you'll find there.  And if you need a couple dozen or even a few hundred, Randy just might have what you're looking for.  I've been to his warehouse.  He really does have a million LCDs in stock.  If you need an LCD, give him a call.  Tell him I sent you.  No, I don't get a kickback.

Tuesday, 25 March, 2003

SimCity 4 Strategy Guide

I've been tinkering with SimCity 4 as I have time, which usually works out to a few hours one day or two during the week, and perhaps an extended period (4 or 5 hours) on a weekend if I'm lucky.  I've built and destroyed uncountable cities while trying different strategies.  I picked up a few hints on the official site, and a few more here and there on the Web.  But my cities keep getting to about 30,000 population, go into budget deficit, and nothing I do seems to turn that around.  I finally got hold of Prima's SimCity 4 Strategy Guide, hoping that it would give me some strategies to try.

The book is terribly disappointing.  It's a reference manual that describes the formulas used in the different parts of the simulation, and a recitation of the numerical effects of different actions in the game.  There are a few broad hints peppered throughout the text, but it's not a strategy guide.  I was looking for more direct hints on city layout and proven strategies for dealing with the myriad details of the simulation.  To make matters worse, the book has many typographical errors, some incomprehensible descriptions of key points, and many examples of conflicting information.  Those errors aside, it's a reasonably good reference, but hardly a strategy guide.

Sunday, 23 March, 2003

Happy Puppy!

Several of you have asked how Charlie is doing.  He's a happy puppy, as you can see from the picture to the left.  (Click for a larger version.)  I was out taking pictures of the budding trees this morning, and thought I'd try some action shots of Charlie.  The tree shots didn't turn out so great, but I thought the Charlie shots turned out okay.  I got the one at the left as he was moving towards me and I was moving the camera trying to keep with him.  I'm surprised how well it turned out.

I also tried out the camera's multi-shot feature.  Press the button and it takes five pictures in a second or two (I'm too lazy to look it up).  In any case, I squatted down and called Charlie to me.  You can view the results in an animated GIF here (640x480 - about 980K image) and here (1024x768 - about 2MB).  The camera's resolution is 640x480, so the larger version is a bit blurred, but not terribly so.  The background moves a bit 'cause I was holding the camera in my hand and I wasn't too sure if Charlie was going to run by or bowl me over.

I love this digital photography stuff.

Saturday, 22 March, 2003

Rosedale Ride

Today I participated in the ninth annual Rosedale Ride.  Today's goal:  62 miles.  Considering that I rode 56 last Saturday and covered much of the route for today's ride, I didn't figure there'd be a problem.  Except when we started at 8:30 this morning it was 50° and raining.  Not a drizzle, mind you, but a medium hard rain.  The first 5 miles was miserable, continually being sprayed by the water kicked up by the bicycle in front.  Riding in a group of 1,000 people is bad enough, but doing it in the rain?  Ugh!  A few riders (the smart ones, maybe?) turned around and went home, but most of us continued.  Although I did hear plenty of people say that they had planned to ride 62 miles, but with the rain they decided to do the 45 mile route instead.  My riding partner and I missed the 62-mile turnoff just after the 16 mile mark, and didn't discover our error until we'd gone another 5 miles.  What to do?  Of course, we turned around and headed back to rejoin the 62-mile route.  The rain stopped and the clouds cleared a bit as we approached the 30-mile mark, and the rest of the ride was reasonably comfortable, except for the wet clothes.  Even with the extra 10 miles tacked on, I felt pretty good at the end of the ride, although I was happy to see it end.

I'm well into the training for my double century this fall.  I ran across a book called The Complete Book of Long-Distance Cycling, by Edmund R Burke, Ph.D. and Ed Pavelka.  If you're interested in long-distance cycling (100 miles or more), definitely pick up this book.  It's full of good advice on training, eating, stretching—everything you need to know.  They have the Bicycling Magazine century training program that I used last year, and a similar program for a double century.  At only 16 weeks, their double century training program is a bit too aggressive for me (they do point this out in the book).  I'm modifying their program a bit and will take 20 to 25 weeks to work up to that distance.  That'll make it September or October before I try a double century.  It's going to be an interesting summer.

Friday, 21 March, 2003

War.  Oh, Boy.

Bombs are falling, troops are rolling, and we've had the first casualties.  Yes, there's a war on.  And I'm really sad to see that it had to come to this.  But when the President started pushing the United Nations last fall to disarm Iraq, there were only two possible outcomes:  either the U.N. speaks with one voice and coerces Saddam Hussein to disarm, or the U.S. does it with whatever help it can find.  Anybody who thought the President was bluffing hasn't been paying attention for the last few years.  The French insistence on "more time" for inspectors gave other countries the legitimacy they needed to look big in opposing the U.S.  And once the French realized that we weren't bluffing (they really weren't paying attention), it was too late for them to back down and save face.  That the French and their coattail riders are attempting to take the moral high ground is quite the source of amusement.  And disgust.  That the U.N. turned a blind eye to Iraq for the last 12 years just proves that the U.N. is not effective in dealing with outlaw regimes.  Or any other controversy, for that matter.

The question in everybody's mind is whether Iraq has those fabled weapons of mass destruction.  I suspect so, but that's really beside the point.  WMDs or not, Saddam Hussein and his minority Baath party must go.  Should have been gone 12 years ago when we had the opportunity.  But instead we bowed to world opinion and left in power a person who has absolutely no regard for his own people.  How anybody could think that he would have any regard for world opinion is beyond me.

Mostly I'm just sick of the whole thing, which is why I've never mentioned it here before.  It's very depressing to think that with all of our technology and supposed understanding, we still can't prevent a sociopath from murdering his own people and threatening the rest of the world.  I think I'll go bang my head against the wall now.

Tuesday, 18 March, 2003

Windows Assembly Language Programming

I've heard it said that assembly language programming for Windows "isn't really assembly language programming."  The people putting forth this claim usually point out that when you write assembly language programs for Windows, a very large part of your code is just building stack frames and calling Windows functions.  This is somehow "less worthy," I guess, than how you do things in DOS or Linux.  That is, pack things in registers and invoke an interrupt.  (Although in Linux you also have access to glibc, which you would access by building a stack frame and calling a named function.  In fact, invoking the interrupt functions in Linux is highly discouraged because in theory functions change from version to version.  In practice, functions are added in successive versions, but there are very few, if any, changes to existing functions.)

Extremists will point out that the existence of any operating system makes what you're doing something less than "real" assembly language programming.  If you're not talking directly to the hardware, they say, then it's not really ASM.  Oddly, BIOS routines seem to be included in most definitions of "the hardware."  I suspect because most of these uninformed extremists would find it rather inconvenient to write their own IDE interface software, or decode keyboard characters.   

What a load of bull.  Unless you're doing embedded systems work, you will have to interface with an operating system.  So some operating systems let you refer to functions by name rather than cryptic interrupt function numbers.  Big deal!   One way you pass parameters on the stack, and the other you stuff registers.  What's the difference?  If you want to show somebody how to stuff registers, build your own internal functions and call them!  And, really, from the user program's point of view, there's no essential difference between invoking a software interrupt and calling a function.  Besides, interfacing with the operating system is such a small part of assembly language programming as to make the particular method almost insignificant.

The important lessons in assembly language programming have to do with the processor—and you use the same instructions there regardless of how the operating system provides its services.

Thursday, 13 March, 2003

How Fast Can A Dog Run?

Sometimes you learn things unexpectedly.  Today's lesson: how fast can a dog run?  I was cruising down a county road this afternoon recovering from a sprint when I heard the pitter patter of little canine feet approaching from behind.  Turning my head, I saw what I think was a Jack Russell terrier approaching with evil intentions.  I pushed a little harder on the pedals and easily outdistanced the dog, who gave up and trotted back home.  A couple hundred yards later I realized that I'd taken a wrong turn.  Damn.  Now it's either ride the extra 5 miles this route will entail or turn around and have a little fun with the dog.

I approached the dog's yard going about 12 MPH.  Sure enough, the little mutt came tearing out the driveway headed right toward my front wheel.  Having had some experience with dogs, I knew he'd dart to the side at the last second and try for my foot.  But pavement isn't grass, and he slipped and scrambled trying to turn around.  I shot by him and turned to wait.  As he approached, snarling and snapping, I accelerated to 15 MPH but that wasn't quite fast enough and before I knew it he was right at my heel.  I picked up the pace a little more to get in front of him, and soon he was following my back wheel quite nicely at 17 MPH.  We stayed like that for about 15 seconds until I was satisfied that he couldn't run any faster, and then I sprinted off to let him return home.  Another successful science experiment.

Out on the county roads away from traffic, dogs are the only real danger to cyclists.  Barking dogs aren't a problem, because they're usually friendly or scared and won't approach, or they're safely contained behind a fence.  But any unfenced dog is a potential hazard, so be wary.  Dogs that want to attack usually do so quietly.  Attacks from the rear are easily countered by pedaling a little harder. A dog can't maintain 20 MPH on smooth pavement for very long.  I've found the best way to handle a frontal attack is to maintain a steady pace until the dog is even with the front wheel and then accelerate.  You don't have much other choice in this attack.  If you slow down you give the dog a better opportunity to catch you as you pass, and if you try to dodge the dog you're going to end up in a heap—either because the dog dodges right in front of you, or because you've presented a better target. The most dangerous dog is the one who comes at you from the side because you don't get much warning.

If a dog does catch up with you, it's best not to panic. And don't worry too much about going faster—your brain will have pumped about a quart of adrenaline into your bloodstream and you'll be rocketing along faster than you ever thought possible.  Dogs seem to like going for the feet, which fortunately are usually moving too fast to be caught easily.  Trying to kick the dog in the teeth is a very bad idea because it makes your foot easier to catch.  Your best course of action is to grab a water bottle and squirt the dog.   That distraction will usually slow him long enough for you to get away.

If you're moving too slow to sprint past a dog, get off the bike well in advance of the dog's approach and keep the bike between you and him.  Get out your water bottle and squirt the dog.  That'll usually keep him back, and might even make him decide to go away.  I've also found (back in my running days) that bending over as if you're picking up a rock is quite effective.  I guess these types of dogs have been hit by plenty of rocks, and have learned that a person bending over like that means that a missile will  soon be on the way.  It's not a good idea to try hitting the dog with your bike.  If you miss you're going to give the dog an opportunity to attack, and if you hit him you'll probably just make him angrier.  Your best bet is to try to find help, either by waiting for a car to come by or by walking to the nearest house (keeping the bike between you and the dog).

Wednesday, 12 March, 2003

Collins 75A-4 Receiver

It's a Collins 75A-4 Amateur Receiver, probably the best such radio to come out of the 1950's.  This particular radio belonged to my grandfather, who purchased it new sometime between 1955 and 1960.  I ended up with it when he passed away in 1990.  My friend Jeff Duntemann (K7JPD) took it off my hands and actually used it for 10 years.  Jeff shipped it back to me recently (it arrived today), and now it sits on my desk waiting for me to hook it up to something.

Although I have my license (KB7UQD), I've never been what you'd call active in Ham radio.  I have a 2 meter mobile rig that's been stored away in the garage since I sold the car I used to have it installed in.  I also have my grandfather's old Hallicrafters HT-37 transmitter sitting in a box in the attic.  I don't know if that one works, and I wouldn't know how to fix it if it's broken.  I guess I'll have to find an old timer around here who likes fiddling with old tube equipment.

That's what I need.  Another hobby to keep me busy.

Sunday, 09 March, 2003

Back on the Bike

Back on the bike!  Spring has arrived in central Texas and I'm back on the bike, trying to whip myself into shape for the upcoming Rosedale Ride on March 22.  December, January, and February are not real good months for riding around here so my training has been somewhat lax.  Yes, I know that I could set my bike up on the magnetic trainer.  Pedaling in one place is not particularly exciting.

This will be my fourth year doing the Rosedale Ride.  When I rode the 100K in 2000, it was the farthest I'd ridden a bicycle.  I rode the 40 mile route in 2001, and last year I rode the 28 mile route with my friend Ron Hollis, who was on his hand cycle.  Rosedale is a well attended ride (about 1,500 riders, I'd guess), and well supported.  This year they have rides of 8, 15, 25, 45, and 62 miles.  I think I'll step back up to the 62 mile route this year.  It seems like a good way to get my training into full gear.

Training for what?  For some strange reason, I have the desire to do a 200 mile ride sometime this year.  I haven't quite figured out how I'm going to train for that, as I suspect it will require somewhat more commitment than last year's 8-week century training.  I'm sure I'll think of something.

Friday, 07 March, 2003

Trace Debugging Reborn!

Back in the bad old days of computer programming, before the advent of integrated development environments (IDEs) and source-level debuggers, the most common debugging method was code tracing—placing output statements in the code that would write the state of the program or the name of the current procedure to the console or to a log file of some sort.  Placed correctly, those messages could give you good insight into your program's operation.  The tough part was knowing where to put the trace statements so that you had enough information in the output log, but not too much.  It was a painful process, but it's all we had at the time.  Well, there were symbolic debuggers, but most COBOL programmers didn't understand enough assembly language to use them effectively.

With the advent of source level debuggers the fine art of program tracing was mostly lost.  Why dig through a log file to find out what your program is doing when you can just fire up the debugger and step through the code?  Source debuggers are useful tools, but a log file gives you something that a debugger can't—a permanent record.  A log file can also be used (if you write your program to support it) to "replay" program execution.  If you write your program so that it records all inputs in the log file, then it should be a simple matter to write code that will read input from the log file to duplicate a session.  Combined with a source level debugger, the log file gives you a reliable way to duplicate most errors.

The lost art of program tracing is finding its way back to mainstream programming.  Operating systems have always had event log files where major events were stored, but until recently there was little attention paid to trace information.  The primary reason for renewed interest in tracing?  Web services and other programs that have no real user interface and are intended to run unattended for months or years at a time.  A log file is the only practical way to monitor such applications and diagnose problems.

The point?  I find it interesting how many times an older technology is supplanted by something "better," and then is re-discovered a generation later and touted as the hottest new thing.  So very often replacing old technologies results in our losing something essential, but not realizing the loss until long after the old technology is mostly forgotten.

Wednesday, 05 March, 2003

AOL Trashes a Billion Spam Messages

AOL announced today that its front-line filters trashed a billion spam email messages in a single 24-hour period.  That's one billion messages that were canned before they were delivered to subscribers' inboxes, or an average of 28 messages per subscriber.  That's an astonishing number.  It's interesting to note, though, that AOL's filters have a false positive problem.  As the article says:  " extremely small fraction of messages snagged in AOL's spam filters were legitimate ones."  The AOL spokesman declined to give any figures on the false positives.  Yes, folks, spam is a real problem.  I've noticed an increase here recently, including at least one every day that has the "klez" virus.  RoadRunner strips the attachment from those, fortunately.

The Internet Engineering Task Force ( has finally decided to get involved.  They've formed the Anti-Spam Research Group (ASRG) to study the problem and propose solutions.  One wonders why the IETF has taken so long to get involved.  It's not like spam is a new problem.  It looks like they're focusing on a consent-based system which looks like a fancy term for filtering.  They do mention the addition of a source tracking component, which I think is necessary for effective spam blocking.  Source tracking, of course, makes anonymous email a bit more difficult, so the idea will meet some resistance.  It will be interesting to see how this proceeds.

Monday, 03 March, 2003

Considering a Tablet PC

I've held off getting a laptop for many years because they're just too bulky and inconvenient.  During the 18 months I spent traveling for Inquisite, I hated lugging that damned laptop computer around.  Even the newer and lighter models seem pretty inconvenient.  I was hoping that the Kyocera Smartphone (a Palm OS device—see my entry for November 1, 2001) would give me the ability to keep notes and such, but even with the FitalyStamp keyboard I find writing on the thing painful.  A Palm is a cool toy, but I find it difficult to use for any serious work or even taking more than the briefest of notes.

They recently put up a Tablet PC display at the Microsoft Technology Center.  On it are a Viewsonic V1100, and a Toshiba Portégé.  I've been hearing about Tablet PC for a while and mostly pooh-poohed the idea, thinking that a cross between a laptop and a Palm could only give me the worst of both worlds.  Now I'm not so sure.  I've been toying with the machines on the display for the last few days, and so far I'm reasonably impressed.  I'm not real excited about the Viewsonic because it doesn't have a keyboard (although you can buy an external mini keyboard), but the Toshiba looks very nice.  At 3.1 lbs, it's less than half the weight of the laptop I used to lug around, and the system specs are more than adequate for what I need.  It's just too bad I can't borrow one for a couple of weeks to see if I really like it.  $2,500 is a lot of money to spend on something that I'm not sure I'll be happy with.

Now if I could get that with a built-in phone...

Saturday, 01 March, 2003

Democratic Presenditial Candidates

With the addition the other day of Florida Senator Bob Graham, we now have 9 Democrats vying for the nomination to run against President Bush in next year's election.  Yes, it's hard to believe that all this is taking place almost 2 years for the actual election.  When this all got started back in December (when Al Gore announced that he would not seek the nomination), I put it all down to opportunism.  With Gore out of the picture, the Democrats have no clear front runner, and everybody wanted to try his or her luck.  Now I'm not so sure.  Maybe the Democratic party, in an effort to wrest control from the Republicans, has convinced all of these candidates (fringe candidates, many of them) to run in order to "get out the vote."  This isn't a "vote for me" strategy, but rather a "vote against Bush and the Republicans" strategy.  This could work, I think, although I suspect that they'll have more success with Congressional seats than with the Presidency.  There are risks, though.

We'll see the inevitable withdrawals from the race beginning late this year, with the withdrawing candidate throwing his support behind one of the remaining candidates.  Going into 2004, we'll have a half dozen candidates for the Democratic nomination.  Supporters of the early withdrawers likely will become confused and disenchanted with multiple allegiance shifts.  And at some point the few remaining candidates will have to concentrate on differentiating themselves from each other rather than attacking Bush and the Republicans.  When the mudslinging starts, they're going to lose a huge number of people who were intending to vote, and a last-ditch effort in October 2004 will not bring those people back.  I think Democrats are counting on support for a particular candidate to equate to support for the party (or non-support of Bush and the Republicans) in general.  I just don't see that happening.

Or I could be totally off base, and those nine candidates really are just overly optimistic opportunists.  There's no doubt that the scheme I laid out above would require a level of cooperation and coordination that the Democrats haven't exhibited in recent memory.