<< October 2003 | Home | December 2003 >>

A Problem Is Solved

When I upgraded my weblog software to Pebble 1.4-dev (CVS) 54 days ago, I noticed some inconsistencies between stand alone Tomcat 4.1.27 and the embedded Tomcat in JBoss 3.2.2 + Tomcat 4.1.27 in the way HTTP BASIC Authentication is handled. The net effect is that the trackback feature cannot be used under JBoss + Tomcat.

Simon Brown, the author of Pebble, has provided a work around for the problem. He has also written a nice summary of the issues involved at Java.Net.

I've just updated my Pebble to the latest CVS. And I think I'll send a trackback to Simon, and let him know that all his hard work is very much appreciated in this corner of the universe.

Fedora Core 1 Installation Notes

This is a post I made to the SLUUG mailing list 16 days ago after I installed Fedora Core 1 on my Thinkpad T30:

Just a quick note to let you know how my Fedora Core 1 installation went yesterday.

I did two installs, once as an upgrade to Red Hat 9, and the other as a fresh installation. The upgrade messed up my network configuration, and Japanese TrueType fonts (so that Mozilla crashes every time the mouse is hovering above the "Bookmarks" button). The fresh install fixed both issues.

I could have fixed the network and font issues by hand. But I was thinking, "If these basic things are messed up, what about all the other things?" So rather than being a unpaid QA person for Fedora, I took the easy route of just wiping the slate clean and did a fresh install.

The installation process is the familiar Red Hat one. In some of the dialogs, they still say "Red Hat Linux". It still says I have a 3 button PS/2 mouse even though I have a USB wheel mouse and a touch pad. I did not bother to change that and the mouse works after the install. I still have to choose my LCD resolution by hand.

It detected both the wired and the wireless network card.

The problem I had with my screen being all messed up after returning from a screensaver or from the suspension mode seems to be gone. I don't have to do the "Ctrl-Alt-F1, Blank the screen and Unblank the screen" exercise any more. However I'm having another problem. Shortly after coming back from suspension mode, the whole thing freezes due to some "dma-timer-expiry" issue with hda. So I have to turn the thing off and on.

I don't know if I'm better off in that regard.

Up2date seems to work, although there are no updates yet.

Everything else feels just like Red Hat 9.0.

Java Software Distribution

So you've written this wonderful Java application. J2EE backends. Swing GUI. Everybody loves it. They all want it, willing to pay good money.

Now, how do you distribute the application? Windows people want InstallShield. Linux people want RPMs. Neither is appropriate.

You take great pains to craft an ear file that can be just "dropped into the App Server". And client jar files that can be started by the "java -jar" command. And a couple of simple property files for configuration.

I say, just jar them up into a bundle with a manifest file. And write a universal installer that fills out the configuration files on the target machine.

Here's how it should work:

$ jui big-app
Found big-app at mirror.com, version 1.1, get it? y

Put it in download/big-app? y

[......................] 100%

Configuring big-app, this will take just a minute

Where is the deploy directory? /opt/jboss/deploy

[......................] big-app.ear copied there

Where to put the client jars? /opt/big-app/share/java

[......................] 10 jars copied there

Big-app needs some configuration.

Where is the database? jdbc:oracle:thin:@box:DATABASE

What color do you want? red

[......................] Configuration done.

$

It would be nice if it also manages dependencies.

Computers Know You Are a Newbie

I believe computers are not as lifeless as a machine. They play tricks on people's minds. They are notorious in the way they frustrate people who are new to computers or a task. I have experienced this scenario many times, on both ends:

A: "Hey, come here. I can't make this work."

B: (Comes over) "What is it?"

A: "I just did X, and then I did Y. I should get Z, but I did not."

B: "Show me again."

A: (Does X, and then Y, and gets Z) "Oh well, it worked this time. Thank you anyway."

Swing's Successes

Every once in a while, a "Swing has failed" cry would break out on the web. The latest instance of said cry is A Java Today article by Joshua Marinacci.

Inevitably, someone will make a comment saying, essentially, "Look at IntelliJ's IDEA! It's Swing."

