<< February 2005 | Home | April 2005 >>

Virtual Desktop Manager

I saw Mario Aquino using a nice virtual desktop switcher at this month's St. Louis JUG meeting doing the Jemmy presentation.

It was the Microsoft PowerToys for Windows XP Virtual Desktop Manager. Compared with the MegaScale MultiDesktop Manager I used in my Monitoring and Management presentation 75 days ago, this manager has two advantages and one disadvantage:

  • It starts four desktops automatically upon logging in.
  • I can switch to a different desktop with one click or a key combination (for when the PowerPoint is full screen.)
  • It works only on Windows XP.

This feature has been built-in for Linux since the early days and is standard for GNOME and KDE. I'm so used to it that when I work on Windows I feel constricted. The Workspace Switcher, as it was called in GNOME, offers a preview of the different workspaces right there on the taskbar (which is properly called the GNOME Panel.)

The Windows Virtual Desktop Manager also offers a preview, but it is a full screen one. It looks flashy and all, but I still like the GNOME version better.

Fwd: Misunderstandings (Funny)

Hilarious.

This is why the customer has to be present in all of the steps of product development.

Sun To Open Source Java Enterprise System?

(Via kukoo的blog, as seen on JavaBlogs.com)

InformationWeek is reporting that Sun is making Java Enterprise System available as an open-source product.

My only question is: "What is Java Enterprise System?"

Does it have anything to do with Java? Ever since Sun decided to brand their version of Linux distribution Java Something, I have to ask this question every time Sun mentions the word Java.

The Subversion Conversion Diversion

I've meant to start using Subversion ever since I first looked into it 394 days ago. I went as far as reading the online book from cover to cover. (I promised to buy the book when it came out but haven't, yet. But that's another story.) However inertia kept me from making the switch.

The excuse came when Julie decided to upgrade her workstation, which also doubles as my Web/JBoss/Oracle/CVS/Print server. It's been running Red Hat 7.2 since May 2002. I stopped upgrading her machine since that always meant the programs will run slower and the menus and icons will be rearranged, without any added benefits. This time, though, some of the new features of Yahoo doesn't work with the old Mozilla 1.0.1 anymore.

I've moved my blog over to my workstation 19 days ago. (I also desperately needed the new spam blocking features of Pebble 1.7.1.) I moved my CVS repository over this morning, and converted it to Subversion.

"How did it go?" You ask.

"Splendid! Everything worked as expected, after I figured them out."

What did I figure out? Plenty. Having read the book a year ago definitely helped. Fedora Core 3 helped a lot by including the Subversion in its distribution. The cvs2svn script did all the conversion work. I also read blogs from these helpful people:

Here's my version of the experience report.

Subversion in Fedora Core 3

Subversion is included as part of the Fedora Core 3 distribution. The main subversion package was installed by default when I installed Fedora Core 3. The Apache connector package mod_dav_svn is not, and I have to run yum install mod_dav_svn to get it.

I planned to run Subversion through the Apache connector and nothing else. Since Apache httpd is run as the apache user, all of my Subversion administration work has to be done as the apache user. To be able to su - apache I have to edit /etc/passwd to change apache's login shell from /sbin/nologin to /bin/bash.

Creating the Subversion Repository.

I created the Subversion repository by running the

[root@gao-2004] # svnadmin create /var/svnroot

command as root. I then changed the owner by running

[root@gao-2004] # chown -R apache.apache /var/svnroot

To make SELinux happy, I also run

[root@gao-2004] # chcon -R -h -t httpd_sys_content_t /var/svnroot

as suggested by the Subversion FAQ.

Configuring mod_dav_svn

I followed the book in configuring mod_dav_svn. Fedora Core 3 modularized Apache's httpd.conf. To configure mod_dav_svn, I only need to edit /etc/httpd/conf.d/subversion.conf. Here's my customized version of the file:

[root@gao-2004] # cat /etc/httpd/conf.d/subversion.conf

LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so

<Location /svn>
   DAV svn
   SVNPath /var/svnroot

   Order deny,allow
   Deny from all
   Allow from 127.0.0.1
   Allow from ::1
   Allow from 192.168.7

   <LimitExcept GET PROPFIND OPTIONS REPORT>
      AuthType Basic
      AuthName "Subversion"
      AuthUserFile /etc/svn-auth-file
      Require valid-user
   </LimitExcept>
