Wednesday, June 29, 2011

How Computer Programs Work (When They Work!)

Just about everything, from telephones to toothbrushes, has a computer in it these days. Exercise bikes can be programmed to simulate flat beaches and mountainous climbs. (I assume sex toys will soon have similar features, if they don't already.) Coffee makers require rebooting, and microphones can automatically fix your off-pitch singing. Computers win at chess and Jeopardy. Can American Idol be far behind?

So what makes these machines so smart?

Actually they're not smart at all. Computers can only do a few very simple things. All the rest is a combination of those things, as arranged by some clever programmers. And the programs tend to involve a few stock ways of solving problems. Some of the basic problem-solving techniques are:

Repetition - Computers can do the same thing over and over again, very fast, without getting bored (as far as we know.) If you left a piece of candy in one box in a room full of thousands of boxes, the computer would be perfectly happy to look in each box, one after another, until it found the candy.

Condition Testing - If our computer is checking every one of the thousands of boxes in the room, and it finds the candy in the second box, we probably want it to stop looking. For that, the computer's program would contain an instruction like: If you find the candy, then stop. Of course, once you have the candy, you may not care whether the computer keeps on looking or not, and the computer will be perfectly content to keep checking boxes forever, or until it needs a software upgrade.

Recursion - Suppose that in this room of boxes, you might have boxes inside of other boxes, and boxes inside of boxes inside of boxes, etc. Think of a program called CheckBox as a set of instructions:
  1. Look inside box
  2. If the candy is inside, then stop.
  3. Otherwise, if more boxes are inside, do CheckBox on each of those boxes.
In other words, the CheckBox program calls itself if it finds a box inside another box. That will work for boxes inside boxes inside boxes inside ... etc. up to any level. This is a very useful idea for problems that can be broken down into smaller problems, each of which is like a smaller version of the original problem.

Of course, if a person were doing the searching, and found boxes inside boxes, they would automatically look inside without being told. (Then again, computers don't have to be told not to eat a KFC Double Down sandwich.)

Parallelism - The part of a computer that actually computes is called the central processing unit (CPU) or simply processor. More recently, it's called a core, as in dual core, quad core, etc. Lots of modern computers have multiple cores, which means they can do several things at one time. So one smart way to solve a problem is to split it up so that each processor can be working on part of the problem.

It's like having several people search through that room full of boxes you've got. Naturally they'll find the candy more quickly ... but only if they're not all checking the same boxes! You have to make sure each one knows which boxes to check. It would also be nice if the one that finds the candy tells the others to stop looking.

There are lots of variations and combinations of each of these techniques, but these are the basics. Just about every computer program can be viewed as a sequence of these techniques. At some future date, when I really have nothing better to say, I'll discuss some of the kinds of problems programs solve, and how they use these techniques.

Monday, June 27, 2011

The Aging Process

From the Fountain of Youth to Botox, people seem to be enthralled with the notion of postponing aging (or at least, the appearance of aging.) We all want to be forever young and beautiful, with clear skin and clearer minds. Of course, we want to hold onto everything we've learned in life, but to retain (or regain) the youthful enthusiasm and energy.

Unfortunately, little is documented about the aging process itself. Doctors understand certain conditions that tend to be age-related, but not the underlying changes that are summed up as "getting older."

To help remedy this, I want to document some of my own personal experiences with aging. This is not exhaustive ... I hope to continue aging for a good long while to come, and will report further results.  The brief outline so far, is as follows:

Childhood - Couldn't wait to grow up. Grown-ups had all the money and power. Of course, back then a $5 bill was unimaginable wealth.

Teen Years - Desperately wanted to join the ongoing sexual revolution. Unsuccessful.

College - So much opportunity, so little time.

Young, Single Adult - Life is good. The three I's: Income, Independence, Initiative.

Young, Not-So-Single Adult - The three I's have become three D's: Debt, Dependence and Deference.

Parent - Ironic to look back on childhood's innocence and naivete and think: "Damn, I should have played more."

Somewhat Older Parent - These kids today ...

Wednesday, June 22, 2011

Tuesday, June 21, 2011

Mark Satisfaction Survey

Our records indicate that you recently dismissed a spam pop-up window from one of our advertisers.  We'd like to get your feedback on this spam by asking you to participate in a brief on-line survey.  The results will be used to help us streamline and improve our spam delivery system.

The survey will take about 2 minutes to complete.  As our way of saying "thank you," participants will automatically be entered in a drawing to win a one of these exciting prizes:
  •  250 free business cards (from various businesses in the greater Boston area)
  • a full set of designer napkins with the McDonald's logo proudly emblazoned on them.
  • most of a sticky note pad.
 Please click here to take the survey.

Thank you for your continued support and participation.

Monday, June 20, 2011

Friday, June 17, 2011


Some people have said the end of the world is coming on Oct. 21 of this year.  This is based largely on the same biblical evidence behind the much acclaimed prediction of The Rapture on May 21.  That drew a smaller crowd than the Red Sox/Cubs series the same weekend.

What few people realize is the real end of the world comes not in the form of Judgement Day or anything celestial.  It will be N.M.F.D.

For the uninitiated, this is No More Freebies Day.  It's the day when GMail, Skype, Yahoo!, YouTube, and all the other free Web services we know and love start charging money.  Cause you know that's gotta happen, right?  Turns out that giving stuff away for free is not a great business model.  Imagine if WalMart had a "Help Yourself" policy.  Do you think there'd be a store in every town in the country?  Imagine if Ikea gave away furniture and cinnamon rolls.  There'd be an epidemic of obesity.  (Oh, wait.)

So prepare yourselves.  The day is coming.  You'll have to pay to watch YouTube! videos.  You'll have to subscribe to use Skype.  Facebook will make you pay for each exciting update on who had what for lunch.  And The New York Times will allow you only 19 free articles per month!

Mark my words!  It'll be worse than any apocalypse.

Wednesday, June 15, 2011

Bike Parking

One of my recurring concerns is with using a bicycle instead of a car as much as possible.  In a recent post, I mentioned some of the problems: parking, carrying stuff, and not getting killed in traffic.

As far as parking, with a car, you can just stop someplace and get out.  Your car's not likely to get stolen, and you can improve your odds by locking it, activating an alarm, etc.

A bike, on the other hand, is pretty defenseless.  Even if you lock it, a bike thief can put it in the back of an SUV and drive off with it.  You can lock it to a post or rack or something, but there isn't always one handy near where you want to put your bike.  That's where the telescoping bike seat comes in.

All it takes is some telescoping tubing that can lock in the extended position.  Not only does this make the bike impossible to ride (at least for non-contortionists), but it also makes it too big to fit in the back of most SUVs, etc.  Of course, someone really determined could find a way to steal it, but who's going to want a bike that looks so stupid?

When you get back to your bike, you just unlock the tubing and collapse it to have a normal looking bike again.  Of course, you might want to make sure the tube is locked down in the collapsed position.  You don't want any surprises if you go over a bump.

Tuesday, June 14, 2011

The Fresh Fruit Problem

Now that Spring has finally reached New England (well, sort of), there's an abundance of fresh fruit, and all the issues that raises.  I'm talking about issues such as how to eat watermelon with dignity.  (By "dignity" here, I mean not getting sticky pink juice all over yourself, your clothes and your loved ones.)  Eating watermelon with a knife and fork seems pretentious, but I'm willing to make that sacrifice.

Of greater concern are blueberries.  While nicely packaged for individual consumption, blueberries seem to cry out for company in the form of cream (sour, whipped or otherwise), cereal, or some other bland nourishment.  However, this raises all kinds of challenges.  How, for example, do you mix the blueberries with whatever other food to ensure a uniform distribution?  Obviously you want each mouthful to have the same proportion of blueberry to "other stuff," whatever that may be.  But upon being added to cereal, the blueberries show a remarkable tendency to stick together in groups.  Stirring helps, but is only partly effective at best.

Of course, the most pernicious fruit is the banana.  Apart from the innuendo it inevitably suggests, bananas have a complex structure.  It's tempting to think of them as fruit (to eat) and peel (to throw away.  Things are seldom that simple in life.  Between the edible fruit and the discardable peel, there is a multitude of long fibrous strands of some substance that's not quite fruit or peel.  These generally dangle from a partly exposed banana, taunting the consumer to pass judgement.  It's easy to just pull them off, but if you pursue this too energetically, you begin to destroy the very fabric of the banana.  I'm sure there are philosophical ramifications to this, but they elude me at the moment.

So, enjoy the Spring and Summer, but please use caution.

Monday, June 13, 2011

Friday, June 10, 2011

What Do You See?

... and that one looks just like the Internet!

Wednesday, June 8, 2011


(To the tune of Both Sides Now by Joni Mitchell) 
[Play Audio (4:14)]

Access email anyplace,
And chat with people face to face,
Or view the earth from outer space.
I've used The Cloud that way.

But now I only get delays,
And on-line backups last for days.
I'd surf the Web, but in some ways
The Cloud gets in my way.

I've worked The Cloud from both sides now.
The server farms could use a plow.
And client apps are way too slow.
The Cloud is not the way to go.

No dates since the senior prom,
My love life is a total bomb.
e-Harmony and
I’ve looked for love that way.

But now I get Cialis ads
With horny grandmas and granddads.
It’s atrophying my gonads.
No mate with whom to play.

I’ve looked for love on both sites now
But still I am without a frau.
With porno sites at beck and call
I really don’t see love at all.

Browsing through an e-tail store,
I've bought some stuff, but wanted more.
And had to check my credit score.
I've looked on-line that way.

But now my bank account's bereft.
My credit lines have nothing left
Thanks to identity theft,
And still I have to pay.

I've looked on-line from both sides now.
I'd use PayPal, but don't know how
And once you cross the firewall
The Web is not secure at all.

Monday, June 6, 2011

The Government They Deserve

The two pillars of the United States, democracy and capitalism, are both based on the concept of competition. In a democracy, as in capitalism, politicians and products compete for your votes or your dollars (or both) by trying to appear to be just what you need.

We, as good Americans, know that competition has to be fair. That means that the competitors, whether they be politicians or feminine hygiene products, have to be on a level playing field. If politicians were permitted to say things that are not true, for example, or if advertisers were permitted to make exaggerated claims, the system would not work. We'd have no good way to decide which douche or which feminine hygiene product to choose.

Luckily, as we know, competition forces everyone to be honest.  No politician would ever mislead voters on a policy or cheat on a spouse for fear of being exposed in the media.  No advertiser would downplay a product's safety hazards, or risk annoying a TV audience with obnoxious commercials, because that would just give the advantage to a competitor.

But this isn't natural selection. Darwin's form of competition is about species surviving or not based on their own strengths and abilities. In politics and sales, however, the winners are the ones who capture the hearts and minds of other people. There's no steel cage death match between Democrats and Republicans (though I'd bet the Nielsens would be through the roof!)  There's no showdown between Coke's bottled tap water and Pepsi's.

It's only natural that our lives revolve around competition.  We LOVE to compete.  On TV, people compete at everything from ballroom dancing to cooking to answering trivia questions. If life doesn't give us enough areas to be competitive, we invent new ones, like Wheel of Fortune or Wipeout.  We give prizes for Best Original Song in a Picture Adapted From Another Source and Hottest Singles Under 40 With Fewer Than 3 Dental Crowns. It seems the loftiest human goal is to find something at which you can be better than others.

That's why school athletics programs should be the last things cut when budgets are tight. Athletics are where kids learn about competing, from the examples set by their parents.

Remember, it's not how you play the game.  It's whether you win or lose!

Sunday, June 5, 2011


In this new media age, mere words seem pretty paltry and inadequate.  How can text compete with powerful imagery and attention-grabbing sounds and video?  What hope is there for plodding, sequential sentences when other media can jump from place to place, person to person, sensation to sensation?

In some ways, words are too demanding ... they are commonly reduced in messages to a few consonants with perhaps a token vowel, or even some digits, thrown in for clarification. gtg.  cul8r.  lol.  Who has time to even read "Got to go" or "See you later" anymore, much less to type them?  And using the Shift key? forget it.

On the other hand, even fully spelled out words, at least in the hands of amateurs, are insufficient.  We have to include smileys to set the tone ...  ;^)   8-}  Tempers flare and flame wars erupt over misunderstood messages.

