The Source for Java Technology Collaboration
User: Password:



Chris Campbell's Blog

Open Source Archives


And This One Is Better Than Ever!

Posted by campbell on September 18, 2003 at 05:08 PM | Permalink | Comments (7)

Do not expect any order or rhyme or reason for the content that follows. I've been away from the blogging game for several weeks, so I have a lot of random thoughts waiting to jump out of my dome (in typical fashion, none of them are well formed). Chet and Hans have been cranking out new blogs left and right, so I feel compelled to keep up with my end-of-the-hall-mates.

On the new OpenGL-based Java 2D pipeline: Work on this exciting new pipeline doth proceed apace. We've been making some excellent performance improvements over the past few days, and we're working with video board manufacturers to increase reliability, compatibility, and performance. I think desktop developers should be pleasantly surprised with the improvements offered by this pipeline, and I look forward to your feedback when 1.5 beta ships in a few months.

This new pipeline has been getting some publicity on various forums like Java Gaming and JavaLobby in recent weeks (check out those threads for some more detailed information; the JL thread was interesting until it devolved into a discussion on open sourcing Java, which seems to be par for the course). Now might be a good time to answer some frequently asked questions regarding the new OGL pipeline:

Q: You suck. Why isn't this pipeline being developed for Windows too (Sun is evil)? Why aren't you using a shared code base? Is it because you're dumb?
A: I'm rubber, you're glue... But seriously, we would very much like to offer this pipeline as an alternate implementation on Windows, but it won't make it in for 1.5... Hopefully we'll enable it in a future release, because it could really open some doors for interoperability with JOGL, and various other factors. The reality is that we have hundreds of video boards and driver combinations to support on Windows, and our effort is best concentrated right now on making our DirectX pipeline even more stable and performant. Driver flakiness is a big concern (just ask Chet and Dmitri!), so making sure that the OGL pipeline works on all Windows configurations will be a challenging task. We'd rather concentrate right now on making the OGL pipeline rock on Linux and Solaris, where graphics acceleration has traditionally been more dismal. (And yes, we do have a shared code base, with small platform-dependent modules to support GLX and WGL. It's a nice streamlined design, in my obviously biased opinion.)

Q: Why aren't you making use of UMD's Agile2D project? Is it because Sun sucks and hates open source software?
A: Agile2D is another interesting project out of UMD, but the downside is that it sits outside the guts of Java 2D and Swing, so you have to "port" your application to use Agile2D. Writing the OGL pipeline from the ground up allowed for much tighter integration with Java 2D internals, so you reap all sorts of benefits like using texture memory for caching glyphs and "managed images", in addition to all the performance gains reported by the Agile2D guys. If you tried out Agile2D, you should get all the same benefits and many more just by using core Java 2D and Swing in 1.5...

On the new "Sun Java Desktop System" branding strategy: Okay, so this one is taking a while to sink in, I'll admit. Some folks on JavaLobby are complaining that Java doesn't play a large enough role to warrant the name. Granted, a majority of the apps are not written in Java, but the biggies like Mozilla and StarOffice surely are Java-enabled. The important thing to keep in mind is that this is just the first release; prepare to see many more pure Java apps added to the package as time marches on.

I'm glad that the name doesn't mention the word Linux or Solaris... There's no reason for it. We're at an important cusp in the software world where the underlying OS has become irrelevant. Application developers and end-users alike no longer care what operating system they're using (yes, yes, gross generalization) as long as it runs their favorite cross-platform apps that help them get their job done, whether they are written in Java (NetBeans, Limewire) or not-Java (Mozilla, Evolution). If Sun decided tomorrow to base the Java Desktop System on OS/2 or FreeBSD or whatever, it wouldn't make a lick of difference to end-users (gross generalizations are fun). This general trend in the industry towards platform-agnosticism is really cool, and it's only going to accelerate.

