OpenOffice loses this round

July 16th, 2009

I use spreadsheets every now and then for pretty trivial things.  Recently I’ve been using google docs spreadsheets because they were online and editable from different locations easily.  A few days ago I tried to use OpenOffice for a fairly simple sheet.  I’ve used OpenOffice on and off for years and years without ever becoming a power user.  After 30 minuets of trying to work with my very simple data, I realized I’d spent 28 minutes trying to figure out how to do basic operations that I took for granted in google spreadsheets. So here are the first few things I tried to do that were not as simple as they need to be:

1) Create a header row.

In OpenOffice, this is a “Window” option, and you find it under “Window -> Freeze”.  In google, I don’t even remember doing it, I think it just happened automatically somehow. (Addition: Even after using Window->Freeze, when sorting you still have to check the hidden box “Range contains column headers”)

2) sort rows by the value in a chosen column.

In google docs, when you hover over a column header, you get a pull down arrow that lets you choose A-Z or Z-A. That’s all I’ve ever wanted to do.  In OpenOffice, there is a prominent A-Z icon in the toolbar which does something stupid. (Sort the selected column regardless of other data).  The sort rows feature is under “Data -> Sort” and brings up a popup to configure the sort.  More than I needed.

3) reorder columns

In google docs I just drag a column left or right where I want it.  In OpenOffice the only way I found was to copy the data out of column, add a new column, and paste the data into the new column.

It would seem that spreadsheets are for manipulating tables of data, and it seems that there are many more small tables in the universe than large tables.  So why not optimize for quick and simple operations that casual users do all the time?

I guess I’ll stick with google docs for now.

Installing Solaris patches on top of a tarball.

June 3rd, 2009

There are times when you have a copy of some Solaris packages installed, but the pkg database is not available.  This can happen when you relocate the installation directory manually, or if you’ve placed the files on a non-Solaris NFS server, or if you backed up your /opt directory, and restored it aftera complete OS reinstall.  So what happens if you want to update your software with the latest Solaris patches?  It’s actually not too hard to tear apart a Solaris patch and get at the files, so I wrote a script to help out in these situations.

The script can compare your install directory with a patch to see if the files in the patch match the versions in your install directory.  It can also install the files from the patch into your install directory. The patch arguments can be either zip files or unzipped patch directories.

This checks if any patches look like they’re not applied.

% patchraw -n DIR PATCH PATCH ....

This installs all files in all patches

% patchraw DIR PATCH PATCH ...

I developed the script using the sparc version of Sun Studio 12 as an example, and did no other testing.  So caveat emptor.  If you want to use the script, make a backup copy of the install tree.  There are some comments in the source, and some commented out print statements that might be useful.

In order to get the latest patches for Sun Studio, I recommend using the Patch Check Advanced script by Martin Paul.  You can get it here:

The pca script is a swiss army knife for Solaris patches.  In our case we only need to make limited use of it download a set of patches. It wants to use ‘showrev’ to check your system, so you can’t run it on OpenSolaris for now.  To get the list of the latest patches available for Sun Studio, there are two ways.  There is a page listing Sun Studio 12 patches., but it can be out of date. At the time of this writing, it’s missing a locale related patch.

You can also use the pca script to download the latest index of patches and search through it.  Sun’s patch index doesn’t split out platforms very clearly, so I had to tack on some greps.  Here is the command that worked for me to find sparc patches.  This process only works if the patch synopsis follows some sort of mostly sensible convention.

% pca -l -p 'Sun Studio 12: ' total | grep -v Linux | grep -v RHEL

Put that output into a file like “patchlist”, then use pca to download the patches.  You’ll need a free login/password for the sunsolve site.

% pca -a -d patchlist
Please enter Sun Online Account User:  (your sunsolve/SDN login)
Please enter Sun Online Account Password:  (your password)

If you find this useful please drop me a line…

The script is here:  SCRIPT.

Extra Caveat: The Sun Studio 12 tarball that’s available from leaves out the performance libraries.  So installing all the patches carries the risk of installing part of the performance libraries, but not all the files.  This may cause incorrect linking of programs that try to use the performance libraries.

Mac OS X — Dock review

May 22nd, 2009

I’ve been using Mac OS X 10.5 (Leopard) for a week or two as my main desktop environment, and I’m really liking the Dock for icons and such.  For the last 20 years, I’ve wanted a window manager that combined the quick-launch buttons with the running program icons.  I’ve finally gotten my wish.  But after using it a while, I think there are some rough edges.

