Now blogging at diego's weblog. See you over there!

you like your myths rare or well done?

This pisses me off slightly, which accounts for the more sarcastic tone. In case you were wondering. :-)

I was just reading Vasanth's entry "study reveals not-so-hot java" in which he happily perpetuates myths that for some reason keep sticking to the Java platform. The only point that is half-true in his list is that Java is not managed by an open standards body. I know that many people are not happy with the JSRs, but it's half way there, and Eclipse keeps gaining momentum (memory refresh: Eclipse started about three years ago).

As for his other "points": I'd suggest this: the next time you hear someone say things like "Java is slow on the desktop" your should ask:

  • compared to what? Assembly code? and
  • Where, exactly is your proof? How about a few examples of non-performing Java desktop applications?
I have a number of examples that actually prove quite the opposite to the slow-on-the-desktop claim.

"Write once, run anywhere not true" he says. Really? Then how is it possible that I could write a client application that was deployed successfully on everything between Windows, Linux, MacOS, and even OS/2? Without a single line of platform-dependent code? Is it magic? I can't remember any chanting being involved...

And as far as those much discussed "scalability problems", hey, isn't eBay's use of J2EE enough proof that Java can scale?

Case closed.

Categories: soft.dev
Posted by diego on September 12, 2003 at 8:35 PM

robotize!

AIBO-ERS7As usual, for cultural (rather than technological) reasons, Japan is on the forefront of these kinds of things:

Mrs Tanaka is 84. Today, as usual, she wakes just before 7am, slips on her dressing gown and flips a switch to start water boiling for her first green tea of the day. She's about to get dressed when she pauses. She turns to the low table near the door, where a soft toy sits incongruously, and greets it in her distinctive west-Japan accent.

"Good morning Teddy. How are you today?" "Pretty good, thanks Tanaka-san," comes the reply. "Have you remembered to take your pills? It's the pink ones this morning," the robot bear continues.

A scene from AI 2 or a vision of a slightly over-cooked future nanny state? Actually, it's here and now in Japan.

And, yes, I'm one of those that would get an AIBO if I could...

Btw, I just realized that William Gibson, for all his understanding of Japanese culture and his uncanny ability to "see beyond", has never made much of a deal of personal robots in his novels or stories--even if one might argue that the trend is just too new, it precedes both All Tomorrow's Parties and Pattern Recognition, so a tiny mention would've been expected. Or maybe by now they are too mainstream to qualify for the wonderful techno-kitchness of some of his characters. I wonder.

Categories: technology
Posted by diego on September 12, 2003 at 8:12 PM

simplicity applied

I was going off the deep end in Win32 (yes, I know...) to finish some tests I need to do for my thesis research, and I decided to get some instant gratification by doing something simple: update my templates since there were a couple of weblogs in my blogroll that had recently changed location, and check out my feeds to see what, exactly, was being generated. I had been using the default movable type templates (which in my installation, an upgrade from 2.4 or something, where RSS 0.91 and RDF). In the process I discovered that my original 0.91 feed did not validate due to the date format, which was not RFC 822 (as the RSS spec requires), but ISO 8601...

So I went looking and I found that Movable Type now has a template for RSS 2.0 feeds. Nice! Grabbed it updated, and tested through the feed validator. It worked.

So far so good.

Then I read Sam's great presentation on RSS at Seybold, and there he had a mention of "Funky" feeds.

I remembered that a big argument had started a few weeks ago in this regard. At the time the discussion had turned ugly so fast that I simply stayed away, and didn't even follow it that much.

But now I was intrigued. So I started looking at the RSS 2.0 feed that was being generated by MT, and I understood what the discussion was about.

What was happening was that MT's RSS 2.0 template was using Dublin Core elements to replace elements for which RSS 2.0 had equivalents.

Aha! It wasn't clear to me why this was being done. The feed was valid, true, but somehow it didn't feel quite right... I felt it was like using JNI to access C code for, say, calculating the tangent of a value when using java.lang.Math would suit just fine.

If RSS 2.0 had the elements, then why replace them with something else? I revisited the discussion a bit and saw that Mark had argued that DC elements were more of a standard than RSS 2.0 equivalents, which was a fair point but still didn't quite explain why you'd require aggregators to deal with additional namespaces when you could get away with simply using "built-in" tags. Besides, it was Mark's opinion, rather than MT's, so as reasonable as his argument was it didn't definitely explain why MT was going in a certain direction. Furthermore, I didn't quite agree with the logic; as much as I like the idea of Dublin Core, I'd prefer to go with built-in elements any day of the week (as Atom has done, btw, in not using DC elements even when it could have done so). I now had the opportunity to follow up on what I had been talking about a couple of days ago regarding simplicity, with something small but concrete.

Okay, so I started investigating more and trying to change the feed template into pure RSS 2.0 (no namespaces). Everything seemed to be going fine until I hit the pubDate and lastBuildDate elements. MT was using, for example, dc:date. When I tried to take the date "out of the namespace" it didn't work, even if I changed the formatting to match that of RFC 822. Why? Because MT does not have a tag to generate RFC 822 timezones. The only tag to generate a timezone included in MT is $MTBlogTimezone$, which generates ISO 8601-style timezones.

Things now started to make sense. MT didn't have a tag for that, hence the best way to generate a valid feed was to use an ISO 8601 date, which can only be included if you're using Dublin Core elements, rather than the RFC 822 elements that the feed requires. And after you include one namespace, well, why not do it all on namespaces, since the line has been crossed so to speak. At first I thought that this "line crossing" had been because of the use of category in an entry through dc:subject tags, but rechecking the RSS spec I saw that RSS 2.0 has a category tag for items as well as for feeds, so that wasn't it. It was only the date that was bringing this whole cascade of namespaces tumbling in. That's my theory anyway. :-)

Regardless of why this was happening, I was sure there must be a solution. The Movable Type tutorials at feedvalidator.org were empty, so no luck there. One googling, though, turned up John Gruber's RFC 822 plugin for MT. John's plugin adds the $MTrfc822BlogTimeZone$ tag, which is all that was missing to generate the correct date. Great! Now I had all I needed.

The result is this template which depends on John's RFC plugin and generates valid RSS 2.0 with the tags that I need and avoids using namespaces (maybe when adding more functionality not supported in the base spec, namespaces will be necessary, but I prefer to avoid them if possible). Now I have a pointer for both RSS and RDF feeds on the page. Still have to re-generate the whole site, though, which will take a while.

Phew!

Categories: soft.dev
Posted by diego on September 12, 2003 at 11:46 AM

Copyright © Diego Doval 2002-2011.