Jul 17th, 2008 by Scott Gruby
A colleague pointed me at a tool called LLVM/Clang static analyzer which is supposed to find bugs in code automatically. I was skeptical at first as how could it do it? Well, after running it on a few projects, I quickly became a believer! While it finds some stuff that isn’t technically bugs, it did catch a number of memory leaks that I’m actually ashamed to have found in my code. Some of my old crufty code had leaks in it and a few places where I misunderstood memory allocation caused me to revisit them (turns out that most of the sample code I’ve found dealing with NSManagedObject subclasses also has memory leaks). I’m going to make sure to run this on all my projects; I need to put a better front end on it so I don’t always have to type in the command and remember the syntax.
It took me awhile to get it to say that some of my projects were “bug free”; it uses function names as indicators as what should retain memory and what should not. There was a function GetSomeValue which returned a CFStringRef that had to be released by the caller. CF convention says that the caller does not have to release an object if the function name has get in it. I had to switch the name of the function to CopySomeValue as CF convention says that the caller must release an object that has copy or create in it.
Tags: Programming, Software
Posted in Main | No Comments »
Jul 15th, 2008 by Scott Gruby
The price of oil took a nice nose dive today. The news says that this is in part to expected higher inflation which is attributed to higher fuel costs thus lowering demand. If the price of fuel decreases because of this, will people use more fuel and therefore drive the price of oil up again? While I hope not, thinking about that kind of cycle makes my head spin.
Tags: Politics
Posted in Main | No Comments »
Jul 15th, 2008 by Scott Gruby
So now that my voicemail is turned off on AT&T, I decided to look at call forwarding to forward my calls when I don’t answer the phone. In AT&T’s online phone manager, it clearly says that it will forward calls when I don’t answer the phone (see picture below).

Unfortunately this isn’t true; it immediately forwards the calls and only rings my number after the other number has picked up (I tried forwarding to my JConnect number) which makes call forwarding useless to me. I could get the call forwarding on busy service, but that’s another $5 per month. It looks like I’m going back to Costco to look at new phones or just find a cheap answering machine. Did I make a mistake switching from MCI? I sure hope not.
Tags: Misc
Posted in Main | No Comments »
Jul 15th, 2008 by Scott Gruby
So I switched us to AT&T to save a few bucks. I received the first bill and saw a charge of $8.95 for voicemail + $19.95 activation. Hmmm…I didn’t want to pay this and called them. They turned off voicemail, but won’t credit me for the activation. I argued that adding voicemail wasn’t an option online and got no where. A manager is supposed to call me back and discuss this. I’m not sure why it is so hard to credit me $20 when it is a failure of their system. The only thing I had written on the order is a comment that I’d like to be able to add voicemail; it wasn’t an option when I signed up and the cost was never revealed to me. As you can clearly see by the online confirmation that I saved, the extra charge is never listed.

Why is it so hard to deal with phone companies? First MCI didn’t attempt to keep me as a customer, now AT&T doesn’t seem to care about customers, either.
Tags: Misc
Posted in Main | No Comments »
Jul 14th, 2008 by Scott Gruby
In the president’s radio address this past weekend, he blamed Congress for high gas prices. He thinks that drilling everywhere is going to bring the prices down. Boy, and people actually elected this guy president? The high prices couldn’t be caused by supply and demand (lots of demand around the world), the war in Iraq (takes a lot of gas to fuel those military vehicles), or the world hating us (I’m sure Venezuela and other countries would pump out more oil if they didn’t hate us or more specifically the president so much)? Drilling everywhere isn’t the solution to anything; it may help in the medium term (starting to drill today won’t lower prices next week), but there is only a limited supply of oil in the world. If you want to blame Congress, blame the Congress that rolled over 20-30 years ago by not pushing for higher fuel economy for cars and trucks. The auto makers just didn’t want to spend the money back then to produce more efficient cars and congress didn’t act to force them to do it.
How many days do we have until this guy is out of office?
Tags: Politics
Posted in Main | No Comments »
Jul 14th, 2008 by Scott Gruby
I was browsing LinkedIn today as I got accepted to the iPhone Developer Group (whatever that really is) and noticed an ad at bottom:

