<< August 2008 | Home | October 2008 >>

Microsoft: Closures And The Java VM

Enjoy The Cognitive Dissonance!

(Via Clojure Google Group.)

In light of the news from yesterday, one shouldn't be shocked too much by this. Yet I find myself stunned by the following visual:

Microsoft: Closures And The Java VM

Also, check out the blogroll at http://gafter.blogspot.com/ (at least until it is further updated).

Neal Gafter To Join Microsoft

(Via Twitter.)

Neal Gafter: Joined the JavaPosse last night for a new minutes during their recording session, discussing my new employer... Microsoft.
Danny Lagrouw: @gafter huh? Microsoft? But c# already has closures!
Neal Gafter: @danny_l Doh!

But, but, but,...

Friday Java Quiz: Enhanced for Loop

Q: Will the following program compile? Run without exceptions? If so, what will it print?

public class Foo {
  public static void main(String[] args) {
    String[][] sss = new String[2][];
    int c = 0;
    for (String[] ss: sss) {
      ss = new String[3];
      for (String s: ss) {
        s = "Slot # " + c++;
      }
    }
    for (String[] ss: sss) {
      for (String s: ss) {
        System.out.println(s);
      }
    }
  }
}

Strict rules this week: you must not actually compile the program before answering the questions.

Tags :

James Gosling: It Really Should Be JDK 7

Code To Joy's blogging about a James Gosling quote reminded me of another recent James Gosling quote that I've meant to blog but haven't.

In an appearance on This Ain't Your Dad's Java, James Gosling is heard saying:

James Gosling on 6u10 (at 5:00 minutes): And 6 update 10 is kind of a challenge because It's not a normal update. It is a normal update in that from an API point of view, you won't see very much. But under the sheets, it really should be JDK 7.

So I'm not alone in harboring that thought.

Tags :

Hey Rod, You Are Killing Your Company

(Via The Fishbowl)

Unnamed PR firm for SpringSource: After a new major version of Spring is released, community maintenance updates will be issued for three months to address initial stability issues. Subsequent maintenance releases will be available to SpringSource Enterprise customers. Bug fixes will be folded into the open source development trunk and will be made available in the next major community release of the software.

A lot of people have voiced their opinions about this policy, and an open revolt, a.k.a. a fork, is called for from open source advocates.

Rod Johnson and company is too smart to have not anticipated such reactions. The fact that they went ahead with the plan anyway indicates to me that they are pursuing some other goals. And the way words like "enterprise", "subscription" and "customers" are used indicates that it is money they are after.

I don't fault them for wanting to make money. It is wonderful to have paying customers for your software product, especially an open source one.

However, the policy of differentiating paying customers and community users by the releases that they may or may not receive simply goes against the grain of open source thinking. The community is rightfully "outraged." But we already know that they don't care.

The key here is the response from the paying customers. And I do think that they have some legitimate questions to ask:

  • The extra patched releases that I receive after three months (but within three years), are they still open source? Can I redistribute it, with source, to the world?
  • If what I receive is not open source anymore, have I been "bait-and-switched" into thinking that I'm going with open source when I selected Spring?
  • SpringSource has taken the first steps of abandoning the open source community. Will the product lose its luster?
  • Am I locked in? Will the subscription price go higher each year?

Once again, SpringSource is too smart to have not thought about these, and the effects on their open-source-oriented customers (that they will be gone).

That leaves only their paying customers who don't care about the open source thing that much.

Even for them, there are still some key questions:

  • I know we don't care about open source. But SpringSource ought to care, they are, after all, an open source company. Why are they alienating their own community?
  • They must be desperate for money. How long can they last?
  • What if my biggest competitor bought SpringSource?

I'm sure Rod Johnson and company has good answers to all of the above questions.

Tags :

Fwd: Serious e1000e Driver Issue in SLE 11 Beta 1 and openSUSE 11.1 Beta 1