Here’s my version of an overview of the Mac OS X Dock:

Icons are used to represent several kinds of objects. On the left side of the dock are objects that represent applications.  On the right side of the dock are several distinct kinds of objects. 1) The trash can, 2) folders, 3) iconified windows

Application objects represent shortcuts for starting an app, if it’s not already running.  If the app is already running, there’s a small visual indicator next to the icon, and clicking it brings up one of it’s windows (the main one, the last you had focus in? I’m not sure).  But the application’s windows also show up on the right hand side of the dock.  When you click on a folder icon, you get a very nice pop-out menu with icons for each object inside, very convenient!  When you click on the icon for a running app, AND that app has more than one window, you should get a pop-out menu letting you choose which window you want to select.  It seems like a no-brainer to me, it just makes the interface more consistent.  And the dock would also quit jumping around so much and jiggling left and right as you open and close windows.

I’ll keep my fingers crossed for Snow Leopard, the next version of OS X.

Visualizing dynamic library dependencies

May 22nd, 2009

Darryl Gove has been working on graphical display of shared library dependencies. It seems useful for performance analysis and debugging of dynamically linked applications.

He did one for StarOffice and for Firfox and Thunderbird.

May 14th, 2009

OpenSolaris tips

(Direct document link)

Reboot to a specific boot environment:

    # bootadm list-menu
    the location for the active GRUB menu is: /rpool/boot/grub/menu.lst
    default 0
    timeout 10
    0 zfsbe1
    1 zfsbe1 Solaris xVM
    2 zfsbe1 failsafe
    3 zfsbe2
    4 zfsbe2 Solaris xVM
    5 zfsbe2 failsafe

    # reboot 3

Twitter needs to be commoditized.

April 25th, 2009

Twitter needs to be commoditized. What do I mean by that? I mean that the Twitter message streams need to interoperate with all my other message streams. Twitter is just a bunch of logical message streams from different people. I don’t really care if my messages are coming via twitter or RSS or IM.  Why?  I’ll tell you.

I variously use OpenSolaris, MacOS and Windows most every day, and Firefox/Thunderbird/OpenOffice is my common app platform.  So I’m using TwitterFox to keep up with twitter.  It’s very good as an entry level Twitter client, but now I’m tempted to use something I can customize a little more.  But I’ve already got daily messages coming through several other interfaces, and I don’t want another application.  All I want is access to the twitter message streams.

But wait, you say, twitter is different because you can read and respond instantaneously!  And it’s a multi-way conversation! And it’s limited to 140 characters! But is it really that different at heart from what’s come before? Thunderbird has little popup windows for new mail, and people frequently use email for nigh-instantaneous conversations.  Both IM and IRC are instantaneous and they support multi-way conversations. Why haven’t I heard more about IM and IRC gateways with Twitter? The vast majority of my IM and IRC messages are less than 140 characters, nothing new about that.

In my opinion, the defining feature of twitter is that the clients provide an all-in-one chatroom interface as the primary way of viewing the data, but you get to easily choose who’s in the chatroom.  That’s a feature that should already exist in IRC anyway, it’s just too painful to use in IRC clients.  Because twitter is frequently updated, it grabs people’s attention.  Because it grabs their attention, interactive conversations are facilitated.  So that’s the essence of Twitter: It’s a global chatroom where you subscribe to the people you want in it.  But that’s just a kind of user interface, it’s not inherent to the data feed.

Some of the people I follow on Twitter provide good technical tips and pointers. Some of them are personal friends, some post links to “cool stuff”.  Some of them post frequently, some of them post infrequently. Hmmmm, this is sounding like a breakdown of my various email-based filtered inboxes, and RSS reader tags, and my IM contact categories.

The message clients I use most these days are:

  • Cellphone SMS
  • RSS via Google reader (I use multiple computers remember)
  • gmail (for personal email)
  • thunderbird (for work email)
  • Pidgin (IM, multiple accounts, work and personal servers, some IRC)

So why do I need another one?  The ones with the best features for managing message streams are gmail and any RSS reader. What I’d really like is one application that can manage all those message streams for me, and cross link them.  Anyone want to write me one?

For my own purposes, it would be easiest if this application was a program that could be run as a hosted service.  That makes it easy for it to be cross platform, like Google Reader.  But I’m not supposed to access work email except from approved sources, so having an app server read my work email for me is out. For that reason a complete solution would probably need to be a client-based app.

