« April 2005 | Main | June 2005 »

May 30, 2005

Revenge of the Sith … spoilers ahoy!

I went and saw Revenge of the Sith (RotS) on opening night, which was an interesting affair to say the least. I have to admit I was torn about the prospect of seeing it at midnight. On the one hand, I don't particularly enjoy being around sweaty, frequently-costumed males. On the other hand, I'm a man of great impatience, and waiting a few hours or days more would have been more than I could stand. So it was that I dragged Beth with me, arrived early and sat around watching several young kids fight each other with plastic lightsabers for two hours. Interestingly, one guy proposed marriage during the wait (she said yes).

I enjoyed the movie far more than I was expecting. I was a bit leery after Episodes 1 and 2. I thought they were "good" movies, but certainly not great, and flawed in many respects compared to the original trilogy. Now having seen Episode 3 and having had time to reflect, I'd say that it is easily the 3rd best movie in the series (behind Empire and A New Hope). I watched A New Hope a few days afterwards, and I have to say that Episode 3 makes it a worse movie by comparison!, enough so that I can see making a case for Episode 3 being a better movie.

I've read many complaints about Hayden Christensen's acting in Episode 3, but I actually felt it was pretty solid this time around. In fact, I felt that the person who dropped the ball was Natalie Portman. She just never seemed to convey any believable emotion. Ewan McGregor turned in another great performance, and as I suspected from the trailer, Ian McDiarmid (who played the Emperor) really stole the show. There was also a great CGI performance from R2-D2 at the beginning - he's never felt so "alive" as in RotS.

One of the things I enjoyed most was that, while RotS answered most questions, it purposefully left a few ambiguities out there. I don't like it when movies go to great details to solve all the riddles and give you all the answers, so I was very interested at the implication that the Emperor (or his Sith master) could have been responsible for Anakin's birth.

May 12, 2005

Subversion vs. Perforce

For my money, there are only 2 decent version control systems out there right now: Subversion and Perforce. I use Subversion for MacMAME and a few other projects, and Perforce for all the work stuff. They each have their own strengths and weaknesses so it's hard to say that one is definitively better than the other. They do share one key feature that CVS lacks: atomic commits. This means that if you're checking in a bunch of changes that are encapsulated in one changelist, your operation either succeeds or it doesn't. With CVS, if the operation aborted or a file didn't check in, the repository would be in an awkward state for a period of time until you resolved the issue.

Perforce (p4) offers a compelling visual client, p4v, that gives you just about anything you could ever want in a GUI interface. It's clean, well organized and has killer diff, file history and file merge capabilities. p4 is also really powerful and has a decent CodeWarrior plugin. It deals well with Mac-specific files with resource forks as well. p4 uses an edit-change-commit workflow, which means that you have to check out a file from the repository before you can make changes to it. I don't mind this - it keeps me organized - but it causes trouble if you can't connect to your repository. You can manually unlock files and edit them, but p4 won't know that they're checked out and you have to go through hoops to tell it (I don't know of an easy way, offhand). This has caused me some problems recently -- I can't access our p4 server from 10.4 because the Cisco VPN client is busted under 10.4.

Subversion (svn) is an open-source project, and a relatively new one at that. As such, there are no GUI apps for it that are anywhere near as nice as for Perforce. Subversion does solve the offline problem that afflicts p4 - I can work on files in svn without needing to contact the server. It caches a pristine copy of the server data locally so you can edit and revert back to the server copy without ever touching the network. As such, it works fantastic when you're offline. However, this presents my main gripe with Subversion. It litters your working directories with invisible ".svn" folders. This means that if you try to copy a directory into a svn workspace, you'll blow out the existing .svn directories and Subversion will become confused. This is probably more pronounced on the Mac, because there are several cases where directories are made to look like files - .xcode projects, .bundle libraries etc. Each of these is really a directory hierarchy posing as a single file in the Finder. A few times now I've copied over a revised .xcode project "file" to my svn working copy and caused myself some grief. I don't know of an easy way to fix this situation when it happens.

Subversion's other weak spot is support for Mac resource forks. It has none. This is OK for most cases since you can use data-fork based resource files, but there are some cases where only a resource fork will do. For example, you can't check in a Finder-generated invisible "Icon" file or a ".webloc" URL file generated by Safari. My MacMAME repository contains the actual shipping "distribution", which has a .webloc file and custom icons for a few folders. Or it would, if Subversion supported resource-fork based files. ;) Instead, I have to store them in the repository as zip archives and run a shell script to post-process them when it comes time to build the distribution for release.

One interesting (and some might say annoying) feature of Subversion is that it uses the Apache 2 webserver to host a subversion server over http. OSX ships with Apache 1, so you have to install Apache 2 manually along with some other junk to get it all set up. Worse still, there appears to be a pretty major bug between 10.4 and Apache2 when it comes to pushing large files across the network. As such I've had to migrate my MacMAME server back over to a 10.3.9 box until either Apple or the Apache folks get it sorted out.

If other folks have used p4 or svn and know of ways to mitigate their weaknesses, I'd love to hear about it.