Let me just say up front that I don't agree with the "Swing has failed" camp. I liken them to the "Math is too hard" camp. And I suggest that they change their chant to "I have failed at Swing." And just because you have failed at Swing, doesn't mean that everyone else must also fail at Swing, for clearly success has been attained with Swing.

The key to success with Swing, as I witnessed in my latest project, is to take advantage of the capabilities of Swing, especially patterns and frameworks.

As an example, let me pick apart Joshua's first point:

Swing apps are slow to build. Building a Swing GUI takes time because you have to do it programmatically.

Isn't it odd that a programmer should complain about something being programmable? The fact that Swing GUIs are programmable is a huge opportunity for programmers because you can build higher level abstractions on top of it.

It can be done. It can be done to the point where making changes to the GUI appearance takes only seconds.

Adam Explains JMX

Adam Quan did an excellent job explaining JMX.

SQL Injection, Cross-Site Scripting, Session Hijacking, ...

Been an most interesting evening at the St. Louis C# SIG meeting at Microsoft. The guest speaker is Jeff Prosise from Wintellect. To topic is Web security.

Specifically, four types of popular web site hacking techniques are demonstrated:

Very effective presentation. Have to be present to appreciate.

Knowledge, Expertise, Sense of Accomplishment, ...

When are you the proudest: when you have built something? or when you have figured something out?

I definitely belong to the latter category. Having won the first prize in the Chinese Mathematics Olympiad years and years ago for having figured out a few elementary problems, I experienced the thrill of victory.

But merely figuring out something accomplishes nothing. And society rewards those who build. In a sense building is the natural extension of knowing. Consider these:

  • I know how to learn to build a shelf.
  • I know how to build a shelf.
  • I can build a shelf.
  • I built a shelf.
  • I built many shelves.
  • I build the best shelves fastest, at the minimum cost.

However, the quest for knowledge can progress in a different dimension:

  • I just figured out how to program in C.
  • I'll figure out C++ next.
  • I'll figure out Java next.
  • I'll figure out C# next.
  • I'll figure out XAML next.
  • ..., ad infinity

The danger, to the figure-outer, is that there will always be the next shiny new thing. And, ironically, behind that, there is a bunch of builders!

We figure-outers definitely need to find a balance between exploring new territories and cultivate the territories already explored.

Eric Raymond opened his book The Art of UNIX Programming with this:

There is a vast difference between knowledge and expertise. Knowledge lets you deduce the right thing to do; expertise makes the right thing a reflex, hardly requiring conscious thought at all.

It would be wise to attain expertise, not merely knowledge.

Java Metadata

Just read JSR 175's newly published public draft. Apparently the "@interface" is not a new keyword, but two tokens in one. It could have been written "@ interface".

The @ sign stands for a[nnotation] t[ype].

Implicit in the JSR is the devision of labor between the "Annotation Type Author" and the "Annotator".

I wonder if the annotator's job would be more satisfying than the application assembler. :)

Oh, and we need an XDoclet module to generate the annotation types from actual uses of annotations.

Fedora Core 1 Released

Fedora Core 1 is released today. This is to be the successor to the Red Hat Linux 7/8/9 line of products, except that is not an "official" product of Red Hat.

It's system upgrade time again.

Linux, Red Hat, Fedora, ...

I have been a user of Red Hat Linux since the 3.x days, and am generally happy with the product. Instead of downloading their ISO images and burning CDs myself, I have been buying their boxed sets to save myself a little time and to support the product.

Therefore I was disappointed to learn that Red Hat will not be producing Red Hat Linux any more. They are focusing on high end customers with the new Red Hat Enterprise Linux product line. In other words, there will not be a Red Hat 10.

So I asked the question about where to go next on the St. Louis Unix Users Group mailing list (login as discuss/freely). I received quite a few good answers.

I learned that the logical successor to Red Hat Linux 9 is the Fedora Core 1, due to be released this week. According to Jamin Philip Gray:

Well in a sense it is, it's just not called "Red Hat Linux 10". It's called Fedora Core. Have you tried the latest beta (Severn, I think). I hear it's a whole lot like RH9 only better.

I think that's where I want to go.