![]() |
![]() |
|
|
|
|
|
Like my work? Check out HexaLex, my game for iPhone & iPod Touch. It's similar to Scrabble, but played with hexagonal tiles. http://www.hexalex.com Some of you have probably noticed that I’ve been neglecting some of my other projects and complaining about being busy a lot lately. Well here’s what I’ve been working on. I’m pleased to announce HexaLex, a new angle on crossword games! The first platform for HexaLex is iPhone and iPod Touch, but I’m planning to expand to Facebook in the near future. If you want to get a quick overview of the game and a list of features go ahead and visit the HexaLex.com website. If you want to read some great 5-star reviews or buy the game just pop on over to the App Store. Continue reading for a little more detail on the core concept of the game. HexaLex is an idea I came up with a little over a year ago as a grad student. The core gameplay is a lot like Scrabble, Words With Friends, or Lexulous, so if you’ve played one of those games you’ll get the idea right away. You use tiles to build words on a game board. But HexaLex has a big difference — it’s played with hexagonal tiles. Looks interesting, right? Playing a crossword game with hexagonal tiles sounds like a simple idea but it actually requires a bit of creative thinking to make it playable and fun. (This is probably why it hasn’t been done a million times already!) You see, when two words cross with square tiles they only interact at one tile — the tile of intersection. With hexagonal tiles, that’s not the case. Hex tiles cause interactions at the tile of intersection and its neighbors! This means that playing one word across another word also forms two new two-letter words. This is sort of hard to describe, but easy to see as a picture (like the one below). ![]() Crossing START with CRAZY forms RT and RZ Traditionally, in crossword games you have to make every word on the board valid. If you just take the standard rules and try to use them with hexagonal tiles you’ll quickly discover that the game is unplayably hard. It’s just frustrating to have to work out two valid two-letter words for each and every crossing play. The way I solved this in HexaLex was to introduce the idea of junk words. A junk word is a two-letter word that’s not a valid word. So XR, TQ, and ZA are examples of junk words. (Oops, ZA is actually a valid word, at least in the strange world of crossword games.) In HexaLex you are allowed to play junk words subject to a few restrictions:
With junk words, a simple play of one word crossing another is always possible provided the two words share a letter. The game is playable once again and balance is restored! So now you know that when you look at a HexaLex game it’s OK that some of the two-letter words are bogus, but all of the longer words have to be legit. Junk words aren’t the only break from Scrabble tradition in HexaLex but I’ll leave the rest for another post. HexaLex is available now in the App Store. Give it a shot! Initial App Store reviews have been overwhelmingly positive, with fourteen unanimous 5-star ratings and reviews so far. If you enjoy HexaLex please let me know! You can also become a HexaLex fan on Facebook and/or follow HexaLexGame on Twitter. Also, please help spread the word by clicking the digg button!
As QLColorCode fans are aware, Snow Leopard’s version of Xcode has caused some trouble for me. To wit, Xcode 3.2 shipped a Quick Look plugin that registered for the public.source-code uniform type identifier1 (UTI), which is the primary UTI that QLCC registers for so it can do it’s magic. In the world of applications it’s possible to bring up the Finder’s Get Info dialog on a file of a given type and assign it and it’s kin to some application, but there’s no such interface for Quick Look plugins. Thus, there is no way to express a preference for QLCC over Xcode without removing or renaming the Xcode plugin. To make matters worse, the system’s top-secret non-configurable algorithm for resolving conflicts appears to work backwards from what users might hope for. The Xcode plugin lives inside an Apple-supplied app bundle in a system directory. It’s installed automatically if you choose to install Xcode itself, so it can easily up on your system without you even knowing it. Compare this to QLCC. You, the user, have actively downloaded it and installed it for the express purpose of handling source code files in the Quick Look system. You can easily remove it if you decide you don’t like it anymore. Which plugin do you think should win if they conflict? Apple thinks different. The system always picks the Xcode plugin over QLCC. But come on, if you’re going to have a system like this there ought to be a way of saying “I want plugin X to handle UTI Y.” This could be a nice shiny user interface somewhere or a down-n-dirty terminal command, but it needs to exist. I sent a bug report to Apple saying as much (rdar://7240036, mirrored here). I described my problem and made it clear that the solution ought to be a preference system for Quick Look. At the very least, I said, user-installed plugins should rule supreme. Apple engineering’s response? You can register for more specific UTIs than public.source-code. Nothing about why they don’t want to have a preference system or let user-installed plugins override others. Just “register for more specific UTIs.” The idiocy of this suggestion is staggering. The whole purpose of the hierarchical nature of the UTI system is to allow folks like me to say “I handle source code” without having to list every type of source code. Highlight, the library that QLCC is based on, can colorize about 140 programming languages. Apple engineering, with a straight face, is telling me that I should be registering for 140 UTIs because Xcode decided to register for the one I actually need. It gets worse. Even if I decided to take Apple’s advice, it’s impossible to say what those 140 UTIs should actually be, because there’s no central authority for registering UTIs. (This is another glaring flaw with the UTI system as implemented by Apple.) UTIs like So let’s go back to my hypothetical 140-UTI plugin. Imagine the confusion and headaches when a user’s But really, this is just an example of brush-off via bug report. Despite my slagging I do believe the engineers at Apple are generally quite talented and bright. They must know that the problem exists, but for whatever reason they’ve decided it’s not worth solving. Furthermore, they’ve decided it’s not worth telling some no-name hacker why they think it’s not worth solving. But the most insulting thing is that they didn’t even bother to mark my issue as a duplicate of some other issue requesting a prefs system for Quick Look. (You’d better believe that one exists.) “Go register for more specific UTIs, kid, yer bothering me.” 1 If you’re unfamiliar with the UTI system, John Siracusa’s encyclopedic review of Tiger has a detailed description. This is a quick note for any iPhone devs out there who are having problems getting their stack traces to show up with symbols in the Leaks instrument when running on the simulator. It turns out that this is an issue with using the iPhone SDK 3.0. If you switch your active SDK to 3.1 in Xcode then the symbols will appear again. Apple says they’re “aggressively” working on the issue. For history’s sake, I’m observing this on Snow Leopard 10.6.1, Xcode 3.2, Instruments 2.0. Update: Thanks to a misconfiguration on my part, QLCC 2.0.0 didn’t work on Leopard. The problem is solved in QLCC 2.0.2. Continuing on my “update side projects for Snow Leopard” theme, I’ve just rolled a new release of QLColorCode. I added support for a few new languages, including Scala, which is a personal fave. I also fixed a bug or two and finally upgraded the bundled version of Highlight from 2.6.6 to 2.12, which was long overdue. On the ‘meta’ side, I moved the project’s source code from google code’s subversion to github. I’ve been using git a lot lately so I expect I’ll do the same for my other projects as well. Once you’ve gotten used to firing off branches for every little thing that crosses your mind and seamlessly switching between them at a moment’s notice it becomes hard to work in the SVN mindset again. Unfortunately, QLCC has hit a bit of a roadblock with Snow Leopard. More specifically, it’s not SnoLep that’s giving me a headache, it’s Xcode 3.2. With the new Xcode Apple decided to include their own QL plugin for source code. That’s great, I say, more choice is good! QLCC will render everything that Xcode renders plus OCaml files, Scala files, and all sorts of other interesting languages that Xcode can’t handle. I’m not worried about QLCC losing in a fair fight. But no, Apple doesn’t fight fair. It turns out that Quick Look always picks the Xcode plugin when rendering source code files (on my machine, at least). I don’t think the Xcode plugin gets special treatment, it just happens to win in the algorithm QL uses to resolve plugin conflicts. What is that algorithm? Nobody outside of Apple knows. It could be a coin-flip for all we know. Heck, after a reboot it’s possible QLCC will always win! In any case, when there are two plugins that both want to render files of type Except it’s not all fine. Because let’s say a user decides that they prefer QLCC over the Xcode plugin. Their only option for getting QLCC consistently and predictably is to somehow disable Xcode’s plugin. They could remove it, rename it, or move it somewhere that Update: After further research, it appears that disabling the plugin will not invalidate the signature on Xcode itself, so there shouldn’t be any terrible consequences if you choose to do so. The plugin is located at: So anyhow, QLColorCode 2.0 is out. It works with Snow Leopard. If you have Xcode 3.2 installed you’ll probably never get to see it do its thing, but maybe one or two of you will still get something out of it. For what it’s worth, quick look still sends .plist files to QLCC. Xcode’s plugin won’t touch those things. I just wrapped up Backup Bouncer 0.2.0, with the major change being that it now builds on Snow Leopard. Get it at the usual place. BB used to include a program called ctool that I had thought about using but never actually used. This ctool program was unmaintained and didn’t build on SnoLep, so I finally just wiped it out. All is not quite well on the Snow Leopard front, however. The rsync that Apple ships (at least the one in 10.6.1) has a bug. When copying a FIFO it attempts to copy the contents of the FIFO. If you know what a FIFO is, you know why this is bad. So rsync hangs in the Oh, and I also fixed a bug with the BSD flags test. If you care about that stuff you should re-test. One other interesting tidbit — I changed the “lots of metadata” test to lock the file. This trips up some copiers that duplicate the “locked” status before setting up other metadata, causing the other metadata to be lost. Much to my shame, I had an e-mail upheaval and I can’t find the names of the individuals who reported the BSD flags bug and the “early locking” phenomenon. If that was you, please drop me a message and I’ll give you the credit you deserve. UPDATE: It was Rob Kennedy who reported the BSD flags bug and the “early locking” phenomenon. I hadn’t thought to search through my blog comments. Silly me! Thanks a lot for those tips, Rob! I apologize for letting n8gray.org fall off the planet for so long. My server got migrated without warning and events in real life overtook me as well. In any case, the site’s back up now and I hope everything’s working again. Please let me know if you find something broken! I get a lot of mail from people wishing Forget-Me-Not worked in Leopard. For them, I’m happy to report some hopeful news. A while back I was contacted by a senior Apple representative who expressed interest in helping me revive Forget-Me-Not. In the end, after consulting with Apple engineers, it was decided that the way to go forward would be to provide a new API suitable for FMN. This conclusion was slightly surprising to me, because it seems like the API we’re using should be suitable, but then again I’m not an Apple engineer. In any case, if you want to revive FMN, please file a bug report at http://bugreport.apple.com (requires a free ADC membership) and say you want to support the enhancement in bug report 6018339. You don’t have to say much of anything, just make sure to reference that bug number — Apple considers duplicate bug reports “votes”, so you want to make dead sure they know it’s a duplicate. Before you get your hopes up, please understand that this contact was made back in the early summer and nothing much has come from it. Hopefully a few “votes” for the issue will get the ball rolling again. In bygone days of yore I wrote a rather angry post about my Edirol PCR-30 midi controller, whose key contacts failed after essentially zero use. In my post I mentioned e-mailing Roland support about the issue but I got no response, so I just let it drop. After all, the thing was out of warrantee and I had other stuff to deal with. Last week I randomly decided to google around and see if anybody else had found a solution to the problem. Well, the results of the search were pretty interesting. The problem was ubiquitous — tons of folks with PCR controllers built around the same time as mine reported it on forums and review sites. (This was not the case when I first discovered the problem, by the way.) Some people reported that opening the keyboard and rubbing the key contacts with a stiff pencil eraser brought them back to life, which got me thinking. These things are just electrical contacts, right? Why not put conductive paint on the contacts? That should get them working again for good! So I did a goog for “conductive paint” and one of the first links that came up was this one. And hey, can you believe it? They sell a “Rubber Keypad Repair Kit”! (MG Chemicals, cat. #8339.) Hallelujah, exactly what I wanted! It’s actually designed for repairing remote controls, but midi controllers work on the same principle. I decided to order one and gave it a shot. (BTW, my experience with Action Electronics was very good.) How did it turn out? Well, it was good but not great. The kit did, in fact, manage to revive almost all of my keys. Why didn’t it work for all of them? Well, each key actually has two contacts underneath, and a bit of experimentation revealed that the time interval between closing the two contacts is quite important for the keyboard performance. (I assume this is how they sense the velocity with which you struck the key.) If they close in the wrong order, for example, no note is triggered. I think that the added thickness of the paint (which didn’t always go on particularly smoothly) caused timing problems with some of the keys, perhaps even causing the contacts to close in the wrong order. I tried sanding off the paint and repainting the bad keys, but it never quite worked for all the keys. I tried to live with this for a while — it was, after all, a big improvement over the keyboard’s previous condition. But the fact is, there are times in any musician’s life when only D# will do, and using D or E as a workaround just doesn’t cut it. Finally, I decided that it couldn’t hurt to call Roland and try talking to a live person. After some bouncing around in their phone system (boy do they have awful muzak when you’re on hold!) they actually gave me approval to send in my keyboard! This despite it being many years out of warrantee and my admission that I’d tried to fix the problem myself! I was a little bit afraid that their technician would investigate the problem, find the contacts covered with conductive paint, and stamp DENIED on my RMA ticket with an evil laugh, but no such thing happened. I suspect they just swapped out the whole keyboard assembly without ever uncovering my handiwork — why bother removing all the keys when this is a known defect? So after 3 days I had my PCR-30 back in fully working condition for no cost other than the time and gas required to drop the thing off at the nearby Roland factory and pick it up again. Kudos to Roland for making good after all these years! So anyhow, the moral of the story is that talking to people by phone works better than e-mail, at least if those people are Roland employees. Or maybe it’s that conductive paint doesn’t work as well as you might hope. This took me waaaay too long to figure out. A while back I set up printer sharing (with browsing) on my Ubuntu-based server. My Mac (running Tiger at the time) found the server just fine and it all just worked — I couldn’t believe how simple it was! But then I upgraded to Leopard, and among the (numerous) casualties was the shared printer. No matter what I tried, what protocol I used, what driver I used, the shared printer just wouldn’t work. After hours of banging my head against the keyboard I let it go. About 9 months have passed, and today I decided to take one more swing at. Can you believe it? I found the problem! There were two problems really. First, to access a shared printer on another machine, you have to turn on print sharing on your machine. This defies all logic, but there you go. Second, for some utterly inscrutable reason Apple decided to *dis*able the CUPS browsing protocol, leaving only Bonjour browsing working. ???? Stupid. Stupid. Stupid. It’s as if they said “let’s make sure Mac users will have lots of trouble printing to Linux servers, that’ll improve our customer satisfaction!” To fix this lameness, do the following: cupsctl BrowseProtocols='"cups dnssd"'
Combining these two tips, the shared printer finally appeared in the “Default” pane of the new printer dialog and printing to it just worked. Hopefully Apple makes this more sensible in Snow Leopard… Oh Mama! Another Backup Bouncer post! You might think that I, the author of Backup Bouncer, the crusader for end-user verification of backup tools, would have run BB on Time Machine at some point. If so, you have seriously underestimated my laziness. But this morning I got an e-mail from a user asking for help testing TM with BB, and this finally spurred me to do the test myself. Here’s how you test Time Machine with Backup Bouncer: $ mkdir ~/bb # We need to trick BB into thinking this is a volume it created $ touch ~/bb/bbouncer-vol $ sudo bbouncer create ~/bb # Now do a Time Machine backup and wait till it's done $ mv ~/bb ~/bb-orig # Now restore the ~/bb directory from Time Machine. # Try not to catch SPACE MADNESS!!! $ bbouncer verify -d ~/bb-orig ~/bb On my Leopard 10.5.3 machine here’s what I get with BB 0.1.3: Verifying: basic-permissions ... ok (Critical) Verifying: timestamps ... ok (Critical) Verifying: symlinks ... ok (Critical) Verifying: symlink-ownership ... FAIL Verifying: hardlinks ... FAIL (Important) Verifying: resource-forks ... Sub-test: on files ... ok (Critical) Sub-test: on hardlinked files ... FAIL (Important) Verifying: finder-flags ... ok (Critical) Verifying: finder-locks ... ok Verifying: creation-date ... ok Verifying: bsd-flags ... FAIL Verifying: extended-attrs ... Sub-test: on files ... ok (Important) Sub-test: on directories ... ok (Important) Sub-test: on symlinks ... ok Verifying: access-control-lists ... Sub-test: on files ... ok (Important) Sub-test: on dirs ... ok (Important) Verifying: fifo ... FAIL Verifying: devices ... FAIL Verifying: combo-tests ... Sub-test: xattrs + rsrc forks ... ok Sub-test: lots of metadata ... ok The only annoyance is that hardlinks aren’t preserved, but that’s not surprising considering the way hardlinks are used internally by TM to prevent wasted space. (I should point out that the hardlink failure here is not the same as the Apple rsync one I mentioned earlier today, and it’s not nearly as bad.) These results are not perfect but I would have no problem recommending TM backups to any less-than-hardcore user.
Like my work? Check out HexaLex, my game for iPhone & iPod Touch. It's similar to Scrabble, but played with hexagonal tiles. http://www.hexalex.com |
|
![]() |
![]() |



