Archive for March, 2010

Do you trust Oracle?

Posted in Software on March 31st, 2010 by Preston L. Bannister – Be the first to comment

The death of Sun, and the submission to Oracle – as a developer – leaves me with doubts about Java.

Sun was always a bit of a mixed bag. Some of their work was absolutely brilliant, and some – especially with software – was amazingly dumb. Never did really understand why this was the case. (Lots of theories, of course, but no certain grasp.)

Oracle is a very different mixed bag. The Oracle database is both a very solid piece of work, and old not-quite-irrelevant to the present and future (an intentional over-simplification.) The Oracle database is core to Oracle the company. On the other hand, Oracle (the company) is also heavily invested in applications and software that cluster around the Oracle database. Much of this software is written in Java (for very logical reasons). This would seem to guarantee the future of Java (as a platform).

But … the Oracle-core has a diminishing (if very fat) future. That fat future can stretch out quite a while – beyond obvious reason – as the IBM mainframe market proved.

As a developer, I find that I crossed a threshold some time back, and am impatient with Java when I can express more elegant solutions (to complex problems) in Javascript. (Yes, really – Javascript. May have something to do with early heavy exposure to Lisp in school.) Hearing that C# incorporates lambdas … is C# a better base than Java (with appropriate wariness of stealth Microsoft patents), or rather an extraneous step before bundling a Javascript interpreter?

Do you trust Oracle?

Re-thinking the IDE – a starting point

Posted in Software on March 15th, 2010 by Preston L. Bannister – Be the first to comment

Time for another user-interface rant. :)

Use of multi-column lists

One of my favorite annoyances is multi-column lists. When they first appeared in the early 1990′s, multi-column lists were cool. Add in user-sortable and re-sizable columns, and your application could offer better eye-candy than the competitors.

The usual problem with multi-column lists was that the columns came up the wrong size. Some applications were smart enough to auto-size columns – but not all – and auto-sizing was not always what the user wanted. The next logical enhancement was to save user preferences for column sizes, so that the next time the application came up, the user’s prior manual adjustments to column width were preserved. If the most-useful column widths change with different data, the users spend a lot of time manually fiddling with column widths.

As an example, we have the (really lame) Services view in Microsoft Windows. When this first appeared (in the mid-1990′s) the columns both (1) came up the wrong size, (2) in the wrong order (another topic), and (3) did not save user preferences. At the time, I figured this was a work in progress, and the Microsoft folk would fix this in a couple years.

The screenshot below is from Windows 7, so … apparently not.

The Eclipse IDE uses multi-column lists for compiler error messages (and the like). Eclipse might be my current-favorite IDE, but this is one of my least-favorite aspects.

Note that basically all the columns are the wrong size. The error message text is most important, and is too small, with only a fraction visible. That makes any less-important column too-large, by definition. The column with the most excess whitespace – “Type” – is one of the least important. The “Path” column occupies a lot of space, but is of at best secondary importance.

The most important bit of the “Problems” panel is tiny.

Note also that in the above screenshot, the overhead elements in the panel eat up about half the vertical space – far more space than the most-meaningful message texts.

This is not efficient … on a large 1920×1200 panel. On smaller panels, things are much worse.

Presenting program texts

The main payload in an IDE is the display of program text. An IDE may put up supplemental panels to help discover structure and aid navigation within the program, but the central bit is the program text. In Eclipse only a fraction of the screen is usable for the display of program text.

Current screens are more than wide enough for pretty much all program texts, but those same texts are far taller than they are wide. As screens are far shorter than program texts, you want to make the best use of the vertical space available. Only about 2/3 of the screen height is text, in the typical example below.

With Eclipse you can “maximize” the text panel, but there is still substantial vertical space lost to overhead elements.

Note also that while there is a shortage of vertical space, there is an excess of unused horizontal space.

This is not efficient … on a large 1920×1200 panel. On smaller panels, things are much worse.

Alternate presentations

To make the best use of scarce vertical space – especially on smaller panels – you want to excise vertical overhead. Program texts tend to be dense on the left edge, and sparse on the right. For the display of error messages or navigation aids, if you place panels on the right, there is good chance you will overlap little or no program text. If you use fly-away panels, you can quickly view even very long lines of program text on the smallest-current laptop displays.

There is a simple/clever way around the presentation of variable-sized columns – concatenate all the variable size bits into one column. You can keep the fixed sized bits as columns (or not). If the resulting text is too wide for the available column space, allow the text to wrap. Excise the less-useful fields, and present on explicit user action (like hovering or clicking on the row).