I spend much more hands-on time reading that I do writing.  So I’m prepared to completely blow off the integrated message creation parts, I’m just talking about reading here. It can just just bring up Thunderbird to send email, or bring up to update my twitter feed. The app would need to be able to read and correlate all the message stream technologies I’ve mentioned so far, and allow me to sort and group the various messages streams mixed together.  I have a “friends” folder in my work email that has a small number social emails.  I’d like that one folder from my work IMAP to be grouped with all my personal gmail folders.  I’d like to have views based on people, so that I can see all the messages streams from my buddy Ken, regardless of where they came from (IM, GMail, IMAP, Twitter, and don’t forget SMS and IRC).  I don’t need it to connect all his accounts together, I can configure that.

Some of the message streams are things I’d like to promote to “pop-up” status, so a browser add-on component that talks to the client would be nice.  (Or just use the desktop native pop-up mechanism).

I’m subscribed to fair number of high volume email lists at work, and I filter them off into separate email inboxes.  This works ok, but I’d really rather be reading those in an RSS reader, not an email app.  The user interface is structured in a more appropriate way in RSS readers.

Oh, and don’t forget NNTP.  I don’t use any NNTP streams right now because they require yet another client.  Even using thunderbird for NNTP pulls up a completely separate UI mode in thunderbird.  I’d totally love it if thunderbird had kill-files for IMAP messages, but it doesn’t yet.  By kill-files I mean: “type K to automatically junk all future emails in this thread”.  I don’t mean:  Set up a special filter with a special window and select subject line, and copy/paste the subject line, and remember to go back and prune your old filters, and remember to apply the filter to the specific folder you’re looking at.

In my head it’s a very simple interface, you just zoom in and zoom out on your message streams.  If you zoom all the way in on one blog post, you get a stream starting with the original post, and followed by all the comments. If you zoom out, you’ll see all the posts in the blog, but none of the comments.  Zoom out again, and you see a sample of all the posts in that category of your RSS reader.  The organization is a tree, but it’s heavily cross-linked.  Message streams show up in more than one place. I can start at the top of “all work email”, then drill down to my “work/social” folder, then go sideways to all “social” streams, then drill down to a thread with Ken, then drill sideways (eg by clicking on Ken’s name) to all message streams where Ken participates, etc, etc. Nodes in the tree are automatically created according to the structure of the underlying sources, but I get to create additional nodes that combine the data from other preexisting nodes. I can also create additional nodes by creating keyword search of filters on existing nodes.

Oh well, one day when I retire I’ll get a chance to work on it.  Until then, I’ll just keep bitching.  Someone please get cracking on this.  🙂 If it works right I’d pay a lot of money for it.

Can one programming language work for everything?

April 7th, 2009

There are all kinds of programming languages, and they all have their strengths and weaknesses. Sometimes you want fast prototyping, sometimes you want massive scalability, sometimes you want easy availability of a large library of preexisting code, or access to a specific framework.  Strong typing is useful, duck typing is useful, running on a virtual machine platform is useful, avoiding memory compaction is useful.  Can we get all that stuff in one language?

Given what we know now about language design, is it possible to design a language from scratch, that would work in all those contexts?  In practical terms it’s not very interesting to consider a language without also considering it’s implementation, (virtual machine, compiler, optimizer, etc) so we’re really talking about a software design for an implementation and talking about a language design at the same time.  Maybe it should be called a “programming system”.

Strong typing

One idea I think would be interesting to explore would be whether you can get the benefits of strong typing in a language where types were optional.  There’s a common rhetorical trap here that goes something like this: You have to force everyone to use strong typing, otherwise people won’t do it, and you won’t get the benefits.  I’ll call that the “paternalistic fallacy”.

You want the ability to say that a  module should abide by specific typing policy, and have the system enforce that. That makes it easy to use the system in different ways depending on the needs of your situation.  If you just want to conjure up a quick prototype, you shouldn’t need to define lots of extra typing goop. When you want to export that code and let other people use it, and test the heck out of it, you want to change the typing regime.

Essentially all types can be thought of as an assertion that could be applied at runtime instead of compile time.  Types allow the compiler to optimize in very important ways, like not doing a dynamic lookup for all methods calls. Types allow you to verify the correctness of your code, like trying to assign a floating point constant to an integer variable.  In my mind, these factors boil down to optimization and assertion checking. These features are crucial to have when you need them, but they’re not always appropriate.

Debugger Design

March 20th, 2009

