What
· Technology
· · Java
· · · · Coding (1 fragment)
· · · JavaOne2005 (1 fragment)
Keybase Client ·
I got interested in Keybase.io the day I left Google in March, and I’ve been evangelizing it, but even more the idea behind it: Using authenticated posts here and there to prove public-key ownership. Also I’ve contributed Keybase-client code to OpenKeychain (let’s just say “OKC”), a pretty good Android crypto app. I’m more or less done now ... [6 comments]
Java Security Hole ·
Good solid cryptography is an essential foundation for sound business usage of the Internet, and essential to provide a sane privacy level. But the tools for Java programmers are in horrible shape ... [4 comments]
Clojure N00b Tips ·
Clojure is the new hotness among people who think the JVM is an interesting platform for post-Java languages, and for people who think there’s still life in that ol’ Lisp beast, and for people who worry about concurrency and state in the context of the multicore future. Over the last few days I’ve been severely bipolar about Clojure, swinging from “way cool!” to “am I really that stupid?” Herewith some getting-started tips for newbies like me ... [7 comments]
NetBeans 6.7 ·
Who knows how many more chances I’ll have to talk about Sun tech that I like? In the five years I’ve been here I’ve been pleased by OpenSolaris and Fishworks and HotSpot and GlassFish and others, but NetBeans is #1 in my heart. I just downloaded 6.7 RC3 a couple of days ago to try to fix a problem (it didn’t, but the problem was amusing) and it’s really good stuff. Generally nice, and with one absolutely life-changing new feature ... [6 comments]
JavaOne 2009 Notes I ·
I’m covering these events in my capacity as a blogger; here in the press room, the consensus is that this is JavaOne’s last go-around. I have no inside information and not even a guess, so this is 100% fact-free speculation, but Oracle does have a track record of rolling in the trade shows of the companies they buy: BEA, Siebel, PeopleSoft, and so on. I’d probably be in favor, just because I know the crushing load that this kind of shindig puts on insiders to get their wares ready to show; I’m not sure you could do this more than once a year, effectively ... [6 comments]
Tab Sweep — Tech ·
Herewith gleanings from a circle of browser tabs facing inward at the world of technology. Some are weeks and weeks old: Amber Road, Clojure, tail recursion, cloudzones, deep packet inspection, and key/value microbenchmarking ... [5 comments]
Minimal Rack + JRuby + GlassFish Recipe ·
I’ve been working on a little piece of Ruby-and-Rack-based Web integration goo, and it’s done enough that we have to figure out deployment. One reason I picked Rack is that it’s advertised as deploying on anything. The environment where this will live has some of this and some of that, and we’re using GlassFish to tie it all together, which seems like an appropriate choice. So, the problem is: How to plug a simple Rack application into GlassFish? ... [2 comments]
AD X: Grumbledroid ·
[This is part of the Android Diary.] There’s a pattern in this tribe where you put “droid” on the end of, well, everything. Thus this title; herewith another set of hands-on notes, this with a sort of grumbly tone ... [3 comments]
AD IX: Five Programmer’s Notes ·
[This is part of the Android Diary.] I’ve done a bunch more polishing on my little demo-ware Feed Mapper; it even handles errors. Plus I’ve started sketching in the other half, the thing that might turn it into more than a demo and drive some Cloud biz for my employer. Time for some more give-the-feel-of-Android dispatches from the coalface ... [4 comments]
JMMMDD ·
That stands for Java Mobile, Media & Embedded Developer Days; it’s a conference we’re presenting week after next in Santa Clara. I’m obviously super-interested in mobile-device programming these days, and have always thought that JavaFX Mobile was the most interesting piece of the FX effort; I can’t wait to getting my hands on some hardware. Unfortunately I can’t make it to this one, but it looks like a good event. [1 comment]
AD V: Demo-Ware ·
[This is part of the Android Diary.] I’d had an unofficial goal that the little Android goober I’m working on should be demo-able by the end of 2008. I made it by half an hour. It draws clickable zoomable renditions of geotagged feeds (RSS or Atom) on Google maps. The look and feel are cool. As of now, I’m not actually sure it’s useful for anything, but I think that geotagged feeds are potentially very interesting in general, so a viewer couldn’t hurt. The short-term lessons are about Android, though ... [3 comments]
Enterprisey but Good ·
In the old days I was a Perl guy and now I see the Web through Ruby-red spectacles. Like most people in the open-source and dynamic-language communities, I never really warmed up to Java EE; tons of moving parts, too many layers of indirection, too much XML configuration, and anyhow I didn’t want to use that language for writing Web apps. But it turns out you don’t have to like EE to be real interested in app servers.
[Update: Check the discussion in the comments; there’s more to this than meets the eye.] ... [4 comments]
The Summit ·
I attended about half of the the JVM Language Summit, from Wednesday through Friday at Sun’s Santa Clara campus. I’m not really an expert on the deep nuances of JVM constructs like call sites and permgen and classloaders and so on, but still, I’m sorry I missed some. There were 70 or so people there, mostly way smarter than me. Herewith impressions and pictures.
[Update: See also write-ups from Ted Leung, Cliff Click, and John Rose.] ... [5 comments]
Tab Sweep — Technology ·
I’d kind of gotten out of the habit of doing tab sweeps, largely because my Twitter feed is such a seductive place to drop interesting links. But as of now there are around 30 tabs open on my browser, each representing something I thought was important enough to think about and maybe write about. Some are over a month old. Some of them have been well-covered elsewhere. All I assert is that after I read each one of these, I didn’t want to hit command-W to make that window go away. Unifying theme? Surely you jest ... [1 comment]
JVM Languages Summit ·
This is a big deal, I think. The Summit happens Sep. 24-26 at Sun Santa Clara. Our internal heavyweights will be there; JRuby, Jython, Da Vinci Machine, Gosling. Granted, this likely should have happened years ago; but still, I think excitement will be thick in the air.
All Free Now ·
On November 12, 2006, I wrote Java Is Free, about the GPL’ing of the Sun Java source code. It was a good day. The job wasn’t 100% finished then, because there was encumbered code we couldn’t GPL. As of today, it’s pretty well done. With contributions from a bunch of people and organizations, especially Red Hat’s Fedora community and the Iced Tea project, the missing pieces are filled in and the TCK has been passed. Most people don’t realize what a huge hurdle the TCK is; we are talking about a whole lot of tedious, unexciting, exacting, work, and we all owe a tip of the hat to the people who ground their way through it. [2 comments]
Enterprisey Goodness ·
I tend to liking simple things, and to suspicion of big “enterprisey” software frameworks. I am dimly aware that up in the clouds there are platforms built on platforms built on platforms built on Java, towering edifices where acronyms like “JBI” and “ESB” and “SCA” live. Except for, I could never figure out what they actually, you know, did. Let’s be honest; the complexity and the high-level arm-waving about “Integration” scared me away and I never really tried. Well, I’ve stumbled into a closer look and am beginning to think there’s some there there ... [6 comments]
Java in 2008 ·
I’m glad I went to JavaOne. I want to go again. In order of increasing importance: The Java language is looking stale. The Java platform is looking interesting. And the Java community, well, it’s something special ... [2 comments]
JavaOne Day One ·
Whatever your feelings about Java, the opening of the JavaOne conference is really an outstandingly great event. I’m not sure if, in any given year, it’s the single biggest gathering of software developers, but it’s remarkably huge. I have some pictures to suggest the flavor of being there, and some specifics on the Neil Young segment ... [4 comments]
Warm OSS Glow ·
I see that NetBeans 6.1 is out. It’s a nice enough release (MySQL improvements, surprise surprise), but here’s what touched me. I don’t know how many other OSS projects do this, but I got an email this morning from qa@netbeans.org
: “We'd like to inform you that the following issues you reported have been addressed in the new version” and listing four bugs I’d filed. What a nice touch. [3 comments]
JRuby 1.1 ·
I see the JRubyists have shipped JRuby 1.1. I increasingly think JRuby is interesting and important as a test case, even if you don’t happen to care in the slightest about Ruby or Rails ... [7 comments]
Upcoming Gig: J1 Blogger ·
There’s a really strict limit on the number of JavaOne passes for Sun employees. I can usually manage to score one, but that’s one that someone else isn’t going to get. But I’ve noted with approval that there are press passes for successful technology bloggers; I’m one of those so I applied, and now someone else can get that pass. I’ve missed two J1’s in a row, so I’m looking forward to getting back into that culture a bit. Now, can I actually dig up some news?
Django on Jython ·
It’s starting to happen. There’s a long way to go between successfully executing a bit of Rails and actually making the sucker run usefully, as the JRuby guys will tell you. But speaking of JRuby, there are some eerie similarities: a language-platform project that was promising, then drifting, now revitalized. The ecosystem gets more interesting all the time. [Update:] Frank Wierzbicki reports that Jython is rockin’ & rollin’, it’s not just Django. Good stuff!
On Closures ·
I started out nervous with the idea of adding closures to Java, and I think I’ve slid firmly into the “contra” camp. One reason is that it seems increasingly a bad idea to add anything to the Java language. On a related subject, my brief sojourn in Ruby-land has changed my thinking about closures entirely ... [19 comments]
Bytecodes! ·
Way back in 2004, when we had the first Java/DynLangs summit, one of the DynLangs guys’ gripes was that bytecodes were too hard to generate. They still are; but check out Charles Nutter’s Bytecode Tools in Ruby: A Low-level DSL; is it just me, or is that remarkable? I have tended to be a bit less impressed than your average Ruby fanboy at a bunch of method calls sans parentheses claiming to be a “DSL”. But man, that looks slick.
NB6b1 ·
Which is to say, NetBeans 6.0 Beta 1 is out. Looks pretty good so far, they even revised the Borg Cube logo. I’ve got a couple tabs with .rb files open, and three more that end in .h and .c. I understand it can be used with Java too ... [15 comments]
GlassFish V2 ·
It’s out today. Now, I don’t work with app servers that much, and I’ve hardly ever touched GlassFish. But this is interesting anyhow, for two reasons: First, GlassFish is an example of a software product that was struggling in the market, and is doing immensely better after moving from closed to Open Source. Smells like the future to me. Second, check out that launch pointer: a blog cluster, with the marketing basics and a ton of highly-technical detail. I just don’t think there’s any other sensible way to launch a modern software package whose users are developers. [3 comments]
Tab Sweep — Tech ·
There were a few here that I wanted to do a whole piece about, but I just gotta clear some space on these decks. Today we have pushing and pulling and queueing and Ruby.next and Java hate and PHP-vs.-Rails. What’s not to like? ... [9 comments]
Ruby Glee ·
Now, this would be a red-letter day. I was chasing a weird Ape bug, and I found the problem: atomURI#absolutize
was returning a URI not a string (and by the way, why doesn’t URI offer String methods like index
and =~
!?! But I digress.) Anyhow, I moaned, thinking “Crap, that’s used everywhere, what am I gonna break?” What I needed was “Find Usages”... Hah! I’d recently grabbed a new NetBeans 6 pre-release (the 070810 build of M10) and Tor’s been doing some heavy chest-beating recently. Here goes with the right-click ... [9 comments]
Tab Sweep — Tech ·
Today we have some Atomic Apple love, iPhone Web friendliness, RelaxNG praise, and JVM Language widening ... [6 comments]
Tab Sweep — Tech ·
Today we have Java yielding, thread ranting, REST lecturing, and identity insight ... [6 comments]
Big NetBeans ·
I was chatting with one of the NetBeans guys the other day and he said “BTW, it’s up to 6.7 million lines of code now”. Gack. Here is their public schedule. Wish them luck... the thought of managing a code-base like that makes my flesh crawl. [2 comments]
Tab Sweep ·
Perhaps a little more all-over-the-map even than is usual: GPLv3 clarity, Functional Pearls, raina bird-writer, Java credits, framework programmers, and hacking my Canon ... [4 comments]
The London Illustrated News ·
I spent the week in London. Fun was had, pictures were taken, I learned things. Herewith illustrated notes on transportation, energy, finance technology, businesslike drinking, women’s clothing, Groovy, excellent lamb-chop curry, and a round red anomaly ... [8 comments]
Ruby Servlet Dispatching ·
I’m wiring the Ape up so I can run it with JRuby in a servlet in a real Java App Server, and while Marcin Mielżyński’s first-cut RubyServlet works fine, I suspect it’s not the only approach to dispatching. So I’m doing some research and thinking, and I’ve collected it here for anyone who cares ... [4 comments]
JRuby Servlets ·
I got the Ape running on JRuby and wired Jing back in, which is really useful (some of the so-called Service Docs out there are canine fecal matter). I was pretty damn impressed when the now-2400+ lines of Ape code totally just worked in JRuby. Then, I was irritated by the realization that my primitive CGI setup for running the Ape is just not gonna fly if I have to start up a JVM and JRuby for each request. So I thought “this is what servlets are for, right?” and the good news is that It Can Be Done ... [3 comments]
Another Blow to Emacs ·
I’ve been watching Tor Norbye grinding away on NetBeans 6, and couldn’t wait any more, so I went and downloaded a daily build, and it seems to kinda work. Up till now, all my Ruby work has been in Emacs, but the NB6 pre-pre-alpha trumps it ... [15 comments]
Gosling, O.C. ·
James has been appointed to the Order of Canada, and about bloody time. Not only is this well-deserved, but as far as I know, it’s the first time that a computer technologist has made it in. I have nothing against the dancers and insurance executives and philanthropists and hockey players currently inhabiting the Order, but the construction of the future is in some large part in the hands of the engineers; and this needs better recognition.
SOA, REST, Java ·
What I usually do in this space is grumble and whine about SOA & SOAP and so on. Today, let’s start with a laugh, instead. But actually, there’s news; the Java tribe has decided to take REST seriously, see JSR 311 and, for some more pointers, Eduardo’s write-up. I haven’t had time to do a deep-dive, but I’m reassured by the presence of Marc Hadley A.K.A. the WADL guy; and it looks that there will be other real experts at the table. On the other hand, Elliotte Rusty Harold emits an extended snarl. (Sample: “I hope we can derail this completely...”) Hey Elliotte, I guess making friends and influencing people is for losers, right? The proof of the pudding, obviously, is in the eating, but the fact that this discussion is happening has to be a good thing ... [5 comments]
Groovy Flickr Escape Hatch ·
In the mail from Manning this week, Groovy in Action, nicely timed to follow up on the 1.0 release. I still haven’t made up my mind about Groovy, so I’m watching the community with interest. For example, Alex Brown’s Bulk Programmatic Conversion of Photos from flickr to SmugMug. There are a bunch of interesting issues all mixed up here: Yahoo’s identity ploy, wildly-contrasting Web programming interfaces, choosing from the lengthy list of Java XML-processing alternatives; and of course, watching Groovy at work. I have to say the source code is real easy to read; oddly, what it makes me wish for is regex literals in Java. Hmm, it’s not obvious to the casual eye when you declare variables and when you don’t; I’m sympathetic to the optional-declaration idea though. I guess I’ll have to have a look at the book; it was cracking the Pickaxe book’s covers that dropped me onto the slippery Ruby slope. [1 comment]
JRuby January ·
In this month’s JRuby news, Ryan Tomayko goes all visionary, Charles Nutter ponders InvokeDynamic, and Nick Sieger’s a committer. I partially disagree with Ryan’s point #3. My impression has been that the average Java package is at least as well-maintained as in any other language you care to name, and better than some (but he’s right, of course, that the maintenance activity needs start manifesting quickly via your local apt or yum or whatever). Also, Ryan recommends Ruby when “where readability and maintainability are more important than performance and reuse”. Uh, isn’t readability a really important factory in re-usability? Which means that Charles should be (and probably is) worrying about calling Ruby code from Java, not just the other way. Anyhow, JRuby’s a hotter and hotter area. I watch the JRuby developer newslist, which I don’t recommend unless you’re an enthusiast; on a good day Ola Bini alone can saturate the average inbox. [1 comment]
Java Thunder ·
The Java ecosystem is a news factory these days. Herewith a few words on Java SE 6, JRuby 0.9.2, and Groovy 1.0 RC1 ... [5 comments]
Intel Java Voodoo Huh? ·
Check out Intel's new instructions to Rockton round the clock from the Inquirer. This is consistent with what Geir Magnusson said in his (very good) OSCON presentation; that Intel might like to load a custom JVM with secret code that took advantage of their inside knowledge of the silicon, so Java would run better on Intel; one reason they might have preferred Apache to GPL licensing for the Sun Java code. Me, I’m puzzled. If there are special instructions to make Java bytecodes (or .NET CLR code) run fast, uh, how are they going to keep them secret, and why wouldn’t they end up in every JVM and CLR implementation? And why wouldn’t this be good for Intel? There are disassemblers and so on, you know, and plenty of hackers who are accomplished at picking apart x86 binaries. Maybe there’s something else we don’t know. [Update: Check the comments. That Inquirer article is from way last year, and Geir Magnusson says I’m all wrong about Intel. So maybe there’s no story here.] [19 comments]
The Week After ·
A few browser tabs have built up with follow-ons from last week’s Java source code news. The best single day-after piece is Mark Reinhold’s There’s not a moment to lose!; I was on that IRC channel for the “Vijay is on it” moment. Mark also points at Java Posse coverage. I listened to it and ten minutes in was getting dubious, there wasn’t much new news. But about halfway through they started getting technical; as in, is building the JDK more like building Linux (easy) or like building OpenOffice.org (hard)? Listen for details. Then there’s an interview with me in Eclipse Magazine. Two amusing points: when Sebastian Meyen sent me the questions, he mentioned half a dozen different web sites and magazines they might run it in, but not Eclipse mag (Sebastian, it’s just fine); also, contrast the fanciful article title and my answer to the community-models question. Speaking of Eclipse and snickers, there’s Mike Milinkovich telling Information Week that we made the open-source move in reaction to Harmony. Look, Eclipse is an important part of the Java ecosystem, and Harmony is an interesting project with really smart people, but gimme a break. You might want to look past the conspiracy theories and industry tectonics, and consider a simpler explanation. Moving on: I took my daily glance at Slashdot today and damn if there isn’t a great big honking get-the-Java-source-code ad all up and down the right sidebar. I would never have thought of doing that, and I don’t claim to understand the advertising strategy or tactics; but seeing it made me happy. Closing note: You have no idea how much work this has been, for a whole lot of our best people; my hat is off to ’em.
The Morning After ·
Well, that was quite a party. Herewith a few notes on communications, reactions, and names ... [6 comments]
Java Is Free ·
When I took the job at Sun in early 2004, I had a long talk with John Fowler, about this blog among other things. John said: “You might end up happier if you don’t blog about open-sourcing Java.” That was then. Today’s story is simple: Unmodified GPL2 for our SE, ME, and EE code. GPL2 + Classpath exception for the SE libraries. Javac and HotSpot and JavaHelp code drops today. The libraries to follow, with pain expected fighting through the encumbrances. Governance TBD, but external committers are a design goal. No short-term changes in the TCK or JCP. There are a ton of presentations and an (excellent) FAQ and so on, all to show up at sun.com/opensource/java sometime in the next few hours. I wanted to add a couple of remarks on areas that stuff doesn’t highlight ... [16 comments]
Erroneous Ministerial One ·
Herewith my occasional romp through the built-up browser tabs. Item (serious): In The ‘Next’ Java, Joe Gregorio says some Really Smart Things about languages in general and Java in articular. Item (serious): At Business Week, Stephen Baker’s Writing for an audience of one says something genuinely new (hard, these days) about blogging. Item (interesting): My new Samsung is a pretty cool phone, but there are a few irritants. It turns out that someone called RedIpS has fixed them. I just bought a flashing cable on EBay; I wonder if I’m going to be breaking any laws? Item (not serious): SOA Facts. Item (puzzling): Some guy named Tim Bray seems to be in trouble in China; this article provided the title above. I hope Mr. Bray gets out OK. [1 comment]
Upcoming Gig: W-JAX ·
I thought I might make it through 2006 without crossing an ocean, but I just signed up for a keynote at W-JAX in Munich in November. I’ve never been to this conference, but my Sun colleagues say good things about it.
The Ruby Ape Diaries ·
I took tons of notes while I was working on the Ape. I was going to hold off publishing till I released the code, but once I actually launched the formal Sun process to do that, I discovered that it can take two or three weeks, and so I decided to go ahead while it was fresh in my mind. Unfortunately, the piece pretty soon had fifteen different sections and would have been too long for mere mortals with jobs to read, and furthermore, the sections didn’t have much to do with each other, and there just aren’t that many people on earth who’d be interested in all of them. Some of them look close at the issues of making Java and Ruby get along, while others wallow in duck-typing perversity and finer points of Ruby style. So I’ll keep them short and do one a day (or so) for the next week (or so) and fill a table of contents in here.
I. Why JRuby?
II. Back to Ruby
III. Quack Like a URI
IV. TMTOWTDI
V. << !!
VI. Java APIs from JRuby
VII. J?REXML
VIII. Surface Phenomena
IX. Those Libraries
X. Making Markup
XI. Where To?
RAD XI: Where To? ·
[RAD stands for Ruby Ape Diaries, of which this is part XI.] I think this concludes the Diaries, although ongoing already has a couple of five-part trilogies. The Ape works reasonably well and is getting quite a bit of use; Sam Ruby has convinced me that, rather than whittle away at the to-do list, I ought to figure out a way to build a large catalog of problems and edge cases, test-suite style, in such a way that you can add new ones without writing code. I haven’t yet figured out how to do it. My Ruby is still not fully idiomatic but it’s better than pidgin, and there’s a real possibility that the next time I get my back to a wall and need to do something to a few million lines of text right now, I may not use Perl. It should be reasonably obvious that I like Ruby. Still, there are flies in the ointment, worms in the apple, fake jewels in the shop window ...
RAD X: Making Markup ·
[RAD stands for Ruby Ape Diaries, of which this is part X.] If you’re writing Web apps, and even if you’re one of the few who isn’t, you’re probably going to have write code to generate markup, HTML or XML. Historically, programmers have found this difficult, and thus there are lots of libraries that try to abstract markup away behind code (for example, my own Genx). There are tricky issues and trade-offs here, and Ruby throws them into pretty sharp focus ...
RAD IX: Those Libraries ·
[RAD stands for Ruby Ape Diaries, of which this is part IX.] Ruby’s debugging facilities, compared to what IDE users like me are used to, are, well... sincere. At one point during the Ape work, I had a bug that was really driving me crazy. The symptom was that my HTTP interaction with the server would just freeze up, and I couldn’t spot the pattern behind it. It’s a fact of protocol-testing life that this particular kind of shit happens. Sometimes you’re reduced to debugging with print statements, and I was. But after a while they weren’t helping me, I was calling Net::HTTP#start
on an apparently-valid connection and then... nothing. Eventually, I was driven to looking in the library source, net/http.rb
. Hey, it was easy to understand! (Have I talked about Ruby and readability before?) I could see where my request was going, but I couldn’t see how it could go wrong. Well, this is a dev machine, and Real Men debug with print
statements. So in they went... right into the Ruby distro libraries, I mean. And I ran it again. Only took a couple of minutes to zero in the problem; in this case, a JRuby bug. I’m not sure what the lesson is... but the code spelunking was frighteningly easy. This is not typical of other peoples’ HTTP libraries; I have bitter memories of bashing my head to a bloody pulp against LWP back in the last millennium. Did I mention readability? [Ed. Note: You’ll be happy to hear that there are only a couple more RAD entries in the pipeline, then I’ll be done.]
RAD VIII: Surface Phenomena ·
[RAD stands for Ruby Ape Diaries, of which this is part VIII.] Programming is supposed to be an engineering discipline, or maybe a branch of mathematics. But, as Don Box memorably said: “the only people who should do it are those who can't not do it”, calling us “those few people who absolutely must live in the world of executable abstractions”. One consequence is that we’re passionate about the content and the form. Herewith some remarks on appearances; the way Ruby code looks and how you store it and so on; issues as important, perhaps, as any other ...
RAD VII: J?REXML ·
[RAD stands for Ruby Ape Diaries, of which this is part VII.] In native Ruby, the default way to do XML processing is via the REXML library. In JRuby, you have another default choice—Java’s built-in XML APIs. Neither option is that great. Still, there are some reasonably safe ways to get the job done. I wrote some glue code called JREXML to make the Java APIs look more like REXML, which forced me to think about this stuff perhaps more than is entirely healthy ...
RAD VI: Java APIs from JRuby ·
[RAD stands for Ruby Ape Diaries, of which this is part VI.] The reason I first built the Ape in JRuby was so I could get at all those nice Java APIs, and that turned out to be a good reason. Of course, there is a bit of impedence mismach, and I ended up writing some glue code. I kind of suspect that, should JRuby catch on, there’s going to be scope for quite a bit of this glue-ware. This fragment is just a few examples of the genre, to provide examples and perhaps provoke thought ...
RAD V: << !! ·
[RAD stands for Ruby Ape Diaries, of which this is part V.] If you look at Ruby code, you keep seeing this little two-character motif <<
, and maybe everyone else already knew about this, but it sure feels like magic to this farm boy from the Prairies. Bonus: Lisp speculation ...
RAD IV: TMTOWTDI ·
[RAD stands for Ruby Ape Diaries, of which this is part IV.] That glob of letters in the title stands for “There’s More Than One Way To Do It”, and it comes from Perl culture. It is a distinguishing feature of Perl that if there’s something you need to do, not only does Perl have a way to do it, it has lots of different ways. Perl’s legion of evangelists, led by Larry Wall, argue that this is an advantage. Larry has a compelling argument by parallel with linguistics; natural languages usually have many ways of saying anything that’s worth saying. Not everyone agrees that this is a virtue; in particular, Pythonistas have historically grumbled. Ruby seems to fall into the Perl camp. And now, dear readers, I must confess to a bit of duplicity. When I wrote RAD III: Quack Like a URI, I knew that my example was perhaps not the purest possible example of duck typing, but my hidden agenda, namely gathering material for a TMTOWTDI essay, worked out well ...
RAD III: Quack Like a URI ·
[RAD stands for Ruby Ape Diaries, of which this is part III.] This little illustration of a programming idiom is solely designed to horrify newcomers from the Java world, and will look mundane to existing Rubyists. Problem: I want to check a URI to make sure it’s appropriate for use in the Atom Protocol, and if not, report a coherent error message ...
RAD I: Why JRuby? ·
[RAD stands for Ruby Ape Diaries, of which this is part I.] To build a validator you need an HTTP engine and an XML parser, both of which Ruby is advertised as having. JRuby, when I first took this on, was as at release 0.9.0 and had plenty of rough edges. But I decided to use it anyhow ...
Java.net Terms of Use ·
Sometimes we make progress. Way last year, I got email from Norbert Lindenberg, grousing about the Terms of Use on Java.net; they were full of scary language about how you and your employer had to indemnify Sun and “its business partners” against anything bad that might happen with any connection to anything you did, and about how you were signing up for the similarly-scary sun.com terms of use. So I went poking around and asked the Java.net people why they sounded unfriendly, and they said, “Hmm, let’s talk to the lawyers”, who said, more or less, “If there are good business reasons to relax this a little, well OK then.” It turns out we’re partnering on this stuff with O’Reilly and CollabNet, so there were a lot of moving parts involved; a whole bunch of people had to pitch in. I didn’t do much of the work, so I may have this wrong, but from where I sit it looks like Marla Parker and and Cliff Allen deserve special credit. Anyhow, as of yesterday, things are better. Check it out: the new Java.net Website Terms of Use. Still not light reading, of course, but not likely to cause potential contributors any heartburn.
That Open Source Thing ·
We haven’t been saying much since Java One, so I thought I’d mention that I spent some time this week in the internal work process around Java and Open Source, and that it’s moving along nicely. As of now, I’m really optimistic that it’ll turn out well for the community and for us too.
Go Visit Phobos ·
Hey, I see that Roberto has pushed some actual software bits to the Phobos site. Phobos is a server-side scripting framework that runs on the Java platform. Right at the moment, it’s all JavaScript, but the hooks are there to wire in other languages. I’ve been a major Phobos cheerleader for a year or more inside Sun, but my only actual contribution is the astronomical logo. There were people here who were considerably ambivalent about showing Phobos to the world, and for good reason; they asked “What is Phobos, actually?” and wondered about its relationship to the rest of GlassFish. I’m not 100% sure what Phobos is myself, but it’s interesting as a thought experiment, showing that you can do the kind of lightweight zero-deployment things that people don’t think Java does. The Reddit/Dojo mashup demo is seriously cool. Finally, while the server-side JavaScript notion is pretty weird, go have a look at the code; writing an AJAX app all in one language is seductive on the face of it.
Those Accents ·
I already wrote about how the NetBeans and EE guys are learning lessons from Rails. But when Roman Strobl asked me to look at his latest on instant persistence, I realized that they’ve learned the really important lesson; it’s all about instant-app screencasts featuring guys with cute European accents. Dig the way Roman says “scaffolding”. Clearly Django, Grails, and the other Web-framework wannabes need to go recruit some appealing Europeans... now here’s a radical idea: how about a woman? [Update: Django has a Eurowebcast too!]
OSS Java ·
Well, the reaction to the statement on an OSS license for the Sun Java SE implementation has not exactly been a chorus of huzzahs; it’s ranged from “You don’t really mean it” to “You should have done it years ago” to “lamerz suxx0r neener neener”. The people working through the license and community issues need to be aware they’ll be dealing with unrelenting hostility from their audience. There’s lots of history here, most of which I don’t know, but nobody seems surprised at all this. I have to say, though, the contrast between all that nastiness and the big happy community glow at last week’s Java One was pretty stark; who are Java’s friends again? That aside, I’m still pretty startled about the reaction to the DLJ announcement. I would have thought that making it a little less painful for GNU/Linux users to install Java would generally be regarded as a good (not huge, but good) thing—I know that Simon Phipps, Mark Shuttleworth, Rich Sands, and a bunch of other people worked damn hard on it—but instead (see Simon), it provoked a load of vitriolic trash talk. I’m disappointed.
Continuations and GUIs ·
Gilad Bracha asks Will Continuations Continue? in an excellent essay about whether the JVM needs continuations. Personally I have never found them idiomatic so I have no quarrel with Gilad’s reluctance, but I entirely disagree with the line of argument he uses to back it up. He points out that Web frameworks like Seaside make excellent use of continuations, but argues that that’s a red herring because the current style of Web-human interaction is a temporary anomaly and “the future of Web apps will be different”, with AJAX signposting the way. This notion, that the Web GUI is insufficiently interactive and we need something richer, is widely held among developers and almost never among actual users of computers, and it’s entirely wrong. I can remember when people were forced to use compiled Windows and X11 applications, and most of them were extremely bad because it’s really hard to design a good interactive UI; when the Web came along, more or less everyone abandoned those UIs in favor of the Web, almost instantly and with shrieks of glee. Yes, Web UIs are drastically constrained, offer a paucity of controls, and enforce a brutally linear control flow; and these are good things. I remember, in the early days, people saying “Once you know how to use one Windows app, you know how to use them all”. Ha ha ha. But you know what? Once you know how to use a browser, you are well on the way to being able to use most Web apps. The best AJAX apps are still very Web-like (as in, the Back button always works); but they’re faster and more responsive and nicer to look at. The worst AJAX apps are like bad Nineties VB. Having said all that, I suspect that Gilad’s right about continuations. [Update: More good stuff on the subject from Don Box and (especially) David Megginson. Plus a few remarks, in a superior tone, along the lines of “That silly man, can’t he see that users really want more complex user interfaces?” All, of course, from developers.] [Further: Some pro-complex-interface remarks that are actually coherent from Simon Brocklehurst (but Simon, a good browser should pre-fill forms for you and get it right almost all the time; Safari does). And there’s more solid thinking in HREF Considered Harmful; I know who writes it but he seems to be trying to hide his identity, hmm.] [Hrumph. Curtis Poe says I’m a Sapir-Whorf victim, I don’t feel the need for continuations because I’ve spent too many years using pathetic, impoverished languages like C and Java. Well, OK then; I promise to find a way to squeeze ’em into my Ruby-based comment system.]
On Java One ·
I flew out Thursday evening, and I’m sitting here mid-Saturday, still not 100% recovered. If you make your living in a way that involves software development, it’s a thing you ought to take in sometime. Herewith my take-aways ...
Java One Day Two Podcast ·
By Day Two, which is Day Three if you start counting from NetBeans day, everyone’s starting to look a little worn down. Sleep is for weaklings; last night I went to a dynamic-languages BOF that started at 10:30 and there had to be 100 people there. Same questions, 1:25, 87.5M ...
Java One Day One Podcast ·
Next day, same questions: “Who are you and what do you do?”, “What’s great?”, and “What sucks?”; but re-sequenced. This one’s only one minute 20, and a mere 85M in size ...
Java One Day Zero Podcast ·
I accosted a bunch of people and asked them three questions: “Who are you and what do you do?”, “What’s great?”, and “What sucks?” Herewith the resulting video podcast, one minute 45 seconds in length. It started out high-def and even though it’s only 400x225, it looks pretty decent for Web video. There’s a cost: it’s about 93M in size. [Several have written me to point out that this is insanely large. Well yes, I know. I won’t compromise on quality for the same reason that I won’t compromise on JPEG settings for the images I publish here; but I’ve seen some suggestions for how I might save space without sacrificing it.] ...
Q&A ·
In the opening session at NetBeans day, Jonathan Schwartz said a few words and then brought Rich Green, our new software supremo, up on stage. After saying some nice things about Rich, Jonathan proposed that they do a Q&A, with Jonathan asking the questions, saying a “I’ll simulate a developer”. His first question was “So Rich, are you going to open-source Java?” Rich started with “Well, why not?” But then he gave what I thought was a really transparent brain-dump on the internal debate here at Sun, which is along the lines of “Open source good, compatibility essential”. So it’s going to take a lot of work to figure out the story around compatibility and community, and that’s going to require plenty of input from outside Sun. But then Rich said it again: “Why not?”
Panic Panic ·
Urgh, I got email from the Java One people informing me of my (lousy, oh well) spot on the schedule. I got more email telling me that the $200 early-bird discount ends this Friday. I got more email, a polite query: “Where are your slides?” Argh, the work is far from done and the conference feels like tomorrow and I have many days of meetings between now and then. Pardon me if I’m a little jittery and start at sudden noises for the next few weeks. On the upside, the JRuby people will be speaking, and there’s going to be a dynamic-languages BOF. And there’s going to be another NetBeans day; I’m not on that agenda, thank goodness, so I can just go and hang out.
Picture Frames ·
On this vacation, given that Lauren is seven months pregnant, we picked something that was low-stress and low-adventure (starting with the location; there’s a direct Vancouver-to-Kona flight). I like lounging by the pool and sampling the local beverages as much as anyone, but with a deadline-free week, I also found time for some recreational programming. The result is something I call “Framer”, which generates borders and/or drop shadows for images in most popular formats. It writes PNGs with variable alpha channel so the drop shadows will look OK on any color background. It has some options and you’re free to use it, but it’s not problem-free and unless there’s a lot of interest I’m not going to open-source it. Illustrated with groovy Big Island sunset photos ...
JDiskReport ·
Hey, this is cool; it’s a little doo-hickey that draws pie charts and graphs of what you’ve got on your disk. I wonder on what set of hardware/OS combinations the web-start Just Works like it did on my Mac? The pie-charts of my life were so cool I had to publish a few. And I turned up a real problem, too ...
Programming Languages ·
I followed a pointer from Bill de hÓra this morning and it cost me an unplanned hour while the rest of the family slept, on the subject of programming languages. If you care about such things, stop reading here or you’re about to get stuck too; but that’s because it’s good stuff. Bill pointed me at Steve Yegge, somehow I hadn’t run across him previously.
Item: Bruce Eckel on The Departure of the Hyper-Enthusiasts, which is too rich to summarize but if you had to, it would be: Ruby is good, but not really good enough to beat Python. I wrote about this before, but the conversation it started really has legs.
Item: Steve Yegge pushes back with A little anti-anti-hype, which argues that friendlier languages sometimes beat better languages, e.g. Perl vs. Python. The piece is, he admits, inflammatory.
Item: Speaking of friendly languages, if Steve is right, Ruby has won, check out why’s (poignant) guide to Ruby which isn’t just friendly, it’s a cute little puppy bouncing in your lap, licking your nose.
Item: Back to Steve Yegge, who irritated enough people with that previous piece that he wrote a follow-up, Bambi Meets Godzilla, making the same points, but well enough that you don’t mind.
Item: Steve’s Tour de Babel is a really funny and entertaining romp through a bunch of languages.
Item: Steve’s also interested in other-languages-on-the-JVM, just like me. Unlike me, he positively despises the Java language. Memorable quote: “Java has lots of wonderful features, but Java isn’t one of them. Java’s appeal as a platform for doing real work rests precisely on its strengths as a platform, not as a language.” This is in JVM Languages: Java 5, from the series entitled Stevey’s JVM Language Soko-Shootout, a really interesting run at a sample programming problem in a bunch of different languages running on the JVM.
Item: Speaking of those languages, it turns out that Charles Nutter who (with Thomas Enebo) leads the JRuby project, has a blog, in which he’s recently written about Getting IRB Going which he kind of has (although it turns out to be hard), enough to type in Swing (!) code; and a piece which starts talking about JRuby on Rails, but veers into a very interesting discussion of JRuby performance.
Java EE 5 ·
We’re announcing all sorts of Betas today: NetBeans, Java EE, and so on. Blogs are being aggregated on The Aquarium. I think the strongest statement is Graham Hamilton: Raving about Java EE 5. A couple of days ago I wrote “don’t write the Java EE crowd off, they’re not stupid at all...” Check Graham’s bullet list under “wide ranging goals”; definitely my kind of stuff. Maybe I should try writing that comment system in EE rather than RoR; if EE’s entry level could be engineered down to the point where it’s plausible for one-man projects, that would be a game-changer.
Mustang Beta ·
Check out Mark Reinhold’s excellent summary of the blogging flurry around the recent arrival of the Mustang Beta. Anything that has anti-aliasing in it is all right by me. I really like the style of Mark’s coverage, taking up questions about why the beta isn’t actually the latest build, potential license issues, and so on. I look forward to a time when anything less than this level of transparency is simply unacceptable.
LAMP and Java ·
Take a minute and read Stephen O’Grady’s write-up, which starts at the Sun Analyst Conference, but says a bunch of things about Java and LAMP and related subjects. I’ve been thinking about this stuff almost all the time for the past year or so, so let’s take his ideas a bit further ...
nbextras.org ·
I ran across a couple of blog pointers to nbextras.org and thought it looked kind of cool and kind of useful and kind of lightweight, and I wondered how it came to be here this week when it wasn’t there last week. So I chatted with Trung Duc Tran (he’s one of the senior people over in our Prague NetBeans shop) who put it together with a couple of other co-conspirators and asked “How’d you do that?” Well, it turns out that they found a cheap hosting service and rented a fake Xen-based server and cobbled together the Jetty server and the Pebble blogging engine. “It’s amazing”, Trung told me, “how much work you can get a servlet engine to do when you have all the data in memory.” I asked whether it was a lot of development time and he seemed surprised, they’d discussed it over lunch one day last week and set it up over the weekend and now it’s up. This Java/Web/Open-Source technology, it’s gonna catch on, you just watch.
The Aquarium ·
People have been asking for it since forever, and recent releases of Roller now have a group-blogging feature. I’ve always been skeptical of the idea, which redefines “blog” from being about an individual voice to being about a shared interest; because people are bigger and more interesting than their interests. But over the last couple of weeks, my attention has several times been drawn to pieces in The Aquarium, which is a group blog about GlassFish. While I’m not really an EE kinda guy, I can see how someone who cares about that stuff could find this kind of a resource useful. For example, check out this pointer to an over-elaborated but nonetheless useful article about doing REST in in JAX. Maybe “group blogs” have legs.
Upcoming Gig: JavaOne ·
Hah, I’m delighted. JavaOne accepted my talk, entitled Sigrid: The simplest possible grid computing platform. See you in San Fran in May!
Recursive Spolsky ·
There’s much ado about Joel Spolsky’s The Perils of JavaSchools. I think that Joel’s largely right, in that I don’t think that you can really appreciate why Java is a good language unless you’re proficient in C, and programmers who don’t really appreciate Java won’t get the most out of it. But Joel is half wrong in claiming that Java bypasses pointers and recursion; I use recursion all the time in Java! If you learn programming via Java but remain ignorant of recursion, you’ve been poorly taught. Also, Bill de hÓra has a point when he says that the other really hard thing that good programmers need to have thought about is concurrency. My guess is that Java is actually a good language for teaching concurrency, because the parts of the problem it sweeps under the rug are not essential to deep understanding and anyhow aren’t the really hard bits. Having said all that, if I were developing a difficult, mission-critical piece of infrastructure, I might develop in Java but I’d be leery of hiring anyone who hadn’t been to the mat with C. My experience differs from Joel’s in another respect: Recursion is mildly hard. Closures and continuations are hard. Concurrency is very hard. I never found pointers hard at all.
Language Landscape ·
As the year winds down, the programming-language news keeps flowing; at this point I wouldn’t be surprised by major New Year’s Eve announcements. Bruce Eckel wrote The departure of the hyper-enthusiasts, a lengthy riff on Beyond Java, giving Bruce Tate a hard time on some issues and ranting away informatively on Ruby & Python & Zope & EJBs & Rails & lots more; he’s a little less enamored of Ruby than others. Speaking of Rails, David Heinemeier Hansson responds at length. If you’re going to read these, do not fail to read the comments, which are even more interesting and informative; Bruce Tate turns up in both conversations. The other item that caught my eye was Cameron Purdy noting that Caucho claims to have a module that compiles PHP to bytecodes and runs it on the JVM four times faster than mod_php
(first benchmark, but on a real app not synthetic). It’s GPL’ed. This is more than a little surprising. I’ve been campaigning heavily in the Java community at large and here at Sun specifically to make dynamic languages on the JVM a major priority, but I’d never really focused on PHP, because I didn’t know anyone was even working on the problem. (Well, to be honest, also because PHP has always made me nervous.) This changes the “On Beyond Java” picture. [Late addition: last word to Steve Jenson.]
On Beyond Java — the Web ·
Bruce Tate’s Beyond Java is really Web-centric; he argues forcefully that lightweight Web apps are one of the forces driving people towards things like Ruby on Rails and Seaside, as opposed, say, to Java EE. My observations are mostly consistent with Bruce’s, which as a Sun employee makes me think a lot about how we can haul the Java platform into the lightweight-web-app sweet spot. (So far I’ve failed to convince the Software organization to redirect most of the Java EE engineering resources into a radical pursuit of Convention over Configuration. [He’s kidding -Ed.]) But Bruce’s book had me all cranked up to write about the Right Way To Program The Web, and then synchronicity whacked me upside the head with a demo I saw today, and I’m bathing in Web-architectural angst ...
On Beyond Java — the JVM ·
One of the subjects that keeps coming up in Bruce Tate’s Beyond Java is the parts of the Java platform that aren’t the Java language. In particular, the JVM. Is it still interesting, or will the JVM become like the mainframe: not going away, but old-fashioned and out of sight? ...
On “Beyond Java” ·
I just got around to reading Bruce Tate’s Beyond Java. I think that the senior people in the Java groups at Sun, and all the other Java powers, should read and think about it (and for that matter the CLR people over at Microsoft). The premise of the book is really nothing new: There are a lot of problems out there for which smart, senior people are reporting that there are languages and/or frameworks that produce solutions quicker and better than Java. Beyond Java assembles a lot of this testimony, claims that we’re at an inflection point, and goes on to speculate about what comes next. It argues interestingly by looking back at the history of Java’s explosive rise from nowhere to world domination; but at the end of the day I’m not sure the historical analogies are useful. In other gripes, the book’s structure is a little messy, and the kayaking anecdotes that introduce each chapter could have been dropped without loss of value. I also disagree with Tate’s argument that Swing and SWT are useless, part of the problem not the solution. I hear loud complaints about every GUI-builder; somewhat fewer about those in OS X; anyhow, as far as I know none of the beyond-Java alternatives are rich-user-interface champs. [Thanks to Sam Ruby for pointing out that I’d misread Tate’s argument on this, first time around.] Still, it’s a solid piece of work; see also Sam Ruby’s take and the discussion over at java.net. The book got me thinking about two great big important complicated issues: the future of the JVM, and the right way to build Web applications; but each of those gets its own essay.
Roller Redux ·
Which is to say, Roller 2.0 has shipped. Lots of new stuff, and anything that can hold up under the blogs.sun.com load is pretty well battle-tested. I wonder if there are any other freely-downloadable blogging engines (WordPress maybe?) getting as much full-time dedicated attention.
Bits on the Wire? ·
Interesting twofer from Jim Waldo, who is one of the Really Smart Guys in the Sun software ecosystem. Way back in May, he wrote Going all in..., arguing that when sending data over the wire, it’s good to send objects, and that trying to send raw data, not governed by the semantics of any particular object system, is problematic. I’m OK with sending objects over the wire—as long as they’re short-lived and you keep those fallacies in view—and the problems Jim outlines are real. But in fact, the basic value proposition of XML is that it allows you to receive data from another program while insulating you radically from the other program’s choice of computer, operating system, programming language, database, and so. And, it seems to work in lots of places, for example syndication feeds and product lookup. This doesn’t mean it’s easy, or that it works everywhere, but there are existence proofs. So I wrote a quick note to Jim along the lines of “Uh, what about XML?” Now I’m feeling guilty, because I see from his latest, What is XML?, that the question kind of derailed his plans for what he was going to write about and, well, now it’s October. Anyhow, go read the piece, it’s a good one, worth waiting for. To Jim’s points, I’d also add that pushing the syntax problem down into XML buys you both Unicode goodness and access to a whole raft of good free parsing software, which are not to be sneezed at. But his analogy between XML and Unix pipe-fitting culture is sound. Also, like Jim says, XML doesn’t make the hard problem—What does this character string mean?—go away.
What’s Going On? ·
Gosh, there sure is a lot happening; this week in particular, everyone who wants to lash themselves to the “Web 2.0” mast is hard at work, and the buzz flows thick and fast. Right at this particular microsecond, Zimbra (wondering about that name?) enjoys center-of-the-whirlwind status. Check out the architecture; this is a competitor for existing server-side communications products like Microsoft Exchange and Sun’s Messaging Server. It also has a decent-looking AJAX front-end, inspired mostly by Outlook but with what seem to be cool integration hooks (Rich Sharples wonders whether JavaScript is really the right tool for the job). Anyhow, good luck to Zimbra; it’s going to be a bit of a grind selling this kind of business-critical server-side product. It looks pretty good, but it looks incremental, un-radical. Meanwhile, I kind of suspect that Mark Pilgrim may be inventing the future off in a corner where nobody’s looking; you may not have heard much about either Atom stores or microformats; expect that to change.
InvokeDynamic ·
Hey, remember way last December, we had a bunch of dynamic-language experts in to visit the Java team here at Sun. That was just one little step in the process of making the Java platform a little friendlier to other, non-Java-like, languages. Today I see another step, Gilad Bracha writing about a proposed new JVM bytecode, invokedynamic
, designed to lower one of the nastier barriers faced by people staging dynamically-typed languages on the JVM. Gilad’s style is awfully prickly, but the narrative is engaging.
Just Enough JXTA ·
I’ve been reasonably successful at getting JXTA to do a couple of simple but very helpful things. Herewith some remarks on where I’ve found it useful, and on the Absolute Minimum Necessary code to get a JXTA app running. [Update: James asks me to post the code, so here it is, with commentary, probably only of interest to JXTA-heads.] ...
Indemnification? ·
A few days ago, I wrote about the scary Terms of Participation on Java.net. This led to some internal discussions, and it turns out to be more complicated than it you’d think; to start with, SourceForge and CollabNet have more or less the same indemnities. I still think it would be nice to get rid of them, but it’s not a slam-dunk ...
Scary Legals, Redux ·
I recently covered a story with a happy ending: the nasty (and misleading) legal barbed-wire in front of NetBeans got taken down. Next step: let’s do the same thing for Java.net. Read on for excerpts from the legals, but the bottom line is simple: to non-lawyers (like me), this is scary stuff. The person who pointed this out to me closed with the words “and so I’m not a member of java.net.” ...
More Dynamic Java ·
Check out this Java-to-Javascript “Hello World” from A. Sundararajan. While I always knew that there was official “scripting language” support coming in the form of JSR 223, I saw it for the first time last week too; and it looks like it’s actually going to be generically useful in a lot of different places, and not just with Javascript either.
HiveMind ·
There’s this project I’m involved with where they’ve built a prototype with HiveMind, and off the top, it looks like a very handy package of useful stuff, check it out. Mind you, I’m somewhat unenthused about all the mantra-chanting around Inversion of Control and Dependency Injection, yeah I know that Martin Fowler can write thousand-word treatises on it, but it seems much ado about some very basic O-O techniques. Maybe I’m missing something; I’ve always had a bit of an impedance mismatch with the Patterns People.
Jython 2.2a1 ·
Brian Zimmer did most of the work behind this alpha release, but Bill de hÓra has the best write-up. For simple servlets, by the way, I’ve found the current 2.1 release just hunky-dory, but it’s good to see progress. Congratulations and thanks to Brian.
The Generics Debate ·
We’re now well into our first Generic year in Java-land, and the jury is still pretty well out. For example, Ken Arnold attacks and Tor Norbye rebuts. Check out the comments on Ken’s piece for some fresh, intelligent contributions. As for myself, I’ve just genericized a bunch of infrastructure code, and the trade-off was pretty simple: I got rid of a ton of casts, and the users of my APIs will get rid of even more. On the other hand, I picked up a few compile-time warnings—yes, I do want an array like MyClass<K>[]
dammit! (And I understand that the warnings are correct, and that where previously I had an un-flagged potential ClassCastException
, now I can’t claim that I didn’t know.) I suppose there’s another benefit in that my APIs’ users won’t be able to put a Bicycle
in a container designed to hold instances of Fish
; is that a biggie? Personally, the compiler warnings irritate me more than the casts did, but if what Tor and some of Ken’s commenters are saying is right, I should just suck it up, because my users are benefiting.
Java One Day One: Blu-Ray ·
So what happens is, Sun saves up all its good news for months & months, and crams most of it into an opening two-hour barrage at Java One. It’s pretty impressive, and so are the audio-visuals, with opening high-intensity cyberelectromoodjazz from a band whose name I can’t find but featuring Paul Horn. Anyhow, news: BigIBMDeal, GlassFish, ReallyFastWorkstation, NewJavaNames, and there’s more. The one that I hadn’t known about and was a real surprise was the news that Blu-Ray players are going to come Java-enabled. This is surprising, but obvious when you think about it; along with your HD movie you can put a few classfiles on the disk to do menus and updates and special-effects and, well, just about anything. For those who don’t know, there’s this ferocious multi-year battle that’s been going on for years between two rival camps who want to produce the next-gen DVD: Blu-ray and HD-DVD. It has nothing much to do with technology, it has to do with collecting per-disk patent royalties like the ones Phillips gets for every CD. The Java move might be significant in this big complicated chess game.
Enterprise Open Source ·
Among the flurry of Java One announcements is GlassFish, CDDL-licensed source code for something called “Sun’s Java System Application Server PE 9”. I said “Huh?” and they explained to me that this was our implementation of the Java EE spec and I said “Oh good, we’re open-sourcing EE!” and they sneered at me and said “No, EE is defined by a particular binary that passes a particular compatibility test, so in principle you couldn’t open-source it”. Uh, right. Anyhow, I am quite sure our efficient PR people will be emitting a flood of details and FAQs, so I’d just like to tsk-tsk gently at our friends out there (you know who you are) that rushed into print last week deploring our cluelessness for not doing what was done today. Hey guys, cut us a little slack. And a tip o’ the hat to Bob Sutor who did.
The Java + Open Source Sweet Spot ·
Check out this piece from Tim O’Reilly. The O’Reilly people track sales trends in tech books, not just their own but the whole industry. They’re transparent about their methodology and in my opinion these numbers are very solid and believable. Anyhow, in this case, you need to read the narrative that goes along with the picture. The growth is being driven by the OSS+Java stuff: Spring, Struts, Lucene, and so on. Hey Tim, how about doing middle-aged eyes a favor and making future versions of the graph a little bigger?
The Autobox of Death ·
Hmm, maybe I should have another blog for Java geeking. What happened was, I had an ArrayList<String> and for a variety of reasons I decided to turn it into a HashMap<String,String>. After I’d fixed everything up, I got the weirdest NullPointerException, and I traced it to a call that looked like (x is the HashMap)
if ((x.size() > 0) && x.get(0).equals(foo))
and somehow the compiler had decided that get(0) was a reasonable thing to do to a HashMap<String,String>. Uh, strong typing, anyone?
Java Tiger Bites ·
I finally switched over to Java 1.5 for my coding work. Herewith a couple of things I found moderately surprising. For Java hounds only ...
JXTA Pancakes ·
One week late last year, on a lark I made a traditional Sunday breakfast: pancakes, bacon, and maple syrup. The kid has on every subsequent Sunday put in a non-negotiable demand for more of the same. The good news is that the pancakes are getting better. The bad news is that learning sucks, and my JXTA pancakes are still kind of burnt and misshapen ...
Project Harmony ·
Everybody has now heard about Harmony (if you haven’t, here are the proposal, FAQ, and friendly noises from Sun). Suppose they pull it off, and that there’s an OSS J2SE that anyone can download, build, and change. Why is this a good thing? If you’re a member of the Free Software movement, the project is its own reward for reasons of pure ideology having nothing to do with technology, engineering, or business. I’m not among the faithful, but I’ve nothing against ’em. How about for the rest of us; are there any actually any practical real-world advantages? I’d think the most obvious win would be around patching and bug-fixing. In my experience, OSS software gets bugfixed quicker and better. On the other hand, the Harmonians plan to achieve compatibility by passing the TCK test suite, which everyone says is tough and time-consuming; quite likely, more time-consuming than most individual pieces of bug-fixing. So that might get in the way of the kind of patching responsiveness we’ve gotten used to in OSS-land. [By the way, is it publicly known how long the J2SE TCK actually takes to run? I’ve never seen that published.] I guess you could apply patches without doing a “release” and run an un-TCK’ed J2SE on an interim basis. That might make some people nervous; it would make me nervous. In fact I think the rules say you can’t call it Java unless it’s TCK’d, so I guess we need a new name; I propose “JINJ”. Whatever; whether or not you really think Harmony is worth doing, you have to like people who are hurling themselves at big tough problems, and not in the interests of getting rich. Plus, they’re doing it at Apache, my own favorite OSS nexus. My hat’s off to them.
LimeWire & Chansonniers Perdus ·
For the Français-challenged, the last words sort of mean “missing singers” but a chansonnier isn’t just a singer, it’s a French male pop singer in a particular romantic kind of old-fashioned style. Anyhow, they’re still missing, despite the best efforts of some really remarkable software; oh, and there’s a P2P vs. RIAA angle too. [Updated: found one out of two.] ...
Jini and the Tokyo Subway ·
Just now, the big story in Jini-land is the Starter Kit release. I’ve been spending quite a bit of time here the last few days, trying to figure out whether it’s the future or not; either way, it’s important ...
Java, the Grid, and Rio ·
I’m thinking about how you’d run a big distributed Java system as a service across a whole lot of networked computers, spreading out onto new processors as required, and exchanging high message volumes. Sounds kind of like a “grid”, doesn’t it? Poking around for APIs first turns up DRMAA, but it seems to be oriented towards batch jobs that run for a while then stop and don’t talk to each other much. Daniel Templeton pointed me at the Rio Framework (from Jini-land), which looks like more or less exactly what you’d want. Actually, Daniel just gave me the name “Rio Framework”, which turns out also to be the name of an alternative-policy treaty, and then searching for “Java Rio” gives us Peter del Rio as well as various summits and JUGs in Brazil, so it was real work to find the software. This fragment is a conscious attempt to give it a little Google-juice; I’ll report back on whether it works.
One IDE to Rule Them All? ·
Don Box has an interesting set of Predictions for 2005. Every one of them is thought-provoking and well-framed. There is one, though, that I have to push back on: the surface prediction (#2) is that “Sun will embrace Eclipse”. The deeper issue here pops up a sentence later, when Don talks about “unifying on a common tool platform”. Well, as I (and everyone else who attended) learned at the “IDE Shootout” event at the last Java One, the Java IDE landscape is like a messy, vigorous, noisy, public marketplace. Each of the big IDEs is here for the long haul; and it’s not just Eclipse and NetBeans. Don’t forget Emacs, JDeveloper, and the IDE with the most fanatical fans of all, IntelliJ IDEA. Unlike the Windows world, where Visual Studio is all that really matters, what we have here is an ecosystem, a market, a place where competition and evolution happen. There is absolutely zero chance that the Java world will ever “unify on a common tool platform”. Which is A Good Thing.
Javapolis Jet-lag ·
In a week distinguished by good food and bad travel planning, I flew to Europe on Monday to attend Javapolis in Antwerp, Belgium, and returned Thursday. Herewith an illustrated travelogue and remarks on the conference, the Cathedral and the Pink Panther, and the flesh of Jesus ...
Java Coalface Notes ·
I managed to ignore Atom for a few hours this week and get back to working on project Zeppelin, which leads to a few thoughts on object transmission, concurrency, Jython, and other stuff of possible interest to hands-on Javans ...
Latency ·
[For Java/networking geeks only.] I have these two Java programs, talking through an ordinary TCP/IP socket. The client sends a (medium-sized) serialized object to the server, which does a little bit of computation and acknowledges by sending a (small) object back. Straight writeObject()
/readObject()
calls with setTcpNoDelay(true)
in effect. When both of them are running on my 1.25Ghz PowerBook here, the latency required for the whole transaction is like 190msec, which is horrible. So I moved the server code down to the mouldy old P300 Debian box in the basement, talking to it over two or three legs of WiFi and Ethernet switches, and the latency dropped to around 33msec; still not great, but the difference is instructive.
NetBeans ·
I’ve been using NetBeans to inflate the Zeppelin, and you know what, it’s not bad. The Mac integration could be a little better, but a whole lot of things I need to do are one keystroke away. It runs plenty fast enough on the PowerBook (mind you, only a few thousand lines of code so far). JUnit’s right there, which is nice. The debugger makes it a little too hard to to keep an eye on class variables, but aside from that does about what I need; when I was driven to “print” statements the other day I was fighting a complex socket conversation between two machines where one side suddenly started seeing EOFs and I couldn’t even tell which side was wrong, I’m not sure there’s a debugger in the world that would have been much help there. Now all I need is to get Jython integrated, and we’re making progress on that, stay tuned.
javadocs.org ·
Via the excellent Russell Beattie, a pointer to javadocs.org. Given the amount of Java programming I am apt to do in the next few years, I suspect this could save me several weeks out of my life, in aggregate. I’m making a donation, and I think my employer should help too; maybe we already are.
By Tim Bray.
The opinions expressed here
are my own, and no other party
necessarily agrees with them.
A full disclosure of my
professional interests is
on the author page.
I’m on Mastodon!