-
If you don't have anything nice to say about someone, don't say it
Everyone has heard that if you don't have anything nice to say about someone, don't say it. Well, I guess politicians haven't heard this saying. In your local city council race, a former local news personality is going up against an unknown CPA. The new personality (Marti Emerald) has sent campaign mailers touting what she has done and what she will do. Her opponent (there are a few other candidates, but these are the top 2), April Boling has only sent us campaign flyers that sling mud at her opponent. What kind of campaigning is that? We know nothing about her and she just wants to say what Marti Emerald isn't. If the signs around the neighborhood are indicative of the outcome of the race, Marti will win by a landslide.
-
Good API ideas gone bad
Back when I started writing ReceiptWallet, I wanted to add scanner support and the easiest way looked like I could use Apple's Image Capture (ICA) framework. This worked quite well for the first scanner I tried, but the second one only scanned in black and white or had some other problem. So, I gave up on that, learned enough TWAIN to get ReceiptWallet working with most scanners that had TWAIN drivers. I was quite content for 1.5 years (except for the crappy scanner drivers and crash reports I regularly received). Last week I was contacted by a developer who asked me if I was going to support ICA because some newer scanner drivers were going to be written around ICA. I already had ICA code in ReceiptWallet (I actually tried again right before ReceiptWallet 2.0 was released), so I took a look at it. Well, there is either a problem with my scanner or ICA in Leopard (10.5.2) as I can only scan in black and white. Furthermore, there is a really simple function, ICAImportImage, that should reduce the amount of work I have to do and presents a standard user interface.
There are a few major problems with this interface. The whole area near Scan To Folder is unnecessary if it is called from within an application. I don't want the user to specify where it goes, the format or automatic task. The second major issue is if I change Scan Mode to Flatbed (even though I have a sheet feed scanner), parts of the UI dim and I have to quit the app (same thing happens in Apple's Image Capture application).
So while this is great in theory (I've seen one app use this and apparently not care about the issues), it is a poor user experience in any app other than Image Capture. I'll write up a bug for Apple on this, but who knows when it will get fixed. As for my other issues with ICA, I opened an Apple DTS incident and some of my issues were confirmed as bugs. Wow, that makes it almost impossible to use ICA as I found several bugs in just a simple use of the API.
Will Apple fix ICA? Hopefully. When? I don't have any clue. My hope is that it is sooner rather than later.
-
Threading rears its ugly head, again
It seems to be a recurring topic here on my blog, threading. I was asked to look at a problem for a client yesterday and discovered a very subtle threading issuing (I actually didn't create it, one of the other people on the project created the problem when he added some code). Basically in order to show progress while the app is doing stuff, some code is executed on a separate thread. However, the main thread basically spins in a loop using something like:
while (threadRunning) { NSDate *newDate = [[NSDate alloc] initWithTimeIntervalSinceNow:0.05]; [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:newDate]; [newDate release]; }The application uses CoreData for managing data and the second thread accesses the CoreData store. You would think that the above code blocks the main thread from doing anything while the second thread is running, but like my issue with NSTask, the main thread is actually doing something. In this case, the UI is bound using Cocoa bindings to the managed object context and the secondary thread was also using the same managed object context. As explained in Apple's docs on Core Data multi-threading, you could get a deadlock when 2 threads are accessing the same managed object context at the same time. Bindings hid the fact that they were talking to the managed object context. I should have realized this, but I didn't.
Will I ever learn about how to get threading right?
-
Are software bundle deals just marketing hype?
I've commented on the past about MacHeist bundles and eventually decided that the bundles are not a bad thing with the exception of potentially decreasing the value of individual pieces of software. Last week, MacUpdate Promo started a new bundle deal with some interesting apps and Parallels being offered up if certain sales goals are reached. That's fine. Even though I have Parallels and Hazel, I bit as some of the other pieces looked interested and I like collecting software (odd hobby, I know). Typinator and MenuCalendarClock are already in use daily.

So now I come to my point on this entry. The MUPromo site indicates that X units have to be purchased to "unlock" Parallels. However, over on several other websites, they're running the ad that appears to the right. If you saw that ad, you would expect to get Parallels and 9 other apps as indicated. So, unless MacUpdate wants to be accused of false advertising, Parallels and the other 9 apps listed on their site will be included. Why the whole charade over unlocking based on sales numbers? Just hand over the applications and be done with it. So, in actuality, I should have all 10 applications today as indicated in the ad, but I have to wait until MUPromo decides that it is going to "unlock" all the apps.(No one has asked me to be part of a bundle for ReceiptWallet and after this post, I'm not sure anyone will :-)).