I’ve spent a number of years in the dbx group at Sun, and over time you collect a lot of coulda-woulda-shoulda stories.  You know what I mean, “This code should really have been designed to do XYZ.”  Or “This module shouldn’t have to talk to that module.”  I figured I’d try to record some of the interesting bits for posterity, so I wrote an essay that I vaingloriously call a whitepaper.  So without further ado:

C++ and OpenMP runtime libraries in Solaris

February 20th, 2009

There is a set of runtime libraries that are maintained by the compiler team, and delivered to Solaris so they can be made available in /usr/lib on all Solaris systems. The ones most likely to affect people are the OpenMP support library (libmtsk) and the C++ runtime libraries (libCstd, libCrun). What makes these libraries special is that they share interfaces with the compilers. The compilers implement language features by automatically inserting function calls to these libraries. This means that new features in the compilers can require new versions of these libraries to be installed in /usr/lib.

Updating the libraries The long-standing process for this is that users are expected to install the latest runtime library patches when they want to use a new release of the compilers, or when they want to run executables that were built with the latest release of the compiler.

This procedure has some problems.

1) The lead time, from last bug fix, to getting a Solaris patch available on can be several months. The compiler team never knows when the last bug will be fixed in a compiler release, and they don’t know if that bug will require a library fix or not.

2) Hunting down the right runtime library patches, and installing them on all the machines that need them requires significant time and system administration skills.

Note: On Linux, we always have to include our own copies of the runtime libraries. That’s an added complication, but I’m discussing the problems related to skew between the compilers and the Solaris installation, and on Linux there is never any skew.


We lived with these difficulties when our releases were 12-18 months apart, but we’ve been doing more frequent Express releases for several years now, and so we’ve been relying more and more on a workaround. Internally, we call that workaround SPROtweak after the name of the package that implements it. The SPROtweak package contains copies of all runtime libraries that the compiler team delivers to Solaris. We install this package inside the compiler install directory when we want that compiler to override the system library versions. Our current policy is to install SPROtweak for Express releases, but not for FCS releases. This workaround also has several problems:

1) Programs built with Express compilers depend on the compiler installation directory. If you run the executable on a different computer, it will try to fall back to the system libraries, but it may not work correctly.

2) Official Solaris patches to support Express releases may or may not be available in a timely fashion, so executables are only moderately portable to different Solaris hosts.

3) We use this workaround as a crutch inside Sun. We commonly install the SPROtweak package even in FCS versions of the compilers inside Sun, because we don’t want our users to have to install patches. Since the compilers inside Sun are often used from an NFS mounted directory, we can usually avoid version skew. But we’re essentially saying that we don’t want to deal with patches, but we’re willing to make end users deal with patches.

Sometimes we make a distinction between casual users and production users. The internal installations of the compilers are for casual users, so we don’t want to make them deal with patches. Production users will normally be expected to have their own installation of the tools, and have closer control over the patch levels of their build machines. Production users will have a sys-admin to maintain their build machines. This side-steps the issue of the many casual users that don’t work for Sun.

Are there any better solutions?

A) Always include the latest runtime libraries inside the compiler directory, and give users a simple command line option to use the system libraries or the local copies when creating an executable. This is fairly straightforward, but it doesn’t go very far towards creating a seamless solution.

B) Fix the Solaris patch process so it takes less time to get these fixes available in Solaris. This would make the situation on OpenSolaris pretty good, because availability is 99% of the problem. Updating the runtime libraries is much simpler (although you still have root permissions). But the situation on Solaris 10 is only half addressed, because it’s still a PITA to install the patches.


I’d be interested in hearing the different ways that “version skew” is dealt with on Linux.


In the long run, the way we will address this skew may be different on OpenSolaris and on Solaris 10 because the distribution mechanism is different.

Finding the right package in OpenSolaris?

January 8th, 2009

Ubuntu has a cool feature called command-not-found where they publish an index of all the binaries on the system, and the package that each one belongs to.  When you combine this with the bash command-not-found hook, you get a default environment that responds to a missing command by telling you what package to download.  (Sorry, too lazy for screenshots…)

Anyway, this feature would be a good use for the new pkg command.  You could write a script that creates an index of all binaries, and then store that index in the user’s home directory.  Another script could react to the command-not-found hook in bash and tell the user something useful.

In fact, you could almost do this interactively by querying the pkg database, except that when I query ‘dbx’ (for example), I get 37 hits.  Most are for the different versions of the right package, and a few are for a package-alias of some kind.  A script that got that answer would need to apply some clever heuristics to do the right thing.

It seems like a good afternoon project, but I haven’t had a spare afternoon in quite a while. The alias can offer help with pkg issues.

Any takers?