Tuesday, October 11, 2005

Multi-Lingual Spell Checking in Crossword Forge

Crossword Forge has had an English spell checker for the last six months. Still I've found that I've wanted it to do more. Since Crossword Forge is a natural fit for foreign language teachers, I've always thought it would be great if it could bring multi-lingual spell checking to its users as well.

The question on how to proceed with that was a tough one. Do I add additional dictionaries to the current spell checker, or do I try to leverage the spell checker built-in into Mac OS X (which is already multi-lingual). There were pros and cons to both approaches. By adding my own dictionaries, I could ensure that the feature would be available to all my customers at the same time and in the same way (i.e. Windows users would get the feature as well). But it would mean that I was responsible for the reliability of the free dictionaries I found, and I would have to produce a phonetic variant of those dictionaries for each of the languages I wanted to support. It would also mean that Crossword Forge was going to get bigger (the built-in dictionaries take up space), or more complicated (I could have the user download the additional dictionaries separately).

In the end I decided that I would probably eventually want to do both, but should start with the approach that would have the biggest impact in the shortest amount of time. Since most of my current customers were on the Mac, and I could leverage 13 dictionaries in about the same amount of time that it would take to add 1 more dictionary for all the platforms, I decided to go with the OS X integration approach.

A big factor in that decision was Charles Yeomans excellent online book I Declare. The book takes a programmer through the process of integrating Mac OS X spell checker into RB program's step by step. It also gave me a firm enough grasp of the subject, that I felt comfortable going beyond what was presented in the book. Which brings me to a slightly less technical topic "spell checker interface design".

For reasons not entirely clear to me, Apple decided to implement the Mac OS X spell checker window as a non-modal window. This means that, unlike most spell checkers you may have used, Mac OS X's spell checker allows you to modify your document in ways independent of your spell checker, while you are in the process of checking its spelling! For example you could add a paragraph to your document while it is complaining about a misspelled word. The misspelled word in question may not be there any more, or it may no longer be misspelled. Because most other spell checkers are modal (you can't change the document in other ways while you are spell checking) they avoid this situation entirely. The question is, how should the UI respond in those situations.

I was hoping since Apple designed the spell checker this way, they might have a good way of handling it for their apps that use it. Unfortunately Apple seems to have ignored the problem, or at least handled it in what to me seems an unintuitive experience for the end user. For example, If you press the correct button, even when everything about the document has changed, the spell checker will replace the contents of the current selection with the button. This isn't helpful, and could be quite harmful (what if you had performed a select all, operation right before you pressed the correct button. (all of your documents text would be replaced by the corrected word.))

I deviated from Apple's approach in Crossword Forge. The first thing I do differently, is ignore the selection. I instead, store the misspelled word's position in a way that the user can't directly manipulate it (like they can with the selection). If the text itself changes, I look to see if it has effected the position of the misspelled word in question. If so I re-analyze that piece of text (possibly backtracking if necessary) to see if there are new misspelled words in that vicinity. If not, I can safely proceed to replace the corrected word.

Another mistake made by Apple's spell checker is that it doesn't re-consider the current misspelled word when the dictionary is changed. The word may not be misspelled in the new dictionary, and certainly the suggestions should be different. Crossword Forge's implementation corrects this issue.

Despite the rough road, adding multi-lingual spell checking to Crossword Forge was a great experience, and lots of fun. I hope users will enjoy having a multi-lingual spell checker built into their crossword puzzle and word search puzzle generator, as well. If you are interested in trying it out, you can go here: crossword forge download page. If you are on Windows and want multi-lingual spell checking, send me a note. I still plan on tackling the problem myself, but a friendly reminder may help me prioritize it.

Thursday, September 29, 2005

ABC's "Lost" had an unusual format last night

I'm big fan of ABC's television show "Lost". I was quite surprised by the format last night. The episode started where last week's episode started and included lots of the same scenes as last week. Each of those scenes were extended, so that we could see more of what was going on, or so that we could see the scene from someone else's perspective. The episode roughly ended in the same spot the first one ended.
I'm not sure, but it feels like they originally planned for a 2 hour opener, and were later told that they needed to show it over the course of 2 weeks. In any case, the wacky format actually added to the mystique. I liked it, but hopefully next week we get to move on. I am anxious to find out what happens next.

