Friday, July 29, 2005

NetBeans Dev 4.2 Q Build - Linux release has problems

I downloaded and installing the Linux version of Netbeans 4.2 Dev Q Build for 26 July. This is the same realease as I installed on Windows XP SP2, and the version I've had reasonble success with regards to using the Matisse visual editor. The Linux distribution I'm running with is Fedora Core 4 running the Gnome desktop and the ClearLooks theme. The Linux version of Netbeans does not exhibit the same level of stability that the Windows version does.

I decided to reimplement the same simple panel I'd implemented in this post. I only got the Home subpanel implemented before it became impossible to continue without generating unknown exceptions. The following image shows the layout and the form preview.



Some of the issues I ran across using 4.2 Q on Linux:
  • The titled JPanel (Home) would not show up when it was first added to the form. It only showed up much later after closing and reopening the form.
  • The elements did not flow as easily around the form.
  • And in general I am not particularly impressed with the look and feel of Java on FC4. But that may very well be a distribution issue.
  • Once all the elements were added to the Home panel, the form could not be touched with the mouse without generating an exception. This included closing and re-opening the file. Closing and reopening NetBeans proved to be only slightly better. When I reopened the form I could touch the form with the mouse, but when I attempted to resize the form the exceptions starting occuring right on cue.
If I had to compare my experience of using NetBeans as well as Java (1.5 release 4) between Windows and Fedora Core 4, I'd have to say that Windows beats FC4 hands down. Since KDE 3.4.2 is out, I'm going to install it and change my desktop to KDE and see how NetBeans behaves as well as looks.

Text of the exception follows.

java.lang.AssertionError
at org.netbeans.modules.form.layoutdesign.LayoutInterval.getCurrentSpace(LayoutInterval.java:431)
at org.netbeans.modules.form.layoutdesign.LayoutInterval.getIntervalCurrentSize(LayoutInterval.java:793)
at org.netbeans.modules.form.layoutdesign.LayoutDesigner.imposeGapsSize(LayoutDesigner.java:4947)
at org.netbeans.modules.form.layoutdesign.LayoutDesigner.imposeGapsSize(LayoutDesigner.java:4960)
at org.netbeans.modules.form.layoutdesign.LayoutDesigner.imposeGapsSize(LayoutDesigner.java:4960)
at org.netbeans.modules.form.layoutdesign.LayoutDesigner.imposeGapsSize(LayoutDesigner.java:4960)
at org.netbeans.modules.form.layoutdesign.LayoutDesigner.imposeCurrentSize(LayoutDesigner.java:4903)
at org.netbeans.modules.form.layoutdesign.LayoutDesigner.imposeCurrentSize(LayoutDesigner.java:4878)
at org.netbeans.modules.form.layoutdesign.LayoutDesigner.endMoving(LayoutDesigner.java:503)
at org.netbeans.modules.form.HandleLayer$ResizeComponentDrag.end(HandleLayer.java:2172)
at org.netbeans.modules.form.HandleLayer$ComponentDrag.end(HandleLayer.java:1877)
at org.netbeans.modules.form.HandleLayer.endDragging(HandleLayer.java:797)
at org.netbeans.modules.form.HandleLayer.mouseReleased(HandleLayer.java:1286)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Thursday, July 28, 2005

If It Breaths, Kill It.

At a distant research facility, the final 10% of the human genome has just been discovered. And with it all Hell has broken loose. Now, a call for help has gone out.

So ring out the ominous first words of the Doom Movie Trailer. And guess who shows up? The Rock and Karl Urban With Friends looking particularly mean and nasty, wielding typically vicious looking BFGs with unlimited ammunition, running heroically into the Doomed Martian Facility to Fight Evil. And they have with them a company of sacrificial Marines whose duty is it to die in gruesome yet entertaining ways for the movie audience. I haven't seen this many set up for a sacrifice since Aliens. But hey. It Ain't Shakespeare. So when it comes out, pay your cash, sit back, and bathe once again in the magnetic personalities of The Rock and Karl Urban.

Remember...
Around Every Corner...
Behind Every Door...
Doom Is Waiting.
No One Gets Out Alive.

Why I'll finally switch to Apple

I'll switch to Apple because Apple has switched to Intel. As long as Apple stayed on the Motorola 68K, and later the PowerPC, there was no incentive to give up the rich technical ecology of the PC. The PC in the early years had its flaws, but ever since the PC platform incorporated PCI and AGP, and started to use USB and Firewire, the PC platform has been more than a match for anything Apple could provide in hardware. The only thing lacking was software, and I had no real love for OS 9 and earlier to make me tolerate Apple hardware.

But then Apple released OS X. OS X, as you all know by now, is essentially the Mach kernel with BSD wrapped around it. Beneath the very shiny (and very good) GUI beat the heart of a real Unix. Now I was faced with a tough choice: buy the OS I really wanted to run on an inferior hardware platform, or buy the hardware platform I wanted and run an inferior OS. I chose hardware every time because I could always hack the software sufficiently to give me 90% of what I wanted. But now that Apple has moved over, I should be able (in the near future) to have both the hardware and the OS I want.

There's one more thing that Apple brings to Intel besides its superior OS. It brings real innovation back into the PC market. My hardware platforms over the last five years have been hand built. I've either purchased locally or online (via Newegg) everything I've wanted to create my hardware platform, and then loaded the OS (Windows and Linux). I think the company most at risk in this game is Dell. I think they face pressure at the low end from Lenova (the folks who bought IBM's PC business) and Apple from the high end. And make no mistake. Apple selling quality Intel gear will eat into Dell's high-end sales. There's a lot of built-up animosity towards Dell, and Apple, if they're smart, will tap into this, especially in the corporate market. And don't kid yourself. When Apple finally delivers their Intel boxes in 2006, I'll be looking very hard to see if I can replace Dell in corporate accounts with Apple. I'll be looking real hard.

Wednesday, July 27, 2005

NetBeans Dev 4.2 Q Build - Exploration of Matisse features

I managed to get NetBeans 4.2 Dev back into reasonable shape by uninstalling the application and reinstalling it. I then installed only a very few plugins from the Development Update Center; specifically plugins that support development of NetBeans Modules projects. I have a feeling that there are one or more development plugins in the Infrastructure folder that conflict with the core infrastructure plugins that come bundled with NetBeans. So I think for the time being I'll just leave those be.

I've pushed forward with learning what I can do with Matisse. I created a second simple panel, taking as my inspiration Hacknot's "Beware The GUI Builder." The author raises a number of important points with regards to how GUI builders are used and the poor quality code they produce.
But the GUI Builder's inability to recognize repetitive structures in the GUI (opportunities for reusing a custom component) has the potential to create a great deal of unnecessary code, should the scope of duplication involve a larger number of components.
He then shows the following example panel, which I reproduced quite easily and quickly in Matisse.



The Home panel was created quickly by first dropping the Home panel on the form and then laying each of the controls into the Home panel. I then selected the Home panel, copied it, and then pasted it onto the main form. I moved the second Home panel and beneath the first and changed the border's title to Work. It was simple, fast, and generated a lot of duplicate code.


I show the form's inspector panel to illustrate the relative maturity of Matisse. The code behind Matisse recognized that I was copying a collection of components and renamed them in order to avoid naming conflicts. The problem, however, is that there is a lot of duplicate code. What could Matisse do to help minimize this and foster reuse?

The answer may already be in Matisse. Current versions have an empty Beans section in the Palette and there is a Palette Manager that can be invoked from the top of the Designer. There's even a section in Help about adding a bean to the palette window.



What it takes to add new components, to extend the palette as well as foster reuse, is something I am very interested in. Eclipse's Visual Editor has the ability to extend it and add new controls, but I've worked with the Eclipse visual editor. Matisse in its current incomplete state is better than Eclipse VE in its 1.1 release, and Matisse has the potential to pull even further ahead in usability and functionality for the forseeable future.

NetBeans Dev 4.2 Q Build - New problems crop up

After fixing the problem outlined here I ran Update Center and picked up quite a few interesting bits. I then allowed the system to restart itself, and when it did, I got Unexpected Exception: ArrayIndexOutOfBounds. What follows is the exception trace.

