iPhone SDK: the good, the bad, and the ugly

Apple announced the iPhone SDK the other day and there is a lot of discussion about it among those that I know. Overall, I’m quite happy with Apple’s offering; while I don’t have a huge interest in writing handheld applications anymore (I wrote Newton and Palm software for way too long), it might be fun to dabble in some stuff. In addition, I have some clients interested in apps.

The Good

  • Xcode is the development environment.
  • There is a simulator.
  • Apple is charging money to get a certificate and release applications; this might keep out some of the weekend developers that don’t have good development practices.
  • The SDK looks very complete.
  • Background applications can’t be written. Yeah, hopefully this will make the platform more robust.

The Bad

  • Apple won’t take my money to become a developer, yet. I applied, but who knows if I’ll be accepted.
  • The $99 fee is too low. Yes, I said it. The barrier to entry is so minor, that every Tom, Dick, and Harry will sign up. I don’t want my iPhone to crash and have people write crap. I’ve been through that with the Palm; there is so much crap that people just throw out there. I want quality and people that are serious about development. I have nothing against hobby developers (except they drag the value of software down by releasing stuff for next to nothing), but the entire iPhone platform will get a bad reputation if people download software and have their iPhone crash. Maybe Apple will yank the apps that crash.
  • No Interface Builder support, yet (I’m impatient).
  • Enterprise developers are charged more than commercial developers; I’m not sure what this is about, but maybe it has to do with a different distribution mechanism. I have a client that wants to sign up and doesn’t have a problem with the fee, but it seems to me that Apple should just have one fee.
  • Why were some companies chosen to get early access and others weren’t? I’ve been developing handheld applications for over a decade and no one contacted me. I guess they were just looking for the wow factor; one of the companies that was selected has written garbage in the past on other platforms, but the company name means something…I guess quality doesn’t.

The Ugly

  • Apple underestimated the demand. It took hours for me to grab the SDK; to top it off, someone brilliant put a link to the SDK on Apple’s homepage to drive even more traffic to it.

I’ve only poked around in the SDK as I’m trying to get ReceiptWallet 2.0 out the door, but will take a closer look in the upcoming weeks.

PDFKit is borked

I love that Apple has lots of frameworks for me to use in my apps and gives me things for free such as PDF viewing and manipulation. This is with PDFKit. The problem with PDFKit is that it isn’t very tolerant of PDFs created from various other applications. I reported a bug with this back in the 10.4 era and it got fixed; I simply added a keyword to a PDF using Preview and it crashed (this is the same thing I do in ReceiptWallet). Now, I was pointed to another PDF that has the same behavior. The steps to reproduce this are quite simple:

  1. Download the IRS W-9 form
  2. Open it in Preview (on 10.5.2)
  3. Choose Tools->Inspector
  4. Click on the keywords tab
  5. Click the + button
  6. Add a keyword
  7. Do a Save As and give it a name
  8. Watch Preview crash
Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000dce481a4
Crashed Thread:  0

Thread 0 Crashed:
0   libSystem.B.dylib             	0x952773af szone_free + 2101
1   com.apple.CoreFoundation      	0x9155c826 _CFRelease + 342
2   ...ple.ApplicationServices.ATS	0x906240d4 FindNameAsCFString + 1432
3   ...ple.ApplicationServices.ATS	0x90623acc ATSFontGetPostScriptName + 76
4   libCGATS.A.dylib              	0x9364e8e5 get_name_with_name_code_nl + 250
5   libCGATS.A.dylib              	0x9364ea67 ats_name_handler_get_postscript_name + 23
6   libCGATS.A.dylib              	0x9364fd48 get_postscript_name + 49
7   com.apple.CoreGraphics        	0x924f0cd3 CGFontNameTableCreate + 322
8   com.apple.CoreGraphics        	0x924f0b73 CGFontGetPostScriptName + 29
9   libPDFRIP.A.dylib             	0x18bd81a9 PDFFontType1EmitDefinition + 57
10  libPDFRIP.A.dylib             	0x18bd6674 write_definition + 55
11  libPDFRIP.A.dylib             	0x18bd4c38 PDFFontEmitDefinitions + 22
12  libPDFRIP.A.dylib             	0x18bd6197 emitFontDefinition + 17
13  com.apple.CoreFoundation      	0x9155f1fc CFSetApplyFunction + 140
14  libPDFRIP.A.dylib             	0x18bd61db PDFFontSetEmitDefinitions + 60
15  libPDFRIP.A.dylib             	0x18bd2f8b PDFDocumentFinalize + 385
16  libPDFRIP.A.dylib             	0x18bd1c0e pdf_Finalize + 28
17  com.apple.CoreGraphics        	0x925567bf CGContextDelegateFinalize + 55
18  com.apple.CoreFoundation      	0x9155c786 _CFRelease + 182
19  com.apple.CoreGraphics        	0x925567ac CGContextDelegateFinalize + 36
20  com.apple.PDFKit              	0x902a418a -[PDFDocument(PDFDocumentInternal) writeToConsumer:withOptions:] + 1491

