SENSS Bruce: There once was a time I was a Java programmer…

…and I was a good one, too, patching up a bunch of gaping holes in JDK 1.4:


/**
* This class kludges around the RMI serialization limit of 64Kb in
* DataOutputStream.java by breaking long strings into palatable
* chunks.
*
* @author Alec Muffett
* @version 1.23, 00/10/18
* @since Bruce1.0
*/

public final class RMIStringWrapper
implements Serializable

…and doing in-app optimisation:

/**
* This is a class which maintains a static and shared cache of random
* number generators of specified algorithms, to reduce instantiation
* overhead.
*
* @author Alec Muffett
* @version 1.17, 00/05/11
* @since Bruce1.0
*/

public final class PRNGCache
{

…and adding bunches of functionality that nobody had bothered to add at that point:

/**
* Class to implement extended csh-like fileglob pattern matching.
* The FileGlob class implements the following syntax:
*
* * - zero or more instances of any character.
* ? - any single character.
* [A-Z] - any character in the range A thru Z inclusive.
* [^A-Z] - any character NOT in the range A thru Z inclusive.
* foo{bar,baz} - matches "foobar" and "foobaz".
* foo{,bar,baz} - matches "foo" and "foobar" and "foobaz".
* foo{,bar,b?z} - matches "foo" and "foobar" and "foob?z",
* where the "?" matches any single character, etc.
* foo{bar,baz{1,2,3,[7-9]}} - works as expected, etc.
*
* Backslashes are used to escape metacharacters; care should be used
* when embedding backslashes in Java code strings:
*
* fg = new FileGlob("\\*"); // need double "\" to embed one "\"
*
* The pattern compiler does no optimisation; it is expected that the
* programmer realises that:
*
* foo{bar,baz{1,2,3,[7-9]}}
*
* is more simply written (and more quickly matched) as:
*
* foo{bar,baz[1237-9]}
*
* @author Alec Muffett
* @version 1.16, 00/10/03
* @since Bruce1.0
*/

public final class FileGlob {

…not to mention beating-up the Java dev team about not being able to upclass a listening socket from an inetd stdin FileDescriptor into a ServerSocket – they got back to me about that four years later, I ignored them – and probably best of all was PSTRMISocketFactory.java – a factory you could just throw into RMI and which would manage intra-TCP per-socket authentication using a pluggable stack a-la PAM.

Bruce was a great project. We had a great team:

$ grep @author */*.java | sed -e 's/.*author *//g' | sort -u
Alec Muffett
Casper Dik
Keith Watson
Sandeep Kumar

…and Dave Leftwich and Diego Zamboni (at least) are missing from that list. We even had Sun’s first-ever open-source license. We also had the second one, when the first one sank for being inadequately free. I fought both of those battles, and the crypto-export control ones too.

Bruce was a good project. It’s a pity we fumbled it.

But now I have a new project. Or two, and one of them has already been prototyped.

$ java HelloWorldApp
Hello World!

Time to dust off those mad skillz 🙂

Comments

4 responses to “SENSS Bruce: There once was a time I was a Java programmer…”

  1. I do seem to remember Sandeep trundling off to search the extant class libraries and free software, looking for a CSH fileglob implementation; after a week or two of his research, as team leader I exploded and wrote the damn thing from scratch in two hours flat.

    It’s been one of my criticisms of software reuse ever since.

  2. Keith Watson

    Alec,

    Thanks for the mention. This was the last project in which I programmed in Java. I never touched it again and have been happy about that.

    Bruce was a great project in terms of starting Sun down the path toward open source licenses. Until upper management got religion, it was a difficult task to argue for it. When we were in SunPS, it seemed to make more sense. (Sell services around an open framework.)

    I think, due to a comedy of management errors, we were never able to complete it and receive the right support needed to make it a success.

    Learned a lot though.

    Keith

  3. Steve Lodin

    Lot’s of COAST/CERIAS guys there. What a bunch of studs!

    1. Yeah, funny that… I think we hoovered-up most of Spaf’s little angels 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *