Thursday, May 31, 2007


I must admit, the hype about Facebook's F8 platform has got to me. First, I started playing around with my very under-utilized profile on Facebook. I added some apps: Flickr and Twitter. These are "apps" on my blog as well, so they seemed natural enough. Then I added the most popular new Facebook app, iLike. I figured it would be similar to, which I had on my blog. I even went to the iLike site, signed up, and insalled their "sidebar" for iTunes.

What a disappointment! First, there is no connection between iLike and the iLike-Facebook-app. To add songs to the iLike-Facebook, you must do it manually. Ick.

Next problem, the iLike sidebar is very buggy. It seemed to keep my CPU utilization pegged. It didn't matter if I was listening to a song or nor, or if "hid" the bar. It's obnoxious anyways, taking up way too much real estate for an application that is a complement to another (iTunes.) When I realized that the songs I listened to on iTunes were not showing up on Facebook, it was obviously time to uninstall iLike.

Ok, so back to Facebook. I like the idea of their platform. It's much of a real platform than any of the widget/gadget/whatever platforms out there. They give you access to Facebook services, and give you UI tools for integrating your app's UI into Facebook.

What's interesting to me is to compare it to Ning. A Facebook app does not live on Facebook. It lives somewhere else. It can communicate with Facebook and its UI is shown inside Facebook. A Ning app lives on Ning. The Ning app must be written in PHP. The Facebook app can be written in any language. An app on Ning gets to take advantage of Ning's scalability. An app on Facebook can see huge traffic, but your server/hosting provider has to able to handle that. You had better find some quality, cheap server hosting.

