Live like our ancestors?

I’ve heard people say, during discussions of the evils of modern life, that we should endeavor to “live like our ancestors.” I wonder which of our ancestors they’re talking about.

I wonder if they think we should go back to my childhood, where we lived in constant fear of nuclear war, where there was a single phone in the house, calls out of your immediate area (long distance) were very expensive, and there was no such thing as overnight delivery or even fax machines. If you were lucky you got more than three channels on your television. Fresh fruit and vegetables were seasonal luxuries, and if you were lucky you got two days’ notice of potential hurricanes and floods. Food was more expensive and less plentiful. Airline travel was a very expensive luxury. If you wanted to go across the country it took you several days by train or perhaps a week by bus. And even a rumor of being homosexual could destroy your career and get you killed. A gay man was labeled a pervert, and wouldn’t find any public support. People didn’t acknowledge that gay women existed.

Or how about my parents’ generation, where children regularly died of measles, polio, and other infectious diseases that were mostly a thing of the past when I was growing up? People died of simple infections because modern antibiotics (even penicillin) didn’t exist. Life expectancy was about 65 years in the developed world. My dad recounted stories of trudging through the snow in the middle of the night to the outhouse. That sounds like a great time. Wouldn’t it be just peachy to live in a time when the law enforced discrimination against blacks? Air travel didn’t exist for most people. Family vacations were perhaps a trip to the lake in the summer. If you were lucky there was a telephone in the house. If you didn’t live in a city, you might not even have electricity. Refrigeration involved somebody delivering a block of ice to your house every week, so you could put it in the ice box along with the few bits of food you wanted to preserve.

My grandparents grew up on farms. No electricity, running water, telephones, or cars. Going into town involved hitching up the horse and wagon and spending the whole day getting to town and back. Radio didn’t even exist when my grandparents were kids. Children were born at home, without a physician in attendance. X-rays were unknown. Half the population of the United States spent more than half their time just growing and hunting enough food to live. Average life expectancy was about 50 years. In the early 1900s, the infant mortality rate in the U.S. was about 150 out of 1,000. By contrast, the infant mortality rate in Afghanistan today is about 112 of 1,000. Today in the U.S. it’s less than 6 out of 1000. Yeah, it’d be just grand to live in that time period.

Want to go back further? Until 1865 the law allowed people to own slaves. Yes, another person could be your personal property to do with as you pleased. Sounds fun, huh? Average life expectancy was about 40 years. If you lived to be 10, you were lucky to make it to 50. In 1800, close to 40% of children never lived to be five years old. Go back another 50 years or so and parents were lucky if half their children lived to adulthood. In Colonial America, 90% of people were subsistence farmers; they spent nearly all their time just growing and foraging for food. And it was grueling, backbreaking work.

You don’t want to live like your ancestors lived. You want to live in a bubble with all your modern conveniences and the benefits of a technological society, while the world outside conforms to some unrealistic notion you have of the idyllic life your ancestors lived in. You’re fooling yourself if you believe that they had it better than we do today.

 

How to confuse a programmer

Computer programming is complicated enough that we really don’t need to look for ways to further confuse programmers. On the contrary, we should actively look for ways to increase programmer understanding. Perhaps one of the easiest ways to confuse programmers is to choose bad names for things. For example, consider this little code snippet that’s supposed to demonstrate using a ManualResetEvent to control thread execution.

private ManualResetEvent suspended = new ManualResetEvent(true);

public void Main()
{
    //

    // suspend
    suspended.Reset();

    // resume
    suspended.Set();

    //
}

public void Work()
{
    // long task
    while (!stop)
    {
        suspended.WaitOne(/* optional timeout */);

        //worker task
    }
}

There’s nothing wrong with the way the snippet works, but naming the event suspended is one of the most confusing things I’ve seen this year. The suspended flag is set when the program is running. WTF? I’m pretty sure I’m not the only programmer who, if he were to encounter this in production code, would very likely misunderstand it.

“I have to wait for the suspended flag to be set before I can resume.”

Come on, people. Think about what you call things. Naming is important!

Categories

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.