</Location>

This allowed me to access the Subversion repository from any machine on my local network. When I visited the URL http://www.weiqigao.com/svn/ from Firefox, I see an empty Subversion repository.

Converting the CVS repository to Subversion

I installed cvs2svn. I read the documentation of cvs2svn, and decided that I can get away with the simplest command possible:

[root@gao-2004] # cvs2svn --existing-svnrepos --no-default-eol --keywords-off \
 --cvs-revnums -s /var/svnroot /var/cvsroot

[...]
cvs2svn Statistics:
------------------
Total CVS Files:              2808
Total CVS Revisions:          4505
Total Unique Tags:               3
Total Unique Branches:           1
CVS Repos Size in KB:        84619
Total SVN Commits:             293
First Revision Date:    Tue May  6 20:46:23 2003
Last Revision Date:     Sun Mar 27 18:34:00 2005
------------------
Timings:
------------------
pass 1:    36 seconds
pass 2:     0 seconds
pass 3:     0 seconds
pass 4:     1 second
pass 5:     1 second
pass 6:     0 seconds
pass 7:     0 seconds
pass 8:   340 seconds
total:    381 seconds

This sucked everything from my CVS repository into the newly created Subversion repository, all the histories, tags, branches, everything. It took a little while.

However, in hast, I run the command as root, which left a couple of log files in the /var/svnroot/db owned by root. That made Apache unhappy. When I tried to access the repository through the URL in Firefox I got an error message saying it cannot access the SVN filesystem.

I stopped Apache, changed the owner of the log files, and run svnadmin recover /var/svnroot just ro make sure the database is OK. When I restarted Apache, I can indeed see my repository from the browser:

I can now go to another computer in the house and check out my blog:

[weiqi@gao-2003] $ svn co http://www.weiqigao.com/svn/trunk/blog blog

A run of the command diff -q -r between the CVS check out directory and the Subversion check out directory showed that they are identical, not counting the CVS and the .svn directories.

Some Statistics

Here are some statistics:

  • My CVS repository size is 108MB.
  • The converted Subversion repository size is 95MB.
  • A fresh checkout of my blog project from the CVS repository took 38 seconds (over the network).
  • With Subversion, it took 2 minutes 7 seconds (local machine). <— See Update below!
  • The CVS check out is 98MB in size.
  • The Subversion check out is 280MB in size.

[Update: The Subversion checkout timing above was measured by running the svn co command without the -q flag. Therefore the timing was dominated by filenames scrolling across the terminal window. With the -q flag, I get the following timing numbers: 29 seconds over the network, 36 seconds locally.]

Tags :

Have You Noticed Something Different, ... In GMail

I've been using GMail for a while, since Dale invited me in. But I noticed something different only today.

The links that you click on to read your mail, aren't HTML links at all. There is a slight difference in behavior—When you click on a normal HTML link, the action is triggered when the mouse button is released. In GMail, when you click on your mail, the action is triggered when the mouse button is pressed.

I'm surprised that it took me this long to discover this discrepancy. It also made me appreciate how different GMail is from ordinary web applications. I think I can argue that GMail is more like a Java applet then an HTML page.

Software Version Numbers Are Lame

Two things are happening on my computer now. First, I'm running my daily Fedora Core 3 up2date, which tells me a new version of Firefox, Firefox 1.0.2 is available. Second, my Firefox 1.0.1 browser is showing me the corresponding Slashdot story, titled "IT: Mozilla Firefox 1.02 Released."

A visit to the Mozilla homepage confirmed that the version number is 1.0.2. Slashdot is definitely wrong.

But, Slashdot is not the only one to blame. The version number itself shares at least half the responsibility. It has a usability issue. It is too similar to a number, yet is not a number. The human brain will do its best at trying to make it a number. And dropping that extra dot is a perfect way of achieving it.

Thnik abuot all the msesaegs with trasnposed charatcers that you might have receievd in the psat few yaers.

Now read the last sentence again. This time pay attention to the spelling. Isn't it any wonder that a normal person would try to read 1.0.2 into 1.02?

We as software developers talk about usabilities all the time, yet we can't even make our software version numbers usable!

It's just sad.