(URL removed to protect the innocent.)
While it may seem that Google AdWords is a good way to get business, how many serious projects that are worth several thousand dollars do you think you can get off this? I had a hard enough time getting people to buy ReceiptWallet off an AdWord (I probably didn’t do it right) let alone pay me a ton of money to write an app.
Good luck with this type of advertising!
Tags: Software
Posted in Main | No Comments »
Jul 12th, 2008 by Scott Gruby
I’ve been doing some iPhone development lately (screenshots and announcement of my first app will be next week) and realized yesterday why I keep running into hurdles; I’m a perfectionist. I want everything to look and work well and have studied the built-in apps for guidance. In my app, the hardest part was the settings believe it or not. As I was looking at apps yesterday and found some issues with some major applications in terms of functionality and interface.
Let’s take a look at a screen from the AP news application pictured to the right. The text placeholders are far too big and in my opinion, there should be labels to the left of each text field. Second and this is where someone really didn’t pay attention to details is that if you hit the + button, it brings up the people picker; there is a cancel button like there should be, but if you hit the Groups button (standard in the people picker), you’re stuck. You must choose a group and then hit the cancel button. Next if you goto the Local section, if you add a location, there are 2 glaring issues to me; first, the return button in the lower right. That really should be a done or something else. The second is that the title says “Add Zip Code”, but the keyboard is NOT the
standard number pad used for PINs and the like. Furthermore, you can enter something like Los Angeles, CA and it says that there is no local news. This is not very user friendly. Do I happen to know the zip code for LA? (OK, I could enter 90210 and get close).
Am I nitpicking? Of course. Will someone pick apart my apps? I’m sure that someone will just to say that I can talk the talk, but not walk the walk. Everyone and his brother is going to say that they do iPhone apps and there will be tons; I hope that people pay close attention to detail as that is what I think will separate the iPhone from other platforms.
I hope to have some neat apps for the iPhone in the near future; so far I really enjoy the platform, but paying attention to detail is the hardest part. In the current app I’m working on, I re-did my settings 3 or 4 times until I liked how it worked.
If you have any ideas or need a contract iPhone developer, please let me know.
Tags: Software, Technology
Posted in Main | No Comments »
Jul 10th, 2008 by Scott Gruby
I’ve been reading about Stevens Creek’s new TripLog/1040 application through some discussions about bad UI. Steven Patt, the author and long time Palm developer (like me, however I stopped a few years back), defends his decisions saying that users want everything viewable on one screen. While this may be true, this app looks like a horrible Palm OS app. It follows none of the Apple UI guidelines and looks nothing like any built-in iPhone application. There is absolutely no excuse for it; some of the buttons are far too small to actually hit on a device. They may work fine in the Simulator, but they are not usable. Then the background color is just awful.
He can justify his decisions all he wants, but this kind of UI just makes the iPhone look like a piece of junk. Developers need to adhere to the guidelines to make the platform look solid. Years ago I wrote an article for one of the Palm conferences about minor things developers could do to polish their apps, like have the correct button sizes and placements. Many Palm OS developers ignored it.
While I’m ranting about software, it was so nice of him to violate his non-disclosure with Apple by posting screenshots of his application. It seems like he wasn’t only in this violation. Does Apple care? I don’t know, but it annoys me to no end that even if I did have an app ready, I would have honored the NDA and not posted anything until I was released from the NDA. I would have hoped that Apple would have punished these developers by not accepting their apps into the AppStore, but this didn’t happen.
Tags: Software
Posted in Main | No Comments »
Jul 6th, 2008 by Scott Gruby
Here in San Diego we have free trash pickup (for single family residences) due to the People’s Ordinance of 1919 which I believe came out of the city selling refuse to pig farmers and making money on it (hmmm, it would appear that the city leaders back then had some of the same issues of public trust as the current ones). With free trash pickup, what incentive do we have to recycle? We recycle as much as possible and just started a compost bin last week to reduce the amount we send to the dump. If the city wants to encourage more recycling, they should offer a financial incentive (don’t take away the free trash pickup) to say lower property taxes or something like that. The city is already in hot water as state law requires it to recycle more, but it isn’t meeting that. While people should just feel good about “going green”, let’s be realistic. Unless it positively or negatively affects people’s wallets, it just isn’t going to be adopted by everyone.
(I’m not new to “going green”; back in 1990, I started a paper recycling program for my Eagle Scout project. Times have changed, but I’ve tried to do my part to help.)
Tags: Misc
Posted in Main | 2 Comments »
Jul 3rd, 2008 by Scott Gruby
I’ve written a number of times (I think) about how long should I support an older OS. I’ve also said that I’m not abandoning Tiger users, quite yet, but I may have mentioned that new features are likely going to be Leopard only as required to make things easier. In the recent past, I’ve implemented 2 Leopard only features; the first is support for Image Capture scanners. Image Capture seems like a broken framework that might be fixed someday. In the meantime, the only way for me to reliably test and get things working is to require Leopard.
The other feature (which I just finished today) is allowing a library to be encrypted. The approach I took was to create an encrypted disc image and shove everything in that. Encrypted disc images are supported on Tiger, but one of the slick features in Leopard is a sparsebundle. What is a sparsebundle? Well, it is a growable disc image that has “bands”. This means that if you modify a few files in the disc image, only the necessary bands are updated. This is absolutely necessary for backups otherwise each time a user touched a ReceiptWallet library, he’d have to backup the entire disc image (backup apps do the right thing; it isn’t a manual process to copy the bands). With one of my libraries approaching 1 GB, that would be a complete waste of time. Time Machine uses sparsebundles for the Time Capsule and if it is good enough for Apple, it’s good enough for me! So, I’ve disabled encryption on Tiger. I’m sure that some people won’t be too happy about this, but doing encryption another way would have taken significantly longer with no true reward.
Everyday, I look at the statistics I collect on what operating systems users run. The large majority run Leopard. In the graph below, you have to make one big assumptions as the data is anonymous so users that check for updates all the time (more than the default once a day) will get recorded more than once, and that is that Tiger and Leopard users check for updates at the same rate. The actual numbers are irrelevant; it is the trends I look at and the ratio of Leopard to Tiger users. The blue and red lines represent the most recent versions of Leopard.

Tags: Programming, receiptwallet, Software
Posted in Main | No Comments »