java.lang.ArrayIndexOutOfBoundsException: 0
at org.netbeans.core.windows.model.SplitSubModel.setSplitWeights(SplitSubModel.java:487)
at org.netbeans.core.windows.model.EditorSplitSubModel.setSplitWeights(EditorSplitSubModel.java:72)
at org.netbeans.core.windows.model.ModesSubModel.setSplitWeights(ModesSubModel.java:247)
at org.netbeans.core.windows.model.DefaultModel.setSplitWeights(DefaultModel.java:998)
at org.netbeans.core.windows.Central.userChangedSplit(Central.java:1527)
at org.netbeans.core.windows.view.ViewHelper.setSplitWeights(ViewHelper.java:239)
at org.netbeans.core.windows.view.DefaultView.userMovedSplit(DefaultView.java:711)
at org.netbeans.core.windows.view.SplitView$1.propertyChange(SplitView.java:139)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:341)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
at java.awt.Component.firePropertyChange(Component.java:7159)
at org.netbeans.core.windows.view.ui.MultiSplitPane.access$500(MultiSplitPane.java:49)
at org.netbeans.core.windows.view.ui.MultiSplitPane$MultiSplitLayout.layoutContainer(MultiSplitPane.java:605)
at java.awt.Container.layout(Container.java:1401)
at java.awt.Container.doLayout(Container.java:1390)
at java.awt.Container.validateTree(Container.java:1473)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validate(Container.java:1448)
at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:379)
[catch] at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:113)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)


I got rid of the problem by, once again, removing the .netbeans/dev cache area. But this time I won't copy anything over. I'll just go back in by hand and set everything up, such as my projects and Runtime resources.

OK. I'm trying to add a project back in and I get the new dialog for locating a file or directory. I don't know about this new way of selecting items. Old habits die hard, and I keep wanting to use the mouse in the middle section to click down to the final target, but it doesn't work consistently. I do succeed via typing and tabbing (ala the bash shell). I remember reading about this new 'feature' hitting NetBeans Real Soon Now. I finally reach the project (swingx) and when I select it, I get another unexpected exception, NoClassDefFoundError. The text for that exception follows.

java.lang.NoClassDefFoundError: org/netbeans/modules/websvc/spi/webservices/WebServicesClientSupportImpl
at org.netbeans.modules.web.project.WebProjectType.createProject(WebProjectType.java:42)
at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.loadProject( AntBasedProjectFactorySingleton.java:165)
at org.netbeans.api.project.ProjectManager.createProject(ProjectManager.java:319)
at org.netbeans.api.project.ProjectManager.access$700(ProjectManager.java:44)
at org.netbeans.api.project.ProjectManager$2.run(ProjectManager.java:233)
at org.openide.util.Mutex.readAccess(Mutex.java:234)
at org.netbeans.api.project.ProjectManager.findProject(ProjectManager.java:180)
at org.netbeans.modules.projectapi.SimpleFileOwnerQueryImplementation.getOwner( SimpleFileOwnerQueryImplementation.java:68)
at org.netbeans.api.project.FileOwnerQuery.getOwner(FileOwnerQuery.java:68)
at org.netbeans.modules.projectapi.ProjectSharabilityQuery.getSharability(ProjectSharabilityQuery.java:36)
at org.netbeans.api.queries.SharabilityQuery.getSharability(SharabilityQuery.java:85)
at org.netbeans.modules.versioning.system.cvss.CvsVersioningSystem.isIgnored(CvsVersioningSystem.java:292)
at org.netbeans.modules.versioning.system.cvss.FileStatusCache.createFileInformation(FileStatusCache.java:423)
at org.netbeans.modules.versioning.system.cvss.FileStatusCache.scanFolder(FileStatusCache.java:369)
at org.netbeans.modules.versioning.system.cvss.FileStatusCache.getScannedFiles(FileStatusCache.java:332)
at org.netbeans.modules.versioning.system.cvss.FileStatusCache.getStatus(FileStatusCache.java:171)
at org.netbeans.modules.versioning.system.cvss.Annotator.annotateNameHtml(Annotator.java:158)
at org.netbeans.modules.versioning.system.cvss.FileStatusProvider.annotateNameHtml(FileStatusProvider.java:55)
at org.netbeans.modules.masterfs.MasterFileSystem$StatusImpl.annotateNameHtml(MasterFileSystem.java:461)
at org.netbeans.modules.java.j2seproject.ui.J2SEPhysicalViewProvider$J2SELogicalViewRootNode.getHtmlDisplayName( J2SEPhysicalViewProvider.java:340)
at org.netbeans.modules.project.ui.ProjectsRootNode$BadgingNode.getHtmlDisplayName(ProjectsRootNode.java:333)
at org.openide.explorer.view.VisualizerNode.getHtmlDisplayName(VisualizerNode.java:512)
at org.openide.explorer.view.NodeRenderer.getTreeCellRendererComponent(NodeRenderer.java:100)
at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2653)
at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:475)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(VariableHeightLayoutCache.java:1342)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.getXOrigin(VariableHeightLayoutCache.java:1125)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.getNodeBounds(VariableHeightLayoutCache.java:1108)
at javax.swing.tree.VariableHeightLayoutCache.getBounds(VariableHeightLayoutCache.java:202)
at javax.swing.plaf.basic.BasicTreeUI.getPathBounds(BasicTreeUI.java:501)
at javax.swing.plaf.basic.BasicTreeUI$Handler.focusGained(BasicTreeUI.java:3477)
at javax.swing.plaf.basic.BasicTreeUI$Handler.focusLost(BasicTreeUI.java:3487)
at java.awt.Component.processFocusEvent(Component.java:5380)
at org.openide.explorer.view.TreeView$ExplorerTree.processFocusEvent(TreeView.java:1529)
at java.awt.Component.processEvent(Component.java:5244)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:840)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:530)
at java.awt.Component.dispatchEventImpl(Component.java:3841)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.SentEvent.dispatch(SentEvent.java:50)
at java.awt.DefaultKeyboardFocusManager$DefaultKeyboardFocusManagerSentEvent.dispatch( DefaultKeyboardFocusManager.java:161)
at java.awt.DefaultKeyboardFocusManager.sendMessage(DefaultKeyboardFocusManager.java:188)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:595)
at java.awt.Component.dispatchEventImpl(Component.java:3841)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
[catch] at java.awt.SequencedEvent.dispatch(SequencedEvent.java:93)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)


Well, I've reached the point where I've uninstalled the Q build and I'm starting over again to see where that leads me. More in the next post.

NetBeans Dev 4.2 - One mystery solved

I've complained here and here that I could not run Tools | Update Center. Trying to run Update Center would result in an 'unexpected exception'. The problem appears to be one or more corrupt settings in the .netbeans/dev cache area. I don't know where the specific problem lies, but I was able to test this theory by simply renaming .netbeans/dev to .netbeans/dev.bad and restarting the 4.2 Q build. When I forced NetBeans 4.2 to rebuilt its cache area, then the Update Center started working again.

I have yet to determine exactly what the problem is, but I did manage to carefully move many of my older settings from the 'bad' dev cache to the newer, so I could at least continue with my projects and my database settings and servers under Runtime. The Update Development Center is now open to me again. As I posted earlier the problem showed up with a daily build, specifically the one from July 24th. Getting rid of the build didn't get rid of the problem. If you run into something like this in the future then as a sanity check rename or move the existing NetBeans cache and re-run Netbeans to see if the problem goes away. This is, interestingly enough, very similar to a problem I had with developer builds of Eclipse 3.1.

Thanks to Jiri Rechtacek for pointing out the solution.

Tuesday, July 26, 2005

Discovery launches