Saturday, September 24, 2005

Vonage finally comes through

Vonage finally transferred our business number to our other account. They originally told us that they could get it done in 2 hours, 1 1/2 days later it was finally transferred. They also said the messages would go to voicemail, instead callers at that number would get "this number has been disconnected". Hopefully we didn't lose too much business during that period.

Helping with hurricane Rita

I got to help out with the effort to evacuate southern Texas this week, as a Red Cross volunteer. I was surprised and quite pleased by the amount of responsibility they gave me. It was a great experience, and if you can help out with the red cross (especially during an emergency), I urge you to do so.

On Thursday I got an email from Ryan Nord asking if I wanted to help out at the Red Cross that evening. I did, and I went down at 5 PM to the Austin Red Cross Chapter. Luckily I was going south because the roads were just packed going North. Everyone was getting out of southern Texas in preparation for hurricane Rita. Once at the Red Cross I filled out some paperwork to sign up as a volunteer, and they immediately put me to work (along with a bunch of other friends that had all come down from the church: Ryan Nord, Larry Webster, Ben Winzenz, David Eckholdt, Jayson Wilkinson and Stuart Bontrager).

My first assignment was filing various Katrina refugee files. There were thousand of records that needed to be consolidated. This was important work, but I was glad to see that it was just a temporary assignment.

Soon after we got started filing, we were wanted to do a new task. The local red cross needed rental cars to get some of their work done. 5 of us piled in the back of a minivan (driven by Ben (not Winzenz)) and went to the Airport. Each of us picked up a different car from Avis and drove it back to local chapter. Mine was a Chevy Malibu. I never thought I'd say this about an American made rental car, but it was fun to drive.

Back at the chapter office, we continued to file, while we waited on our next assignment. I was asked to help with the paperwork, to process all of the rental cars.

Then came my next big assignment. Larry Webster and I were asked to deliver hundreds of blankets to two different evacuee shelters. First we loaded the back of the truck with quite a few blankets (135?) Then we went to the Goodwill to buy more blankets. We delivered 10 blankets to a school in north central Austin, and rest went to Artie Henry Middle School in Cedar Park. While at Artie Henry we heard about a dialysis patient that needed to be transferred, but we couldn't help because our truck only had room for 2.

We went back to headquarters (it was now 11:30 pm), and told them about the dialysis patient. They asked if one of us could still help? Since I didn't have anything critical on Friday, I told Larry that I'd be happy to take this one. (Larry had some meetings on Friday morning, and needed to eventually get home.) I was given a van and asked to pick the dialysis patient up and 3 mentally challenged individuals at Cedar Park High and bring them to Reagan High School. Reagan High School was setup as a center for evacuees with special medical needs. When I finished that task, I was quite tired and ready to go home. It was 2:30 AM. The command center was still quite busy however. I offered to spend the evening helping them.

They were quite happy, and were going to have me help open up a new evacuee shelter in Westlake (because of the bad traffic, evacuees were still pouring in from southern Texas, even though it was 3 AM). In a last minute change of plans I was asked to relieve the Shelter Manager for the evening (again at Artie Henry Middle School.) I stayed on duty until 9AM Friday morning, as the acting Shelter Manager.

All I can say is WOW! What an experience. I would have never imagined that I would be given such interesting and rewarding work. I especially didn't think I would be helping in the capacity as Shelter manager when I volunteered on Thursday. It was lots of fun, I look forward to helping them again.

iota-calc 1.6 released

I finally got iota-calc 1.6 out the door. I had been sitting on the release for a few days, because of some volunteer work I was doing (more on that later). Also, Selene found a problem with one of the conversions (bits to bytes), which has now been fixed. If you want to try the new version, you can go here iota-calc download page.

Thursday, September 22, 2005

Customer Service

