Working smarter, not harder

Work has been the focus of my life for a long time, especially the 5.5 years prior to my new job. Being a self-employed contractor meant that every hour I worked, I got paid. Then when I started ReceiptWallet, I had to not only do my contract work, I had to handle support and development of ReceiptWallet which took up more time.

Last summer I started to re-evaluate my life and started my path towards working less and working smarter. Taking a full time job was my first step. Deciding to sell ReceiptWallet was my next step. Now that my work consists of one day job, it’s time for me to clean up my act and make better use of my time both during the day and after work. A friend of mine sent me a link to a Merlin Mann podcast about blocking off time and “ganging” requests that people make of me. While the podcast may offend some with the language that Merlin uses, it is definitely worth a listen. Most of my work day is spent in a reactionary fashion; instant messaging is part of work and reacting to issues is another part. Luckily, in the last six months, my IT team and I have been able to turn the constant fires into something that is a lot less frequent. However, I still am finding that I need to carve out time to focus on the harder projects. I need to take the incoming requests, log them and get to them later. Ever since I wrote NotifyMail, I’ve interrupt driven. (Curse email…I got addicted way too long ago!)

Most of the people I work with are in the central time zone, so around 3 pm my time, the interruptions pretty much stop. I’m going to try to use the time from 3 to 5 pm as a daily time to focus on the bigger projects that take a lot more concentration. The smaller projects, I can do during the day as they don’t take as much concentration. I’m hoping that I can really stick to this. Already I’ve met my goal of working less (my boss probably doesn’t want to hear that :-)), so I think it is achievable. While I have handled as much work that has been thrown at me in the past, I’m in a different position juggling more. The key to thriving, in my opinion, is to work much smarter and work less. Some people can work all the time, but I found that I’m not really effective after 5-6 pm in terms of my heavy thinking. Believe it or not, I never pulled an all-nighter in college; the closest I came was staying up to 3 or so working on the school paper, but that was monkey work doing page layout.

I’m crossing my fingers that the changes in my life in the past year will help make me a more balanced person. Next up, finding a hobby and actually doing it! LEGO building is fun, but I’m looking for something challenging as well. We’ll see.

New job

As some of you that follow my blog have inferred from my posts, I have a new job. I started with alwaysBEthere, Inc. as Director of Technology. alwaysBEthere was a client of mine for several years, and I was offered a full time job. Switching from a contractor (I was a contractor for over 5 1/2 years) to an employee again wasn’t that hard for me. As part of joining the company, I made it a requirement that I be able to work for home, so that part didn’t change. The company is headquartered in Minneapolis with a small office here in San Diego. So while I have the option of going into our office, I only do it now and again; I find that I can get much more work done at home without having to commute.

So what do I do? I don’t have much of a clue on a day to day basis! I handle all kinds of requests ranging from our internal IT to working on projects that could affects customers. Now that I’m six months into it, I feel like I’m finally getting a handle on part of my job.

What will the next six months bring? I don’t know. Do I have any regrets about not being self employed anymore? Not really. I didn’t become self-employed out of choice, but out of necessity (the last company I was with didn’t have any work for me and frankly, I was bored, so we parted on good terms). I stayed a contractor because I was doing well and didn’t think I could find a job with as much flexibility as I had. I like what I’m doing and it presents much different challenges from when I was self-employed. As long as I’m challenged and feel like I’m accomplishing something, I think I’ll be happy.

Aging Hardware

Every now and again, I tend to look at the equipment I have on my desk and think about how long I’ve had it. The oldest piece of “equipment” is a pair of Apple Design speakers that I got in 1996 or 1997. They still are in use and work quite well. The second most ancient piece of equipment is my PowerMac G4/500 dual processor which I bought in late summer 2000. This machine, despite being 5.5 years old, still serves as my test and build machine. My builds now take 20-25 minutes as there are a ton of components and I keep considering if I should upgrade to a newer machine. I’ll still need a PowerPC based machine for testing, so maybe I’ll be able to pick up a G5 dual processor machine cheap as soon as the Intel based towers come out.

Sample code is great (when it works)

I think that it’s great that companies like Apple put out sample code to help developers write code without having to resort to figuring it out themselves or doing something in a way that will break. Several years ago I wanted to add my application (NotifyMail) to the login items/startup items for a user under OS X when OS X was new. There was no documented way to do this, but a DTS engineer at Apple posted on a mailing list that if people wanted code, to send him email. So I sent him email and have been using the code ever since in a bunch of projects. It had a major limitation in that if System Preferences was open and you used the code to modify login items, the user wouldn’t see the change which could be confusing. I had added an awkwardly worded alert indicating this and no one complained.

As I was changing some setup stuff on one of my machines, I added an item to the login items by using the contextual menu item in the dock. I then opened up system preferences and began adding and removing it via the menu again. To my surprise (and delight) system preferences immediately indicated the change. After a bit of searching, I found some sample code called LoginItemsAE which was first created last October. I download the code, added it to my project and attempted to compile. Hmmm…it relied on stuff in Mac OS X 10.4, but I was targeting 10.3 (and 10.4.), so it didn’t compile. I double checked the sample code and it says it goes back to 10.2. After a lot of research, it turns out that in order to get the code to compile, even if targeting 10.3, I had to set the SDK to the 10.4 SDK. I didn’t want to do this as I have 50+ targets in one project that all use one configuration file that sets the SDK to 10.3.9; this kind of change could be bad as it would allow me to use functions only found in newer OS versions and then crash on older systems. So if I’m not careful, I’ll get a crash. By setting the SDK, if it doesn’t compile, it won’t run on the older OS version which makes life easier. It would be nice if there was a way to warn you about which functions aren’t available on newer OS versions.