Maybe it comes down to the fact that everyone's a creator now.  Anyone can point a camera at an event and be a journalist.  Anyone can slap together some mobile phone video clips and be a filmmaker. We are all documentarians of our own lives, and we shamelessly blog and Flickr and Tweet them as though nothing could be more important.

It reminds me of old family gatherings, where literally everyone would be talking at once.  Not talking and listening.  Just talking.  Maybe that's the beauty of the internet.  We're all one big family now.

Friday, June 3, 2011

Bike Talk

The weather in New England is getting gorgeous (ignoring a few tornadoes), so my thoughts have turned, as they do every year, to biking. Specifically, I want to use a bicycle instead of a car for as many purposes as I can. Most of my errands are local anyway, and biking is almost as fast, if not faster, than driving. Biking also reduces stress, gives you exercise, and gets you exposed to nature, especially in the form of bugs and bird poop.

However, there are three concerns: parking, carrying stuff and not getting killed by cars. That last one is rather important to me, as I have quite a Netflix queue built up.

The parking problem is that you can't simply get off your bike and leave it around when you get to a store or restaurant or someplace. There are others who covet such things, and a bike can conveniently serves as both stolen goods and getaway vehicle. You can, of course, lock it, but that means carrying big, heavy locks around. It also means you need something at your chosen spot to lock the bike to. (A  skilled and determined thief can simply toss your locked bike in the back of an SUV.) There are frequently bike racks, signs, lamp posts and other objects around, but not always where you need them.

