Monday, January 3, 2011

Story From My Past #1: How I Learned to Play Yahoo! Hearts

This is a series of stories that I tell people all the time but have never put down in writing until now.

My last semester in college I had a cushy job working as a UNIX computer operator that basically let me just do my homework and watch T.V. for 9 hours a day. The only problem with the job was that it was an hour drive from my house one-way. I was finishing up college and I knew I wouldn't want to move to this area so I had to keep my options open. That was when I got the call from Brian, a friend of mine that I went to college with.

At that time, Brian took  up a job working for the county of Riverside at the Office of Education  managing their computer systems. He really liked working with me on our senior project and we both shared a similar twisted sense of humor. He offered me a little extra money and that was enough to send me packing.

It was my first day and Brian, my new boss and friend, set me up to be trained by Ron. Until I began working there, Ron was affectionately known as the "new guy". Just to give you a little perspective on what I was up against,  Ron was the last guy they hired to work in the information systems department. By comparison to the other people working there he was still just a rookie. He had only been working there for 10 years.

So here I am, exactly half the age of the "new guy" (it is awkward when your coworkers ask you if you went to high school with their daughters) learning the ropes of the information system department's HP-UX server. After a long period of time (approximately 30 seconds) I figured out that Ron knew very little about HP-UX (and computer systems in general).

Ron began by telling me about his daily tasks. He had a cheat sheet that he wrote up so that it would be easy for me to learn and take over his mundane work while he pursued more fruitful endeavors (like playing Yahoo! Hearts).

Every half-hour, Ron had to go to a terminal and enter in a set of commands at the HP-UX command line. This was a simple enough task but the commands were pretty intricate and, once a command was completed, Ron had to write the results down in a "command results log" along with the time and date the command was executed. The commands didn't take very long to run and if there was an error Ron was instructed to just make a note in the log and send the manager an email.

After observing Ron do his routine every half hour (which took about 20 minutes to complete because he had to write out all of the results from the command) I had to ask, what seemed to me, to be an obvious question: Why not write a shell script?

I might as well been speaking Chinese because Ron, who had been working with this very system for only 10 years (and me for about an hour), had no clue what I was talking about. I explained that a shell script  was somewhat like a movie script, but instead of telling actors what to do the script told the computer what to do.

Ron was flabbergasted! This was the most amazing thing he has ever heard! He said, "So all I have to do is run this script every half-hour and write the results in the log".

I said, "Well we can instruct the script to write the results to a file that you can print out at the end of the day. And you don't have to run it every half-hour yourself. You can set up the script in the cron and it will run the script automatically. In fact, we can also set up another script in the cron to print out the results at the end of the day. We can also write into the script to email the manager when an error happens during processing".

It took me about one hour to write and implement the script. Once the script was implemented, it ran like a charm and the mundane part of Ron's job was but a memory.

I said to Ron, "OK, that's done. What else do you do during the day?"

Ron said with a shrug, "Nothing."

"Well then what do you want to do?"

And that is how I learned to play Yahoo! Hearts.

1 comment:

  1. So, my first "real" techie job out of grad school was as technical writer and webmaster for this little startup. This was in 1996 so our web site was running on a 386 with Linux and Apache and not much else. The site had about 20 pages, and it was in horrible shape (not that I knew any better back then, no CSS, etc). Every once in a while, the marketing guy would ask me to make changes to the site, and the only way to do that (since they didn't want to set up FTP) was to walk up to the terminal, fire up vi and make the changes right there.

    About the fifth or sixth time that the marketing guy would ask me to make changes to background colors or text color (I think all of the declarations were inline, as I recall) one of the UNIX guys saw what I was doing and after watching me wack away at these files for the better part of an hour, he just said, "Why don't you just use Perl?"

    I said, "What's Perl?"

    Before long I was learning Perl, regular expressions, and all kinds of stuff I had no idea even existed. It took about six months to get that first program running, but after that, the web site changes would take minutes instead of hours. So then I had to figure out how to pretend like I was still working really hard on everything when in fact I'd been done for hours.