Joe 'Zonker' Brockmeier: The Intel e1000e driver on openSUSE 11.1 Beta 1 and SUSE Linux Enterprise 11 Beta 1 might have a serious issue with the potential to damage the network card in a way that it cannot be used any longer.

Tags :

Friday Java Moral Dilemma: import com.sun.net.httpserver.HttpServer;

Todays question stems from an answer to last week's quiz. In this answer, Solomon Duskis used two imports from the com.sun... package hierarchy:

import com.sun.net.httpserver.HttpServer;
import com.sun.jersey.api.container.httpserver.HttpServerFactory;

Q: (Pretend that these imports showed up in code in your project, and you are in a code review session prior to a release of the project) Should these imports be allowed to be used in your project? On what ground?

Tags :

Quote Of The Day

Now that we have been awarded the contract, we have to do it.
Tags :

VisualVM Is In The JDK Now...

... you should check it out:

[weiqi@gao] $ jvisualvm
Visual VM In Action

Java 6 Update 10 RC2 (b32): JavaFX Comes To A Cache Near You

Yet another release candidate (b32) for Java 6 Update 10 is released today. Going through the fixed bugs list, I found this RFE:

Bug 6735003: JRE-Installer should pre-populate deployment cache with JavaFX Libraries.

The JavaFX libraries should be setup as JNLP extensions in a well known permanent location (URL).

The libraries should not be bundled with the JRE installer. At the end of the installation, we should launch "javaws -import [javafx url]" in background and have it bring down the libraries silently.

We might need some changes to the deployment download engine and see what can we handle this background download efficiently, e.g., what to do if the client tries to start a javafx application while this backround download is still in customer.

It's time to learn about JNLP extensions.

Tags :

StackOverflow.com Goes Public

Abel Avram reporting on InfoQ: Stack Overflow, a web site for programming questions&answers, has been made public while still in beta. The site offers programmers the opportunity to ask questions and receive answers from fellow coders for free, and intends to become the right source of answers for any programming question.

I've been aware of this website for quite some time. First from listening to the StackOverflow podcast on IT Conversations. And then recently from my referer page.

You get a strange feeling when non-public or foreign language websites link to your blog. Now that it is public, I can finally see what they are talking about.

If this is the first time you've heard about StackOverflow.com, let me just mention that it was built by Joel Spolsky and Jeff Atwood, prolific authors of humorous, and sometimes biting, programming related web contents.

I'm not a big fan of programming Q&A websites, mostly because most of them a ad-laden or behind pay-walls. I hope StackOverflow.com will be one that reverses the trend.

Google Chrome Annoyances (Part 1)

Let me preface this series of postings with this statement: After 14 days of use, I find Google Chrome a satisfying browser to use. That satisfaction comes from its UI simplicity, speedy response time and stability.

However, here are some of the features that I wish Google Chrome had:

  • I still reflexively press the "/" key when I want to start a search on the current page, only to discover that the search word I typed is not showing up in the lower left corner. Then I remember that I have to use "Ctrl-F" and look at the upper right corner.
  • I tried to find a way to add a "Printer" icon to the address bar but failed. And I find the "Print..." menu item in the context menu to be "further away" than an icon in the address bar.
  • The idea of a "Home" page that contains your browsing history sound good, but I find myself using it less than I expected. I go there only when I know I can find the link threr before hand.
  • I find myself wanting to setup multiple "Starting Page" tabs (what Firefox calls "Home Pages") and the UI for doing that is awful. I struggled to get the tabs to line up just the way I wanted.
  • I haven't felt the urge to hunt for plugins for this browser too often. But the few times I did try, I failed. I'm using Google Chrome without the benefit of AdBlock or Google Toolbar.

Granted, some of the above complaints are Firefox inertia. But nevertheless, they are Google Chrome pain points. I'm sure people who come to Google Chrome from IE, Safari, or Opera would have different sets of pain points of their own.

Friday Java Quiz: RPC vs. REST

I've been hearing a lot about the merits of REST over the deficiencies of RPC lately. For example, the latest blog entries from RPC-hero-turned-REST-advocate Steve Vinoski.