ActiveState Perl Under Cygwin Bash

On my current project, we use MPC to generate Visual Studio .NET 2003 solution files. It's a set of Perl scripts. Earlier this month, MPC started to fail under Cygwin Perl, and I have to uninstall it and start using ActiveState Perl. To keep on doing what I do, running the Perl scripts from the Cygwin bash shell, I wrote a little bash script, named it perl and put its directory in the PATH in front of the ActiveState Perl's directory:

#!/bin/bash
#
# Call ActiveState Perl with path-like parameters converted from
# Cygwin format to Windows format.
#
ACTIVESTATE_PERL=C:/Perl/bin/perl.exe

declare -a args
declare -i index

until [ -z "$1" ]
do
  if echo $1 | egrep -q '^/|^\.'
  then
    args[index]=`cygpath -a -w $1`
  else
    args[index]=$1
  fi
  ((index++))
  shift
done

$ACTIVESTATE_PERL ${args[@]}
Tags :

Google Print

I saw it mentioned in Lambda the Ultimate yesterday. Google has added the Google Print (Beta) service which offers scanned books online. You can browse the book online, search for words within the book, get the metadata about the book, or buy the book from online booksellers.

The books come from publishers and libraries.

Just do a regular Google search. If there is a book that matches, it will be shown near the top of the search results, the same way Google Desktop Search results are displayed.

When I tried it, only one book is ever shown. And you pretty much have to type in the exact title to get it. I tried "War and Peace", "The Wealth of Nations", and "Tom Sawyer."

Eclipse 3.0.1 In JPackage

Those JPackage guys have really been working. Take a look at the Eclipse splash screen they made:

Eclipse Splash Screen in JPackage

Ask Jeeves Acquired, 40 Days After Buying Bloglines

The New Work Times is reporting (free registration, etc., etc.) that Ask Jeeves will be acquired by IAC/InterActiveCorp.

This comes only 40 days after Ask Jeeves' acquisition of Bloglines. The New York Times report did not even mention Bloglines.com as a factor in the deal.

Staring at the IAC home page for five minutes will convince you that Bloglines.com doesn't belong there (HSN? LendingTree.com? Match.com?)

What are they going to do? Offering you Home Shopping Network gadgets based on what you blog? Offering 4 home loans every hour based on what you blog? Matching you up with the other half based on what you blog?

"Blog With Us. Find Your Match!"

Do You Know Where The New Java Licenses Are?

After seeing press reports like this InfoWorld article, I tried to find an online copy of the two new licenses that they are talking about. But I couldn't.

Can anyone point me to online versions of either the JIUL (The Java Internal Use License) or the JDL (The Java Distribution License)?

I'm not sure if these licenses are what Jonathan Schwartz alluded to two days ago.

My hope is that these licenses will allow Red Hat (or any other OS vendor) to distribute Sun's Java with Fedora Core (or whatever other Linux or BSD distributions they are offering). So far, no one in the press has covered this aspect of the Licenses.

Java's Open Source Accessibility, From Sun!

Jonathan Schwartz: ...

ps. stay tuned for news on Java's open source accessibility, too...

Layout Problems, Seeking Explanations or Fix

Eric mentioned it 4 days ago. And I was able to observe it yesterday on a reproducable basis.

The problem shows up only in Firefox on Windows and Linux, not on IE on Windows or OS X, nor on Firefox on OS X, nor on Safari on OS X.

The problem is simply this: on the first visit to http://www.weiqigao.com/blog/ after a restart of Firefox, the title of the first blog entry is 13px lower than on a subsequent visit. Thus if you hit the reload button, the title seems to jump up a little bit.

I'm totally in the dark as to why Firefox behaves this way. My speculation is that this is a race condition of some sort between the HTML and the CSS.

I did encounter the measure 13px last week when I customized the CSS. At one time the header of this blog was 13px lower than before. Inspecting the HTML I discovered that the new version wraps the <body> element in a <div> element, which pushes everything down by 13px.

Several other layout issues that I discovered last week, and one Jonathan discovered, include:

  • Floating elements (the blogroll) pushes <pre> elements way down, leaving the page looking empty, when the window is resized to be very narrow. (In IE they merely overlap, which is what I expected.)
  • Increasing font size once will introduce the horizontal scroll bar that won't go away, no matter how wide the window is resized to be.
  • Increasing font size even further, the dotted lines around the calendar will diverge from the actual calendar.