Filed as Radar (Apple’s Bug Reporter) bug # 5784122. I don’t even enough a way around this. I could try to re-write the PDF, but if the PDF has filled in information, it will become toast. Do I have to write my own PDF code to handle this? Apple has so many technologies that some of the most useful (at least to me) get neglected; there is so much focus on the glitzy stuff that the basics get ignored.

Am I out of touch with my users?

I received 2 pieces of email today about the new ReceiptWallet 2.0 beta basically saying that they wanted their receipts and documents in one window since ReceiptWallet and DocumentWallet were now one. When they were separate applications, receipts and documents had to be in separate windows as they were separate programs. With the combined program, that is basically still the case. Furthermore, with multiple libraries users can now separate out information more, like for multiple years, multiple companies, multiple projects, etc. If everything was in one window, this wouldn’t be possible. Am I missing the point of these users? It has me very confused and almost questioning the major decisions I’ve made about the products (making them handle multiple libraries and combining them). However, most of the feedback I’ve received has been quite positive; one user even bought a second copy that he didn’t need just because he liked the new version so much.I take what my users say to heart and spend a lot of time thinking about what to implement and how to implement. I don’t just discard feedback; I always think about it and wonder how many other users are thinking the same thing. Unfortunately most users don’t contact me, so I have no idea what they think of what I’ve done.

The OS war continues

Yesterday I was talking to 2 people that had completely different views on operating systems. The first person had just switched to a Mac and bought his wife one as well. He was extremely pleased and said that Vista actually caused him to switch as it was slow and then he had to upgrade his hardware to run it. He also thought that he’d need to run VMWare to run his old Windows apps, but found he only uses it for some media files (probably those with DRM) that don’t play on the Mac. On the flip side, the other guy was completely anti-Mac because he said it confused him and he didn’t like how iTunes arranged his music. Fair enough to not like iTunes as iTunes is designed for most users that don’t care where iTunes actually puts the music; he is the exception.

I always say that you should use the tool that gets the job done; if you want to use Windows, that’s your choice, but don’t ask me for help. People have also said, buy a computer that the person you know who knows most about computers uses so that you can ask them questions. With that kind of thinking, please buy Windows so you don’t ask me questions :-).

I think that most people that sit down with a Mac for awhile and get used to it, will find that it works well and may be less confusing than Windows. With all the software that ships with Macs, it makes it a no-brainer for many people.

The OS war will never end; however, these days with Intel based machines, it is much easier to convince people to move to the Mac.

Caught cheating

No, I didn’t cheat in school, I cheated in failing to fix a ReceiptWallet feature. When I was working on ReceiptWallet to move it to document based, I didn’t fix the AppleScript support. When ReceiptWallet was a single window application, the scripting support was global; with document based, the scripting had to be specific to a library. As anyone that has written AppleScript support, it is a royal pain in the you know what. I was hoping that no one would notice this, but even before the end of the ReceiptWallet beta, I had someone send me email about it. Damn, I guess I had to fix it.

So, I spent the last 2 days fixing the AppleScript support so that people can bulk load receipts and documents in ReceiptWallet. I’m quite pleased with it, but it was much harder to implement than I’d expect.

My power to offend and being a Mac snob

My comments in this blog seem to offend some. For better or for worse, I speak what is on my mind. It sometimes gets me in trouble, but most of the time helps me get stuff off my mind. I will admit that I’m a Mac snob and want applications to have a Mac user interface; I don’t want some cross platform UI (if the app works well and the engine or behinds the scenes stuff is cross platform, that’s fine).I received email about a recent post where I basically said that the app’s UI was crap. I couldn’t get past the UI to actually use the app, so it could be a fine app, but the UI was just awful. For me, pretty much anything done in REALBasic that isn’t tuned to the Mac is not a Mac app. Should the author be offended? Sure, he has the right to be offended if he wants. I stand by what I said about the UI; I like using a Mac and if I wanted to use Windows, I’d accept half baked user interfaces and put up with what is shoved in my face. Mac apps are just more elegant and have more polish.

Writing documentation

I have the daunting task of writing the documentation for ReceiptWallet. While I have some as well as some knowledge base articles, the docs need an overhaul. I wrote the previous version of the docs for Apple Help by hand. This time, I was going to look for a tool to do it. I found 3 options. HelpLogic, Simple Help Editor, and Mac Help Writer. The UI on the first two makes me want to barf. They say that they’re cross platform programs. For most programs, “cross platform” means “we have a crappy Mac UI in order to get it to work on Windows”. This isn’t true for all applications, but for many.