Today was a really good day to watch a launch. Around 10:30 am my office mates and I went up on the roof of our building (it's three stories) to wait for Discovery's launch. We were joined by about 20 others from other companies; all told we had between 3 and 4 dozen observers on the roof. One of the watchers was a woman whose husband worked on the countdown team. She called his office to check if there was any hold, and was told that the shuttle was ready to go in about 10 seconds. Sure enough, looking east, we saw a brief flash as the engines lit off. There were clouds on the horizon so it was another long 20 seconds before the shuttle lifted over the cloud tops and we had a clear view of the shuttle. We all stood and waited silently, until the rumble of the engines finally reached us (in Orlando) and then we started talking a little. The shuttle continued to lift higher and higher. When it finally diminished to a little dot we all started moving back towards the stairs and back to work. Everybody was in great spirits for the rest of the day.

And now I'm sitting on pins and needles while NASA looks to see if any debris that was seen falling away from the spacecraft could have dire consequences. One image, showing a section of heat tile near the nose gear doors falling away, has me worried most of all. I hope that they go out and look at the shuttle after docking with the ISS. We don't need another repeat of Columbia.

Update

I had Columbia on my mind when I first wrote this. Sorry for substituting Columbia for Discovery.

NetBeans Dev 4.2 Q Build - The experience improves

There was a tremor in the Force today. I downloaded the latest NetBeans 4.2 Developer Q build, installed it, and completed Roman's DemoForm flash demo. I was glad to see that the Q build was indeed more stable than the bleeding edge developer drops I'd been working with recently. What follows in no particular order are a list of improvements and issues I found in the July 26th Q build.
  • The visual editor is no longer touchy. When I inserted jLabel8 (Organization) into the Identity panel, it dropped in between the name and email address labels. I was then able to drop the supporting JTextField next to the JLabel and size it without causing the Identity panel to resize and push the surrounding controls off the form.

  • I still caused a few unexpected exceptions. This was caused by me playing around with the organization text field. However, I could close the form and save it, and when I opened it again I was left with everything except the text field on the form. This is a much better behavior than before, although I'd prefer not seeing any exceptions at all.

  • I had to change how the signature field and choose button were added to the Identity panel. I had to add the field, add the button, then resize the field to get them both to fit side by side properly. This is when I noticed that there are more controls across the top of Roman's demo than there are on my Q build editor. Roman seemed to use them to 'hint' how the controls were adjusting to one another. I would suggest that the development crew put those controls back and get rid of the strange control 'thinger' that sits within the design editor (see the image to the right; the 'thinger' is to the right of the Advanced button).

  • Copy and paste are not all there yet. For example, I selected the OK button at the bottom of the form and copied it (Control C). I then went around the form, selecting various controls and hitting Control V to see if I could paste a copy of the control on the form. I found only two areas I could paste; on the main form and on the back of the design editor outside of the primary form area. I was surprised I could not paste a copy into the Identity JPanel. I was also surprised by the behavior of pasting onto the designer outside of the form area. Once it was there it couldn't be dragged back inside the form; it could only be deleted.

  • And finally, you still can't run Tools | Update Center. Which means that if you want or need to grab a plugin you can't at the moment.
My original Butt-Ugly Layout (BUL, pronounced 'bull') still gives Matisse fits. It caused a fair number of unknown exceptions and when trying to resize or move controls, most of the other controls on the form just slipped and slid around or completely off the form. Based on my BUL experiences, I'd like to suggest the following enhancements for Matisse.
  • Embrace the grid. I know that you want to use 'natural' Swing layout controls and constraints, but the grid, used during visual layout, would allow the developer to concentrate more on design than worrying if adding another control will cause most or all of the current form to slip and slide around in unexpected ways. You can use the grid as an intermediate visual 'crutch' on the editor, while working magic on the backend to construct the 'right' layout using org.jdesktop.layout.GroupLayout.

  • If you can't give us a grid, give us a way to 'pin' one or more controls onto the form so they don't move. Back in the old days when Solaris OpenWindows was something new, you could use a graphical pushpin to pin a menu to the desktop so it would stay open. It might be useful to resurrect that moldy old visual paradigm and apply it to the Matisse visual editor. You could pin down the controls you didn't want to move before adding more controls or moving others around. Or you could pin an entire panel full of controls at once using a button and then unpin specific ones, or just keep adding new ones around the pinned ones.
That's it for now. But before I go, let me present my Roman DemoForm in all its pixelated glory.

Glorious victory! I've successfully added the company label (jLabel8) and associated text field to the form. Look, ma! No exceptions! And no unusual growth of Identity and subsequent pushing of the three lowest buttons over the edge of the form and into oblivion.














And here we see my fabulous work running in preview mode. I sat back and basked in its pristine beauty.

NetBeans Dev 4.2 - Going from bad to worse?

For as long as Matisse has been advertised (starting June 26th) I've never had the success of building GUIs that others seem to have. Enough with the hype. Starting with this post, I've started to document the brokeness of NetBeans Matisse by trying to build Roman's DemoForm. I pulled down the latest developer releases for NetBeans 4.2, dated the 24th and the 25th of July. Both of them are broken now in some fundamental areas besides Matisse. In particular you can't run the update center. For the last two releases invoking the update center has produced the lovely exception dialog you can see to the right.

The Matisse module is still very broken, and it is still impossible to create the DemoForm that is a part of Roman's flash demo. I would strongly suggest to the developers and boosters of NetBeans that they quietly hide Roman's demo until such time as Matisse is robust enough that the entire demo can be successfully built. Otherwise Matisse is now little more than vaporware. And go back and fix the update center.

What follows is the text of the update center exception.

java.lang.NullPointerException
at org.netbeans.modules.autoupdate.XMLAutoupdateType.getDefaultURL(XMLAutoupdateType.java:325)
at org.netbeans.modules.autoupdate.XMLAutoupdateType.readObject(XMLAutoupdateType.java:373)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:919)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1813)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at org.netbeans.modules.settings.convertors.XMLSettingsSupport$SettingsRecognizer.readSerial(XMLSettingsSupport.java:514)
at org.netbeans.modules.settings.convertors.XMLSettingsSupport$SettingsRecognizer.instanceCreate(XMLSettingsSupport.java:542)
at org.netbeans.modules.settings.convertors.SerialDataConvertor$SettingsInstance.instanceCreate(SerialDataConvertor.java:357)
at org.openide.loaders.FolderLookup$ICItem.getInstance(FolderLookup.java:485)
at org.openide.util.lookup.AbstractLookup$R.allInstances(AbstractLookup.java:875)
at org.openide.util.lookup.ProxyLookup$R.computeResult(ProxyLookup.java:435)
at org.openide.util.lookup.ProxyLookup$R.allInstances(ProxyLookup.java:388)
at org.openide.util.lookup.ProxyLookup$R.computeResult(ProxyLookup.java:435)
at org.openide.util.lookup.ProxyLookup$R.allInstances(ProxyLookup.java:388)
at org.netbeans.modules.autoupdate.AutoupdateType.autoupdateTypes(AutoupdateType.java:68)
at org.netbeans.modules.autoupdate.ServerPanel$ServerTableModel.refreshContent(ServerPanel.java:181)
at org.netbeans.modules.autoupdate.ServerPanel.(ServerPanel.java:49)
at org.netbeans.modules.autoupdate.FirstPanel.(FirstPanel.java:49)
at org.netbeans.modules.autoupdate.Wizard$3.(Wizard.java:497)
at org.netbeans.modules.autoupdate.Wizard$StartPanel.getComponent(Wizard.java:496)
at org.openide.WizardDescriptor.updateState(WizardDescriptor.java:641)
at org.openide.WizardDescriptor.initialize(WizardDescriptor.java:369)
at org.openide.NotifyDescriptor.getterCalled(NotifyDescriptor.java:237)
at org.openide.NotifyDescriptor.addPropertyChangeListener(NotifyDescriptor.java:599)
at org.netbeans.modules.autoupdate.Wizard.(Wizard.java:202)
at org.netbeans.modules.autoupdate.Wizard.(Wizard.java:106)
at org.netbeans.modules.autoupdate.Wizard.(Wizard.java:101)
at org.netbeans.modules.autoupdate.Wizard.go(Wizard.java:254)
at org.netbeans.modules.autoupdate.UpdateAction.performAction(UpdateAction.java:68)
at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:94)
at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:47)
at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:90)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Monday, July 25, 2005

Working with Ubuntu - Observations