Since I was irritated when this sort of things happen on other websites, I would like to resolve all these issues on my own blog.

First Impression of the iPod Shuffle

The iPod Shuffles arrived yesterday. I've seen it before, so I'm not surprised by its small size. Let me just say when I put it on the desk it blends in with the other office supplies really well, smaller than the stappler, could easily be mistaken for an eraser.

The operation of it couldn't be simpler. Plug it into a USB port on the Mac mini caused iTunes to open up and a "Weiqi Gao's iPod" "folder" to appear. A click on the AutoFill button is all it takes to copy the songs in the Library to the Shuffle.

I left the iPod in over night to charge the battery. And I've been listening to it all day today, lanyard around the neck.

Upon hearing the first song, I said to myself, "this sounds nice." I'm not a big audio person and it doesn't take much to please me, but the sound out of the Shuffle is better than the sound out of my PC speakers.

The next song is one I had forgotten that I downloaded. (I hadn't bought any songs from the iTunes Music Store yet. My songs are either ripped out of my few CDs or downloaded in the First Napster Era.) It's a French song. Again, sounding nicer then I first heard it.

Steve Jobs is right (either that or his reality distortion field has worked) that the randomness of the selections is a source of pleasure out of the Shuffle. It feels more like listening to a radio station without the talking in between songs. Well, with the different genre of music I have, it's more like listening to ten different radio stations.

I'm really glad I bought the iPod Shuffle. I like the infinite little surprises that I was treated with today.

Who knows, maybe I'll start buying music from the iTunes Music Store one of these days.

Tags :

Friday Quiz

It's not Friday here yet, but it's close. It may be Friday where you are already. So here is this week's Friday quiz:

Without peeking at any books, online documents, IDE quick helps, or javap, write down all the public methods of java.lang.Object.

Now explain what each method is for.

No Fluff Just Stuff Symposium Comes Back To St. Louis

The No Fluff Just Stuff comes back to St. Louis for the third showing in a little over a week---on the March 18-20 weekend.

This is an excellent opportunity for Java developers in the St. Louis and near by area to get exposed to the leading voices in the industry without having to travel too far or miss too much work. The price is reasonable too---$775 for a three day conference. You can see the agenda and register here. Only a few seats remain.

We will be giving out discount codes for the conference at tonight's St. Louis Java Users Group meeting.

Fellow OCI developer Mario Aquino will present about Jemmy, a Swing GUI Testing framework.

Pebble 1.7 Is Here

I have upgraded my weblog software from Pebble 1.4 to 1.7. I tried to keep as much of my old theme as possible. But there are some visible changes:

  • RSS, RDF, and Atom feeds are available now.
  • The comments and trackbacks popup windows are gone.
  • Comments are threaded now.

The hosting environment has changed. It is now running on my Fedora Core 3 box under JDK 1.5 and Tomcat 5.0.30 that I obtained from JPackage.org.

I would like to thank Simon Brown for his continued effort to improve the Pebble software. I would like to also thank the JPackage people for making it easy to setup a Tomcat environment on Fedora Core 3.

Let me know if you encounter any difficulties reading the weblog.

Tags :

We Found The Bug

Kevin: (Immitating trumpet) Da-da-da-da!

Jonathan: What's the excitement?

Kevin: We found the bug! Our tests paid off!

Java 5 Odditty, Seeking The Right(TM) Fix

I attempted to upgrade my weblog from Red Hat 7.2/JDK 1.4.2_02/JBoss 3.2.2 (Tomcat 4.1.12)/Pebble 1.4 to Fedora Core 3/JDK 1.5.0_01/Tomcat 5.0.30/Pebble 1.7 this weekend. The transition is pretty smooth with one show stopper bug:

2005-03-06 21:44:27 StandardWrapperValve[SecureBlogController]: Servlet.service(
) for servlet SecureBlogController threw exception
javax.xml.transform.TransformerFactoryConfigurationError: Provider for javax.xml
.transform.TransformerFactory cannot be found
        at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
        at pebble.blog.persistence.file.FileBlogEntryDAO.store(FileBlogEntryDAO.
java:382)

A little Googling brought me to this page at sun.com, which says the error can be eliminated by setting the system property javax.xml.transform.TransformerFactory to com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.

The big question, of course, is, "How?"

Tags :

Jonathan Schwartz: Web Services May Collapse Under Its Own Weight

Jonathan Schwartz:

...

5. Web services may collapse under its own weight.
No one at the conference said this. Those are my words. I'm beginning to feel that all the disparate web service specs and fragmented standards activities are way out of control. Want proof? Ask one of your IT folks to define web services. Ask two others. They won't match. We asked folks around the room - it was pretty grim. It's either got to be simplified, or radically rethought.

As you know, I also believe simplicity and volume always win - and that today's web services initiatives are in danger of vastly overcomplicating a very simple (really simple) solution.

...

I don't agree with everything that the Sun CEO says. But web services have got to simplify. And real world web services success stories have got to come out. Not the kind like "Look, ma, I have a web service. How cool am I!", but the kind like "We can do X now, which generates lot of revenues for us. And we did it with web services. Doing it any other way would have cost us millions of dollars more!"

Monoppix---A Mono Live CD

You don't have to know Chinese to guess what this blog entry, titled 在Monoppix上Hello World, which I saw scrolling by at JavaBlogs.com today, is about:

Toby Sun: 兴奋得事情还远不止于此,Monoppix = Mono + Knoppix,它是一个已经安装和配置好Mono的Knoppix,以及预制了MySQL的一个on-the-fly的CD,完全遵守GNU/Linux。

Monoppix is a Knoppix based bootable live Linux CD that includes the Mono implementation of .NET Framework.)

