Monday, August 16, 2010

The Sprinkler Paradox

This morning before I got on the plane, I noticed that my sprinklers were not working. I quickly discovered the cause and started them on a cycle to help ensure my lawn stays somewhat green. This got me thinking about "The Sprinkler Paradox."

When I was studying Electrical Engineering in college, I had to take a microprocessor design class. One of the major areas of study was on performance. We looked at how long it took to execute all of the basic steps in any computer or microprocessor. Then we would look at how to speed them up. The first step was to identify the single process that took the longest and optimize it. While it may be obvious how to take a few milliseconds off execution time in a short section, if there are significantly slower ones, it won't make much of a difference. I had a hard time grasping that concept because I thought any speed-up was good. Then I did the math for the performance equations and realized how futile it was to concentrate on short execution steps and how important it was to concentrate on the longer ones.

This brings me to the Sprinkler Paradox. It seems that everyone is concerned about water conservation and so it is common practice of not letting the water run while brushing teeth. Instead you should only turn on the water to rinse your toothbrush or mouth. However, the water used while brushing your teeth pales in comparison to the amount of water used to water your lawn. Thus if you really want to make an environmental impact, you should be less concerned with the water you use brushing your teeth, rip out your lawn, and put cacti in your front yard. Oh and while you are at it, don't let the water run when you brush your teeth. That is the "Sprinkler Paradox."

Another example of the Sprinkler Paradox has to do with cell phone chargers. Recently energy companies have asked everyone to unplug their cell phone chargers when not in use. The idea is that there will be huge energy savings throughout the country. Never mind that some electrical meters spin faster than a buzz saw when an air conditioner is running and more energy can be saved simply by turning up the thermostat a degree or two.

While we all have good intentions to be green and conserve water or energy, let's do all we can and not just make token efforts. Not letting the water run while you brush your teeth is a good start, but it doesn't mean a thing if you're over watering your lawn.

Thursday, July 15, 2010

Where are all the Hobbyists?

There is not much to do in the evenings on a sailboat once the sun goes down. I really only have 3 choices: go out, watch TV, or read. Lately I have been studying electrical engineering. While I was in school getting my degree, I took a lot of different courses and was presented with a lot of information without any context. I remember having one class on feedback systems and kept trying to get the instructor to explain a real-world application for this information. It is only since I have gotten my amateur radio (ham) license that I have seen useful applications for all the stuff I learned in school. Why couldn't one of my professors just drawn a block diagram of a radio receiver and showed us a practical application for what we were learning? My gut tells me that they didn't have a clue either.

While I was going to school, I had a good friend that had gotten his ham radio license while in the Boy Scouts. He seemed to understand all of the principles being taught every day and had the best grades in all of his classes. Now it makes sense, he had a practical application for everything he was learning. While the rest of us were just trying to get the math right, he knew where the circuit would be useful and why we were designing it that way. Getting my ham radio license when I was in the Boy Scouts really would have helped my college career.

All of this studying combined with Lance Armstrong's bad luck in the Tour de France this year has gotten me thinking about the old Radio Shack store. If you don't know, Lance rides for team Radio Shack, which is trying to shake off 20 years of declining popularity. When I was a boy, I used to go to Radio Shack and look at all of their neat electronics kits. You could buy things like resistors, diodes, and capacitors. Even though I had no clue what they did, I wanted some. I had visions of creating wonderful electronic devices in my garage, as did many other visitors to the store at that time.

Now when you walk into a Radio Shack, it is like a ghost town. I don't know how they stay in business because nobody is ever there. Sure they sell things like mobile phones, but so does every other store. I'm just waiting for Starbucks to add them to their list of goods. If you go to the back of your nearest Radio Shack, they still have individual electronic components but I never see anyone back there.

This has me asking the question: Where are all of the hobbyists? Have they disappeared or are they still out there?

Tuesday, July 13, 2010

Low Tide