I wrote earlier in the week about installing Ubuntu. Here are more impressions as I work with the distribution, primarily developing with it.
  • Building a kernel doesn't work. I pulled kernel 2.6.12.3 from kernel.org and attempted to build it with a config file I had from Fedora Core 4. The config allowed for successful builds and boots on FC4. But when I attempted to do the same here, I got a "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,7)". One other oddball aspect of this failure is the size of the initrd image: it's over 9Mb in size. I've never built one that big before, and it's double the size of the stock 2.6.10 kernel that comes with Ubuntu.
  • Running Java works after some tweaking. I have Java installed "on the side" and provide access to it by defining JAVA_HOME and adding $JAVA_HOME/bin to the path. I placed that information in /etc/profile and /etc/bash.bashrc during testing. The problem was that even though I could open a shell and use Java, when I tried to invoke Eclipse 3.1 from a desktop launcher, Eclipse would fail saying it couldn't find Java. I eventually solved the problem by adding a soft link from inside Eclipse to the JRE. In this case, I changed directory to /opt2/eclipse and then types 'ln -s /opt2/java/jre'. This created a soft link to the JRE and Eclipse then started up without a problem.
I don't know what I'll do next. I have several solutions to try before threatening the dreaded wipe-and-reinstall tango. I'm really curious what's so special about building a kernel. I'll start investigating that by building 2.6.12.3 with the Ubuntu configuration. I do like Ubuntu. I'm just perplexed by some the kernel issues I've run into.

Sunday, July 24, 2005

The Other Armstrong

On July 20, 1969 Commander Neil Armstrong and fellow astronaut Edwin Aldrin successfully landed in the Sea of Tranquility on the surface of the moon. Several hours later Armstrong exited the lunar module in which he'd landed and became the first human being to set foot on the moon's surface.

I'll always remember that electric moment for the rest of my life. I was a high school freshman at the time. I had soaked up the entire space race from the earliest Mercury missions on. I'd built every plastic space model I could afford. I'd read every space book and magazine article published up to that time. The year before I'd seen 2001 and couldn't wait to go into space. I was one stoked geek with a ring-side seat to the future. That night, my brother and I sat in a darkened room with our black-and-white TV and watched Neil Armstrong step off the LEM and onto the surface of the moon and into history.

The Apollo program continued on through Apollo 13 and on to the last mission, Apollo 17 in 1972. That was the year I graduated high school and headed to Ga. Tech to study electrical engineering. The end of Apollo had a profound negative effect on me that has stayed with me ever since. I watched our country dismantle a good portion of our space program, and I saw many good and bright people laid off. Despite Skylab, the space shuttle, Hubble, numerous deep space missions and our multi-billion dollar international space station, NASA and the space program has never matched the edge or excitement that led to the landing on the moon.

Life and living is about people. It's about overcoming incredible odds to achieve incredible goals. Neil Armstrong personified American ingenuity and know-how to land on the moon. Neil Armstrong would have never reached the moon without the help and resources of American technology, but he was the right man to represent us at the time. Lance Armstrong, closer to home and in history, also overcame incredible odds (beating cancer and Tour rivals) to become a seven-consecutive-time Tour winner. Across the span of 36 plus years both men share many important characteristics; the desire to succeed, dedication to their dreams, intelligence, careful planning, and resilience to adversity. And most importantly, excitement.

Space exploration is more than just sending out unmanned probes. Yes, we've gotten a lot of excellent science from the unmanned probes, there's no denying that, but at a glacially slow pace. What we haven't gotten is a sense of true adventure. And that takes a human being on the spot that we can identify with. We send out our robots to look at very small slices of the universe while we sit in comfort back on Earth. We crawl slowly over the surface of Mars and when problems strike, we take forever to find and execute a solution. We've grown timid and slow over the last 30 years. We're managers and administrators and cautious engineers, not dynamic explorers.

How wonderful it would be if Lance Armstrong could help infuse a new sense of dynamic zeal to American manned space flight and give back to us what Neil Armstrong introduced to us so long ago; walking on the surfaces of other worlds. I can only hope.

Armstrong's Magnificent Seventh

I just read on SI.com that Lance finished his seventh tour and won it as expected. I ride as a "recreational rider" or as some of the locals I ride with jokingly call me, a "clydesdale". At 6ft 4in and 245 lbs, I dwarf riders like Lance. I'm lucky to go reasonably fast on the flats of Florida, dodging potholes and asshole drivers. When Lance wins I feel a great vicarious thrill. I know I'll never ride in competition, especially at the pinnacle of athleticism that Lance has attained, but I respect and admire Lance because of world-class riding and winning in style.

I've always ridden a bike, and when I was in college I actually ran a J.C. Penney's bike shop in Atlanta, GA. But the sport in America was virtually unknown in the early 70's. I didn't really begin to get serious about riding until my late 40's and my friend Sterling Hall. Sterling got me back out seriously and consistently riding in 1999. I picked up a Huffey at a local Walmart , and tried to keep up with Sterling on his Cannondale. Sterling was kind enough to ride slow with me. I stayed on that Huffey until Christmas 1999, when I finally went down to a local bike shop and picked up a Canondale hybrid. It was one of the least expensive ones I could afford.

From that point forward I rode pretty regularly on a bike trail close to where I live, West Orange. Sterling introduced me to that trail when I picked up the Cannondale as well as riding long distances. I soon reached the point where I'd ride by myself or with Sterling, but I rode. My pace picked up and my weight began to drop. Then, I started to work at a Lockheed/Martin facility where I ran across two hard-core riders, Richard "Crutch" Crutchfield and Tim O'Mally.

Tim is the more serious of the two. He rides Treks and competes in local competitions. Both look like Lance clones with their whipcord lean and muscled bodies. Crutch was a lot like me in that he got pulled into riding by Tim. The difference is that Crutch started a lot younger and on a true road bike (a Giant). By the time I hooked up with them they were riding together at lunch around the L/M facility. Tim convinced me to ride with them. Little did I realize what I was being set up for.

The L/M facility has a circular access road that measures 2.33 miles (yes I measured it). Those two would get out there and average around 25 miles/hour riding for 45 minutes to an hour. I'd be lucky to average 16 on my hybrid. No matter how hard I tried they just effortlessly pulled away. While it was always embarrassing, pride forced me to go out no matter what. I reached a point where if they passed me on the first lap (and they always did), it took at least five more laps before they could chase me down and pass me again. You take your comfort from the small things, and I was happy I was increasing my speed.

Over time I picked up riding tips, especially from Tim. I changed my tires to ride more efficiently. I changed the height of my seat. I got new clips and pedals. And eventually I got so tired of being lapped on the hybrid I purchased a Trek 2200. I still got lapped by the Dynamic Duo but not nearly as often. Riding that Trek was like riding a rocket compared to the Cannondale, just like the Cannondale had been a rocket compared to the Huffey. I kept that up until I left L/M and the project I was on in December of last year.

Since January I've fallen into a rut. Because of my change in projects I worked at a different location where it's a lot more difficult and dangerous to find a place to ride. Seeing Lance win his seventh tour reminds me that if a man like that can overcome cancer and win seven tours, then what excuse do I have to let my bikes sit in the garage and collect spider webs? None, really. Since Lance started his seventh tour I've discovered a gym in the building where I work that has two riding machines. During the week I spend 45 minutes to an hour on the machines, three days/week, and then ride the trail on the weekend. I've been off riding for over six months, so I need to work back up again. But I've made a promise to myself. No more excuses. I've invested six years into riding. No more spider webs on the bike frames. From this point forward, no matter how old I get, I will always be riding my bike. I'll ride for fun, for health, and out of respect for Lance Armstrong. But I'll ride.

Friday, July 22, 2005

Ubuntu Linux - Superb installation

Just as I promised myself in an earlier post I installed Ubuntu Linux over my Fedora Core 4 installation. When this weekend finally rolled around I saved what I cared to save on FC4 and installed Ubuntu 5.04 via the same DVD I'd burned earlier in the week.

I like this distribution very much. In fact this is the first Linux installation based on Gnome and Debian that I can actually say that I like as well as KDE. Working with Fedora (and earlier versions of Redhat for that matter) have given me a distorted view of both desktops. Ubuntu is outstanding in its completeness when compared with other distributions and everything Just Works. This is a far cry from Fedora Core 4 in particular in which it mostly works, with some noticeable lapses, especially with up2date.

Getting Ubuntu installed was extremely easy. All my system hardware was detected. One very nice touch was Ubuntu's ability to find both of my network interfaces. One is the nVidia (nForce2) built-in device. The other is an older PCI network card I've had for years now. Ubuntu found both and allowed me to determine which one would be eth0 and which one to enable at boot. FC4 just grabs both, and to add insult to injury, forces the plugin NIC to be eth0.