Since Mono works on Windows, Linux, and Mac OS X, it's hard to imagine why anyone would want to download a 426MB ISO image just to see a working Mono installation. But then again, I did download it, burned the CD (from the Mac mini), and booted it on my Thinkpad, just to take a look at it. It contains the Mono 1.0.5 release of everything, the compiler, the JIT VM, the ASP.NET engine, the libraries, and the IKVM.NET JVM to CLI translator. MySQL is there, as well as the MonoDevelop IDE.

So, if you are a .NET developer who doesn't have a working Linux installation but would like to see your C# code running on a non-Windows operating system, Monoppix is for you.

If you just want to see your C# code running in Mono, you will be better off just to install Mono on Windows. Likewise, if you already have a Linux machine, you will be better off just to installation Mono on it. I just pulled down the latest unstable release 1.1.4 from the FC3 yum repository.

Ruby on Rails Article at ONLamp.com: Part 2

Part 2 of Curt Hibbs's Ruby on Rails tutorial is out.

SwingWorker, Secondary EventPump, JIT Cache Bwtween Runs, ...

Sun has posted the transscript of a SDN Chat Session about Desktop Client. The parts I liked the most are:

JavaGeek: Why hasn't the SwingWorker (or a similar mechanism) made it to the standard APIs? What is the recommended way to deal with process-intensive tasks?

Scott Violet: Excellent question. It turns out we're very close to finishing up a version of SwingWorker that will be part of 1.6. This is the version that Igor, Brent, Bino and myself talked about at last year's Java One conference. This version of SwingWorker is generified and supports property change listeners. It's extremely handy. I'll also mention that AWT is looking at a way that you can pump events during a long running process. Other toolkits provide similar mechanisms and it turns out it's very handy.

markyland: Are there any plans to allow Swing applications to be compiled natively?

Scott Violet: The closest thing I can say we're looking into is persisting compiled code between runs of the JVM. For example, each time you run your application we end up compiling a lot of the same methods; if this were cached it could conceivably speed things up. Whether or not something like this makes it in depends upon the results we get.

JNB: JGoodies Forms

Lance Finney writes about JGoodies Forms in the March issue of OCI's Java News Brief (JNB).

I have used JGoodies Forms in the past and liked it a lot. Like all LayoutManagers in Swing, JGoodies Forms takes a little while to learn and understand. Unlike some of the other LayoutManagers, once the understanding is in place, once you get it, the actual using of it is more natural.

If you are in the "I'd rather create my GUI in code" camp, as opposed to the "I'd rather paint my GUI graphically" camp, JGoodies should be able to help you in many situations.

You are still writing Swing applications, aren't you?

Tags :