Obviously I have some special interests in all this. At Ludi Labs, the Roost website had some similarities to Ning. It was a build your own site (we didn't add the social networking adjective) using all of these great services. Of course Ludi failed and Roost was never available to the masses. Thus I find myself rooting for Ning now. I think F8 poses a real problem for them...

Wednesday, May 30, 2007

Who I Met at Lunch 2.0

I met several interesting people at Lunch 2.0 today @ NetGear. Maybe the most notable was Jessica Mah. I sat across from her while I woofed down the free BBQ (which was only good because it was free.) I thought she looked familiar, and I then remembered reading an interview with her on Valleywag. In retrospect, the interview on Valleywag is a fairly good representation of what it's like to talk to her in person. The biggest difference would be that she curses a lot more in person. Jessica is a future billionaire, though, so I had better be nice.

She had another 17-year old friend who met her there that was more interesting. She was more concerned with figuring out what to major in, so I guess she's not heading up any companies.

The whole experience reminded me a lot of college. Way more men than women, and yet all I remember are the women.

Lunch 2.0

I'm going to a Lunch 2.0 event today @ NetGear. Terry has been trying to get me to go to one for a year, and now that they're famous, I figured it was time. Plus NetGear is serving BBQ.

Tuesday, May 29, 2007


Does anyone enjoy recruiting? Probably not. I've done a lot of recruiting in my career. I've read a lot of resumes, conducted phone screens, and of course interviewed countless candidates. After a while, you think you've seen everything. But every once in awhile, somebody comes along to prove to you that you haven't. I just had an experience like that.

The candidate started off harmlessly enough. Let's call the candidate in question Paul. Paul's resume came to me from a recruiter. His resume was kind of interesting. He had done a nice mix of Java and C++. His overall experience was ok, nothing too unusual. His education was also solid, if unspectacular. I see a lot of Java developers who don't know anything but Java, so the fact that he had done his share of C++ attracted me to him. I figured, what the heck, let's setup a phone screen.

The phone screen went ok. He clearly was unprepared for it and knew nothing about the company that was interested in him. That's a huge negative in my book. If somebody from a company is going to give you a call, you should at least do five minutes of research on the company and read their website. Now if the company doesn't have a site, ok, fine. Or if you read it and you can't comprehend it, that's fine too. But do your homework.

Paul wasn't the first candidate who had not done his homework, so I pressed on. I was immediately struck by his arrogance. He wanted me to sell him on my company before he would do anything else. Again this was unusual, but I usually give a "here's info on the company" diatribe at the end of an interview, so I just went ahead and did it at the beginning.

As things became more technical, Paul again did ok. His answers showed decent experience, though they were definitely lacking depth. I pushed for more detail on a few things, and again got mixed results. I moved on to a design question, and he actually did pretty good on that one.

So at this point, I had formed an opinion on Paul. He was a definite "maybe." I don't like to bring maybe's on-site. Bringing a candidate on-site meant a lot of people spending a lot of time to interview him and then discuss the results of the interviews. Luckily, I have an extra tool to use for maybes: a quiz. It's a simple quiz on programming fundamentals. It's often hard to drill down to fundamentals over the phone. This was the case with Paul, so the quiz was well suited for him.

The quiz is automated. I give the candidate an email address. They send an email to it whenever they feel like taking the quiz. It immediately sends the quiz back to them. They send their answers back. Everything is timed of course. That's key actually. The quiz is easy, but the speed that people are able to answer easy questions says a lot about them.

I told Paul about the quiz and asked him if he wanted to take it. He said ok, so I sent him the instructions for taking the quiz.

Last night as I was getting ready to go to bed, I received an email from Paul. In his email he said that he didn't have the time to take quizzes for every would-be suitor. He felt that his degree from an "acclaimed" (his words, certainly not mine) college should be enough to prove that he doesn't need to take a quiz. So if I wanted him to take the quiz, I would have to pay him $85.

I found this so funny that I almost didn't believe it was for real. I must admit, I have never heard of a job candidate who would demand money for being interviewed. What arrogance! What audacity! It's still almost too much to believe. And his reasoning? Because he went to an "acclaimed" college.

I know a thing or two about educational snobbery. I have been guilty of it myself because of where I went to college. I've never gone this far. For the record, Paul had a bachelor's degree from a public university. I won't say which one, but it's a huge school with over 50,000 students. There's a good reason why his education didn't jump out at me as anything special when I read his resume.

Anyways, I let Paul know that I would pass on his offer and wished him well in his job search.

Monday, May 28, 2007

Summer Reading

Moneyball has inspired me to do some summer reading. Actually it's also the lack of summer TV that has inspired me. So what to read? Next up at least is Running with Scissors by Augusten Burroughs. Any other suggestions?

Moneyball and Eric Chavez

I finished Moneyball and it was a great read. It included a "new" afterword about the reactions to Moneyball. That's interesting in its own right, but what's more interesting to me is Eric Chavez.

Chavez signed a huge contract at the end of the 2004 season. It guaranteed him $66 million over 6 years. Reading Moneyball with its constant reminders that the A's payroll is only $40 million, it's hard to imagine Billy Beane investing 27.5% of his resources on one player. Then again, Beane absolutely fawns over Chavez. He makes a lot of comparisons between Chavez and great players like Jason Giambi, Barry Bonds, and Alex Rodriguez. In 2004, Chavez was coming off his best season in terms of the stat that Beane and his brain trust valued most: on base percentage. So maybe it shouldn't have come as a surprise. You've got to figure that Chavez's agent read Moneyball as well...

Of course history has a way of making a fool out of us all, and in this case Eric Chavez is making a fool of Billy Beane. Chavez's OBP quickly dipped from 0.397 in 2004 to 0.329 in 2005. It rebounded last year a little, to 0.351. Chavez is off to a terrible start this year, with his OBP at 0.286.

Not only has his OBP fallen, but so has everything else. Apologists can certainly point to injuries, but he has been an unequivocal bust in the first 2.3 years of his huge contract. Just like with every other kind of mistake, there's a lesson here.

The lesson could be to never pay for "future" potential. That's what Beane did. He compared Chavez to other great players, clearly with the idea that he was paying for performance that would be great than what the 27 year old Chavez had produced at that point in his career. If he instead had concentrated on what Chavez had actually produced at that point, he would have seen a guy who was only slightly above average in most of the hitter-centric statistics that Beane had seem to used in so effectively evaluating baseball talent. Chavez's 2004 season was definitely "well above" average, but his other seasons were not.

Of course hindsight is 20/20, as the cliche says. Beane had to part with a lot of valuable talent: Jason Giambi, Miguel Tejada, Mark Mulder, and Tim Hudson. There were some good reasons to pick Eric Chavez as the one guy he wouldn't let go. It's certainly costing him now though. Beane traded away Mark Teahen because of the signing of Eric Chavez. Teahen has been a much better player than Eric Chavez last year and so far this year, and is only making $416,000.

Thursday, May 24, 2007

The Pain of Silverlight

I'm starting to write the Stocks application with Silverlight. I installed Visual Studio Orcas. That took forever. I installed the Silverlight extension to VS and the Silverlight 1.1 runtime. That was a lot to install! But that's the hard part, right? Microsoft development tools are great, right?

Uhh, no. Creating a Silverlight project was easy enough. I was surprised to see that VS did not provide any kind of visual designer for Silverlight. It was basically just an XML text editor for creating XAML. I was able to quickly throw together Hello World. I hit the Run/Debug button, and hit my first problem. VS had a problem passing the URL for my Hello World page to Firefox (the default browser on my system.) So I changed my default browser to IE, and tried again. Hey that worked.

I played around with the IntelliSense in the Silverlight/XAML editor. I only saw graphical options. No form elements. I needed a way for a user to input a Stock symbol for my Stock app! So what to do?

There is a visual designer for Silverlight, Expression Blend. So I downloaded that (yet another download) and cranked it up. I created Silverlight project in it. I looked for a text input box in the palette, but didn't see anything I consulted the Help. It indicated that there should be something in the palette for this:

Further exploring Help reinforced this:

The icon I see there sure looks like the Icon in the first screen, near the blue circled 4. But when I use Expression, I only get the TextBlock option. That's also the only option I got when I used IntelliSense in Visual Studio. I'm getting the impression that Silverlight does not currently support any kind of text input!

It appears that I am not alone in this frustration. Luckily that led me to some text controls that somebody else made...


I'm finally reading Moneyball. I wanted to read it JavaOne week on the train from San Jose to San Francisco, but at least I'm reading it now. One interesting thing about reading it now is you know how many of the players mentioned "turn out." I had to laugh when Billy Beane was so upset about his scouts drafting Jeremy Bonderman...

Flex Stocks Updated

I tweaked the Flex version of the Stocks app. I cleaned up the UI to make it just plain ol' white. I also integrated the HTML "host" page for the SWF file with the WAR and the source. So here it all is:


I'm thinking of refactoring the original GWT app to use the exact same code as the code used here. More on that later.

Tuesday, May 22, 2007

Flex Stocks

As planned, I re-implemented the Stocks application from the first GWT tutorial using Adobe Flex. Here is a link to a short document I put together outlining the code and the interesting parts. It also has links for downloading the code I wrote.

It was really pretty easy to do this. Of course this was a pretty simple application. I might try to re-implement the advanced version of the Stocks application from part of the GWT tutorial. First, I'll do the easy one in Silverlight.

GWT Tutorial Part 2

The second part of the GWT tutorial I wrote for IBM is now online @developerWorks. The second part adds some more server-side logic for persisting data (in this case a stock portfolio) to a database. Of course it makes judicious use of GWT to accomplish this auto-magically.

Sunday, May 20, 2007

Neon Bible Revisited

I made my first listen to Arcade Fire's Neon Bible a couple of weeks ago on the train going to JavaOne. I thought it was good, but not as good as the hype machine indicated. Since then I've listened to it many more times. I've listened to it in the car, while running, and while coding. It turns out it really is as good as the hype.

I think one of the reasons that I was initially unimpressed was the beginning of the album. The first song, "Black Mirror" is good, but it's bassline and beat really reminded me of "Rebellion (Lies)" from Funeral. That was the song that got me into Arcade Fire originally, so when the first song on their new album sounds a lot like their most well known song from the past album ... Not good. But the song is actually pretty good otherwise.

The album is good throughout, but really hits its stride at the end. "The Well And The Lighthouse" through "No Cars Go" is just an awesome stretch of songs. It reminded me of the beginning of Radiohead's OK Computer, and that's high praise.

My favorite lyrics of the album come from "Windowsill" (part of the above mentioned stretch of ridiculously good songs.)

Don't wanna fight in a holy war
Don't want the salesmen knocking at my door
I don't wanna live in America no more

Nevermind that these guys are Canadian...

So yeah, this is a must have album. Best of the year? Maybe. Best of the decade? Probably not, but probably in the top ten.

Friday, May 18, 2007

Paying the Mac Tax

One thing I used to really like about my old iBook G3 was the AV cable. This was a special cable from Apple that plugged into the headphones jack but provided RCA audio outputs and a composited video output. So with one cable, I could easily hook my iBook up to a television. This came in handy so many times. The cable was only $20 or so to boot.

My MacBook, like most (all?) new Macs, has FrontRow and a remote control. However, the AV cable does not work with the MacBook! I asked a guy at the Apple Store about it, and he said that many people buy the AV cable and then return it because it won't work with the Front Row Macs. GRR!

Ok, so what do I need to hook my MacBook up to my TV? Well, first I will need a mini-dvi to video adapter. Cost: $19. I'll still need a separate composite or S-video cable. Cost: $20. For audio, I'll need a Y-adapter. Cost: $12. Total cost is $51!

What's silly is that Apple doesn't make those last two cables, so they are not getting any more money than they would got for charging me $19 for the magical AV cable. Maybe they're just trying to push Apple TV. I guess there must have been some technical reason to drop support for the AV cable. The MacBook supports DVI, whereas the old iBook did not. So there.

Now if only the Apple store would have carried the mini-DVI to video adapter...

Wednesday, May 16, 2007

Flock Update

I installed the latest developer build of Flock on my MacBook. The latest changes are really nice. Setting up your services (, flickr, Blogger, etc.) is really easy. You just visit those pages and Flock asks if you want it to remember your info so you can use its tools. The UI changes are also pretty nice. The new My World thing is interesting, though I haven't really tried it out yet. The Blogger is integration is also supposed to be improved, with support for Blogger's labels. I'm trying that out by using Flock to write this post.


One interesting thing from JavaOne was that I wound up with an invite to the Joost beta. I installed it on my MacBook last night and checked it out. The UI is very cool. I'm even more impressed to know they are using XUL for it.

I watched a couple of clips: a Comedy Central show, a Fort Minor video (from Warner Brothers), and a Sports Illustrated swimsuit model profile. The video quality is pretty good. Definitely a couple of steps above YouTube. It still came up lacking, especially with the swimsuit model! It was tolerable for the other two shows.

The responsiveness was very good for me, but I do have a very fast connection (8 mbps) at home. Everything seemed really smooth and impressive. Obviously there's not a lot of content on there. I showed it to my wife this morning, and she was less than impressed. I think if the MTV channel would have had Pimp My Ride on it, then she might have been a little impressed.

Tuesday, May 15, 2007

MacBooks Updated

I buy a MacBook, so of course the very next week MacBooks get updated. Oh well. The black one like I bought only got bumped from 2.0 GHz to 2.16 GHz and from 120 GB HD to 160 GB HD. Not too big a deal. If they had added an ATI video card I would have been really annoyed!

Monday, May 14, 2007

Silverlight and Flex in the Browser

The web browser is one of the great equalizers of the world. It's why Microsoft feared Netscape. If something runs in the browser, it doesn't matter where it came from. HTML, JavaScript, CSS are agnostic of the technology used to generate them. Don't get me wrong, browsers have their "quirks" and certain technologies make use of these quirks more readily than others, but these things aren't coupled. I can create an XHTML compliant application using ASP.NET and C# just as easily as I can create an app that uses lots of IE-only HTML and JavaScript using PHP.

There is an exception to this uniformity and that comes from browser extensions/plug-ins. These are capable of doing more proprietary communication with back-end servers. In a world where a new rich internet application framework is being introduced by some multi-billion dollar software company each month, one could easily imagine a tight coupling between such frameworks and the server technologies that feed them.

Of course the mother of these new frameworks is Flex, Adobe's application platform built on top of Flash. One of the common companions to Flex is Flex Data Services. This is actually an Enterprise Java application for accessing enterprise resources (like databases) and serving up data to Flex clients. One would guess that you could do the same thing on your own, and not just in Java. Your Flex client makes gets/posts to a URL and parses the response for a data model. You could even use SOAP for all this, if you were a masochist.

The design behind Silverlight seems very similar. The quick start tutorials from Microsoft show a Silverlight client connecting to a web service. Thus it should not be too hard to build a Silverlight application that talks to a Java or PHP server. On a side note, I had one interesting realization from reading through some of the Silverlight tutorials. They make a big deal distinguishing between client-side Silverlight code written in managed CLR (i.e. C# or VB.NET) as opposed to code written in a scripting language such as JavaScript or Iron Python. My understanding of the CLR was that everything was compiled into Intermediate Language (IL.) It sounds like if you use C# for your Silverlight project, then this is the case, but not if you use Python. This seems ... odd. One approach I thought they might try was to compile everything into JavaScript and let IE's runtime handle it ... but then I remembered that they are providing Silverlight for Firefox and Safari.

So my plan now is to take the Stocks application I wrote for the GWT tutorial (part is out next week, by the way) and create a Flex and Silverlight version of the same thing. I might cheat and re-use the servlet that GWT creates, or I might create a REST servlet. Too bad there are JSR 311 implementations yet.

Oh yeah, and then there's JavaFX. There is a fair amount of JavaFX documentation and examples. However, I'm not really sure if JFX will use a similar mechanism as Flex and Silverlight. It seems like it has to. The example I've seen usually create all the JFX on the server and then ship it to the client for rendering. That approach seems kind of primitive and something that would be difficult for an interactive application (like the the stock application.) Maybe by the time I'm done with the Flex and Silverlight versions of things, it will be more obvious how to do the same thing with JFX.

Interceptors vs. AOP

One of the subtle but interesting things that Gavin King said last week at the Web Beans session at JavaOne was how AOP is overkill for most things. He said that Web Beans will support a rich interceptor model (take a look at Hibernate's for an example,) but no built-in AOP. He described AOP as a massive programming solution that is often inappropriately used to solve simple problems. That got me thinking.

We used AOP a lot at Ludi Labs. We were using Spring AOP. I started thinking, could we have use an interceptor pattern as a replacement for AOP? First off, the only reason I would even go down this line of thinking was because AOP presented some problems for us at Ludi. There were the annoying-but-trivial problems such as bloated logs and obfuscated stack traces. There were much more significant problems around performance.

Let's take a concrete example. Any time we store data, there was some "boilerplate" metadata we would store as well. For new data, this would be things like creation time and created by. For updates to existing data, it would be things like update time and updated by. Everyone stores this stuff, and often do it via database table definitions or even database triggers. We weren't storing our data in a traditional database, so we couldn't rely on those common solutions to this problem. Enter AOP.

We created advice for adding this metadata. We were storing user information in a thread local that could be accessed via an injectable stateless service. So it was easy to write advice that could figure out the created or updated info, and it was easy to write a pointcut to specify when to apply this advice.

Obviously this could have been done with an interceptor. But wait, there's more. Once we had this advice in place, there was more boilerplate stuff we wanted to keep track of. For any object we had some common metadata that could be applied to it. This included related objects (for example we could have a jpeg that was the cover art for an mp3,) user comments, and typical web 2.0 tags. We maintained all this together in an atomic object, but that could imply a lot of baggage to pass around.

So we added advice to disconnect this metadata when an object was read. We then re-used the previous advice to re-attach the metadata when the object was being written.

Again, this would have been easy to accomplish with an interceptor as well. There's one more wrinkle. The above metadata could be altered, and everything still worked. For example, an extra comment could be added by one person while somebody else was changing the description of a photo. This just wound up being more advice to write, no big deal.

So is this easy with an interceptor as well? I think this one could be a little trickier. Before we had a clear event in our component lifecycle: updating object data (say the title of a photo.) Now we're updating its data still (adding a comment) but it's data we want to manage separately even though it's persisted in the same data structure. If we are using the same component model, we probably need some kind of bifurcation of logic since these will be the same events. I guess the more OO way to do thing would be to model the events in the component model explicitly, i.e. something like saveData() and saveMetadata() not just save(). Or you could move your interceptor up the stack to distinguish when between these events. That's what would correspond more to the AOP way: define your point cut higher up.

The nice thing with AOP is that you don't have to change any component code to handle this refinement. It's that extra flexibility from having "a huge software solution." If you're able to plan out your needs ahead of time, then interceptors are fine.

This brings up the other bad part of interceptors. Take a look at the Interceptor interface in Hibernate. It has 15 methods. Of course there's the concrete class EmptyInterceptor which provides empty implementations of all 15, so you can extend it and only implement what you need. That's still ugly. You can imagine introducing interceptors on your own components, and then constantly having to expand the interceptor interface and any corresponding helper classes for it.

Saturday, May 12, 2007


I ran my first 10K, the 2007 Human Race of Silicon Valley. My goal was to get under an hour. I thought I had a chance at under 55 minutes, because I had ran a 57 minute 10 K in training a couple of weeks ago. I was thrilled that my official time was 54:16. Here's a picture of me just before the finish line.

My next goal is to run a half-marathon, and I'm aiming for the San Francisco Marathon on July 29.


I bought a MacBook yesterday. No, I didn't get it from the mysterious shop owner in Bern :-) I got a black one, and it is way cool. I wasn't sure if I'd like the glossy screen, but it is really nice. It's sooo bright! I was using a MacBook Pro back at Ludi Labs, and the screen on the MacBook is definitely superior. I'm typing this on it right now. I spent much of last night installing Java 6 (still only a "developer preview" version,) Eclipse, and XCode last night. I ran Software Update and saw what looked like half-a-gig of updates to install. I deferred them for now. Ah the joys of a new machine.

Geronimo Plugin Tutorial

I posted yesterday that the GWT tutorial I wrote is now on the developerWorks. I didn't even realize it, but another tutorial I wrote was published last week as well. I wrote a tutorial on Geronimo plugins for IBM. It was actually a really fun tutorial to write. I think Geronimo's plugin architecture has a lot of exciting possibilities. In some ways it's a natural progression in terms of modularity. I always think of JBoss as folks who really recognized the possibilities opened up by making JBoss so modular via it's JMX based architecture. Geronimo's GBean architecture is a natural improvement, and it's what makes the plugin architecture possible. So check out the tutorial to see how easy and open the architecture is.

Friday, May 11, 2007

GWT Tutorial on IBM

Part 1 of the tutorial I wrote on GWT is now up on developerWorks.

JavaFX Tools

As I mentioned earlier, I gave the JavaFX plugin for Eclipse a try. I was not too impressed. So I went through the monstorous download of NetBeans 6.0 and installed the JFX plugin for it. I'm still not too impressed!

Again this was basically just a text editor with the JFX runtime automatically launched. No palette or even much code completion. There was a little syntax highlighting, but that was about it.
Ok, so I know this stuff is really new, and I shouldn't be too critical of it. However, I read this exerpt from an interview with Sun CEO Jonathan Schwarts from OnJava:

In response to a question about JavaFX and JavaFX Tools. Whether Sun was planning on charging for FX tools.

Schwartz: “The world is divided into two camps, those who can and will pay for technology because its expense is less than the inconvenience of not having a support contract and those who cannot and will not pay for software for whatever reason, economically, culturally or the business just doesn’t need it. Our economic motives are to go after the former camp, our technology objectives are to go after the latter camp. Because almost by definition given what Dr. Diallo(sp?) just said, they out number the former camp 50,000 to 1. So volume defines market opportunities for everybody, you need only look at the internet to have that proven to you. It’s up to us to figure out how to monetize those volume opportunities in and among the communities that are capable and interested in doing so.”

Hmm. So now I'm thinking that designer like tools for JFX will be coming, but they won't be plugins to Eclipse and NetBeans. The big advantage I thought JFX might have over Flex and Silverlight was its free-ness and open source-ness. Not only would that make it attractive to adopt but would also open up third party enhancements. What's a Java technology without at least a dozen different frameworks built for it?

Now I'm thinking that this won't be the case. Sun will try to monetize JFX in the exact same way that Adobe and Microsoft monetize Flex and Silverlight. There's nothing wrong with this, it just means that JFX won't have one potential advantage over those technologies. That doesn't mean it won't have other advantages, as mentioned in previous posts. Its architecture may make it much more suitable for designer-developer workflows and rapid development.

I still think Sun is missing a huge opportunity. They could be the disruptive technology in all this, but it sounds like they won't go that route. So much for "Open Possibilities."

Happy Birthday to Me

Wednesday was my birthday. I actually celebrated my birthday last week, while my sister Jeana was in town. Check out the amazing cake that Crystal made...


How can a die-hard Star Wars fan like me not love that? Dig through my photostream a little and you'll see some pictures Jeana took of Crystal assembling her masterpiece.
At this point I'm completely convinced that I will one day be able to retire and live off Crystal's booming cake decorating business...

Thursday, May 10, 2007

JavaFX Presentation at JavaOne

The transformation of F3 into JavaFX continues. I had signed up for the Form Follows Function (F3) session, but F3 was renamed JavaFX yesterday and now even the session title has been renamed: JavaFX Script. Chris Oliver is getting ready to make his presentation. The program on the projector says "JavaFX PDF Reader." So maybe he is going to use a JavaFX app to show the slides for the presentation. One can imagine a PowerPoint -> PDF -> JavaFX workflow here. If this is the case, it's a nice touch since it's a classic "eating your own dog food" tactic. Let's see…

The JFX (as Chris Oliver started calling it) presentation was very cool. Chris talked about his motivation for JFX. The first was that developers tended to be the limiting reagent in UI development, i.e. they took much more time than designers did. Web UIs were often used for prototyping for this very reason. Java/Swing UIs are often stereotyped as being very ugly, quite unlike Flash based apps. The last (and maybe most important) factor was that event listeners became a huge mess in UI code.

To tackle the first set of problems, JFX leverages Java 2D instead of Swing. The constructs used by designers have analogies in Java 2D, not in Swing. JFX brings a lot of the techniques of Swing to Java 2D. It uses a declarative syntax for this and allows for composition a la Swing, but Java 2D powers the building block components of JFX. This is very cool. The idea here is that anything you can do with Flash (and Silverlight!) can be done with Java 2D, and now can be easily done with JFX.

The next, and maybe more crucial aspect, was the elimination of event listeners in JFX. JFX uses a bidirectional update system that makes everything seamless to the developer. If the server updates a component it is re-rendered automagically. If a user invokes an action, the server side state is synchronized effortlessly. This was pretty impressive. As somebody who has designed a UI language (at Ludi Labs) I was especially impressed. We tackled the same problem there by auto-generating the event listeners essentially. I'm curious if this is what JFX is doing. Chris mentioned his inspiration came from functional programming, so maybe he came up with a more elegant approach.

Finally, among the demos was indeed the PDF reader I mentioned at the beginning of the post. Indeed all the slides were being displayed using the JFX PDF viewer. It was a very slick PDF viewer, with nice animations, zoom, page previews, etc. Chris got a great reaction when "revealed" that his PDF reader was a JFX application.

So what do I conclude from all this? Glad you asked. JFX has a design that really sets it apart from anything out there. There's a lot more going on here than just a Flex clone. That definitely is part of it, as Chris was quick to admit. Flex looks nice. Nice looking apps is only part of the equation. Improving UI development is a bigger puzzle to solve. JFX looks like it can deliver. It just needs the tooling for the designers to go along with it. More on that later.

One final observation. It really seemed like Chris Oliver was as surprised as anyone that F3 became JavaFX and thus the "big announcement" of JavaOne. Sun seems to be pushing JFX using the mobility angle (including all this nonsense about Blue-Ray devices.) There was no mention of that by Chris.

Java Pavilion

I had lunch with my old college buddy and PHP guru Terry Chay. After lunch, we went to the JavaOne Pavillion. We checked out a few of the booths. One of the notable ones was Backbase. We checked out their widget system. One of their slick AJAX features is history/back button support. Terry quickly figured out how they were dealing with browser history and asked the booth rep. The rep didn't know how they were doing it, but a little investigation proved that Terry was right on. I found it amusing that he was teaching the Backbase rep how Backbase worked. Isn't it supposed to be the other way around?

Later, while I was at the JavaFX session, Terry checked out Krugle's booth. They were peddling enterprise code search appliances. My immediate thought was that in Java, Eclipse does a pretty good job of that. The strong typing of Java makes it ideal for search. The one thing that Krugle's appliance seemed to have going for it was that it integrated with your source control system and thus could turn up search results on "old" versions of code that were maybe gone now. I could see a new developer reading through an existing code base, looking at a class and saying "Fools! Why didn't they just use a priority queue to implement this thing." Maybe he could then do a search for a priority queue and find an old version that had done exactly.

Wednesday, May 09, 2007

JavaOne Day Three

I'll keep this pretty short for now, since the Wi-Fi is definitely not holding up as well today as it did earlier in the week!

I went to two sessions this morning. The first was on Web Beans. Gavin King did a great job explaining the ideas and the possibilities created by Web Beans. Bob Lee added some bits on some of the things in Guice that will make it into Web Beans. You can tell things are at an early stage, and it's hard to know if Web Beans will just be a superset of Seam and Guice. From my perspective, Seam is more powerful, but Guice is more elegant. Two interesting questions in the Q&A. First, somebody asked about involvement by the Spring guys on Web Beans. Bob Lee says they have been invited to the expert group, but so far no interest. There's a lot you can imply about that, enough for another post some other time. Next, somebody asked about the compatibility between Web Beans and the component model for the Service Component Architecture JSR. Gavin King balked at this, as seemed to think the whole notion of Service Component was a contradiction of terms. He said he couldn't say much more without being extremely negative.

Next session was Effective Java Reloaded by the venerable Joshua Bloch. First surprising thing was that Bloch is the "Chief Java Architect" at Google. And I thought they didn't have titles at Google and everybody was a software engineer! His talk was great. He had some really cool things with generics in particular. He talked about the SuperType Tokens that I had fist read about in Bob Lee's blog last year. It was a very useful talk. The only disappointing part is that he told us that book by the same title (the sequel to his successful Effective Java) won't be ready until the end of the year. I don't buy too many Java books anymore, but that's definitely one I will buy.

Tuesday, May 08, 2007


I guess the big news out of JavaOne today is JavaFX. The more I heard about it, the more it sounded familiar. Sure there's the obvious comparisons to Flex and SilverLight (more on that soon) but there was something even more familiar about it. Then I realized it: F3! I had read about F3 just last week (you can see it on my links) and had given it a try. So it turns I've already been running JavaFX.. Here's a picture of the F3 Calculator running on my laptop:

One of the most interesting things is the white space on my desktop. The F3 Calculator is part of it actually (or vice versa really.) There's probably some bugs to be worked on here! Also notice the little F3 icon in my system tray. You have to use that to close the calculator. The whole thing launches using Java Web Start, which is a good thing.

So yeah, JavaFX has a lot in common with Flex and SilverLight. Even in name. Microsoft had WinFX which became Windows Presentation Foundation which became Windows Presentation Foundation / Everywhere which became SilverLight. I'll say some of the same things about JavaFX as I said about SilverLight. If they could actually achieve "my dream" of writing a UI once and having it render nicely as a web app, a desktop app, and (most importantly) a mobile app, then it will be a huge success. I don't think anyone is close to that, yet.

JavaFX could actually have a lot more legs to it than SilverLight. It will be completely open, unlike either of its competitors. That should give it a huge advantage. That open nature should also mean a lot of creative integrations with the huge open source Java ecosystem. That's how JavaFX could win over developers. The key will be for Sun et. al. to deliver adequate tooling for it, as it is a UI language. Adobe already provides good tooling and Microsoft is sure to do the same. Sun's doesn't have to be as good as the Flex/SilverLight tooling, but it needs to be close. If it's not as good, you can expect to see other folks in the Java community step in.

Speaking of tooling, Cedric has a good rant against JavaFX. He smelled Sun trying to get people to use NetBeans, but as you'll see in the comments, there is an Eclipse plugin. Maybe the Jigloo guys can work with it, too. The better point that he makes is that Groovy SwingBuilder does a lot of the things that JavaFX promises to do. Maybe Sun should have leveraged that. I haven't tried JavaFX out yet, so I can't say if it has any syntactical advantages over Groovy. I must agree with another commenter that Sun doesn't seem too fond of Groovy. They seem much more interested in embracing Ruby via JRuby.

Update: I tried out the JavaFX plugin for Eclipse last night. It is quite bare-bones. It basically just lets you run a .fx file from Eclipse. No visual editing. It didn't even seem like there was any extra syntax help. I will try out the NetBeans one, but it sure looks like Cedric was right on about Sun once again trying to push NetBeans on people.

Arcade Fire

I've been taking Caltrain to San Francisco this week for JavaOne. I picked up the new Arcade Fire CD, Neon Bible this weekend and listened to it on the train. If you look at its reviews on MetaCritic, it has had a lot of praise heaped upon it. I never form an opinion on a CD on the first listen. If I would have done that, then I would have hated Achtung Baby. My first impression of Neon Bible was that it was good, but nothing really jumped out. Again, a second listen is at least warranted.

The most pleasing thing about listening to it on the Caltrain was I got to really appreciate my Bose noise-canceling headphones. I know these are made to work well on airplanes, so I guess it should come as no surprise that they completely wipe out noise on a train. They had worked pretty well for me at my noisy office at Ludi Labs, but the train was definitely their element.

More JavaOne Thoughts

Day One of JavaOne, Java University, is over. I have a few final thoughts. First, I really enjoyed the course I took "Using Java EE 5 and SOA to Architect and Design Robust Enterprise Applications". The instructor, Joe Boulenouar, was very good. You can tell he really enjoys what he does and is very knowledgeable. The class didn't seem as sexy as some of the other ones being offered on things like the Java Persistence API or jMaki, but it was packed with information. Joe did a good job of explaining what are some of the tough things that architects have to think about when designing a system, and then going through a collection of design patterns where each tied back into the architect's checklist. Of course he then also mentioned how various JavaEE 5 technologies can be used to implement these design patterns. If you get a chance to hear Joe speak on something, I highly recommend it.

My only complaint about JavaOne is the lack of AC power outlets. There were a few outlets near the bathrooms or in random places in the halls. It is silly to see developers huddled around these places so they can charge up their laptops. There were a lot of great lounge areas, so how hard would it have been to put some power strips out there? Are they worried about too many people plugging and eating up electricity? Is there a safety issue? Alternatively they could expose power outlets in the lecture rooms so people can plugin and charge while listening to a speaker.

Monday, May 07, 2007

Java University

I'm at JavaOne today for Java University. Sun has done a great job with the Moscone Center. I'm sitting in the Hackers Den (or something to that effect) on a comfy leather couch in front of several plasma TVs hooked up to XBox 360s. There's also some nice Solaris workstations for use with your JavaOne pass (it reads the SmartCard on the pass.) Very cool. I had heard the Wi-Fi had been bad in the past, but it has been pretty good so far from me. Of course there's a lot less people at Java University than the general JavaOne madness that starts tomorrow. Maybe the network will get maxed out then.

The Java University course I am taking is on architecting Java applications. Most people have a hard time saying what's the difference between architecture and design. This course does a good job putting it in perspective. It makes me wonder about the existence of Agile Architects. In many ways the kind of forward-looking thinking needed by successful architects is at odds with some agile principles. Or then again, maybe successful architects are an urban myth.

I skipped out on the free lunch and had lunch with a good friend of mine. We went to Osha Thai for lunch and it was really good. I highly recommend that to any JavaOne attendees or anybody in downtown San Francisco for that matter. Just go early, it is very crowded (it's San Francisco.)

Sunday, May 06, 2007

JavaOne This Week

Tomorrow I will be at JavaOne. Tuesday is the official start of JavaOne, but tomorrow is Java University. I'm going to it and to JavaOne on Wednesday. It should be a lot of fun.
I'm taking Caltrain to San Francisco. Actually I'm taking the VTA Light Rail and then taking Caltrain. The VTA is within walking distance of my house. Still, it's going to be between 75-90 minutes each way, depending on if I take a baby bullet.
I went to Borders today with the intent of buying a book to read on the train this week. Actually I had a book in mind: Moneyball. Then I remembered why I always buy books online. It is such a pain to find a book at a bookstore. I searched all through the "Baseball" section at Borders and had no luck. I searched the general sports section for good measure, but no luck. I probably should have used one of the lookup computers, but at that point I was annoyed and just left. Maybe I'll buy the book on iTunes.
I thought about using my laptop on the train, but that will drain a lot of my battery power, and I don't know how likely I am to find AC juice at JavaOne. Oh well, I guess I can just listen to Year Zero and Neon Bible.

Thursday, May 03, 2007

Guice, Spring, and Arid

I was reading this article on Arid POJOs on TSS today. Chris Richardson, the author of Arid, has a nice introduction to it. One thing I found amusing was the statement at the beginning important benefit of using XML is that it completely decouples the components that are being assembled from the mechanism that is assembling them This is not true when using annotation-based dependency injection such as that provided by the Guice framework. Components that use those kinds of annotations are tightly coupled to the framework and are definitely not POJOs!
I've been known to make my own digs on Google frameworks, but sometimes you have to call out FUD when you see it. The POJO argument usually comes from the requirements of writing EJBs prior to EJB3. You had a lot of interfaces to implement, and some of these interfaces required a lot of methods (typically lifecycle callback methods) to implement. To be an EJB you had to look like an EJB to the container, hence all those interfaces and methods to implement. The term POJO came about because POJOs don't look like EJBs.

So it is ridiculous to somehow say that a class that uses a (or javax.ejb for that matter) Annotation is not a POJO. Can a POJO not have any Annotations? Can a POJO not reference third party packages? Better remove all your Jakarta commons import statements...

As for tightly coupling to a framework, I will concede that it is nice to be able to switch out your DI provider without having to change code. I guess that is one drawback of using Guice. The Guice solution of writing a Module class for doing all the wiring and thus isolate the dependency doesn't seem realistic. You could do the same thing in Spring: programmatically create your configuration and thus wire together your classes. Nobody does that though, they all use XML files or maybe auto-wiring.

So maybe Chris Richardson has a valid point here. Bob Lee and the Guice gang at Google make some strong arguments for switching to Guice from Spring. You have to change code to make that switch, and you'd have to change code again to switch back.

I think in many cases, it is worth the "pollution" of your code. The thing I like about EJB3 and Guice annotations is the explicit dependencies. I have to worry about not only writing code, but also about writing code that other developers can understand. I have to worry about the learning curve I create for new developers I hire. There is a lot of clarity in something like:

public interface MyClass { ... }

There is also a lot of clarity in seeing a unit test that creates a module to override the bindings to allow for mock versions of certain classes.

At Ludi Labs, we used Spring in just about every way it can be used. Sometimes we got a little carried away and patted ourselves on the back about how clever we were. Then we would bring on a new developer and they would struggle to figure what the heck was going on with our application. We would have to patiently walk them through some things until things started to click. I have a feeling that Guice would have made this less painful for new developers, though there were definitely things we did with Spring (especially using its AOP support in conjunction with DI) that I'm not sure you could do with Guice.

Wednesday, May 02, 2007


Microsoft's announcement of Silverlight seems to have really caught a lot of attention. I'm having a hard time understanding this. What did they really announce that we didn't already know?
  • Free storage for streaming video using Silverlight: That's nice I guess. In typical Microsoft fashion, they are subsidizing the switch from an existing technology (Flash) to their own version of the same thing. Don't get me wrong, there's nothing wrong with that.
  • .NET CLR included with Silverlight: This is the big news, I guess. Well not really. Using the CLR as a runtime for rich content over the web is not new. It was always one of the ideas behind .NET. It's a replacement for ActiveX, which even Microsoft seems to hate now (well at least IE7 complains and warns a lot about it.) MS obviously had to include some kind of runtime with Silverlight. Adobe has its supercharged version of JavaScript, ActionScript (Microsoft has this too, it's called JScript.) The CLR that will be included will be a subset of the "full" CLR. So it just means that Silverlight devs can use a stripped down version of C# that will (just guessing here) will perform JavaScript like duties. That's nice. I guess. I'm going to conjecture that for most things you will do in Silverlight, it will be a lot easier to use a dynamic language like JScript (or Python or Ruby, as .NET versions of those were mentioned) instead of C#. Adobe experimented with making ActionScript more Java-like with ActionScript 2.0, and re-thought the decision with ActionScript 3.0.
  • Silverlight CLR open sourced and ported to Firefox and Macs: Oh wait, this is the big news. Actually I guess it is, but not for the reasons most people think. This is Microsoft's white flag. They are admitting that a lot of people use Firefox now and there's even a reasonable number of people using Macs. So for them to compete with Flash, they need to support Firefox and Safari.
  • Silverlight CLR on Windows Mobile: This is actually the most interesting thing to me, though I am somewhat skeptical. The idea of being able to write an application that works on the web, on the desktop, and on a mobile device is very appealing to me. Heck, I basically spent a year of my life writing a language to do exactly that at Ludi Labs (RIP.) I went to one of those grandiose Microsoft launch parties earlier this year just to see what progress they had made on this front with Windows Presentation Foundation err I mean .NET 3.0 err I mean Silverlight. The stuff I saw from Mix only seemed to indicate things like video streaming (more on that soon) than real application development. That's why I'm still skeptical. I've written Windows Mobile apps and it is definitely a differentiated development experience vs. writing a Windows application. Sure a lot of things are similar and you can use some of the same languages (or a subset, does this sound familiar?)
Now part of why I'm not so impressed with Silverlight is that I mostly care about application development. It seems to me that Silverlight will basically enable developers to build Flex-like applications. I see its support for CLR languages as a minor advantage. It will be interesting to see if they give away a Visual Studio Express edition for doing Silverlight development. That would be an advantage over Flex. Otherwise, I see this playing out similar to how the introductoin of C# and .NET played out. Microsoft shops may switch to it, but it's hard to imagine Flex developers switching to it.

There's big wrinkles I've left out. The biggest is streaming video. It may very well be that Silverlight provides superior streaming video capability. If that is the case, then a Silverlight based YouTube would seem to have potential. It would be a real boon to pirated video, like HD episodes of TV shows. That would be huge. If works great on phones, even better.

The last piece of the puzzle is the desktop. Is Microsoft going to push Silverlight as a desktop application development? I did not get this impression. It seems possible, but why would they do this? Adobe is certainly going this route with Apollo, but Adobe doesn't have any presence on the desktop. Microsoft already owns it. So it seems like Silverlight would only be used as a counter, if needed. I'm not really sure it will be needed though.