On the state of the "Mu" project: I haven't had much time for Mu this summer, but that hasn't stopped others like Mr. Rob Ross from adding cool new features, like video playback. I made some minor enhancements to the "lite" client to improve ease-of-use (i.e. act more like iTunes), but those haven't yet been committed to CVS. Soon we'll be ripping out some of the internals and replacing them with an exciting new media content/metadata system about which I've been conversing with the Gas/JRec/Ptarmigan author. There's also talk about adding new pure Java codecs, live TV viewing, TV listings, and even some video conferencing functionality. Hopefully we'll make some more progress this autumn... Help from interested parties is always appreciated!

On Giants/A's playoff tickets: Should I stay or should I go? I could stay here and get some work done, or I could go sit in line at the ballpark with the rest of San Francisco. It's a beautiful day in the city, but I wonder if they have wireless down there? Better yet, I could bribe my sickly roommate into sitting outside all night for tickets. Yes, that sounds like a fantastic idea to me (hint hint nudge nudge)...

On Maven: I still haven't had a chance to play with Maven yet (beyond the few articles I've read), but it sure seems cool. Anything to eliminate the drudgery of build/doc/test systems is fine with me. And I used to think Ant was high-level...

On the genius of Bob Pollard: November 4th brings us a definitive box set from legendary lo-fi drunk-rockers Guided By Voices, entitled "Hardcore UFOs". Whenever I drop money on GbV, I come closer to understanding how crack addicts feel when they make their purchase -- 2% guilt and 98% elation. How can you not admire song titles like "I Invented The Moonwalk (And The Pencil Sharpener)"? The energetic, start-stop, repetitive-F-chord mania that is "Postal Blowfish"? The buzzing-guitar-string simplicity and effortless crooning of "Goldheart Mountaintop Queen Directory"?

On the virtues of vacationing (or "how to boost your debugging effectiveness"): This was a great summer. I took various long breaks (well, a few days at a time) away from work to visit with nature, friends, and family. My personal rule number one on these trips was "do not under any circumstances think about work", and then a funny thing happened. I'd be sweating my way up Half Dome or just plain sweating on a beach somewhere, and then I'd have a vision. No, it wasn't Yeti (what an odd assumption on your part)... It was the design flaw that's been nagging me for months, but this time it came with a solution. It's that old psychological notion of receiving inspiration when you least expect it. So there you go, next time you're working on some tough project, tell your boss you'll be taking a few days off to work-but-not-really on that important project.

On a related note, I was just reading James Gosling's latest blog entry about trusting (or better put, not trusting) yourself when debugging. I do this to myself all the time, and I never seem to learn my lesson. Just yesterday I was reading an old email I sent about the OGL pipeline, where I said something to the effect of "Q doesn't work even though I know that we're definitely doing Z, which should enable Q". So for months I built up this notion that the bug couldn't possibly be related to Z. And then what happens? I go revisit Z to discover a subtle flaw that had been there all along, and now of course when I fixed the bug in Z, Q is working just as I had always expected! Damnation! I could smite myself! (In fact, I just did that just to add a little drama...) Moral of the story? Don't trust yourself, but do listen to James, he's a smart guy.

On the coolness of iPods and iSights: I broke down and bought one of each, after hemming and hawing for months. The iSight is great, and the ease of iChat is unparalleled. Yet it just kills me that I'm able to video/voice chat with all of two people (Mac owners of course). So, good for Apple, they'll convince a couple more percent of the earth to buy their machines, and meanwhile everyone else (Windows/Linux users) is missing out on a fantastic hardware/software solution. Everytime a company ties people into a specific OS with some custom built application, the industry takes one step backwards. Argh like Charlie Brown.

I haven't yet received my iPod. I've been making all the necessary preparations, like converting my entire CD collection, encoded in the FLAC format, to MP3. I updated an old tagging/converting Java app that I had sitting around to handle the conversion, and it seems to be working like a charm. Yay Java. Note that by purchasing this iPod, I've admitted to myself that maybe the world isn't quite ready (yet!) for my idea of always-on, instant media transcoding/streaming from your home media server to your MIDP2-enabled cell/PDA (running a mobile version of Mu). But mark my words, this will be the future of personal, mobile entertainment! You just wait!

In my ears: The Super Friendz, "Love Energy" and Neil Young, "On The Beach"
In my eyes: Haruki Murakami, "The Wind-up Bird Chronicle"