I've thought of carrying a boat anchor around, and just dropping it to the sidewalk when I want to leave my bike for a while. (Make sure to stop the bike before doing this.) Of course, it would have to be a pretty heavy anchor, and that might be awkward. A better option would be a harpoon gun. I could fire a harpoon into a nearby tree, sidewalk or parked car, and then lock the bike to that.

The second problem is cargo. How do you carry a week's worth of groceries, or a new HDTV? It would be nice to have a big trunk or cargo bay, but that too would pose a security problem. It could make balancing the bike pretty challenging too.

There's a wide range of bags designed to mount on just about every part of the bike not otherwise occupied by person. These include: panniers (on either side of the rear wheel), trunk bags (above the rear wheel), front panniers (on either side of the front wheel), seat bags (under the seat), handlebar bags (Do I really have to spell it out for you?) and, of course, the backpack. A fully loaded bike heading down the street looks like an attack by a giant fuzzy slipper. Of course, you have to remove and carry all these bags when you lock the bike up someplace.

Then there's the matter of not getting killed. Many cyclists deck themselves and their bikes in reflective tape and flashing lights, creating that festive holiday look just about anytime. I think bike-mounted AK-47s would be more effective, but there are some legal restrictions on these. That boat anchor might come in handy here as well.

But on a more practical note, the keys to bike safety are:
  1. Follow the rules of the road.
  2. Be as visible as possible.
  3. The best defense is an offense.