Another Ubuntu feature I've found quite useful is Synaptic Package Manager. You get this from Applications | System Tools | Add/Remove Programs in Advanced mode. From there I was able to add a reasonably current gcc/g++ as well as ruby. Applications I couldn't push up to more current releases were Open Office (at 1.1.3) and Firefox (at 1.0.2). Before I nuked FC4 I got FireFox 1.0.6 with the latest security fixes.

Surprises
  1. There is no explicit root account. During Ubuntu installation, the initial user account is given administrative rights. To reach rootly powers you use sudo from the command line, or give your own login password when running a root GUI tool (such as Add/Delete Programs). I've read the reasons given why this is so, and I agree with them. This is a well though-out way to allow regular users to handle updates, while allowing so-called power users to just sudo -s to create a root shell and have at it. But it keeps anyone from logging in as default root and opening the door for easy system exploits like Windows.
  2. The Ubuntu kernel supports NTFS out-of-the-box. This is a very pleasant surprise, especially given the policy with Fedora not to include support for NTFS. I think the Fedora policy is asinine, especially if you want to run a Linux system on a box that originally supported Windows NT to XP but still want access to files on NTFS volumes. Every time I've installed FC, I've had to pull down a kernel and rebuilt it with NTFS support enabled.
  3. KDE is completely available via Synaptic (and I'm sure via apt-get). But because Gnone is so well behaved under Ubuntu, I find I have no need to go and install KDE on top of Gnome so I can run the KDE apps. Gnone sucked so bad on FC4 that I was willing to live with FC4's somewhat buggy KDE packages. I also like the fact I have Open Office and Firefox. I would have installed Kubuntu but I discovered during the live run the unfortunate 'features' of using Konqueror for the browser and Koffice for the office package. I find both to be quite inferior to Firefox and OO, respectively.
  4. Better screen support. My system is now running at 1600 by 1200, which is better than the 1280 by 1024 I got out of FC4. The 2D acceleration is very smooth. What's more, Ubuntu has packages listed in Synaptic for 3D ATI driver support, something unheard of for FC4 out-of-the-box. Font clarity and overall readability are overwhelmingly better than Fedora, even at 1600 by 1200. And that's saying a lot when you're half blind like I am.
  5. Synaptic. I can't begin to tell you how much better Synaptic Package Manager is over up2date or yum. And up2date is broken on FC4; it's unable to automatically indicate when new updates are available like it did on earlier versions of Fedora. I have no idea if up2date is going away or not, but I have read enough messages telling everyone to use yum. Yum is indeed good, but no better than apt to my limited experience, and with Synaptic available, it's far easier to manage and install packages than it ever was with up2date.
  6. Nautilus. Nautilus is a mixed bag. Ubuntu did fix the default behavior where every time you clicked on a folder you got another window. With Ubuntu you keep the same window you started with. But I still had to go into System Tools | Configuration Editor, go hunt down nautilus, and turn on preferences | always_use_browser behavior. Once I did that then I had the old sidebar folder views. Sorry, but this is what folks coming from Windows and older Macintosh systems are used to, and this should be the default. I hate spatial view.
  7. ClearLooks. This new desktop theme is the best I've seen in a long time, from either Gnone or KDE. It's clean, minimalistic, and fast. It edges out KDE's Plastic in my mind, and beats the hell out of Fedora's theme.
Easy to install. Easy to configure. Easy to use. Full-featured. And fast. And it Just Works. These are attributes that Fedora, especially Fedora Core 4, no longer shares. I hung onto Fedora because it followed on from Redhat, and I had been, if nothing else, a loyal Redhat customer and user when Redhat sold its older distributions. I'm sure that over time I'll discover warts on Ubuntu that will appear as big and as ugly as those I've found on Fedora Core 4. But I rather doubt it.

The only flaw in an otherwise excellent experience is the odd issue of being unable to fully automount an ext3 partition when Ubuntu boots. The partition was full of data I wanted to keep and was not reformated. It was created under Fedora Core 4. But after Ubuntu boots the partition is there and available. That's the only odd problem that seems to stick out, and it's interesting enough that I find it more a challenge than a problem. Overall Ubuntu is one of the best, if not the best, Linux distributions I've ever run, and for a free-as-in-beer distribution it just can't be beat.

NetBeans Matisse - Needs considerably more work

I pulled down the latest developer NetBeans (for July 21st) and installed it, then I visited the Project Matisse page and watched Roman Strobl's flash demo. I wanted to followed Roman's dialog and illustrations as I recreated his DemoForm. Using the latest developer version my results were a lot less successful than Roman's.

First, the Matisse module seems to have regressed with regards to stability. I encountered numerous unhandled exceptions as I attempted to add each of the controls. The biggest problem with the flash demo is that when Roman starts his demo he starts from a point where there are already a number of controls on the form. I added the same controls in order to start at the same spot where the flash demo starts. I generated no less than two exceptions to get to that point, which forced me to "save early, save often." The problem is that once an unexpected exception appears, then no more work can be done until the form is closed. You can't even save your work. You throw it away and then restart the form editor from the last saved state. The exception that plagued me is listed below.
java.lang.AssertionError
at org.netbeans.modules.form.layoutdesign.LayoutDesigner.endMoving(LayoutDesigner.java:396)
at org.netbeans.modules.form.HandleLayer$ResizeComponentDrag.end(HandleLayer.java:2188)
at org.netbeans.modules.form.HandleLayer$ComponentDrag.end(HandleLayer.java:1893)
at org.netbeans.modules.form.HandleLayer.endDragging(HandleLayer.java:799)
at org.netbeans.modules.form.HandleLayer.mouseReleased(HandleLayer.java:1290)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
The following images show where I got to with regards to the Matisse visual editor. The left image was the final "stable" stage, with the Identity panel added with its text field and three text entry areas. Note the three buttons beneath the Identity panel. These are outside the panel. They'll later illustrate what I've run into trying to build non-trivial layouts with Matisse ever since it's been made available.

The right image shows what happened to me when I tried to follow Roman's example and add Organization label and text box to the Identity panel. Unlike the smooth example in the flash demo, my experience was anything but smooth. Any attempt to add the label did not push down the lower two labels. Instead Matisse kept placing it first in line with the email address label, and pushing the text box off the form edge. I finally got it added to the panel by manually moving down the lower to labels and associated text boxes, adding the new label and text box, and then manually moving the lower controls back up again. When I finished that exercise I had managed to shove down the "Remove Account" button on the left, and the lower buttons beneath the Identity panel were now almost completely off the form edge. Not a problem, right? Wrong. Grabbing the Identity panel's lower edge and attempting to resize it back to its original location resulted in an immediate unexpected exception. I could do nothing to the form at this point, except kill it, and any attempt to bring it back up and resize the Identity panel resulted in the aforementioned exception being thrown.

Monday, July 18, 2005

Ubuntu Linux - What a pleasant surprise

I run both Windows (Professional XP SP2) and Linux (Fedora Core 4, SuSE 9.1) at home. One box runs FC4 all the time, while the Windows box dual boots between Windows and SuSE. I have, however, been less than satisfied of late with Fedora Core, especially FC4. Yes, I know Fedora Core is 'bleeding edge'. I don't mind bleeding edge in areas clearly defined as such, and quirks can be forgiven if usability provided out weights the quirks. But there are enough annoyances in FC4 in many areas that shouldn't have quirks that I've started looking around for a replacement distribution on the all-Linux machine. Thus my willingness to try various distributions, such as Ubuntu 5.04.

Ubuntu is available on the web in CD-ROM and DVD-ROM format. I decided to download the DVD ISO and burn a DVD for testing. The DVD is available only via torrent, so I snagged a copy of Azureus, the Java BitTorrent client. I first Azureus to grab NASA's World Wind client, and I've been hooked on Azureus ever since. Azureus is interesting for another reason; it uses the Eclipse Rich Client Platform. Once I had the Ubuntu DVD ISO, I burned it to DVD and popped it into my notebook.

My notebook is a Gateway M680 with Windows Professional SP2 installed. It's unique in a number of ways. One feature of note is the video subsystem. It's built with ATI's X700 mobile video card. The Gateway also comes with a 17" display, and the display though the ATI card and driver is set to 1680 x 1050 pixel resolution. It also has Microsoft's ClearType enabled. The overall effect is beautiful to view as well as very easy to read, especially with my bad eyesight. I want to boot Ubuntu DVD just to see how well it handles the display. ATI video cards are a bear to get right under Linux, and I want to see what the out-of-the-box experience is like.

But before I could do that I needed to pop the Ubuntu DVD into the Gateway's drive. And when I did that I got another pleasant surprise. Windows found and ran the Ubuntu browser. The Ubuntu browser is a lot like the OpenCD browser in that it allows the installation of free and open software on Windows. The Ubuntu browser even has a link to the OpenCD and explains that the Ubuntu collection is a sub-set of the software found on the OpenCD collection.

The Ubuntu browser is well laid out, and allows the user to read about the various applications available for installation. I particularly like the screen shot galleries for each application. Over all the Ubuntu Windows browser is very professionally done. I have yet to boot the Gateway into Ubuntu, but if the Windows browser is any indication then I look forward to a pleasant and professional experience on the notebook as well as my home Linux system.



Update

Ubuntu didn't boot into the GUI on the Gateway. The reason is the lack of a default ATI driver for the video chipset. I'll sure give it lots of points for trying, though. The X.org configuration file had an entry for the Radeon Mobility X700 (RV410) chip, and it let me try to run at 1680 x 1050 resolution. I'll be booting Ubuntu (or more precisely, Kubuntu when its torrent download finishes) on the home Linux box tonight, and if the live run finds everything and runs to my satisfaction, then I will replace the Fedora installation with Kubuntu and use that as my working distribution. And since the home box has an older ATI 9600 card, I'll play with adding the ATI driver.

I really do want Linux running on the Gateway, but the Gateway is my work machine provided by my employer and it's not mine to do with as I please. I have no problem making it a dual boot (with Lacey's support), but I have to get real work done. I don't have a lot of time to tweak and fiddle with Linux to make it work as well as Windows. Perhaps as time goes on and I find out more I can install Kubuntu on the Gateway. If that happens I'll post it here.

