Monday, November 29, 2010

A Case For Twitter

I have never been a fan of Twitter until now. I have always thought it stupid that the public would waste time following celebrities 140 characters at a time. I still feel the same way, however, recently I have seen some legitimate uses for the service.

At the end of September, there was a fire in Herriman, Utah. It became known as the Machine Gun Fire because it was started by practice rounds at a National Guard firing range. The dry grass and high winds caused the fire to spread rapidly and endanger many homes. Naturally the cell phone service in the area quickly became overwhelmed as people tried to check on loved ones and news media tried to inform the public. It was interesting to watch the news and see the news try to explain what was happening while anyone in the Salt Lake area could see the massive fires burning on the hillside.

In the end, the residents were evacuated with the help of reverse 911 (where the local government sends a message to every home in the area). A second tool that was incredibly helpful for sending information was Twitter. The news outlest and residents could get up-to-date information simply by logging onto Twitter.

Fast forward to this Thanksgiving weekend and Utah was supposed to have a major blizzard blanket the area on Tuesday. The massive storm turned out to be a dud. Then it started snowing Sunday morning at 3am. I got up and shovelled the walks. It continued snowing all day, through the night, and didn't let up until today. When I left for the airport this morning to catch my flight back to California, there was two feet of snow in my front yard. I had to shovel the walks again. Naturally there was the question of if the kids had school.

We turned on the TV, but there wasn't any news about school closures. We turned on the radio, but all they wanted to do was play songs. We even turned on a computer and checked if there was any news. The first place my wife visited was the superintendant's Twitter feed and it said something along the lines of "Thanks to our diligent staff, parking lots are cleared and school will be held."

While most kids would be disappointed to discover that school was still being held, mine breathed a sigh of relief. They know that a day off today just means a day taken away from their Spring break. It is amazing how such a small message was the information needed to continue the day's activities.

Wednesday, November 24, 2010

That Was It?

Yesterday I wrote about how a big snow storm was supposed to hit Utah. I stayed up watching the traffic cameras and checking in on the family. My wife and kids were safe watching a movie and didn't give the storm a second thought. I got a call right before everyone headed off to bed saying that there was only 4 inches of snow on the driveway.

I woke up this morning and checked in with the family before they headed up to Snowbird for some skiing. My wife said that there wasn't much more snow this morning than when they went to bed. That's it? Only 4 inches of snow? My wife did mention that it was incredibly cold and so the salt on the roads wasn't melting the ice. That can make for tricky driving but I don't think it justifies all of the lead-up to this storm. The weather service kept saying it was going to be a 4-foot storm. The mountains only got 9 inches. That barely justifies bringing out the new skis.

It will be difficult to trust the weather service the next time I hear that a huge snowstorm is rolling in. I'm sure others feel the same way. Unfortunately that means that when the big storm really does clobber the area, we will be unprepared. Awe who am I kidding. The next time I hear about a big storm coming, I will get excited and hope for tons of snow. That's what skiers do.

Tuesday, November 23, 2010

Waiting for the Storm

I am in California today but my family is back in Utah. There is supposed to be a huge storm rolling in this evening. The National Weather Service has been predicting this storm since Sunday and been using terms like "a significant storm like we haven't seen for several years." I'm not sure if that means it is a once-in-a-decade storm or once-in-a-century storm. Or if it just means "a really big storm."

The storm has been getting so much attention that my son was told not to come to one of his University classes today, to give him extra time to get home before the storm hits. It is only a 30 to 40 minute drive for him, but several of his classmates will be driving many hours to get home for the Thanksgiving break.

I have a keen interest in this storm because I will be flying home tomorrow and don't want to be stranded here in the San Francisco area. The Internet has been very helpful in keeping me abreast of the weather situation. While you may be tempted to look at www.weather.com, the best weather site is really www.weather.gov. It gives you all sorts of weather and travel advisories that are very useful.

While it is nice to get weather forecasts, there is a lot to be said for simply looking out a window. Unfortunately I am over 500 miles away and looking out a window isn't an option. If only there was a camera in the Salt Lake area that is connected to the Internet. More importantly I need one looking outside. Traffic cameras are a pretty good resource and you can get to a huge list of them for the Salt Lake area by going to www.utahcommuterlink.com. The site has a map showing all of the traffic cameras in the area and it is really easy to click around Salt Lake and see where it is snowing and where it is dry.