Note that too-wide message texts can be hard (or slow) to read. (Ever lose track of the line you are on when looking across a very wide display?) There is a good argument for limiting the width of message texts to about the width of a typical piece of paper. (Funny how that works out – common paper width tends to be about the efficient maximum for text width.)

Combine the notions for maximal program text and complete-but-constrained message texts, and you might end up with something like this simple IDE mock-up. (Note this is very much a quick-and-dirty first iteration.)

At 1920×1200 – on a 24″ desktop panel.

(Best to pull this up in Google Chrome, as only Chrome does a really good maximum size full-screen. Works in Safari. Renders in Firefox, though event handling is wrong. IE is pretty much hopeless. As this is a mockup, my aim was not to make it work across web browsers.)

Note that as the screen size drops, the use of screen space becomes radically better than conventional IDEs.

At 1440×900 – the resolution of my 17″ laptop panel.

(Imagine the vertical overhead of Chrome as a part of the text-space.)

At 1280×800 – the resolution of common basic laptop panels.

Note that on this smallish laptop we are getting both more vertical program text, and more complete message texts, than on my big 1920×1200 panel using Eclipse.

At 1024×600 – the resolution of a netbook panel.

With the fly-away message panel toggled off, even a netbook screen shows a good amount of program text.

Topic for later – navigation

After using Eclipse for several years, I have become pretty comfortable. Oddly, I have come to realize that in one aspect – navigation – Eclipse is inferior to my old use of Emacs with ctags/mkid/calls/grep. Under the hood, the functions for introspecting program texts are a dream compared to what I had twenty years back … but navigation still feels a bit clunky.

The next exercise will be to try and map out what is different, and take a stab at how to do better.

Magnetic propulsion?

Posted in General on March 8th, 2010 by Preston L. Bannister – Be the first to comment

Airplanes have always always been an interest, since I was a kid (though theoretic, not actual).

Simple basic facts about aeroplanes: long thin wings tend to more efficient (aerodynamically, not structurally) than wider/thicker/shorter wings. For much the same reason – propellers are more efficient than jets. Ducted fans are less efficient than propellers, but more efficient than pure-jet engines. Turbofan engines are basically ducted fan turboprops. Gains in jet efficiency over than past few decades are in part due to higher bypass turbofans (basically moving from pure jets closer to propellers).

Even propellers are not ideal. Swirling a couple curved sticks of metal through the airstream at high speeds is going to chew up energy without adding to propulsion. Many-bladed turbofans chewing through the airstream have got to be worse. Lots of energy wasted – could there be a more efficient way? Nothing especially obvious … or something better would be in practice.

Ideally we would like a way to throw back the bulk of an airstream without lots of extraneous physical churning. The only certain way we know is to use propellers – like oars in water. Could there be another way?

There is a well-known phenomena in Physics known as “electric wind”, that moves air without physical contact, but is by no measure efficient. Is there any way this could be used?

Is there any way to efficiently push an airstream without physical contact?

The “electric wind” is a stream of charged particles. A magnetic field deflects an charged particle moving through. The deflection exerts a force on the magnet (assuming the force is not sufficient to capture the charge). Movement against that force consumes energy. That energy presumably could accelerate the charged particles.

The mean free path of a charged particle at normal atmospheric pressures is short. Any accelerated ion would give up about half it’s energy at each collision. Short mean free paths mean many collisions. The net result would be (presumably) to accelerate a bulk of the airstream. Maybe.

Magnetic fields deflect charged particles. Strong magnets rotating on opposite directions could deflect and accelerate, then re-deflect and further accelerate charged particles – maybe. Would the result be significant? Would the result be efficient? I have no idea.

This might be an approach only possible if the “controller” is sufficiently smart, and with quite intense magnets (superconducting?). Matching the acceleration and deflection of charged particles through alternating magnetic fields through changing atmospheric conditions may not be possible with simpler control.

Is a “magnetic propeller” is practical possibility?

Using GMail for mailto: links in Ubuntu

Posted in Web on March 4th, 2010 by Preston L. Bannister – Be the first to comment

Create the file $HOME/bin/mailto with the contents:

#!/bin/sh
gnome-open "https://mail.google.com/mail?extsrc=mailto&url=$*"

Make the file executable.

On Ubuntu Linux (using the Gnome desktop), go to:

System > Preferences > Preferred Applications

Under Internet / Mail Reader select “Custom” and enter the command:

/home/preston/bin/mailto %s

(Replace “/home/preston” with your $HOME.)

This should open GMail in your default web browser, composing a new message, with the recipient set.