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 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.