Finally, I want check and see how air traffic is backing up. Sometimes I fly Delta and sometimes I fly Southwest. Both carriers have websites where I can go to see if specific flights are delayed. Southwest's is a little easier to use because it will allow me to select flights between two cities without having to know the flight number. Delta requires knowing the flight number, which isn't too difficult to get. A more general place to go for getting an idea about delays across the country is the FAA's site. It shows a map of the United States with the major airports represented by a colored dot. Green dots show that most flights are on-time, orange dots may have weather or other delays greater than 15 minutes, and red dots indicate delays of an hour or more. Moving your mouse over the cities brings up a balloon with information as to why the airport may be experiencing delays.

I talked to my wife earlier and she said that the news is telling people to avoid travel if they can. It will be interesting to see if the storm really hits with the fury that has been predicted. When it does, I should be able to see it from the comfort of Sunny California.

Monday, November 22, 2010

Bad TV Reception

It is tough watching TV this evening. On the sailboat I don't have cable or satellite and have to pull my television signals from the airwaves.

When I set up my HD television, I was surprised at how many stations I could get. On a good day, I can receive about 75 channels. Tonight I am getting 4. There are a number of factors that contribute to good television reception. I would expect to have great reception this evening and then I remembered I walked down a steep ramp to get to the boat. That means it is low tide and I am sitting about 8 feet lower than usual. Antenna height is probably the biggest factor for good television reception.

When I look at today's tide tables, I can see that low tide was at 5:48 pm (or 17:45 as it is listed on the table) and that it was 0.9 feet below the average low tide. No wonder the ramp down to the boat seemed so steep. Now I just need to figure out a way to get my antenna higher in the air. If only I had a large pole connected to the boat with a rope on top that I could use to raise and lower my antenna . . .

Thursday, November 18, 2010

Random Numbers

Today is one of those days where I am putting together a bunch of sample reports. The reports contain fictitious data and serve as a starting point for management when they are trying to figure out what they want in a report. I may start with a bar chart in the sample report and then management will decide they want a line graph instead. Figuring out what management wants before I spend a lot of time fine tuning the report saves a lot of headache in the end.

My reports are all database driven and so it is important to populate the database with realistic-looking numbers. One of the tools I use is an existing report that I have printed and hanging on the wall of my office. When that doesn't work, I resort to random numbers. I just hate trying to make up numbers on my own.

Creating a random number with a computer is seemingly not a trivial task. My son discovered this with one of his programming assignments recently. They are using an algorithm provided by the professor, but it has one major drawback: the numbers aren't so random. If you call the function once, you will get a specific number. Then close the program, rerun it, and you will get the same number. In order to get a truly random number, you need to "seed" the algorithm with a true random number.

It may not seem like a serious problem until you truly need a random value. This is what was happening with my younger son in his ski races last year. He seemed to get stuck with the same bib number when start order for his group was supposed to be random. The software used to determine random start order was putting the same kids at the front of the group and the same kids at the back of the pack. For the kids lucky enough to be at the front of the pack, they had better snow conditions. My son, on the other hand, got relegated to the back of the pack and had to deal with ruts up to his armpits.

As with most seemingly complex problems, there is an elegant solution to having a computer generate random numbers: read the milliseconds from the computer's clock. When I explained that to my son working on the programming assignment, he couldn't believe there was such an easy solution. Now I just need to pass the information on to that bonehead who wrote the ski racing software.

Wednesday, November 17, 2010

Don't Believe Everything you Read

Every morning I get an e-mail from Steap and Cheap, a website that sells outdoor equipment at ridiculously inexpensive prices. Included in the e-mail is a paragraph or two that is generally funny and always entertaining. Today was about the giant island of plastic that has accumulated in the middle of the Pacific Ocean between Hawaii and the mainland US. This is one of those stories where I will just have to disagree with what we are being told.

If you do a little searching on the web, you will find all sorts of stories about plastic accumulating into an island out in the middle of the ocean. Some say the island is about as large as the state of Texas while others claim it is twice the size of the United States. One thing they all agree on is that it is about 1000 miles West of California and 1000 miles North of Hawaii. I don't think it is a coincidence that relatively few people have the means to visit such a location. Unfortunately for the environmentalists, I have been there and can report first-hand as to the reality of the situation.