While it's fun to listen to famous people debate the issues, I've always had the impression that REST is something that is not as concrete as RPC. In Java, for example, If I want to do RPC, I have several different tools that I can use right there in the JDK: one is RMI, the other is Java IDL (not that I'll recommend it).

That leads to todays question:

Q: How the bleep do you get started with doing REST with Java?

(I know you are going to wave your hands every which way and utter phrases like "uniform interface" or "hypermedia as the engine of application state" or "internet scale" or "small joins, loosely parted".)

Q: Show me! (Send a string "Howdy" from host A to host B the REST way.)

No peeking at the internet or the REST book. Just write the demo.

Tags :

Did Google Just Update Chrome Without Telling Me?

Check your "About Google Chrome" box now. What version do you see?

Mine is "0.2.149.29".

My server log shows a mixture of "0.2.149.27" and "0.2.149.29".

The funny thing is, I don't remember ever seeing a "Your Google Chrome has been updated" message when I started Google Chrome.

Until I figure out a better explanation, this browser is provisionally classified as "evil".

Quiz: Which App Does Not Work With Chrome?

Q: Which of the following *does not* work with Google Chrome?

  • Microsoft Silverlight 2.0 Beta
  • Google Toolbar
  • Google Desktop
  • All of the above
Tags :

Killing Flash But Not Firefox: Yes You Can (On 64-bit Debian)

Reading the Google Chrome comic book last week lead me to the following line of thoughts:

A: It would be nice if I can kill a tab as easily in Firefox as in Google Chrome.
B: Nah, I can't because everything runs in the same process.
A: But those darn Flash/Flex apps—they routinely eats 100% of my CPU and hang all tabs, all the time
B: Too bad they are in-proc. But wait, they aren't on 64-bit Debian.

Recall that Adobe provides their Flash plug-in for 32-bit Linux only. And to use it in 64-bit Linux, a nspluginwrapper is needed (as I reported 410 days ago.)

Yesterday, I got into one of those situations where Firefox is using 100% CPU and is not responding. I fired up SystemMonitor and sure enough, underneath firefox-bin there is a subprocess called nsviewer.bin. I killed the nsviewer.bin process and Firefox (well, IceWeasel, to be precise) became responsive again.

I was happy.

Google Chrome: The Evaluation Period Commences

This is unreal. I mean the Google Chrome debut, not the Sarah Palin nomination. The first hint of the latest Google beta came to me via a Wall Street Journal email tech alert:

Jessica E. Vascellaro and Robert A. Guth reporting for wsj.com: Google Inc. plans to introduce its own Web browser, the latest twist in its battle with Microsoft Corp. over key Internet technologies.

Then came a full two days of media buzz around the thing, complete with a, get this, leaked comic book that include real life characters (I recognized Dion Almaer and Chris DiBona before I read the captions.)

That was followed by the anticipation evoked by a count down clock on the official download page. "In 11 hours" it said.

I sat there clicking the "refresh" button on my Firefox 3.0.1 browser until "In 10 hours" showed up. Wow, a brand new browser, I thought.

The final download order came in the form of a tweet:

dshaw, 02:01 PM September 02, 2008: Check out: http://www.google.com/chrome/ Cranking up an XP VM to check out Chrome.

That's when I downloaded the thing and installed it.

I don't know what this means yet. But I'm going to do some real life evaluation of this browser in the next month or so. I went to the "Set program access and defaults" menu and made Google Chrome my default web browser, *and turned off access to IE7 and FF3* (and Safari3, but Sarafi3 refused to be turned off).

Expect a usability report in about four to eight weeks.

Tags :

Java News Brief (JNB): Writing API for XML (WAX)

I've fallen behind on reporting OCI's Java News Brief (JNB) articles, again, lately. But this month's article made the job so easy: Mark Volkmann wrote it. It's about his open source Writing API for XML library. And you can watch it:

I hope I never have to write XML by hand, but if I do need to, WAX sounds like a pretty nifty library.

Tags :