I tried to overlook the UI of these apps and the cost wasn’t an issue, but I couldn’t figure out how to use either program and HelpLogic kept saying that it couldn’t save my preferences and to check permissions. Not a good start. So I gave Mac Help Writer a try. It looked like it would work even if it did require me to use the format the author of the app wanted. I could live with that. However, there were 2 major flaws with the program. First is I couldn’t create ordered lists and second I couldn’t insert graphics. I went ahead and bought it and figured that I’d edit the files by hand after creating them.

Right before I went to bed and after I cranked out a bunch of help, I figured it out! I would use tokens and then search and replace later. So I’d encode < as %% and > as %%%; I’d search for the latter first and everything would work out.

To make things even easier, I created a shell script (with the help of Jerry Brady of Blue Circle Technologies) that automates the process after I use Mac Help Writer to generate the help.

#!/bin/bash
path_to_script=$(cd ${0%/*} && echo $PWD/${0##*/})
path_to_script_parent=`dirname "$path_to_script"`

cd $path_to_script_parent
cp -f Images/* ReceiptWallet\ Help/images/
cp -f Styles/* ReceiptWallet\ Help/styles/
cd ReceiptWallet\ Help/

WEBROOT="pages"
FILES=`find $WEBROOT -type f | grep html$`


for F in $FILES
do
    echo "    processing: $F"
    /usr/bin/perl -i -p -e "s/%%%/>/g" $F
    /usr/bin/perl -i -p -e "s/%%/
  • /
  • /g" $F done cd ../.. rm -rf Resources/English.lproj/ReceiptWallet\ Help mv Help/ReceiptWallet\ Help Resources/English.lproj/
  • This makes my markup look kind of funny, but it seems to work and I’m now more than half way through my help!

    Backup, backup, and backup again

    There are two types of computer users, those that have lost data and those that will. Yes, I know this is a profound statement, but computers are prone to fail (they are made by humans, who do, of course, make mistakes). I’m very religious about my backups as I have lost data in the past, not much data, but some. For years, I did weekly archives to CDs and then DVDs. These were good as I could go back in time and get old data, but it turns out I never did that. Last year I shredded years of old CDs and DVDs. My current strategy is to protect against hardware failure and software corrupting data. The first part is easy, just backup to an external drive every day. I do this and rotate between 3 drives; one is always offsite in my safe deposit box. I goto my safe deposit every Friday (the tellers know me I’m there so often). This is a great strategy and has served me well. I did have a hard drive failure several years back, but recovered quite easily (not quickly because my most recent backup that was a few hours old was sitting in the safe deposit box that I couldn’t get to for 2 days as I dropped it off on a Saturday). Every day I use SuperDuper! to backup and I’m very pleased with this. I’ve added Time Machine to my mix and that has also saved me. I believe you can never have too many backups. Oh and I forgot, my virtual private server gets an archive created daily and then once a day, it is synced down to my machine and then weekly copied to a drive going to my safe deposit box. So, I’m pretty well covered.

    Why did I write all this? I got a panicked email from a user that used Carbon Copy Cloner to backup his drive, erased his computer and then installed Leopard. However, he apparently didn’t verify that this backup (his only one) worked. When he fired up DocumentWallet, all his documents that he had created over the last 8 months were gone and he wanted to know how to get them back. I’m not sure what the final result was, but I told the user where DocumentWallet stores his data and to search his hard drive; hopefully he’ll find his documents. At any given time, I have 4 backups of my data (1 Time Machine and 3 cloned drives with SuperDuper!). Could disaster strike me? Sure, if I delete a file and discover months later that I need it, I won’t have it. This has happened a few times, but it wasn’t critical. With all my source code under Subversion version control, I have another layer of protection that lets me roll back to older versions of my source.

    So the moral of my story is make sure you have a backup strategy and always do backups. Either use an automated system or make sure you are extremely consistent about it. (Mine is semi-automated; I have a cron job that launches SuperDuper! everyday at 5 pm and then I shove in one of my drive.)

    Discounts for Apple Employees

    Periodically I get inquiries from Apple employees about discounts. Sometimes I respond, “what kind of discount can you give me?”, but usually I give them the line that ReceiptWallet is priced low enough that it is affordable and if it saves time, isn’t it worth the cost?

    I can understand educational users asking for discounts, but why should Apple employees get discounts? Do I get a discount on Apple products (yes, as a developer, I pay $500 to get 1 discounted machine a year, but that’s it and arguably, the discount I get for what I want is about $500, so it is a wash).

    Crappy Support Policy

    Yesterday, I went to see about contacting support for VMWare Fusion to see why my el cheapo negative and slide scanner wouldn’t work as no one responded to my forum post (on their forums). After poking around the site, I discovered that they only offer 30 days of complimentary email support. After that I have to pay per incident. Wow, that sure doesn’t make me want to use their product. I can understand complimentary phone support for a period of time, but limiting email support, that seems ridiculous. Yes, I realize that some people abuse it, but what about the average Joe who only contacts support with an issue, more over, a bug in the software?

    If someone has gotten the VuPoint Slide/Negative Scanner running under VMWare, please let me know