This morning I was riding my bike to work on the path shown in the picture above and it was very low tide (unlike in the picture). Along the bike path are several piers that go out into the water. They are not much more than a couple of planks of wood and are used mainly by kids doing a bit of fishing. I have often thought about stopping on the way home and taking a walk out on one of the piers. After my ride today, I don't think that is a good idea.

At low tide, it is about a quarter of a mile walk from the bike path to the water. This leaves the piers totally exposed and you can see their supports. Salt water is a very corrosive environment and some of the supports have been eaten away to the point that they are little more than toothpicks. One or two are completely gone. At high-tide it is impossible to see the decay that has taken place and it is easy to assume the pier is safe.

Computers can sometimes be like those piers at high tide: it is tough to see what is going on underneath. Most of the time, that is fine because computers are fairly reliable. However sometimes things go wrong. Computers can easily pick up a virus and so a scan should be done on a regular basis. Hardware can also fail and so it is important to pay attention to errors you get. Hard disks are the most common component to fail and should be replaced at the slightest hint of a problem. Cooling fans and power supplies are also components that can fail. While it is rare to have memory go bad, it can happen.

Unless some maintenance is done, someday soon, one of the piers I ride by on my way to and from work is going to fail. If someone is on it when it does, then he or she is going to get wet and/or muddy. Don't neglect your computer and let the same thing happen to you. While you may not get wet, you may lose some cherished pictures from your digital camera or important documents. If your computer is getting old, be sure to make a backup of your irreplaceable files. Most importantly, pay attention to any error messages you get. It could save you some grief in the future.

Thursday, July 8, 2010

Patience

Every morning I ride my bike into the office. When I get there, I am a little hungry as I wait to have breakfast until after my ride. The office has an instant-hot-water tap from the coffee machine and so I use it on a couple packages of instant oatmeal. That makes for a great way to start my day.

When I first started eating oatmeal in the office, I would mix the water with the oatmeal and then immediately start eating. After all, I was hungry and didn't want to wait any longer than reasonable. Then I discovered a trick: wait a minute or two. I was amazed at how much better my breakfast tastes after letting the oatmeal absorb some of the water. I don't get that gritty texture as everything is soft like oatmeal is supposed to be. My breakfast experience has risen above sustenance and is now tasty as well.

The Internet is similar to my breakfast in that sometimes you have to be a bit patient. It is not uncommon for my kids to complain about how something on the computer isn't working. The problem is simply a matter of patience. Rather clicking around and hoping something will happen, the offending child just needs to wait a moment or two for the website to catch up. There are a number of areas where a slowdown can occur (i.e. automatic system updates on the local computer, lots of internet traffic, lots of people accessing the website, etc.) and so while it may have been fast yesterday, today it is slow.

If waiting a couple of seconds doesn't resolve your Internet problems, then you might want to go get a drink of water or make a sandwich. If you come back and the computer still seems stuck, then there really might be a problem. Until then, just give it some time.

Monday, June 21, 2010

Lines at the Airport

Every Monday I get the joy of standing in the same security line at the airport. If you didn't catch it, the word "joy" was soaked in sarcasm. I hate that line. The funny thing is, if I just wait 20 minutes to get to the airport, there is no line. I can sail through security with nobody in front of me. Instead, I try to give myself plenty of time in case there is a flat tire or some other emergency.

The airport has two lines: one for vacationers and the other for seasoned travelers. One would think that the expert line would move faster because everyone knows the fastest way to get through the x-ray machines and metal detectors. Unfortunately that is not the case because of one moronic TSA employee. There are 4 agents checking tickets and identification. Rather than split the agents between the two lines, he allocates three agents for the vacation line and one agent for the experts. Naturally the line with more agents goes much quicker. Since I travel every Monday, I know this and generally get in the faster line. It is interesting to watch the reaction of the business travelers once they realize their mistake. Unfortunately they are powerless to voice their dissatisfaction. The moment you mention the unfair policy to Mr. Moron, you get volunteered for that all-encompassing-body-cavity search.