Five Minutes on the Soap Box

Posted by campbell on June 25, 2003 at 11:35 AM | Permalink | Comments (10)

[This entry was also written sometime last week...]

I rambled through my last entry, so this time I'll try to stay on topic. And what's the topic, you ask? Good question, I'm not quite sure, but I'll figure it out soon. Hmmmm. Did you see the Giants game last night? Yep, pretty exciting. Yep. Hmmmm. Nice weather, eh? Sure is.

Ahh yes, I've been thinking a lot lately about the state of application programming and the magic of well-designed, reusable components. The Java world has come a long way in the past few years in this respect. Just take a look projects like Jakarta Commons and Hibernate, to name just a couple. The open source community is finally starting to build on top of itself, and we're starting to see some real innovation as a result.

I remember when everybody and their brother would implement their own Base64 codecs, and now so many of these mundane tasks are handled by the Commons project. I remember when JDBC was considered a high-level library for accessing databases, and now we have these great really-high-level frameworks like Hibernate and JDO. I remember my first experience spending hours with DOM APIs to pluck objects out of an XML document, and now I could use JAXB in about 20 minutes to achieve the same effect. Sure, many of these libraries aren't part of the core JDK, but over time we've come to trust and use them as we do for say, the core Collections classes.

Over the past few months I've been hacking away at the Mu project while also helping out Paul Noffke with his novel tRio project. We were sharing ideas on how best to implement pluggable audio sequencer and content hierarchy frameworks, and it became apparent that we could be sharing libraries, not just ideas. Going further, I was thinking that we could share the same content interfaces and data structures with Reed Esau's cool JReceiver project. It wasn't necessarily obvious (see the recent Ken Arnold interview) when each of us was designing our applications that we could be breaking these modules off into their own reusable libraries, but one could quickly see the benefits of such a collaboration. In fact, one of the next things I'd like to tackle is to break out some of these modules into libraries that we or anyone else out there could use in their media-based applications.

We as developers need to think less about writing monolithic applications. It should be more like putting a jigsaw puzzle together, where the pieces are things like reusable libraries and remote web services. Invariably, when you're putting a puzzle together, there are one or two pieces missing. Resist the urge to just shove the piece of gum you've been chewing for the past four hours into the hole. Sure it might fill the gap, but it probably looks quite poor in comparison to the rest of the puzzle. Also, it's no fun scraping old gum off a table. Yuck. Spend the extra effort, even if it doubles your development cycle, writing a small library. Chances are, someone else out there (perhaps even you a few months later) will find the library useful and will really appreciate the savings in their development cycle.

On a related note, I'd like to see a report on the amount of time people spend wrangling with native GUI, I/O, and networking interfaces when writing applications for a specific platform. Apple has spent many person-years developing iTunes in Objective-C and Cocoa (I'm guessing), and meanwhile Microsoft has spent similar number of person-years developing their Media Player using whatever, C++ and MFC I assume. In the end, both apps serve essentially the same purpose, but are only useful to the folks that own each respective operating system... I just performed a cursory experiment on freshmeat.net and found three dozen or so implementations of the game of chess. Written in Lisp, written in Perl, written in Java, written in C, this one uses GTK+, another uses Qt, and the list goes on. I guess the point I'm getting at is: how much time have we as an industry wasted over the years reinventing the wheel, writing redundant libraries and applications for every quirky platform under the sun (no pun intended)?

Let's instead focus our efforts on new applications that make people's lives better or easier in some way. Take something like Hydra, which Daniel Steinberg mentioned in a recent entry. This is an amazing piece of software that really changes the way you think about collaborative editing. And yet, only 4% of the computing world's population can leverage this innovation because it was designed specifically for Mac OS X. Don't get me wrong, I love my PowerBook, and this app's Aquafied interface is beautiful and usable. But we need to think about developing for people, not for your favorite UI toolkit or the programming language flavor of the week. [I'll spare you the Java evangelism, as I'm sure you could see where this point was heading...]

