Archive for June 2007
My first official self-commit to an open source project.
I’ve just checked in my GWTJSF patches to the Ajax4JSF trunk. You can now get the GWT 1.4-compliant GWTJSF project by following these directions.
No word yet from the Exadel guys; I’m 99% sure I didn’t break anything but they’ll tell me if I did, they’re not shy :-) I do hope they will update their labs.jboss.org documentation to mention this project again, now that it actually builds in their tree. We’ll see.
I included a reference to the googlecode repository in the gwtjsf pom.xml, so it should have no problems pulling GWT 1.4.10 (which it needs).
The old GWTJSF examples (which are not on labs.jboss.org anyway yet) no longer work, mainly because the Maven build (as my last post discussed) splits the sources into a separate jar, so the old build files break. I’ll likely land at least one of my modified samples in the Ajax4JSF tree in the next couple of days, so people will have a reference point.
After that I’ll get back to finalizing my Seam/GWT example and submitting that to the Seam project. Hopefully in another week, or two at the most, I’ll have this whole thing wrapped up and then I can get back to the Gears/GWT offline Blogger editor project!
Nothing like using something for yourself to clue you in to the buzz around it.
The buzz around Maven 2 is pretty negative. And now I’m seeing why. As my last post mentioned, I’m working on fixing the Maven build in the GWTJSF source tree. (Right now that source doesn’t build at all.)
I got the basic Maven compile working. Spent tonight on trying to get the tests working. Finally gave up when it turned out there were two critical problems:
- The GWTShell doesn’t like the Maven classloading pattern. Charlie Collins has a patch for this but it didn’t make it into GWT 1.4.
- Running GWTShell requires access to the OS-specific GWT native libraries. The current means for doing that is with system dependencies in Maven, e.g. download the appropriate GWT version and point your Maven POM at it. This is totally contrary to the entire point of Maven, which is supposed to download everything for you. Will Pugh is working on GWT-Maven support for downloading the whole native GWT archive and expanding it locally, but it’s not done yet.
So, fine, I gave up on getting the tests to run. Now I just want to verify that I actually have a working .jar file.
Turns out that I don’t, because the GWT compiler needs not just the .class files but also the .java files to be in the gwtjsf.jar file. The original Ant build for the GWTJSF project had no problem doing this, it was totally obvious and trivial how to do it. So, it should be trivial in Maven 2, right?
I found the plugin documentation page for Maven 2. This led to the documentation page for the jar plugin. Hmm, pretty sparse. How about the usage examples? Nope, nothing there about what the actual configuration options are, just some examples of signing (which isn’t at all what I want to do). But look! At the top, it says this:
If you want to use advanced configurations you should have a look at the Javadocs for MavenArchiveConfiguration.
Oh joy! But wait. If you click on that link, what do you get? You get a page titled “Maven – Page Not Found”, which amusingly enough includes a tag saying “Built by Maven”.
That’s what I call bad – when your own javadocs for your automated build tool have automatically generated broken links!
It turns out that I missed a plugin that was actually already in the POM for the project, namely the maven-source-plugin. This generates a separate JAR file containing the sources for the project. That’s not what I want — I want the JAR file to contain both the sources and the classes — but it seems to be the best I can get Maven to give me.
Overall, it really seems that Maven has an incredibly fragmented configuration model, plugins with very, very specific functionality that is hard to override, and documentation that is scattered and broken. Sigh. Oh well, once I land this I’ll do my best to be done with it. Here’s hoping the Maven team can fix some of this.
Edit: I will say that I like what Maven is trying to do. This POM Reference makes a lot of sense… having a higher-level description of your project is not a bad concept. But the execution and the documentation are fraught with peril.
Many people love Perforce. That includes me.
What a lot of people don’t realize, though, is that if you are an individual programmer working on your own personal projects, Perforce is free.
See, you can download the latest release of Perforce and use it in an evaluation mode, where it’s limited to two users and two clients.
If you’re only using it to maintain your own local changes to one or more open source projects (say, GWT and Ajax4JSF and Seam), then that’s all you need. There’s no limit on the number of files or branches, and all Perforce features are 100% functional.
Right now on my Windows PC, I’ve got a Perforce depot which has:
- a complete download of the GWT Subversion tree
- a complete branch of that GWT tree, with my changes in it
- a complete download of the Ajax4JSF Subversion tree
- a complete branch of THAT Ajax4JSF tree, with my changes in it
- a copy of the Seam booking example
- a branch of the Seam booking example, with my changes in it
Setting my Windows Perforce client to use Unix line endings means that Perforce doesn’t screw up the Subversion metadata.
The workflow is:
- check out from Subversion
- check in to Perforce
- branch in Perforce
- edit like mad in the branch, committing at will
- once done, integrate back to the Subversion copy
- check out the whole Subversion copy for edit
- svn update, svn patch, svn commit
- revert unchanged files in Perforce
- re-commit to Perforce
The truly wonderful part is that I can take changes from the Subversion copy to my dev branch, or vice versa, as circumstances warrant. Basically, it’s the full power of Perforce branching, used to manage my personal development alongside the concurrent development of everyone who’s landing in Subversion.
I can’t recommend it too highly. Totally brain-saving compared to keeping multiple local Subversion working copies or whatever. Try it, you might love it.
As aforementioned here, I’ve spent a good chunk of this year integrating GWT, JSF, and Seam. The current fruits of that labor are here.
The original GWT-JSF integration was done by the Ajax4JSF guys. The code is hosted in the JBoss Ajax4JSF Subversion repository. The main problem is that they’ve converted the entire repository to use Maven, except for the GWT-JSF code.
So I’m fixing that. This post documents how. I’m going to try your patience by giving the blow-by-blow in real-time as I work on this. Consider this an object lesson in how to bang your head against a brick wall with MAVEN spray-painted on it.
First, get the Ajax4JSF code building with Maven, by following these directions from the Ajax4JSF guys.
Second, integrate a pointer to the GWT-Maven repository, along the lines of these instructions from the GWT-Maven team. Specifically:
- Add the gwt-maven repository to conf/settings.xml:
<!-- add gwt-maven repository -->
- Update the GWT dependencies in the main project POM to 1.4.10.
to the gwt-user dependency, to keep it out of the WAR file. (gwt-user.jar is only for compile time; gwt-servlet.jar is all you need in your deployed GWT webapp.)
Why can’t the gwt-maven repository live just inside the GWT-JSF POM? In fact, why don’t ALL the necessary repository definitions just live inside the top-level trunk POM for Ajax4JSF?
Third, run “mvn install” in the ajax4jsf/trunk/gwtjsf directory. See it blow up because it can’t find the 2.0 version of jsp-api.jar.
Wonder why this is, since the top-level trunk build has no problem finding it. Flail around adding a <profile> to the POM and watch it die in all kinds of other interesting ways. Back that change out again. Realize that you really have no idea how Maven works. Look at the base dependencies again…
… Turns out to be because the gwtjsf POM has the wrong groupId for jsp-api — it should be javax.servlet.jsp but it was just javax.servlet.
And with that, the frickin’ thing compiles! That’s progress :-D
What’s more, it’s almost 1 AM and my baby daughter wakes up at 6:30 AM. (Get used to me saying that.) But hey, something works now that didn’t work when I sat down here tonight. That’s what hacking is all about: getting something new working. Get enough new things working, and anything’s possible.
Time to commit all this to Perforce (see my next post) and then off to bed. Next hack night probably on Saturday, or if not, next Monday. Hopefully I’ll be able to land this sucker, and then maybe even land my actual changes to the project! What a concept!
Well, Rob Hanson is as good as his word, and has a draft GWT ORM for Gears implemented. Meanwhile, the GWT Maven guys have put the latest GWT 1.4 RC into their Maven repository.
And me… well, I’ve been busy with the grandparents :-) Gonna get cracking again this weekend.
Sorry for the hiatus of the last few days. My parents are in town and there’s been lots of grandparental fun, and I’ve also been kind of blocked on posting here.
I’ve been in a quandary about this blog, which is that I have too many topics I want to blog about, and not all of them are actually software-related. Should a blog titled robjsoftware.org have posts about religion, or family, or whatever else I might want to say that isn’t really code-related?
After getting a lot of advice from various people (thanks Bill Harris, Francis Potter, Bob Lee, and my father Norman), I decided that no, it shouldn’t. Part of blogging is developing an audience, and I’m not (quite) egocentric enough to think that everyone who’s interested in my programming posts will share all my other interests. I’d rather have opt-in than opt-out, in other words.
So I’ve started another blog — blog.robjthoughts.org. That’s where all the non-software topics will go. I’ll occasionally crosspost, but it’ll be very much the exception. I’ve also cleaned up the labels on this blog to avoid the weirdness of a “non-software” label on a blog named “robjsoftware” :-)
Thanks for your patience. Now that my definitional issues are sorted, content will resume flowing shortly. (And I promise I’m done making new blogs now!)
Mark Pilgrim rants quite cogently about the evils of Flex, Apollo, and Silverlight.
I admit it. We’re using Flex at my day job. We need to build a whole huge pile of rich client interfaces to our existing production system. And you know what? Flex simply has the best designer tools of anything we’ve looked at. We’ve got some great designers who are able to build interfaces in Flex that have real navigation and real interaction behind them, without needing more than a few smatterings of Actionscript. Flex Builder is just a good tool for building interactive UIs. Then the developers take those designer prototypes and refactor them into the actual application.
Designer-developer roundtripping is what Adobe calls it, and it’s just not currently doable in the “web that works.”
None of that has anything to do with the things Pilgrim is ranting about, and yes, proprietary is bad. I think Pilgrim missed that Flex, which Apollo is based on, is open source now. Not sure how effective or real that is, but it is technically true. And, of course, my company is building intranet apps, with only limited customer exposure, which is pretty much the ideal case for Flex right now.
Anyway, there’s my stake in the ground: I’m not religious about open source, and I’m willing to use closed source tools when they’ve got compelling advantages. (But in my spare time, it’s open source all the way!)
Also, so Pilgrim can laugh at me: how in the world do you subscribe to his RSS / Atom feed? I CAN’T FIND IT ON HIS SITE. Which means I must clearly be very dumb in some really basic way.
Catch-22 with Maven: how can you create a project that has a dependency on another project that hasn’t been stored in some repository somewhere?
I’d love to land my GWT/JSF integration work. But the Ajax4JSF team really likes Maven for some reason. And my code relies on GWT 1.4, which isn’t final yet. So there’s no way for me to check in a Maven build that uses it, because there’s no repository in the world that has it.
Feh. I like what Maven is trying to do, but I would love there to be some middle ground here. Gavin King wants to do lunch next week to talk about the GWT/Seam stuff, though, which is cool.
Meanwhile, Rob Hanson is working on a GWT/Gears ORM implementation, and Ryan Dewsbury (author of the legendary gpokr.com, as well as a book about GWT applications) already has a GWT Blogger client written and working as part of his book. So it looks like gluing those two together would be an offline Blogger client in, like, no time. Ryan’s looking into how soon Addison-Wesley will approve the source for some kind of release, Rob Hanson’s going to have code working by Monday.
Given that the Maven stuff is slowing me down on finalizing the GWT/JSF stuff I did, it may be that Hanson and Dewsbury are going to put this offline Blogger-editor thing to bed before I can get my head out of my butt. Which would be fine — GO GUYS GO! There’s always more code to write, and no sense being selfish :-D
- Many small posts or few large ones?
- Why does Blogger do such a terrible job of scaling your profile picture?
- Should I tell everyone on God’s green earth about my blog right away, or should I post a lot and then start spamming about it once I actually have some content?
- How many people actually read through your back posts anyhow?
- Given that there’s only so much spare time, how much of it should I spend programming, how much should I spend blogging, how much should I spend reading blogs, and how much should I play one of the dozens of computer games that stare at me longingly from the shelf, wondering where my love went?
- Is this template just too ugly for people to stand for even one minute?
- Why is Blogger’s edit window so d**n small?
- Can I say d**n without the asterisks in this blog?
- Is editing posts after they’re published bad form, even if you think of lots of things you forgot to say?
- Am I interested in — and liable to blog about — too wide a variety of topics to attract any readership whatsoever?
- Who is this blog for anyway, myself or everyone else? Is blogging like art — something that exists only in relationship to an audience?
Sorry for the logorrheic posting flurry. I’ve been wanting to start a blog for years but for some reason never did. Now that it’s up, the dam has burst.
So this post is about my history as a programmer, and about some of the lessons I’ve learned in ambition and tackling the right problem.
First let me say that I’m hopelessly in love with programming. My basic definition of software engineering is “building machines out of ideas.” And that’s something that essentially has no bottom, and no top. There’s no limit to software.
That flexibility is also a trap, because in reality software has to be built on other software. And overreach is the ambitious engineer’s curse.
Let me give some examples from my own career. My first real post-college job, in 1990, was working on Project Xanadu. I’d read Engines of Creation in school, and it totally changed my life. I wanted to make hypertext happen, now.
So I flew out to California and started working for Autodesk with the Xanadu folks. What followed was one of the most exhilarating, and then one of the most disillusioning, periods of my life.
Xanadu was a glorious triumph of software design, and a consummate failure of software production. Picture it: the entire system was predicated on the assumption that hyperlinks would only work if they were fundamentally coupled to the individual textual characters that made up their anchor, such that any editing operations would exactly track which characters were linked to. The design sought to create a serverless, versioning system for generic hyperdimensional multimedia data, on top of which was an addressing scheme for arbitrary hyperlinks. All this was built on a super secret data structure, essentially a multi-coordinate splay tree (with adaptive optimization for all lookups). An object-oriented data store provided the persistence. A pipelining message protocol provided the networking And all of this was written in Smalltalk, compiled to C++ for efficiency.
Do you remember how slow computers were back then?
The World Wide Web came along a couple years after the project finally fell apart, and took over everything. Because the fundamental assumption of Xanadu — that the critical problem was tracking all anchors across all content edits — was wrong. That problem wasn’t critical. And Xanadu’s now a footnote.
On the bright side, I have a lot of friends from that era, despite my hastily chosen and immature words in the Wired article that came out in 1993. Dean Tribble and Ravi Pandya now live in Seattle, working on the Singularity OS research project at Microsoft. Mark Miller is at HP now, thinking more deeply about secure mobile code than anyone. Life goes on and ideas flower in their time.
So from that, I decided to reduce the ambition level a lot, and went back to Autodesk to work on Autodesk Animator Studio, a Windows video paint package.
For Windows 3.1.
Anyone remember what watching video in Windows 3.1 was like? On a 1994 Pentium with 8 megs of RAM? Now imagine editing it.
(It looks like the only little video I saved from those days no longer plays in Windows XP. Sigh, bit rot creepeth ever unto the past.)
Yes, this could also be called overly ambitious. We did ship, but the whole experience drove my manager at the time, Jim Kent, out of the software biz for good. Fortunately, six years later, that turned out to be a very good thing for the public version of the Human Genome Project.
But hey, shipping was a big step forward!
A brief detour into charting software, and then I decided I wanted to get into the computer game business. So I worked for a small company named Protozoa in San Francisco. Protozoa was doing performance animation software, and wanted to make a game with their technology. I learned a lot about 3D and realtime programming there. I also learned that if you don’t have a total focus on what makes your game fun, your game will not in fact be fun. I ALSO learned that building a realtime 3D game on DirectX 3, in 1995, is not the best idea. Again, ambition bites, hard.
Years later I learned that one guy I worked with there, Bay Raitt, was destined for glory. Bay was a super genius character modeler. He was agonized by the problems of trying to build characters with only 200 polygons. Exactly how agonized I only realized years later, after seeing the second Lord of the Rings movie. I bought a book about how they created Gollum, and lo and behold, Bay was Gollum’s lead facial animator. In retrospect, seeing him work on a 1995 3D computer game was like seeing Picasso trying to work with a half-dry jar of finger paint.
Alrighty then! Time to move on from computer games, I thought. But the stings of Xanadu had healed somewhat, and I wanted to learn about networking. And a number of the Xanadu folks had re-convened in Cupertino, at a startup named Electric Communities. EC was seeking to take some Xanadu-era ideas about capability security and secure mobile code, and to build from them a distributed, peer-to-peer, cryptographically authenticated, secure-identity-supporting, commerce-capable virtual world.
Using Java version 1.0.
Are you seeing a pattern here?
EC failed for reasons similar to Xanadu: the software was too big, too ambitious, and too slow to make a compelling product. Not only that, but users didn’t want virtual worlds nearly as much as everyone thought. Years later, and with 21st-century hardware, only Second Life has somewhat cracked the nut, and even their infrastructure is suffering pretty deeply right now (word has it).
Again, though, I met a number of super smart people who are now doing great things elsewhere, including Doug Crockford, moderately (ahem) well-known in Web 2.0 circles. Also Arturo Bejar, security ninja at Yahoo; Brian Marick, a major testing god; and Chip Morningstar and Randy Farmer, also now at Yahoo, who have a quite candid assessment of the whole era on THEIR blog. And I got to spend the better part of a year figuring out how to create a secure, capability-based protocol for virtual-world object transfer between untrusting hosts. Getting paid for that? It was really, really fun. Until the money ran out.
EC was really the end of my over-ambitious days. In 1998, after EC, I went on to work for Helium, a now-defunct consulting company founded by an old Protozoa buddy (Gever Tulley) and a number of his oldest friends. We did a bunch of work for Quokka.com (a truly classic dot-com flameout story — they picked the wrong sports to cover and created all their sites by hand, but we had fun doing Internet livecasting of sailing races and the 2000 Olympics!). Then Quokka folded in 2001, Helium reformed, and we went on like that until 2003.
Finally in 2003, I begain working for my current employer, Nimblefish. A number of my old Helium and Quokka friends joined me there, along with other great folks. I’ve been there for three and a half years now, an all-time record for my career, and we’ve got a working production system that just keeps getting better and better. Hibernate, Flex, and other modern tech drives our code; we’ve got real customers, and we’re growing; and we’ve got a clear strategy that we’re executing on at full bandwidth. I think I might have finally kicked the curse of over-ambition…..
…or maybe it’s just dormant! :-)
I’ll close with the word that best captures how I feel about programming: