Friday, May 28, 2010

Multitasking

Lately I have taken a look at how I try to do too much at the same time and how that can get me into trouble. The reason I started looking at this is because of a boat casualty this week. When I get done with my morning shower, I like to hang my towel out in the cockpit of the boat so it will dry. Before I head into the office, I bring the towel inside. This is because San Francisco has gotten a lot of rain lately and I don't want to come back to the boat and have a completely soaked towel. This can happen even though the day may start out sunny. Lately I have felt that I live in Seattle and not San Francisco.

Friday I must have had too much on my mind because I left the towel outside and forgot about it. I then headed to the airport after work and didn't get back to the boat until Monday evening. Naturally my towel was nowhere to be found. I assume that the wind blew it away. I did a look around the marina, but never found it.

How many other times have I left the lights on or forgotten something important because I was distracted? This week, I decided that it all boils down to multitasking. I start working on something, get interrupted and have to do something else. If I am lucky, I might actually get back to my original task, but more often than not, I am drawn to other tasks. Pretty soon, I am working on three or four tasks at the same time.

When computers multitask, they are about as inefficient as us humans. They work on a problem for a bit, save off all the information to someplace safe, then work on the next problem. When it comes time to work on the original problem, they copy all the saved information back to the working area and continue. The only advantage that computers have is that they are really good about remember what they are working on. In the case of the forgotten towel, I was packing up my dirty clothes, cleaning the boat, and brushing my teeth. When it came time to lock up the boat, I completely forgot about the towel.

In thinking about how I lost my towel, I have tried to come up with a way to keep that from happening again. One option is to just hang the towel inside the boat and forget about letting it dry outside. Unfortunately there is not enough air circulation in a boat and so nothing ever really dries. Mildew is a huge problem on boats. Borrowing a trick from my computer, I think I have devised a solution. My boat has a stainless-steel cable that runs around the outside called a lifeline. It is meant to keep all sailors in the boat when out on the water. It also works great as a drying line. Rather than hang my towel someplace out of the way on the lifeline, I now hang it right in my way so that I trip over it when I try to leave the boat. That way, I will never forget it again. In a way, that is what computers do. When they finish one task, they know what to work on next because it is right in front of them. So if you ever come to my house or boat and see things scattered on the ground, it is just my way of keeping track of what I am doing.

Thursday, May 27, 2010

System Updates

Yesterday I was officially given a new database to administer at work. There are several things you can do to make sure your database runs smoothly. The first is to make sure you are running on the most current version. While you don't want to be on the bleeding edge of technology, it is important to make sure you have all of the security and bug patches installed. Otherwise you open yourself to a number of potential problems.

Upgrading some versions of PostgreSQL are as easy as shutting down the database, installing the new binary files, and restarting the database. Unfortunately my new database required a more lengthy process. As the database is used in a production application, I can't just shut it down on a whim. I have to wait for a regularly scheduled maintenance window. As luck would have it, the window fell at midnight this morning (or last night, depending on how you look at it).

When I was done at the office, I went home, ate some dinner, and did a few chores around the boat. Then I came back and started the database update. Everything ran smoothly and I was done relatively quickly. It helped to create a checklist earlier in the day while my mind was still fresh. Figuring things out after midnight can be a bit foggy if you aren't used to staying up that late.

The tough part about doing a late-night system update is the next morning. Even though I knew I could sleep in, I had trouble sleeping past my usual waking hour. Now I just hope I don't fall asleep at my desk this afternoon.

Wednesday, May 26, 2010

Online Video Games

Working away from home during the week can take its toll on your family life. While I have plenty of time to talk with my family, it just isn't the same as being there. Video conferencing with Skype helps a bit, but it is easy to miss that interaction you get by just hanging out together.

Several years ago, my extended family started a weekly game night. My Brothers, dad, and I would play an online video game on Thursdays with our sons. While some of us live close to each other, my older brother and his son are in San Diego. The game we started playing was SOCOM, which is a first-person-shooter game where you are a Navy SEAL that hunts terrorists (or visa versa). We originally started playing the game on Playstation 2's. Then it came out on the PSP. The PSP is nice because you can bring it on the road with you and don't have to lug around a larger console, nor do you have to worry about connecting it to a hotel TV.

My youngest son is 14 and really needs his Dad around. Since I can't be there, I try to talk to him on the phone. Unfortunately he is a boy and doesn't really like to talk on the phone (unlike his older sisters, who can talk for hours about nothing). Lately we have pulled out the PSP's and started playing online together. It may only be for a half-hour or so, but we are doing something together. I have the headset game in one ear and the cell-phone headset in the other. We are in constant contact the whole time. While we aren't in the same room, I think that this is as close as it gets to being home even though I am out of town. Now I just have to get better so he stops complaining how lousy I am.