To make a long story a little shorter, I had to whip up some stub code to get it to compile which was a whole lot more work than I had expected.

Tracking down bugs

One of the hardest aspects of writing code is debugging it when it doesn’t want what you expect. In one of my past jobs, I was given the task of making a server stable which meant finding a bug buried in thousands of lines of code that I really didn’t understand. No one gave me a timetable on doing this, so I worked at it for over 4 months if I recall correctly. Turns out the problem was a bug in a driver that we didn’t even control; I put in a workaround and moved on.

Today I spent over 4 hours working with an excellent QA engineer to track down a bug; he did everything I asked him to do, sent me logs, reinstalled software, tried on a second machine, etc. Turns out that if I had read the log a little closer, I would have been able to fix the bug in minutes instead of hours. Having a QA resource like this makes it so much easier to find stupid bugs.

Reliable Internet Access

It seems that people I work with have Internet problems a whole lot more often than I. I feel quite lucky that my cable modem provider, Time Warner Cable, has been pretty rock solid for the last 6+ years that I’ve had them. There have been a few issues in that time, but nothing that I can really remember. I did have a problem with their DNS servers that drove me crazy, so I started running my own. I handle my own email, so I don’t have to worry about that either. The “pipe” that Time Warner provides is fast and reliable. What more can I ask for in a provider?

The Joys of Working at home and being self employed

I’ve been working at home for about 6.5 years and have been self employed for almost 3. When I tell people I work at home, they usually respond that it must be nice. Well, it takes a certain kind of person and attitude to work at home. My first experience working at home was when I lived in Portland, OR and the company I worked for had basically shut its doors, but kept me on board for a few months. As I was relatively new to Portland and the weather was just awful (it was in the winter) I absolutely hated the experience. After I left Portland and moved back to San Diego, I chose to work at home, while still working for a company in Portland. Since it was now my choice to work at home, things were much better. Working at home gives me the flexibility to goto the gym when I want, run errands when I want, and work when I want. With all this flexibility comes a few downsides. The biggest being that I can work all the time; now that I’m self employed, the more I work, the more I get paid, so it sort of makes me want to work more. Some days I like working at home, occasionally the silence and lack of interaction gets to me.

As for being self employed…I’m not sure that I could work for anyone again. The ability to take off when I want without permission is great. The tax breaks are definitely worth being self employed. The big downsides are that if I don’t work, I don’t get paid which causes me to work a lot more than if I had an employer and if I’m sick, I don’t work and don’t get paid. This, of course, can lead to a lot of stress.

Overall, being self employed and working at home agrees with me.

Hard Drive Recovery complete

I restored my PowerBook’s hard drive to the state it was on Saturday before it crashed using the most excellent SuperDuper!. If you aren’t doing regular backups (daily), then you are asking for trouble. There are 2 kinds of computer users; those that have lost data and those that will.

Hard drive failure

One of the worst things that could happen to a computer happened today to me. The hard drive on my PowerBook failed. It started making funny noises yesterday and then today it stopped spinning. Given that I’m a bit paranoid about backups, I said to myself, “this isn’t a problem as my backup is 2 hours old.” Then my elated thought turned to disappointment when I realized that my 2 hour old backup is sitting in the bank vault where I had just been a few hours earlier to store my backup. The good news is that my 9 day old backup boots my PowerBook thanks to SuperDuper!. So on Monday morning I’ll drive over to The Chip Merchant, plunk down $150 + tax for a new 80 GB hard drive, then goto the bank which doesn’t open until 9 am. Then I have the fun task of disassembling my PowerBook and putting the new hard drive in.

To add to my backup strategy, I’m going to get additional TrayDocks and have 2 backups at home so that this doesn’t happen again.

Cocoa NSAutoreleasePool

Autorelease pools are extremely convenient for not having to worry about memory allocation and freeing the allocated memory, similar to the Newton days with its garbage collection. A problem that I’ve been aware of with autorelease pools, but promptly forget all the time is that if you are in a tight loop and keep creating autoreleased items, you’re going to run out of memory and crash. For instance, in the following block of code, without even realizing it, a new autoreleased NSDate is being created once every tenth of a second. If you are processing data for say 3 minutes, you have created 1800 of these that aren’t being released.

while (running)
{
	[NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.10]];
}

Now that I’ve thought about this, 1800 doesn’t sound all that bad, however, if you keep doing this without giving the OS a chance to do the autorelease cleanup, you’ll run out of memory. A better way of doing this is:

while (running)
{
	NSDate *newDate = [[NSDate alloc] initWithTimeIntervalSinceNow:0.10];
	[NSThread sleepUntilDate:newDate];
	[newDate release];
}

This way you won’t have anything lying around. Hopefully this will save a crash or two and lots of time scratching my head figuring out why it is crashing when I can’t reproduce the problem.