I believe it was Bill Joy (or someone similar in the League of Outspoken Smart People) who said something like "I'd rather have well-debugged binaries than open source code, any day". I like to think both concepts go skipping through the prairies hand in hand. Reusable binaries make constructing varied, complex applications a relatively simple process. Open source collaboration allows those binaries to be developed taking into account the feedback from other possible consumers of your technology. It shouldn't be an either-or scenario.

The things I've discussed here shouldn't be news to anyone, these are the fundamentals they teach you in Software Engineering 101. But sometimes it helps to remind ourselves that innovation is always within reach. Spend the extra cycles to design solid building blocks. If your structure should be dismantled someday, at least you or someone else could reuse the construction materials (okay, okay, I suck at analogies). Anyway, here's a simple test: if you find yourself writing an application and you're thinking about naming it "Yet Another So And So", you've failed, go innovate elsewhere. Otherwise, the community awaits your creation; why not host your project here on java.net for everyone to see?

[And what does any of this have to do with Java 2D, you might ask? Not a whole lot; I do have an interest in open source development, and it's just some stuff that's been weighing on my mind for a long time. But man, this was a rather bookish (i.e. not very fun) entry on my part. Maybe next time I'll give an update on what's happening these days in Java 2D Land.]

In my ears: "The Grand Hour", Guided By Voices
In my eyes: "Breakfast of Champions", Kurt Vonnegut



You Can't Do That With Java

Posted by campbell on June 24, 2003 at 04:23 PM | Permalink | Comments (9)

[We had some difficulty setting up my blog account; this entry was actually written early last week...]

This is my first-ever blog. Yep, I'm selling out to the blog gods, even though I once said I would never blog. I even gave up writing in my own journal a couple years back once I realized that each entry sounded exactly like the last - a basic recap of the days events and nothing further. So if my blogging devolves into a similar style, I'll give it up. But for now, I think these weblogs give us a chance to have more "face time" with the community. Many developers have complained that Sun isn't open enough, and I'd really like to dispell that myth by offering some news and thoughts from the inside. Making Java better is a community effort, and we're just one small part of that community. Hopefully you'll come to understand that the folks in the Java Client Group really (really really) care deeply about the concerns of all our customers, and we all really want to see Java succeed everywhere.

Anyway, on with the program. I feel obliged to do the standard JavaOne recap... Let's just say that it was 400 times better than last year's JavaOne. This year, the mood was brighter, the products were cooler, and everyone I talked to was incredibly stoked about Java again (must be the new logo). The sessions all seemed to go well, and we had a lot of good interaction with folks at our booth and at the client group BOFs. On top of all that, we finally launched the javadesktop.org community site, which gave me a release vehicle for the project I've been hacking on recently, known quite unaffectionately as "Mu".

Possibly the greatest news we've had in a while was last week's announcement of the Game Technologies Group at Sun. I've had various lunchtime conversations with members of the new team, and believe me, this is one sharp group. Their charter is to find the deficiencies in the Java platform that prevent developers from writing leading edge games entirely in Java, and then plug those holes. One thing that really makes me cringe is when someone says, "You can't do that with Java". Well, have you seen "Alien Flux"? Did you see the High Dynamic Range OpenGL demos presented by Ken Russell and Chris Klein at JavaOne? With the GTG's release of open source Java bindings for OpenGL, OpenAL, and input controllers, I think you'll be hearing that "you can't do that" statement a lot less. [Ahh, I'm overcome with memories of a certain Canadian children's televsion program.]

Another complaint we've received in the past is that we have many great media technologies (Java 2D, Java 3D, JMF, JavaSound, JAI, Swing, and so on), but they don't work all that well together. It's great to know that we now have this team dedicated to making all these components fit together into one coherent layer. If all goes well, developers should no longer worry about mixing heavyweight components with lightweights, playing back video in a 3D application, or using the flexibility of Swing to create an interactive heads-up display in a 3D game.

Well, this first blog entry was all over the map, eh? Next time I'll pick one topic and stick to it like maple syrup.

In my ears: "Electric Version", The New Pornographers
In my eyes: "Blindness", Jose Saramago





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds