Wednesday, October 21, 2009

The "I am Legend" Pitch

It's like "Castaway", but there are zombies on the island, right? Tom Hanks all alone on this desert island, but with zombies that come out at night.

Yeah - it's like "Castaway" meets "28 Days Later", but instead of Wilson the ball we have Sam the dog, so it's like "Marley and Me" too.

Yeah, I'm afraid Sam doesn't make it, and Tom Hanks probably wouldn't last long too, so it's Will Smith. Really buff Will Smith, and the island is Manhattan - post apocalyptic Manhattan - "Mad Max" style!

No - no women, just Will and the zombies, except there are female zombies - scary hot female zombies, and several scenes with mannequins.

Sure - we could add some flash backs with women, but it's really a cautionary tail about man's hubris and science gone wrong in the near future. Like "Terminator" except Schwartzenegger is a virus that turns people into zombies, and Sarah Connors is Will Smith.

No, I didn't think about that, but it's a good idea - "terminator zombies". Could be a sequel.

That's right - "Castaway" meets "28 Days Later" with "Marley and Me" meets "Terminator" in a "Mad Max" world with Will Smith in every scene and mannequins. It's a guaranteed block buster!

Friday, October 16, 2009

Public Option

I was thinking about arguments for and against the “public option” in health care reform. The argument in favor of a public option is that a non-profit national health insurance option would set an upper bound on premiums and prevent collusion between private insurers. The private health insurance industry has a history of inefficient resource management that spends 30% of premiums on overhead (including high executive salaries). The industry also prioritizes profits over patient well being in its efforts to avoid paying claims and over-pricing coverage for anyone that develops an ongoing health condition.

The argument against the public option reasons that the private insurance industry will not be able to compete with the public option, so the insurance industry will evolve into a single payer system run by the government. From that point public option opponents go on to argue that a government run single payer system is bad.

Spelling out the arguments for and against the public option in this way shows that both sides of the debate actually agree that a public option would more efficiently finance health care than private insurers do currently. The argument then becomes whether or not private insurers will be able to evolve and compete with an opponent that will not collude on price, the costs and benefits if we evolve toward a centralized single payer system; and if the government does not provide a private option, then how can we trust private insurers to change their behavior and become more efficient and more focused on patient well being.

Wednesday, October 07, 2009

Social Networking

I've been playing around with Twitter and Facebook lately. I'm surprised how well these sites work as communication tools. A bunch of people tracked me down on facebook in the last month, and it's fun to keep in touch. Crazy.

I'm now trying to figure out how we can wire up the feeds off some of our blogs and wikis at the Auburn libraries to auto-update the library twitter/facebook accounts. I thought there would be some open source tools we could download, but twitterfeed is the most promising thing I've come across so far. We'll see how it goes.

Sunday, October 04, 2009

Comments on Bill Marre

I watched Bill Marre the other night, and he took his usual jabs at religion and religious for inspiring terrorism, oppressing women and others, and generally doing bad stuff in God's name. I only disagree with Bill to the extent that he believes that the world would be a better place without religion. I rather tend to believe that religion is just a convenient excuse for the bad things that people will find a reason to do anyway. Bad guys like Hitler, Stalin, Mao, and Pol Pot did not need religion to justify their crimes - they just reasoned that their ends justified the means.

Anyway, that's the deep thought for the day.

Friday, July 03, 2009

Just read a good NYTimes article about China's investment in green power. China established green energy regulations two years ago stricter than the rules the United States Congress can't agree on today. Articles like this one show how we (the U.S.) don't compare well with China in energy policy where investments and sacrifices today can pay large dividends in the future. We have begun to address structural problems like financial regulation, health care costs, green house gas regulation, and energy policy, but from Wall Street to the A.M.A. to health insurance providers to oil companies to the average Joe eating a hamburger in his SUV driving to an air conditioned McMansion we're not quite ready to radically change the way we do business. We are slowly changing though - forced by the financial crisis and crisis to come (health care, global warming, etc.). It may make sense to stick with a system that has worked for years until disaster forces change, and at least we don't sell poison baby milk.

Monday, June 29, 2009

littleware on Google Code

I just setup my littleware code as a project on Google code: http://code.google.com/p/littleware/ .

What a great site! It was easy to setup the project, but here are a few tricks for interacting with the Mercurial repository.

  • To initialize the Google repository from an existing repository on your local machine:
    • hg clone googlerepo
    • hg bundle localrepo
    • cd googlerepo; hg unbundle localrepo.bundle
    Something like that.
  • Took me a while to realize that googlecode autogenerates a custom password for Mercurial push. You need to track down that custom password under the googlecode admin console to 'hg push' up to Google's repository.

Sunday, June 14, 2009

Guice, Read only POJO, and Builders

I often design java interfaces with methods that return POJOs with read-only properties like the following.


public interface Manager {
      public Info lookupInfo( String sKey );
}

public interface Info {
    public String getA();
    public int    getB();
}

I prefer to decouple Manager's implementation from Info's implementation via Guice injection like this:

public class SimpleManager implements Manager {
    ...
    @Inject
    public SimpleManager( Provider<Info> provideInfo ) { ...
}

The problem with injecting the Info provider is that provideInfo supplies read-only objects which SimpleManager cannot assign property values to. One fix to this problem is to introduce an Info builder interface, and inject that, and a nice way to implement the Builder is to nest the Builder interface within the Info interface, then nest the Info implementation within the Builder implementation. We wind up with something like this:

public interface Info {
    ...
    @ImplementedBy( SimpleInfoBuilder.class )
    public Interface Builder {
        public Builder putA( String val );
        public Builder putB( int val );
        public Info build();
    }
}

public class SimpleInfoBuilder implements Info.Builder {
    private static class SimpleInfo implements Info {
           ...
    }
    ...