I think there's a marketing opportunity for a stunt cyclist to teach others how to fake being hit by a car.  The massive insurance awards in these cases might make drivers think twice about being reckless around bikes.  (Nah!)

Probably the best solution to all of these problems is to get a bike that's like a car.  It could have a large car-type body.  It would be too big to be thrown into an SUV, and could have an actual trunk.  It would be as visible as a car, and the body would offer some protection to the cyclist.  And if it's too heavy to ride around with, you could put an engine under the hood.

Wednesday, June 1, 2011

How the Internet Works (When It Works!)

The Internet allows computers to talk to each other. Duh. The technology behind this is called packet switching. The idea is that any message, no matter how big or important, can be split up into packets. These packets then get sent, along with a lot of other packets from other people's messages, across the Internet. Because each packet is carried separately, the pieces of your message might take different routes from computer A to computer B. They could arrive at different times, and out of order.

Suppose you were writing a long note to someone across the room at a crowded party. As you finished writing each page, you'd tear off that page, fold it in half and write your friend's name on the outside. Then you'd hand it to someone next to you, and ask him or her to pass it to your friend across the room. Of course, for each page, there may be a different person standing next to you, and all the other people in between you and your friend may have moved around too. Better number those pages.

The cool thing about this is that no one's in charge, telling the others what to do. It's all just a bunch of individuals following a few basic rules to be nice. If there were an earthquake, and half the room fell into a crevice in the earth's crust, you could still pass notes (as long as your friend were still there). Of course, the notes might take a completely different route around the hole in the ground.

And you might get some funny looks.

No doubt you've already spotted one problem with this. Other people at the party could open your notes and read them. That's called packet sniffing. Because each packet only has part of the message, that may not be a problem, but if your message is short, or the same person happens to wind up with several pieces, it could get ugly.

The other problem is that the people at the party will think you're a jerk for passing notes at a party. Besides, who writes notes anymore? Just text!