Tuesday, May 25, 2010

Internet Recipes

Living alone 4 nights a week means I either eat out a lot or I have to eat my own cooking. Past experience has taught me that eating out a lot is the best way to gain weight and so I try to cook my own meals as often as possible. Unfortunately I haven't had to cook for myself in almost 20 years (thanks to my wonderful wife) and so my cooking skills are somewhat rusty. Oh sure, I am good at putting together meals for camping trips, but there are only so many ways to spice up a tin-foil dinner.

Before leaving the office last night, I spent a couple of minutes on the Internet looking for recipes that I could easily make. I only have a single pot and a single frying pan in my bachelor kitchen and so I searched for one-pot meals. I found a great site with 20 wonderful looking recipes. The only problem was that they all required a number of ingredients I just don't stock on my boat. Not only is my kitchen small, but there isn't a lot of storage space to keep even the most basic staples. There was one meal that looked like it didn't require too many ingredients: Thai Green Chicken Curry. So before heading home, I stopped by the store and picked up what was needed.

I got back to the boat and spent the next hour cooking dinner. Naturally I would have preferred to eat 5 minutes after I started cooking, but there wasn't anything else to do but watch TV and I already do too much of that. The instructions were easy to follow and I was proud of myself when I sat down to eat. Now I have one more recipe to add to my really short list of things I can cook. Just don't tell my wife, she might expect me to cook more when I am home.

Friday, May 21, 2010

Learning Python

One of the nice things about my new job is that I get time set aside each day to learn a new skill. Most of the developers I work with here are using Python and so I figured I would learn this computer programming language. What better way to learn than to work on an actual project. One of my coworkers was more than happy to volunteer a project and after a week, I am mostly finished. There is still some clean-up work to do, but the program works.

I do have to confess that I am not any better at knowing Python now than when I started the project. My program interacts with so many other pieces of the system that I feel like I am working with Lego blocks. When I need to figure out how to interact with one system, I do a search on the Internet, find some sample code, and work it into my program. I know just enough to make changes so that it works. When I get errors, I search the Internet and get an immediate fix.

Today I have a code review and I have to explain how my code works and why I wrote it the way I did. The only problem is that I have no idea what I did. The program just works and does what it is supposed to do. Oh well, maybe I will learn Python next week.

Wednesday, May 19, 2010

Moving Files to My New Computer

So far, I have not run into any problems because I left my MacBook at home. Of course it helps that I am not working on any old projects. Last night I did some volunteer work and didn't get back home until very late. This evening I will have some spare time and it will be a better test of how well I did transferring files from the MacBook to my new laptop.

Previously I listed 7 steps that I use to transfer old files to a new laptop. Step 3 is: Move all important files to the new computer. With my MacBook, that was easy. Any time I create a new file, I make sure it ends up in the "Documents" directory. Linux, Windows, and the Mac all have a directory called "Documents" and so the advise is valid on all 3 operating systems.

When I create a new word processing document, it ends up in "Documents". When I start a new spreadsheet, it ends up in "Documents". Now it may sound like my documents directory is full of files. It isn't. One of the beauties of computer file systems is that folders can contain other folders or directories. This means that I have a number of folders in "Documents" and those folders contain other folders. When I got to step 3 of my list for transferring information, I just copied the Documents folder to my new computer and I didn't have to go searching for all my important files.

Truth be told, I have yet to complete the process of transferring all of my old files to my new computer. I started the process by copying them to a 16 GB flash drive and was amazed that it took up 3.5 GB of space. Now I just keep that flash drive with me and when I need a file from my old computer, I copy it from the flash drive to my new computer. That helps me figure out what I really need from my MacBook. After all, who wants to fill up their new computer with old stuff that never got used on the old one?

Tuesday, May 18, 2010

A New Laptop

Recently I received a new laptop at work. It isn't nearly as nice as my old black MacBook, but it means I have yet another computer. For a while I was leaving my work laptop in San Francisco and carrying my MacBook back and forth to Salt Lake. This week I decided to leave it at home and utilize the laptop the company gave me. So far, it has turned out to be a good decision, but the week is still young.

One nice thing about my MacBook is that it has a built-in camera to use with Skype. My new computer has the same setup. None of the computers we have at home have a camera and so it was kind of nice to talk to my son. He logged into my MacBook while I was on my new laptop and we were able to see each other as we talked. It didn't take long before everyone in the family was down in my office crowding behind the laptop screen to get a look at Dad.

Working 600 miles away from home can be a little lonely sometimes. While I spend quite a bit of time on the phone with member of my family, it will be nice to enjoy seeing them as well as talking to them.