NetBeans 6.0 M9 and JavaFX Script

Tuesday, May 22nd, 2007

Quick tip: if you’re playing with JavaFX Script, stick to NetBeans 5.5. The JFX plugin is pretty throughly broken in 6.0, as are several other unrelated features. 6.0 M9 is way too buggy to be used in production just yet.

Another Reason Java is Faster than C (maybe)

Monday, March 12th, 2007

Paul S. R. Chisholm points out a new reason virtual machine based languages such as Java may sometimes outperform statically optimized languages such as C:

Portability depends on architecture (for example, x86 vs. PowerPC), but high performance depends on microarchitecture (for example, Pentium M vs. Athlon 64 X2). Today’s Core 2 chips have many high performance features missing from the 1993 original Pentiums. A good compiler like gcc can take advantage of those additional features. This is bad news if you’re using a binary Linux distribution, compiled to a lowest common denominator. It’s good news if you’re building and installing Linux from source, with something like Linux From Scratch or Gentoo/Portage. It’s also good news for just-in-time compilers (think Java, .NET, and Mono); they’re compiling on the “target” machine, so they can generate code tailored for the machine’s exact microarchitecture.

This sounds plausible in theory. What I don’t know is whether Java takes advantage of this in practice. Has anyone looked at the JIT source code lately? Can anyone say whether it makes any microarchitecture-specific optimizations?

PDF Killed the Programming Language

Sunday, February 25th, 2007

It’s a slow Sunday morning so I was going to browse around a new language I’d been hearing rumors of, and maybe send them a little link love if I liked what I saw. However it seems all their tutorials, manuals, white papers, and almost everything else are in PDF. Yuck. Not worth my time.

They’re complaining that they can’t get any thought leaders to pay attention to them. If they insist on publishing on the Web in a format designed for paper books, it’s no wonder no one has noticed them. Write back when you start noticing this little thing called HTML, guys. I’ve got a feeling it’s going to be big one of these days.
(more…)

Answering Sleepycat

Sunday, February 18th, 2007

Sleepycat asks some interesting questions about a non-standard persistence API they are developing. By the way, non-standard is good. Ideas like this should be tried out in open source products first before baking them into standards. I applaud Sleepycat for taking this route instead of rushing into the JCP. Indeed standardizing in advance of implementation experience explains a lot of the problems in JEE that APIs like this one are designed to replace. Anyway, on to the questions:
(more…)

Homework

Monday, February 5th, 2007

Don’t you just love students who send you their homework problems in the hopes that you’ll do it for them? Here’s the latest example I’ve gotten:

Often in reading an article, a book or a document one comes across a word whose meaning is not known to the reader. This problem can be overcome by providing an on-line dictionary so that a reader could look up the meaning of a word. In order to provide help with reading, you are asked to develop a Java Applet with the following GUI interface:

Labels Text Boxes
Word typed Text box A
Word meaning Text box B

Once a user types a word in text box A and presses return, the meaning of the word is displayed in text box B (provided that word exists in the dictionary), otherwise, the message “word not known” appears in Text Box B. Notice that both text boxes are preceded by a label. For the purpose of testing, it is expected that the developed Applet is able to cope with 100 or more English words

That’s actually not a bad problem: takes in applets, GUI widgets, event handlers, data structures, and possibly network communication (if the dictionary is stored remotely). However it’s not too complex to implement in a week. I’ll have to remember it for my own classes.

In the meantime, if any teacher recognizes this as their own assignment and wants to know where I got it, drop me a line. :-)

Compiling Javac

Thursday, November 16th, 2006

I downloaded the javac sources and gave them a whirl with ant on my PowerBook. No success. They wouldn’t compile. I’m not sure whether this is because I’m using a Mac or because I’m using Java 5, and they want Java 6. There seem to be several missing or incompatible classes.
(more…)