April 11th, 2005

NicePlayer is well on its way to the best media player for mac — ever. I finished implementing a plugin this past week using Xine-lib that plays back a lot more media than QuickTime supports. It does have some minor issues (mostly having to do with setting the playhead point in certain cases) that are Xine bugs, but we can do cool stuff like play back vob and HD mpeg2 files (at full res! requires a G5). This is mostly thanks to XinePlayer being open source — I mostly hacked around the existing Xine view code, refactoring it to adhere to our plugin API. Xine gains all of the great UI things we have in NicePlayer, and NicePlayer gains great playback speed — a win-win.

All of the problems with the resize indicator appearing in funny places have been resolved — the resize indicator now appears on mouseover where the movie resize should be while in full screen mode. I’ve also implemented notification support, so we get cool text notification overlays like DVD Player. There’s also support for non-proportional scaling (actually it pretty much comes for free), and plugin loading order and preferences have been fixed (not that anyone noticed it was broken). We’re probably going to miss our projected release date of 4/17 by a week or two, as we’re trying to get some pretty advanced playlist UI in. But we’re definitely getting closer to a 1.0 release, with probably one or two more interim releases between now and then.

Personality Services, Active Timer

April 3rd, 2005

In my free time this past week, I hacked together a couple of new things. The first being Personality Services, a completely useless but totally fun OS X Service that mutates selected text into one of a different personality (Jive, Texan, Swedish Chef, etc.).

I also updated Active Timer, a small app I wrote last year to keep track of how much time I was spending on my senior project versus reading Slashdot. It’s a neat little app, this update doesn’t add much functionality except keeping track of things at seconds resolution (rather than at five seconds). This is a large user interface improvement due to the fact that people would continually download the application, run it for a few seconds, and then decide it didn’t work (it did, but only kept track of things in five second increments). Anyway, this should stem the few complaints posted in the comments on VT. I also redid portions of the app to use Cocoa bindings, just for fun. You can’t really tell though, except now you can sort the various tables, something that comes for free.

I should probably come up with actual project pages for those applications, although I’m kind of ashamed at having spent time creating Personality Services.

In other news, I now have a small portion of VI implemented as a subclass of NSTextView. I hope to bring it to the point where I can use APE to replace all NSTextView subclasses with my class, so that I can get VI commands in every Cocoa text box.

NicePlayer 0.91

March 8th, 2005

Jay and I release NicePlayer 0.91 over the weekend. I did a lot of work on DVD playback support and the underlying plugin framework. Indeed, the plugin API has been mostly solidified (except for adding support for returning a nib for custom configuration in the plugin preferences), and there’s a even some sample code posted on the NicePlayer web site to help others create plugins. In fact, for anyone who is looking to create their own DVD player using Apple’s DVD Playback API, they need not look further than the provided sample code, which is basically the code that NicePlayer uses to play DVDs. If all goes as planned, the next release will use VLC to play video: not only will it give a great speed boost to playing back divx files and such, but will also provide a better user interface for VLC users.

The other big new feature is AppleScript support — extremely useful for users of the Saline clicker software. There’s a resize widget, as per Nicholas Riley’s suggestion, and the widgets now smoothly fade out after you’ve moved your mouse off of them. While trying to figure out if we could get normal correct window shadows for NicePlayer (we can’t without faking our own — something which makes the app a lot slower), Jay found the following shadow bug in OSX — the non-focused windows with standard OS X shadows have an artifact in them — a thin line running along the bottom, below where the shadow should have faded out. You can see this if you stack several windows on top of each other, such that the bottom shadow falls on the white space in the window below it (this makes it easier to see). The line is fairly clearly visible, and I’m surprised I didn’t notice it before Jay pointed it out.

Smalltalk on the JVM

March 4th, 2005

I ran across a piece of software called St/JVM by Mission Software that allows you to run Smalltalk code on the JVM. This is inherently exciting because not only does it bring some assemblance to the CLI (specifically, the .NET VM) — I can’t think of any inherent reason that the JVM can’t support multiple languages in the same way that the .NET VM does (although other languages are ‘second class’). It makes me wonder how this is implemented though — as I recall there were certain issues with having to modify the .NET VM that Ralph Johnson’s group was working on to get Smalltalk to work on the .NET VM.

Is there some sort of intermediary layer between St/JVM that is written in Java itself, and not simply a compiler that compiles to JVM byte code? St/JVM also claims to support blocks, which leads me to believe that this must be the case — and that St/JVM could potentially be somewhat slow. This is mainly due to fact that activation records in Smalltalk sit in the heap, whereas activation records for most other languages sit on the stack. This is mainly due to the fact that you can create blocks with references to variables in the activation record — the lifetime of the block could live longer than the lifetime of the function, and the existing variables that are referenced in the block must still be valid as long as the block is still exists (this is probably the hardest thing to deal with in implementing blocks in Objective-C, I intend to write more about this in the future). It would seem like St/JVM probably implements activation record objects using a Java abstraction, allowing you to do all of the neat things that Smalltalk does, such as viewing activation records as objects when in the debugger. Unfortunately, there’s no downloadable demo at the moment on the page — it would be interesting to see what the performance is.

BlueJ and Teaching Java

March 1st, 2005

For those of you who haven’t heard of BlueJ, it’s a development environment designed for teaching Java. And it’s really, really shiny. This is really the first development environment I’ve seen for teaching programming that I would actually want to use as a teacher.

You start off designing your your class hierarchy graphically. You can define your inheritance by dragging arrows between classes — in this sense, it teaches some simple UML by the virtue of being able to see things graphically. You can also define abstract classes and interfaces and such. And here comes the kicker: you double click on any one of these class objects to edit the code in the class.

Other things that are neat are things we’ve had in Smalltalk: a code pad window, where you can write arbitrary Java expressions and evaluate them. Also, you can right click on any class in the class diagram and click “new object()” — this will then create a graphical representation of this newly created instance in a small window at the bottom of the IDE, where you can right click on the representation and send messages to it. What I mean by this is that a graphical window pops up asking for the arguments, you type those in and hit OK, and it returns the result, like in Smalltalk.

Even better is the integrated support for JavaDoc. This allows you to learn to use JavaDoc, but even better is the fact that the code view has a drop down box that lets you choose “Interface” where the JavaDoc rendered class documentation is immediately shown! And if that’s not enough, BlueJ has support for Unit testing so that you can learn testing methodology in parallel with Java programming and class documentation.

This is really such an amazing system that it’s worth a download just to play around with it.

New Development Blog

February 27th, 2005

This is the location of my new development and programming blog, in order to save those friends of mine who lack either a) interest in the 21st century renaissance (i.e., programming), or b) only care about programming. In either case, all programming and development related things will now appear here, whereas everything else will be in my LJ.