Saturday, July 16, 2005

Building Subversion on MacOS X Tiger

I started to work in the Sparta Orlando office July 5th. As part of my new job I decided to install a SCM system that I, and others in the office, could use. After talking to the other developers we decided to install Subversion, and to make it available over the local webserver. What follows are my adventures over several days attempting to build, install, and integrate everything.

As I said I spent the latter part of last week finally gathering and installing all the pieces for a web-based subversion server on an Apple blade server running MacOS X Tiger, and then trying to get them all to play nice together. What follows are all the steps and settings required to get everything built and running. In order to duplicate my results, you need the following applications in tarball format.
You also need to make sure that you have the latest tool chain installed on Tiger. The system I worked on had Panther (10.3) installed originally. When it was upgraded to Tiger (10.4) the CD-ROM disks, not the DVD-ROM, was used because the blade server only came with a CD-ROM. This meant that the Panther developer tool chain did not get upgraded. The problem when this happens is that the older libtool is unable to properly build libraries for Tiger. Before I could successfully build and install all the tarballs I had to uninstall the older developer tools, then download XCode 2.1 from the Apple developer site and install the new developer tools. This turned out to be a painless if long process. You uninstall the tools (as root) by executing /Developer/Tools/uninstall-devtools.pl. Then, after downloading xcode_tools_2.1.dmg with Safari, Tiger automatically mounts the disk image and allows you to run the tools inside the CD-ROM image necessary to install XCode 2.1 developer tools from that image. Slick.

With the latest tools in place, I was ready to build all the tarballs. The instructions for building all the subsystems seem to be scattered across notes in the tarballs as well as the web, and from what I've read and tried to follow, they're incomplete in various ways. What I'm about to show you will build, and when finished will execute.

The server is a production server, so I tried to perform everything in a sandbox as much as possible. I untarred all the tarballs under my login directory, and with the exception of Berkeley db I installed everything under /opt. The first package to be unpacked and built was Berkeley db 4.3.28. I configured Berkeley to build stock with no configuration switches. I changed directory into build_unix and simply ran ../dist/configure. When it finished building I ran 'make install' as root and it was placed under /usr/local/BerkeleyDB.4.3. This default did not clobber anything already under /usr/local and it made it easier to build the rest of the applications.

Apache 2 was built next. The following configuration switches were used to build a module-based Apache 2 installation that supports Subversion.
#! /bin/sh
#
# Created by configure

"./configure"
"--prefix=/opt/httpd"
"--enable-dav=shared"
"--enable-so"
"--with-dbm=db43"
"--with-berkely-db=/usr/local/BerkeleyDB.4.3"
"--enable-ssl=shared"
"$@"
I cannot begin to tell you how important it is to include '=shared' on every '--enable-feature' switch. I had to go and read the Apache documentation before the clue light came on. I would build Apache and install it with the features enabled, only to look in the modules subdirectory and not find mod_dav.so, needed by Subversion. Simply adding '--enable-dav' will build DAV support, but will link it into the Apache binary, not create the independent shared object (so) module. The whole idea behind Apache modules is the ability to add new features without having to rebuild the http server and not link them in. Or at least that's the theory. When it was installed I modified httpd.conf to listen on port 8080.

I built PHP 5.0.4 next because it's also a module and because we already use the MacOS X Tiger Apache server for other uses and it also has PHP. Unfortunately MacOS X Tiger uses Apache 1.3.33. We now have a plan in place to eventually migrate from the built-in 1.3.33 to 2.054. In order to do that PHP has to be installed and enabled. The configuration switches for building PHP are:
#! /bin/sh
#
# Created by configure

'./configure'
'--prefix=/opt/php5'
'--with-apxs2=/opt/httpd/bin/apxs'
'--with-mysql=/usr/local/mysql'
'--with-config-file-path=/opt/php5'
"$@"
After installing PHP the following changes were made to Apache's httpd.conf file.
DirectoryIndex index.html index.php index.html.var
...
LoadModule php5_module modules/libphp5.so
...
AddType application/x-httpd-php .php
And to test the installation, the following tiny PHP file (test.php) was added to the htdocs directory.
<html>
<head>
<title>PHP 5 Information</title>
<body>
<?php phpinfo(); ?>
</body>
</html>
When you run this simple page under Apache and call phpinfo(), you get all sorts of interesting PHP information.

Finally, I configured and built subversion. The following are the switches for building subversion in this environment.
#! /bin/sh
#
# Created by configure

"./configure"
"--prefix=/opt/subversion"
"--with-apxs=/opt/httpd/bin/apxs"
"--enable-shared"
"--with-ssl"
"$@"
Once installed, Apache's httpd.conf file has to be modified as show below. Note that I'm listing all the modules currently referenced in the order that appears to work. Also note that while the Subversion install will add the dav_svn_module and authz_svn_module to the httpd.conf file, you have to go in by hand and add the dav_module.
LoadModule dav_module         modules/mod_dav.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
LoadModule php5_module modules/libphp5.so
The following is added at the end of httpd.conf per the Subversion installation notes.
#
# Subversion repository location
#

<Location /svn/repos>
DAV svn
SVNpath /opt/svn_repo
</Location>
Once all this has been done, then firing up Apache (apachectl start) should bring up the httpd daemon and all modules without complaint.

Why Did I Build Everything?

I'm sure I'll get comments and questions about using Fink or DarwinPorts to install everything. So let me answer those comments up front. After looking at Fink I didn't find it particularly 'professional'. Open source providers have a warped sense of humor (Fink, Gimp, even Subversion...) that doesn't go over too well in the professional world. I know that Fink is German for fench, a bird, but the name in English is not too complimentary. That and the fact I found a lot of mixed comments regarding the effectiveness of Fink under MacOS X. I did install DarwinPorts and attempted to update Ruby with it, but the repositories it decided to hit were so slow that after waiting over 20 minutes for port to pull down the necessary modules I killed port and just grabbed the tarballs. At least, with tarballs, I have a very high degree of confidence that they will configure, build, and run as intended.

The Rise of AMD

Everyone is in such a twitter these days over AMD's antitrust lawsuit against Intel that you have to read carefully to find news items that illustrate AMD's superior processor technology over rival Intel's. I've read at least four so far; two have to do with dual-core benchmarks, one has to do with power consumption, and one has to do with AMD's last quarter sales performance.