First, yes there is a lot of garbage in the middle of the ocean. When I sailed from Hawaii to Los Angeles, I saw a lot of man-made stuff in the water. However, there never was an island of it. We would sail past a single grocery bag and then see something else 30 minutes later. Considering we were only going about 7 miles per hour, that equates to a lot of junk in the ocean. We really should be doing a better job of disposing our garbage.

Second, yes all that plastic can be harmful to marine life. I understand that sea turtles like to eat those plastic shopping bags because the bags look like jelly-fish. However there are all sorts of marine life that depend on that garbage. It was not uncommon to see various fish seeking refuge from the birds underneath some of that rubbish. Once we came across a fishing float that we wanted to keep as a souvenir of our trip. We plucked it out of the ocean only to find it was covered with crabs, algae, and other marine life. It was like an entire miniature eco system thriving in the middle of nowhere.

Should we be doing something to keep our garbage out of the ocean? Of course we should. Should we be alarmed about the garbage collecting into a huge island? Nope, there is no island. If you don't believe me, look out the window the next time you fly to Hawaii. I would be amazed if you see anything other than lots of water.

Tuesday, November 16, 2010

Finding Bugs

Recently I purchased a new Ham radio. It isn't anything special, just an inexpensive hand-held unit used to help with local events or emergencies. This new radio has the ability to program 128 memory channels using a personal computer. The application runs on Windows and presents you with a spreadsheet-style interface. You fill out specific parameters for each of the memory locations and then upload the information to the radio through a USB cable. This is much simpler than entering all of the information by hand using the radio's cumbersome menu system.

I don't think the software to program my radio was ever fully tested. It took me a good hour to figure out how to use it. Now that I have figured it out, it is really simple to use. The problem was that you have to do things in a certain order. If you don't then the software freezes or refuses to communicate to the radio. It was frustrating while I was figuring it out and I almost sent back the radio.

Testing is very important and something that I have to do on a software project I am working on in my spare time. Since I spend most of my evenings away from home, I have three or four hours a night to work on the software and it is coming a long nicely. When I was home in Utah this weekend, I took the opportunity to show it to my wife. I noticed several problems during the course of my demo and was able to get them fixed immediately.

Most commercial software companies have formalized methods they use to ensure their products live up to expected levels of quality. One method is using someone who didn't write the software to test it. For smaller organizations, such as a guy working on software in his basement, garage, or boat, the demo to spouse or kids can serve a similar purpose. If only the company that wrote the software for my new Ham radio had been so careful. Then I wouldn't have blown a Friday evening trying to figure out how to get their software to work.

Monday, November 15, 2010

MySQL vs. PostgreSQL

The PostgreSQL community recently had PgWest, which is a conference where users and developers gathered together to learn from each other. It was held in San Francisco, near where I work and so I submitted a paper to present. The paper was accepted and I spent a day at the conference. I would have liked to stay for all three days but had a project back at the office that required my full attention.

One of the sessions that I missed was on the differences between MySQL and PostgreSQL. Both are database management systems and are freely available. MySQL was controlled by a single company and then was purchased by Sun, which was then purchased by Oracle. PostgreSQL is a community project with developers all over the world. I would have liked to attend the presentation as I use both MySQL and PostgreSQL for my job.

Looking at all of the online traffic generated by the presentation, I really wish I had been there. I get the feeling that it was a bit like watching a cat thrown into a room full of hungry dogs (MySQL being the cat and all of the PostgreSQL fans being the hungry dogs). I have to sit back and laugh at all of the contention the one presentation has caused. It reminds me of the movie, "Monty Python's Life of Brian." The movie takes place in Jerusalem during the time of Christ. There are several Jewish groups opposing the Roman occupation. One is the "People's Front of Judea" and the other is the "Judean People's Front." Instead of working together to rid themselves of the Romans, they fight against each other.

PostgreSQL and MySQL are both open source databases and can be used without any licensing costs. They may have different architectures and methods of development, but they allow users to run complex database management systems without the burden of heavy fees required to run Oracle, Microsoft SQL Server, or IBM DB2. Maybe someday the two camps will stop arguing long enough to figure out they are on the same side and stop trying to steal each other's users.

Then again MySQL is now owned by Oracle . . . who charges large sums of money to use their "other" database product . . .