I am currently on the phone with Vonage, the broadband phone company. I've called to have them transfer my business line over to an extra phone jack on my regular phone account (also with Vonage). I'm doing this because the Fax line on my business account doesn't work correctly, and never has (often we would get partial faxes or none at all). This is the second time I've called to get them to transfer the account. The first time, was about one month ago. They were supposed to get it all taken care of by that evening. Now its a month later, nothing happened with the account, and we just got another bill for $44.19. This time they are telling me that they will get it right, oh but if they don't, here is a phone number that I can call to bug them about getting it right. Its nice that they give me a name and a phone number, but I really don't want to spend my time making sure they get their act together.

If they could only get it right, without multiple one hour conversations, and without being transferred to new people every ten minutes, it wouldn't be so frustrating. I believe that explaining the same problem to several people is the crux of why customer service often fails. In the process of being transferred all of the progress you made in the communications effort is lost and you have to start at ground zero.

To be fair to Vonage, this isn't a problem that is unique to them. In fact Vonage's customer support has a few things going for it. Their phone personnel are very polite and helpful, and they sound empowered to fix my problem (very unlike SBC's phone support, but that is an entirely different story).

Wednesday, September 21, 2005

Fun with conversions

For about a week now off and on I've been working on adding simple conversion functions to iota-calc. I started this because, I got an email from a potential customer that wanted to know how much Crossword Forge cost in Australian Dollars. I fired up the calculator that came with Mac OS X Panther so that I could compute it. Unfortunately Apple's calculator kept crashing for me whenever I tried to update the calculator with the current exchange rates. I figured it was just a fluke with my system (my G5), so I tried it on my iBook, with the same results. I decided to go to the web to get the answer for this customer, and to write my own currency converter into iota-calc.

Since currency exchange rates vary day by day (even second by second), I would need to get the information from some service on the web. I found a 'SOAP' service that provided the current exchange rates updated every 15 minutes. This was fine for my needs but I couldn't get it to work in iota-calc. After trying for what seemed like eternity I gave up on that approach (later I found out from Mike Bailey (the author of the SOAP implementation in REALbasic), that he was having trouble as well). I instead decided to scrape the information I need from www.fxstreet.com. It works great, and I provide a link to fxstreet.com in my iota-calc interface for all those that need more detailed currency analysis. The really cool thing is that the currency conversions I do in iota-calc are always live (they aren't delayed by 15 minutes, and you don't have to send requests to update the rates on your local machine).

Once I had the currency converter in place though, I couldn't stop there. iota-calc, after all, is meant to be a calculator for programmers, so the currency converter seemed out of place and incomplete. I had to design a set of conversion utilities to make the feature look like part of a architected whole. So I went ahead and added other conversion utilities. One that converts from bits to Terabytes and everything in between and beyond (this one ties it properly into iota-calc's target audience (programmers)). I also added converters for length, area, volume, weights, and temperatures.

Although all of these things exist already in Apple's calculator I feel that my features are an improvement in many respects.
  • supports 140 different currencies instead of 40.

  • Updates to the current exchange rate automatically.

  • Includes bits to megabytes converter.

  • Includes more cooking measures in the volume converter (e.g. teaspoons and cups)

  • More accurate than Apple's converter (e.g. in Apples converter 1 yard = 2.9999 feet). I do this by not switching measurement systems unless I have to (e.g. yards to feet should stay in imperial measures)

  • Apple's calculator allows you to, in some cases, convert between standard imperial and U.S. imperial measures. Though it doesn't do so consistently and does so in a confusing way that could cause the user errors. e.g. You can choose between U.S. Gallons and Imperial Gallons but Quarts are left unspecified as to which measuring system they belong to. Through experimentation it seems that Apple's calculator uses U.S. style quart measures, but if you get your assumptions wrong, you could make a substantial error. Currently iota-calc avoids this whole issue, by clearing noting that it only uses U.S. imperial measures in all cases.


I haven't posted the new version of iota-calc yet. I will probably do that first thing tomorrow. I still need to test it to make sure there aren't any mistakes. Email me if you want to help me test.

I too, have entered the world of blogs

I've been contemplating adding a blog of my own for a while. What pushed me over the edge is that I wanted to comment on my brother's page, blurred metal, and it wouldn't let me unless I was registered. In the process of registering, it created a blog for me. In any case, here I am.

What do I plan to do with this venue? Lets see what develops.