AMD's sales grew nearly 90% in the second quarter. The sales increase was driven primarily by processors, primarily Opteron server chips. According to the Inquirer the Athlon 64 "desktop CPU market doesn't seem to be a very happy place to be." Regardless of the Inquirer author's opinion, what it shows is that a lot of folks outside of the main Intel-dominated market recognize the quality of the AMD processors (HP and Sun come to mind) and that AMD is happily selling every single one they can make (and at very high markup if you check the sites).

There is an article on Tom's Hardware titled "The AMD and Intel Energy Crisis". There aren't that many benchmarks, but what there are show a basic truth that is summed up in the article:
From a performance per Watt point of view, Pentium-based computers perform far worse under a heavy load due to the higher clock speed level. A maximum of 166 W under 3DMark 05 (Athlon 64 4000+ with nForce4 Ultra) is much more acceptable than 255 W (Pentium 4 660 with 925XE).
There are two dual-core benchmarks that show AMD soundly beating Intel. The one from PCWorld is titled "Dual-Core Duel: AMD Beats Intel" while the second is from GamePC and is titled "Dual Core Done Right : AMD's Athlon64 X2 Processors". The PCWorld article was rather short; it was barely two pages long, with just one benchmark. The second test was much longer and detailed, and it had some interesting comments to make. This one echoes sentiments from the Tom's Hardware article:
Intel's first dual-core processors have been nightmares in terms of power consumption and cooling, leading to some of the highest wattage consumption numbers and thermals ever seen from a "single" processor. Thankfully, AMD's Athlon64 X2 series does not have these similar problems, as we've found in testing, the X2 consumes about as much power and creates as much heat as their previous generation single core chips...

Athlon64 X2 processors are fantastic in terms of power consumption, as two 90nm cores will consume less power compared to a single 130nm-based Athlon64 processor, while at the same time giving nearly double the raw processing power, which is very impressive. At full load, our Athlon64 X2 4800+ system with a GeForce 6800 Ultra system only is utilizing around 200W of power, 100W less compared to Intel's dual core offerings, and even quite a bit less compared to Intel's single core Prescott processors.

Not only does this mean Athlon64 X2 systems should run fairly cool (and quiet!), it also makes the Athlon64 X2 all that more attractive for power sensitive computing environments, such as home theater PC's and low-cost rackmount / tower servers.
What I found amazing is the amount of power both chips consume under full load with the GamePC tests. The Athlon 64X2 4800+ consumed 201 watts while the Intel Pentium D 840 consumed 297 watts. Add in one of the killer video cards like the nVidia 6800 or 7800 cards and some big hard drives, and it's no wonder system power supplies now provide over 500 watts (1/2 kilowatt) for Intel rigs.

Three of the four articles underline a continuing trend at Intel: failure to technically execute. Intel has had a number of embarrassing technical faux paus since the start of the 21st century, beginning with the Itanium (aka Itanic) lackluster acceptance, its poor 90 nm process (leading to very high power consumption problems in late-model Pentium 4 cores), the realization that the Pentium M is superior to the Pentium 4, being forced by AMD to implement (the AMD64) 64-bit extensions, and being forced by AMD to market dual-core processors that are clearly inferior to the ones from AMD.

Intel illustrates clearly what you get when you let marketers instead of engineers lead a company. Microsoft went to the dark side early on. They used shrewd marketing to gain market monopoly, and they've used that same skill every since. Intel went over during the late 90's when they wanted a piece of the dot-bomb server market dominated by Sun at the time. HP went along because they didn't have the funds for another PA-RISC design cycle, so they hitched their wagon with Intel to the EPIC-based Itanium, Intel's marketing weapon of choice at the time. Intel saw the mountains of money being made by Sun during the dot-bomb madness and they wanted that. Then the dot-bomb imploded, the Itanium was late and never quite lived up to its advanced billing, and the rest, as they say, became history.

So now we have a situation in which the largest processor maker, Intel, is selling inferior processor technology purely on marketing and market dominance alone, while the underdog, AMD, is fighting to sell a clearly superior processor, and has been for the past two years, barely making inroads with Intel-dominated customers. In the ideal world you win customers and markets with proven engineering superiority, but in the real world AMD struggles to gain market share. Given Intel's ruthless and brutal reputation, is it any wonder that AMD finally decided to sue Intel?

Wednesday, July 13, 2005

NetBeans hype hides NetBeans' limitations

If you're like me, you hit the NetBeans site on a periodic basis to keep up with what's going on with NetBeans. On the site there's a section to the right called NetBeans Buzz, and today they had an entry from Lin Gang's Weblog titled "NetBeans plugin development will gain Sun an advantage in IDE competition". Great title for a blog entry. Sounds like powerful support for NetBeans. Too bad that the title doesn't convey what the author really says.

The point the author was trying to make is the lack of NetBeans activity as compared to Eclipse, specifically with the development of plugins to extend the NetBeans IDE. Specifically, he stated
...it is a big disadvantage for NetBeans [to] compete with Eclipse, for such a great IDE, we do not want to see only Sun engineer[s] are working on the development and maintaining for it.
And I agree with that 100%. There is a quote in Lin Gang's weblog with no attribution that I found via Google, and it came from Rick Ross of Javalobby. I'm going to quote the entire section from Rick's article.
Sun could easily inspire and reward NetBeans plugin development
Some may not realize it, but NetBeans also has very rich support for plugins at the platform level. Almost 90 plugins are listed at the NetBeans plugin catalog, but there appears to be far less current activity in the NetBeans plugin world than there is in the Eclipse world. When I looked at the page showing all new plugins added in the last 30 days the list was almost empty, although perhaps someone is just falling down on the job of maintaining the catalog. In any case, a shortage of active plugin developers and current plugins could add up to a serious disadvantage for NetBeans. It would probably be strategic for and cost-effective for Sun to institute a program that motivates and rewards people to actively develop NetBeans platform plugins. Sun could learn from Google's "Summer of Code" example and provide direct financial support for those who successfully build NetBeans-compatible, open source plugins. An investment of a mere $50,000 in this could yield surprisingly positive results and improve the overall competitive value proposition of the NetBeans platform. If they don't do something along these lines, then I suspect it will ultimately be much harder for NetBeans to remain a contender. Despite the valiant efforts of Sun's NetBeans group to compete and innovate, if there's no 3rd-party plugin development activity Sun will be going it alone once again, and that would be both unwise and unnecessary. Jonathan, show some love and support to the NetBeans team, write them a check and make a NetBeans plugin scholarship program happen before JavaOne. Sun can inspire, but only with inspiring leadership.
It's interesting that I never read Rick's more honest post on NetBeans. That's because the NetBean's leadership at Sun is careful about what they report, especially on the NetBeans site. There's nothing wrong with wanting to put forward a positive image about any product, but I have become increasing uncomfortable over time with the dearth of counter examples to the glowing reports of user nirvana. This time a little more balanced truth leaked through when they failed to carefully read Lin Gang's posting.

As I mentioned in an earlier post the NetBeans 4.2 development version now has project entries for creating two types of plugin projects, a stand-alone plugin and a suite of plugins. At first blush you'd think "Yippee! Now I can develop plugins like Eclipse!" You'd be wrong. The best the current development system does now is to create a very empty project skeleton and automatically add some of the XML files I wrote about in "Newbee NetBean Module Creation." When compared to the Eclipse plugin development environment, the resources and tools to help you develop NetBeans plugins is woefully short.

Eclipse has tutorials, extensive help in its IDE help section, and many books that show you how to contribute to the Eclipse ecosystem. The Eclipse IDE and supporting tools are ready for business. The NetBeans IDE, in spite of excellent engineering over the version 4 series, is still lacking in critical areas, specifically support for plugin development. The supporting information infrastructure is just not there, and digging nuggets out of other engineer's weblogs is not the same as solid foundation you find for Eclipse.

NetBeans has shown great growth in capability and quality since version 4 was released. The team behind NetBeans is to be congratulated for their hard work and the professional polish they've brought to the platform. But if they want to grow farther then they, and Sun in particular, need to drop the rose-tinted view of the NetBeans development environment as being as good as Eclipse and ask for some help. As Rick pointed out it can be like Google's summer of code, or they can offer bounties for specific plugins, including help on finishing and extending Matisse. Until they do that NetBeans will continue to be an interesting also-ran against Eclipse, and it will finish slipping into niche status.