    public Info build() { return new SimpleInfo( ... ); }
}


public class SimpleManager implements Manager {
    ...
    @Inject
    public SimpleManager( Provider<Info.Builder> provideInfo ) { ...
}


Tuesday, February 24, 2009

Design for Everything

The more code I write the complexity of what I want to do increases, and the number of design variables increase.  I find that I have to design for ...
  • testing - code to interfaces that lend themselves to unit testing
  • remote procedure call - remote APIs must be call by value
  • security - keep JAAS in mind for authentication and access control
  • user interaction - design APIs to provide hooks for user feedback, support user cancel requests, or implement the observable pattern to allow UI listeners for view changing events
  • monitoring - logging, JMX, timers
  • extensibility - OSGi implements a nice plugin architecture
  • transactions - ability to rollback multipart operations on failure after partial processing
  • cacheing - ability of client to cache data from server in a consistent way
  • injection and late binding - I like GUICE for dependency injection, but am lately struggling with marrying the GUICE's preference for data binding at application startup with a UI design that allows runtime definition of injectable parameters.

Saturday, January 10, 2009

Solaris X11 emulate 3 button mouse

Happy 2009!
I've almost got the OSGi+Guice based bootstrap of  my code running in a glassfish server - testing now to work through a few last issues.  I'm pretty happy with this setup - Guice injects dependencies, and OSGi manages module startup and shutdown.  We'll see how it works out over time.
The Glassfish J2EE server runs on an Open Solaris install which a VirtualBox virtual machine hosts on my Dell (Windows Vista) laptop.  Works great.  I've wanted to check out OpenSolaris for a while, and it's pretty slick, but  I'd be surprised if Solaris recovers the market it has lost to Linux.
Anyway - the Solaris X-server was not configured to emulate a 3 button mouse by default.  Fortunately, Google found the following easy 3-button emulation fix, so I can now happily cut and paste in the Solaris VM on my laptop.  The fix just adds an 'Emulate3Button' line to the mouse InputDevice block in /etc/X11/xorg.conf file:
Section "InputDevice"
        Identifier      "Mouse0"
    Driver      "vboxmouse"
    Option      "CorePointer"
    Option      "Device" "/dev/kdmouse"
        Option          "Protocol"              "auto"
        Option          "ZAxisMapping"          "4 5"
    Option      "Emulate3Buttons"   "true" 
EndSection

Wednesday, November 19, 2008

Building a Dev Box

Although I am the sole developer on most of the software projects I currently work on, I often haven in the back of my mind the steps that another developer would have to go through to contribute to a project. I think this is usually a good consideration as this line of thought forces me to at least try to establish a simple development and test environment, and to try to write clear and easy to work with code. Before a fellow developer even looks at a line of code for the littleware project he or she has to install a series of software packages on his machine to build up a base development environment. Here is a quick rundown of several of the packages I install on a box that I expect to develop on. This list is not comprehensive, but it has the big pieces.

Saturday, November 15, 2008

Guice and OSGi

I've been working on and off for the past couple years on a client-server data tracking framework I call "littleware", and over the last month I began revamping the dependency injection bootstrap code on the server side. I've already converted the client side to use Guice, and that has worked out great. A Guice trick that has worked very well for me on the client is to setup a Properties file that defines static user preferences .ini style, then have a Guice module pull Guice @Named constant values for injection.

On the server side I plan to try a two phase bootstrap process using both Guice and OSGi. The second OSGi phase will allow each bundle that contributes to the application to run through the OSGi startup/shutdown life cycle. Leveraging OSGi will also allow each module's code to take advantage of OSGi's service publish and discovery infrastructure. Here is what I have in mind.

  • First an application bootstrap method run by a configuration servlet will load a bootstrap.properties file to pull a list of Guice module classes and a list of OSGi BundleActivator classes.
  • Next the bootstrap method will allocate each Guice module via java reflection invocation of each module's no-argument constructor, and give the list of modules to Guice to create an injector.
  • Third the bootstrap method will use the Guice injector to allocate each OSGi bundle activator.
  • Finally, the bootstrap method will startup an embedded OSGi environment (probably Apache Felix), and seed the OSGi environment with the list of bundle activators.

This will be my first experience using OSGi, but I've read good things about it, and I know several prominent projects take advantage of it. I know OSGi has some support for dependency injection, but I've had greate experience with Guice, and Guice seems much better suited to that task. If all goes well, then I may extend the client to leverage OSGi in the same way. I'd like to extend the current client framework to embed several server-side technologies like javadb so that multiple clients running on the same machine can share services - especially cacheing.

Hopefully I'll be back in a month or so with a status update. I played around with maintaining a blog of XML files on my own server, but services like blogger are obviously a much simpler and better solution that I plan to take advantage of for now.

Friday, September 21, 2007

RSS test

Let's see how this shows up in RSS. Does this show up too ? -Reuben

Wednesday, August 15, 2007

Easy web site

Hello! Sites like this one (www.blogger.com) make it easy to post information to your own web site. If you just want a quick and easy place to post your contact information occasional news items, then give this a try. - Reuben

Saturday, September 09, 2006