• Nickel and dimed by Sprint

    I got my latest Sprint bill today and noticed it was a little higher than normal. Turns out that Sprint charged me $18 to switch handsets; this is after I paid them $350 for the new handset! Do they not get it? On other carriers such as T-Mobile and Cingular, you can pull the SIM out of one phone and put it in another...you don't even have to tell them. They don't even have to know about the change as you do it yourself. Since Sprint and Verizon don't use SIMs (or the CDMA equivalent which didn't take off), I am forced to talk to a human to change phones; Sprint used to have the ability to do it online, but they scrapped that probably so that they could try to sell you something else while you're switching handsets. Cingular is looking better and better everyday.

  • Stupid Patents (including software patents)

    Today I read that Cingular has patented a way of generating an Emoticon (smilies, etc.). This seems insane that a patent be granted on something that has been in use for years. Cingular may have put a slight spin on it, but the Patent and Trademark Office doesn't seem to have a clue about what constitutes a new idea. Speaking of patents, I'm not a fan of software patents as a simple idea that a developer codes up one day thinking that he is clever only to find out that he has violated a patent. If I patented every idea I came up with when writing code, I would never have time to actually write code as I solve problems and it really doesn't matter how I do it in code, so I use lots of different techniques in order to get the job done. Hopefully the Patent and Trademark Office will learn to only patent really clever ideas and not stuff made up to extort money from others.

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

  • Bluetooth and the Intel iMac

    After I setup the new iMac, I started testing it. One of the things I did was try to send a file from a Palm to the iMac via Bluetooth. Hmmm...didn't work. Start thinking about this and turn off the Bluetooth keyboard and mouse. Presto, the file transferred without problems. Turned keyboard and mouse back on and it stopped working. This doesn't bode well for our software; people already blame us for every problem on their machine, now I'm sure someone will say they can't sync with a Bluetooth keyboard and mouse even though it is quite possibly not our problem. Lovely.