Computers have lines or queues for dealing with tasks. That is what allows them to multi-task. Sometimes they use LIFO's (last in, first out) and sometimes they use FIFO's (first in, first out). There are all sorts of algorithms to ensure that important processes are dealt with first and less important ones wait patiently. I only wish the airport operated with such consistency.

Today a couple came through the airport and they were late for their flight. At the time they were sitting in the security line, their flight was boarding. I told them they should go through the empty handicap line and the TSA agents would help them quickly get through security. The couple took my advice and were immediately met by my least favorite TSA agent. He informed them they would have to go to the end of the line and wait like everyone else. Afraid of making a scene, the couple came back to their previous place in line. All of us in line were in a collective charitable mood and allowed them immediate access to the front of the line. The couple was able to make their flight, as I didn't see them hanging around as I passed the gate their gate on the way to mine.

This whole experience left me wondering about the security system at our airports. How do they pick TSA agents? Is it the best and the brightest, or individuals willing to work with grumpy travelers for $13/hour? Don't you think they could find people that at least know how FIFO's (first in, first out) work, so it isn't a guessing game as to when you will get through security.

Naturally I didn't say a word while I was at the airport this morning. My silence enabled me to pass through security without being flagged as a "random" traveler required to go through extra screening. Now that I have safely arrived at my destination, I can post my displeasure of the less-than-intelligent TSA officer. While it is probably safe to assume the guy can't read or even work a computer, it is probably the relative limited readership of this posting that will allow me to pass through the airport unscathed next week.

Friday, June 18, 2010

Bad Spelling

Mark Twain once said, "I don't give a damn for a man that can only spell a word one way." Those of us that wouldn't make the final round of a third-grade spelling bee have to agree with the famed author. Luckily computers help make spelling mistakes a thing of the past. As I write these words on the computer, it automatically highlights any misspelled word with a red-squiggly underline. I then have the option of fixing it. Most of the time I can figure it out and get the word right. If I try a couple of times and still can't figure out the spelling, I have two courses of action: use a different word, or open a word processor and look at its helpful suggestions.

Recently a coworker asked how to spell ambivalent. Actually he first threw out a phrase that he wanted condensed into a single word and ambivalent is the word he decided to use. His next question was how to spell it. I opened my word processor and gave it my best shot. In my opinion, I wasn't even close. However I was close enough for the program to figure out what I was trying to write and it gave me the correct spelling.

I gave the spelling to my coworker, who crafted it into an elegantly worded sentence for an e-mail that even Mark Twain would be proud to claim. This reminds me of a cartoon I once saw with the punch-line, "On the Internet, nobody knows your a dog." I'd like to add a phrase to the end that says, "or spell like one."

Thursday, June 17, 2010

Obscure Configuration Files

A coworker and I have spent the last three days trying to get some open source software to work. We had it working enough so that it was usable for most situations. Yesterday we found the magic key that suddenly fixed everything. I have to say that I am glad to have figured out the problem, but somewhat frustrated it took so long. In the end, it turned out to be a problem with a configuration file buried deep in the software. This leads me to the question: why wasn't the configuration file located in the configuration directory with all of the others?

The product we are using is open source, which means there is no cost to use the software unless you count our time trying to configure it. It also means that the software was put together by any number of people working in their spare time. The product is rather large and complex, requiring a bigger development team. Unfortunately the guy responsible for the part we needed, never got full credit on any of his homework assignments in college.

The solution to our problem was found through a number of Internet searches. Another group was having a similar problem and was kind enough to post their solution on a software-help forum. Unfortunately they had an error in their solution, but we were able to figure it out without too much difficulty. Knowing which file to edit was the difficult task in our exercise.

Once everything was working correctly, I pulled out my engineering notebook and recorded what we did to fix the problem. Should a similar problem happen in the future, I have the solution written down.