Monday, July 11, 2005

Firefox is loosing its appeal for me

I'm about to write something sacrilegious with regards to Firefox. I no longer believe it's quite the golden child we were led to believe it was back in January of this year. Right before I cranked up the browser to write this little screed I had to kill the process on my Windows XP SP2 notebook (a Gateway M680 with an Intel Pentium M 2.13 GHz and 1GB of DRAM). Why? Because it locked up yet again viewing a PDF file (an essay written by Bjarne Stroustrup on the future of C++). It occurs when you use the back button to go back to the page from which you launched the PDF viewer in the browser. It's been locking up at least once a day, requiring that I pull up Window's task manager and kill both the Acrobat reader process as well as the Firefox process. And until I kill them both, chew up about 100% of the processor's time.

Reading PDF files isn't the only Firefox killing action. I've also had lockups with Apple QuickTime. And then there's the peculiarity with Java. On the Protege download page you're asked if you want to run the Java-based plugin installer. Every time I answer no, the installer runs anyway, showing up on the page. IE 6 honors that 'no' and the plugin on the webpage does not run. And Firefox, over time, becomes a memory hog. Right now, with five tabs open (Blogger, Slashdot, Ars Technica, the PDF document, and a blank tab) Firefox is eating up 35MB. When it had locked up it had hit well over 100MB. And then there's the performance over time. Open a bunch of tabs (bunch >= 5), minimize the browser, then bring it back to the desktop. You get to see Firefox open painfully slow, and clicking between tabs can force you to wait, sometimes as long as a minute or more while the disk chugs non-stop.

I'm looking forward to IE7. If IE7 answers the key issues of security and standards conformance as well as provides tabs, then Firefox is off this system and every other system I have access to that runs Windows.

Update: Per the comment's advice below, I upgraded from Adobe Reader 6 to Adobe Reader 7. That does indeed appear to fix the lockup problem when moving back from a PDF file in the browser. Thanks to the anonymous poster for the helpful comment. But that still doesn't change my attitude towards Firefox.

Sunday, July 10, 2005

Watching Dennis Go By

I live in Orlando. Last year I got to sit through three hurricanes; Charlie, Frances, and Jeanne. So it was with morbid interest that I watched Dennis this past week as it tore through Cuba and made it's way past the Gulf coast of Florida on to landfall somewhere to the North Gulf coast. Right now it looks like it will make landfall near Pensacola, Florida. As of 2pm it was 40 miles south of Pensacola and was rated a category 4 storm with winds of 135 mph. It was September of last year that Ivan, a category 3 storm, hit Gulf Shores, Alabama. Ivan tore up communities all across that area and knocked out a section of I10 that crossed Escambia Bay.

The weekend here in Orlando has been somber. Trips to the local grocery and Moes had very few people out and about, especially Friday night. We've had lots of wind and rain, and it has blown more limbs out of trees that were weakened from last year's triple whammy. I remember that Charlie, the first hurricane, didn't hit until August. And here it is early July. With predictions that this is going to be an above-average hurricane season, I dread what the rest of the 2005 hurricane season holds for Florida, especially central Florida.

Fedora Core 4 - Fixing an OpenOffice Update Problem

When I installed Fedora Core 4 (FC4), I upgraded over FC3 rather than installing a fresh copy. I wanted to see what possible problems might crop up. Over time a number have surfaced as I've used my system. One of the problems that came to light had to do with OpenOffice.

OpenOffice was updated from version 1.1.3 on FC3 to 1.9.104 beta on FC4. Everything went well except that the upgrade installed every language pack for OpenOffice. As an American English speaker I didn't install the packs under FC3. I didn't find out about the situation until I attempted to pick up the OpenOffice 1.9.113 upgrade via up2date.

I got rid of the 42 language packs using yum, the command line package manager. The command was
yum remove openoffice.org-langpack*
which then found and removed all the language packs. Once that was done I was able to upgrade (to my satisfaction) to the latest OpenOffice 2 beta.

And one other thing. Up2date is still broken. I have to manually check to see if there are any updates to install rather than having the alert automatically indicate updates (the red exclamation). The notification button is now just a launcher for the dialog.

Thursday, July 07, 2005

Working with Netbeans 4.2 Dev - Part 2

I pulled down and installed the latest daily NetBeans 4.2 development build (6_Jul_2005_1800) and installed it. One nice feature I discovered by doing this: I could uninstall an older version and install the latest version and still have my projects and other settings come back up in the newest installed version. Excellent.

The reason for installing this version was to check out any updates/fixes to Matisse. I pulled up the original toy UI built with the June 28th release. This time I was able to drop sliders on the form and set them vertically, as well as change their size without generating exceptions. Again very good.


But this time I ran into a new problem. I attempted to move the top three labels over to the left and the accompanying text boxes. The next images shows what happened when I tried that action with the "Whatever" label and associated text box. Nearly all the other controls were re-located over to the far right and chopped off. I suppose I could have stretched the panel to re-expose everything and then attempt to relocate all the other controls, but the immediate question is why should I have to?


On my last post, Arseniy commented:
Generated layout is not based on a grid concept nor on absolute XY coordinates (it uses parallel / [sequential] groups of components instead), and the guidelines seem to be good enough to visualize the constraints between components...
I'm concerned about the complexity of trying to manage N constraints between M components where both N and M grow large over time. Watching all the other controls shoot around the form when I moved just one control showed me that Matisse's developers have got a way to go with properly managing constraints as controls are moved and resized. In spite of what Arseniy says I firmly believe the layout tool that will be the most successful is going to be the layout tool that does use a grid to help lay down controls. And before anybody jumps to the conclusion that I'm in love with the Eclipse Visual Editor, let me assure you I'm not. Both show promise but both need a lot more work. If you want a professional Java UI layout tool at this point in time then your best bet is to buy one.

Egypt's Envoy to Iraq Killed

I just read this story on the CNN website. It's buried at the bottom of the main page by the events unfolding in London. It's no coincidence that this atrocity occurred on the same day as the bombings in London. The cowards of al-Qaeda posted the following on a website:
We, the al Qaeda in the land of the two rivers, announce that the verdict of God against the ambassador of the infidels, the ambassador of Egypt, has been executed, praise be to God.
The heinous acts of evil that al Qaeda continues to commit will in the end lead to their total destruction and damnation before God. But how many more innocents will die around the world before we find the resolve necessary to hunt them all down and dispatch them from this world? For in this need, as in so many others, the Lord helps those who help themselves.

Another Sad Day - London Terrorist Attack

I first heard the news about the London attacks on the local NPR station while sitting in morning traffic. It was my regular commute to work via I4. Unfortunately there'd been an earlier accident on the east-bound side (my side) at the I4 and 408 connector snarling traffic to a near standstill. So starting at the I4 OBT exit, I spent 15 minutes slowly crawling towards the ramp leading off I4 and on to the 408 eastbound.

Normally I'd have been cursing the traffic and the drivers that caused the backup, but this morning that faded into the background while I listened to the continuous but meager news coming out of London. And I thought back to Madrid and Bali and of course New York and 9/11. So I sat quietly in traffic listening to the radio and basically getting to work on internal autopilot. Once I got to work I hit the various news sites for more detailed information; CNN, ABC News, MSNBC, and especially BBC News.

As the morning progresses here in Orlando the death toll continues to climb. BBC reports 30 while CNN reports 40. The numbers are sure to climb as the day progresses. BBC is reporting at least seven blasts. al-Qaeda is claiming responsibility. Stock markets in London and New York have taken a hit.

I await with a certain numbness the unfolding of events. I'm curious to see how Britons will react to this attack. When Spain was attacked Spain elected a new prime minister that then promised to pull Spanish troops out of Iraq. Will England react in a similar way, or will they stiffen their resolve with regards to al-Qaeda? And will this attack contribute to further intrusiveness into Londoner's basic privacy? London has an extensive camera system in place already. They also have a large Islamic community. With al-Qaeda claiming responsibility, will England crack down on this community? You have to assume that some support for this attack came from that community. Will the Islamic community cooperate and help root out those responsible?