Wednesday, February 28, 2007

Struts 2 release

I spent 20 minutes this morning going through the struts 2 examples and browsing the demo source code. Good stuff, but I am going to sick with my minimalist JSP + POJO + CSS + AJAX supporting Javascript tool kits for most applications. If I need to do anything complex, I will choose between 2 great frameworks: OpenLazlo or GWT. I have also taken a careful look at Flex 2 - another great toolkit but I like OpenLazlo's support for both Flash and DHTML.

Another picture (one block from our house at our local hiking trail head - taken a month ago):
Coffee Pot

Monday, February 26, 2007

Lunch time walk in "our back yard"

We live in Sedona Arizona. Our house is about 50 yards from a national park trail head so we call the area where Carol just took these pictures "our back yard".

Back yard 1

Back yard 2

You can click on these pictures to get larger images. More pictures of our "extended back yard" are at my KnowledgeBooks.com site.

Source code releases for my commercial products

I have a new policy: source code will be made available for all of my commercial products under both a Free license for non commercial use and a for fee commercial use license. Source code will be available for free product evaluation. I need to improve the build and packaging of all of my products, so it will take a few months for everything to get released. I trust individuals and companies to play fair with my new more liberal licensing policies.

I started writing and making available free web books about 6 years ago and I have been impressed by how many people take the time and expense to support my open content writing by making donations (financial, reporting errors, and making suggestions). Since I have built my consulting business by relying on mutual trust and that has worked well for me, I have decided to also take a more trusting approach to my commercial product projects.

My hope is that enough individuals and companies find my artificial intelligence (AI) and other general purpose projects useful enough to motivate them to support further development through negotiated commercial licensing fees.

Friday, February 23, 2007

Source code for commercial products and social responsibility

I had an "eye opening" experience last December: two sudden pulmonary embolisms that I could have died from. I am well on my way to a full recovery now, but this experience made me think about both my responsibilities to my family (e.g., making sure my wife knows where our financial records are, etc.) and to any customers who I sell commercial software products to.

Think about this: if you buy software from an individual or small company, what happens if that company or individual goes away? For small programs this might not be a problem but the situation is different if your IT infrastructure uses 3rd party software. Customers really should have source code, even for non-open source projects.

I am working on software licenses for my own projects that protect customers yet offer some revenue protection for me.

Thursday, February 22, 2007

Google Apps Premier Edition: seems like a slam dunk decision for small companies

$50/year per employee using the system seems like a great price point. Here in Arizona, the university system has transitioned to using GMail - at a great cost savings. Since Writely does a good job of importing Microsoft Word documents, transitioning most staff off of Microsoft Office seems possible for many organizations. Add in the benefit of shared calendars and GMail, and this seems like a slam dunk decision - at least it would be for me if I had employees in my business.

Often "less is more" when trying to maximize productivity. I often think that too many features in 'productivity' software actually slow people down when the core process involves thinking about a problem, finding solutions, and communicating with customers and co-workers in a simple and efficient way.

Wednesday, February 21, 2007

More on Internet video: Joost.com

A reader of my blog sent me a Joost invite (thanks Ugo!)

Joost is still in beta with a few rough edges, but generally I think that it is awesome! My wife Carol took one look at it and said "I want that!"

The Max OS X client takes over the desktop (if you want), and provides a nice viewing experience. My favorite feature is remembering (an optional setting) which program you were watching and restart the video feed right where you left off.

While I am a huge supporter of Open Content (I was the CreativeCommons.org commoner of the week several years ago for my free web books) I also like to see more commercial material available on demand.

Tuesday, February 20, 2007

Internet Video

ABC has done a good job presenting their TV shows at ABC.com - I don't like their shows, but they do a good job of presenting them with few commercials. On the other hand, Comedy Central has lots of material that I like but their web portal lacks the usability and polish of ABC's portal (but I use it anyway). The screenshots on Joost.com look great but I am still waiting for a membership invite.

I don't blame content owners one bit for protesting if their material appears on YouTube or other user oriented video sites if they are not compensated. Although user driven sites like YouTube and Google Video (where I post my personal videos) are fun and popular, I suspect that video portals that are partnered with quality content providers will gain market share. BTW, it is probably time to roll out 100% IPv6 to support video multicasting (and confounding port scanners as an extra bonus!)

Monday, February 19, 2007

Ruby 2.0 svn trunk with Yarv

I built Yarv on my MacBook following these directions. The Yarv VM is a lot faster than C Ruby 1.8.X and it looks like Rails will work with Yarv before too long. I tried a lot of my code with Yarv without problems - mostly computationally expensive text handling.

Friday, February 16, 2007

The "ergonomics" of Java programming

Ergonomics is the study of human capabilities in relationship to work demands. There are a few aspects of the Java language that tend to make programmers less effective than developers who use concise scripting languages like Ruby or languages like Lisp that enable the development of new domain specific languages on top of the Lisp language. I would like to address two techniques that I use to make Java development more ergonomic, given the limitations of Java.

Fixable problem #1 for me is that Java is not a concise language: I believe that the fewer lines of code in a project, then the easier to read, understand and maintain. I try to crunch down the size of my code by writing getters/setters on one line and initializing multiple variables per line. Also, since most laptop and desktop displays are now a wide screen format, I tend to use more "horizontal real estate" when editing - try to maximize the code that I can see on one screen by putting some small code blocks on one line, etc. - but be careful to keep code readable.

Fixable problem #2: application size and complexity: I always prefer to chop projects up into sub projects. Modules can be tested in isolation and then generate JAR files for use in larger aggregate projects. Including source code in your JAR files makes them more Java IDE friendly for reading library code.

The non-dynamic nature of Java does have one large advantage: IDEs like IntelliJ and Eclipse can offer better auto completion and refactoring capabilities. By carefully structuring Java projects, I believe that while Java will never have the high degree of programmer productivity of Ruby, Lisp, Smalltalk, etc., it is still a great language to develop in - important because of the obvious benefits of server side Java.

OpenOffice.org/StarOffice market penetration only 0.3% ?

I saw this in an Arstechnica article. I have used OpenOffice.org to write 3 of my last 4 books. OpenOffice.org does everything that I need for a variety of writing tasks (although I also like to use Latex) so I doubt that it lacks features that many businesses need. The integration of Microsoft Office with services like SharePoint may be compelling for some businesses, but even so, I would expect many businesses to look at the compelling cost savings with OpenOffice.org - free! Most people learn to use OpenOffice.org very quickly so re-training business costs should be low. Even businesses that want to stick with Microsoft Windows as their standard desktop should seriously look at saving some real money and switch from Microsoft Office.

I also believe that Microsoft's new Open XML format is flawed because of backward compatibility with many old Microsoft products and possibly with binary attachments that are difficult to process in 3rd party software. I have watched Microsoft's business model of customer lock in and standards non-compliance for too many years to not have natural suspicions about Open XML. The standards specification for Open XML is now 6,000 pages - a high level of complexity and a barrier for use by 3rd party developers until there are robust free libraries for processing Open XML.

Wednesday, February 14, 2007

Am I the only one who uses the old LGPL MySQL Java driver?

When I do any database work in Java, I like to support both PostgreSQL and MySQL. The MySQL drivers since 2002 have a GPL license and are not suitable at all (for license reasons) for use in non-GPL projects when you need to distribute your application (but is fine for internal projects). Thus, for non-GPL projects, I use the older LGPL MySQL driver org.gjt.mm.mysql.Driver to stay clean, license-wise.

I do notice that just about all online tutorials that use MySQL with Java use the newer GPL licensed drivers, so I would imagine that many people end up using the GPLed driver in non-GPL projects. Being an open source enthusiast also means respecting license choices of copyright owners.

The old LGPL driver does not support some things like bit values, but since the old driver is open source, I could always tweak the source code if need be. I am a little surprised that the Java community does not fork the old LGPL driver and maintain it.

Tuesday, February 13, 2007

ODF - open document format

Good news that
Minnesota and Texas may become the next states to adopt the OpenDocument Format as the required standard for their agencies, thanks to two state bills up for vote.
I expect Microsoft to apply aggressive lobbying to prevent this, but there are some polititions who try to act in the public interest so there is some hope that the proposed legislation will pass.

Both Sun and Microsoft are supplying OpenDocument translators for Microsoft Office - a good thing! Some people like Office and I believe in personal choice :-) BTW, If your document repository consists of Office documents, consider periodically using OpenOffice.org's batch option for converting a directory (and sub directories) of Office documents to ODF. I would strongly recommend doing this periodically and archiving the ODF documents with your Office documents: future-proof your access to our own work.

Monday, February 12, 2007

Java + AJAX in 18 lines

I have been investing a fair amount of time learning the Dojo Javascript library but I had an application where I only needed AJAX to handle HTML form input - I wanted a server side function to return HTML to be inserted below the form. Dojo is a huge library so I pulled the prototype.js library out of one of my old Ruby Rails projects (prototype.js is only about 70KB). I put the following in my form JSP page:
<form id="myForm2">
 <input type="text" id="input_test_form_text" />
 <input type="button" value="Search" onclick="getS()" />
</form>
<div id="searchresults"></div>

<script type="text/javascript" src="prototype.js"></script>
<script>
 function getS() {
var params = 'query=' + $F('input_test_form_text');
var x = new Ajax.Updater('searchresults', '/ajax_search.jsp',
{method: 'get',parameters: params});
 }
</script>
The follow is a trivial server side JSP ajax_search.jsp that does nothing but returns the original query as an HTML snippet:
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%
String req = request.getParameter("query");
out.println("<p>request for 'query' is:" + req + "</p>");
%>

Sunday, February 11, 2007

Virtualization is changing how we deploy and how we manage old software systems

Several years ago, the Microsoft .Net product manager and his family were house guests at the same home where Carol and I spent a weekend. One of our longer topics of conversation (in addition to the Linux teeshirt that I quickly changed into :-) was virtualization and how it would change the deployment landscape.

Let me introduce my own prejudices: Virtualization is simpler when using open source operating systems and software - avoids license hassles. That said, regardless of which operating systems that you use, virtualization is a great tool for reducing the number of "physical" servers required to run older software. I used to lease very inexpensive dedicated Linux servers and configure and manage them myself. I now lease semi-managed Xen hypervisor based "virtual" servers - with operating system and infrastructure software choices selected for need. The time savings has been substantial for me and performance is both good and can be easily changed by upgrading/downgrading service plans. Service providers can inexpensively offer backup, automatic restore, and automated migration services.

Using Virtualization in your own data centers allows you to maintain old operating system configurations for legacy software systems, and migrate services between servers as needed - all at reduced cost.

Saturday, February 10, 2007

Not being able to work at a desk, and: Intel Macs + Parallels = perfect for development

I made this happy discovery of using Parallels after being forced for health reasons to switch to only using laptops for my work: I tend to get very caught up in my work and not move for long periods of time while working - this lead to sudden onset deep vein thrombosis and two (nearly fatal) pulmonary embolisms. I am getting better, but my surgeon and doctor strongly suggested that I permanently simply stop working at a desk. It turns out that not using a desk is working well for me: I still use my desk occasionally, but do most of my work using a laptop with a laptop desk stand. An orthopedic chair with ottoman, reclining deck chairs in my yard, couch in our living room, etc. all work well for me, and it is good to move around for variety.

Anyway, now I can still be "in the flow" for long periods of time while working, and I am fine as long as my legs are elevated. I am also careful to take short 15 to 20 minute walks every couple of hours. Before this problem occurred last December, I often hiked in the wilderness behind my house for 8 to 10 hours a week, so I was surprised by the deep vein thrombosis. If you spend a lot of time in a desk chair, please be careful to exercise periodically during the day and not get most of your exercise just one or two days a week - I am writing this hoping to help other people not have the problem that I did.

Parallels: this is a brilliant product for Intel Macs. My wife talked me into buying a nicely loaded MacBook a few weeks ago. I had been happily using a Linux/Windows laptop but now use the MacBook for everything. Windows 2000 and Ubuntu Linux were easy installs on my MacBook, and both "guest" operating systems boot very quickly so if I need to perform a Windows or Linux build, or do some testing, I have fast access to any environment that I need for my work. It is also great being able to share file systems and the system copy/paste buffer. That said, I spend almost all of my time just working in OS X and tend to do quick 10 or 20 minute tasks under Windows or Linux, finish up, and shutdown the guest operating system.

Wednesday, February 07, 2007

Heavy weight Javascript + AJAX vs. very light weight CSS + DHTML

Although I spend most of my time working on artificial intelligence (AI) projects, I have spent a lot of personal time in the last year working on basic web application skills. I have been prototyping a system using the Dojo Javascript library - great stuff, but definitely heavy weight. However, by loading up all required Dojo library and application specific Javascript at once, and then using AJAX does provide a responsive user experience - after the initial load up time.

After dinner last night, I re-wrote the web UI for my current commercial development project using minimal CSS, HTML, and a small amount of Javascript - although switching work contexts now requires fetching more resources from the server, the amount of data transfer is minimal and the web app is still very responsive, even factoring in slower network connections.

I have looked at Open Lazlo and other heavy weight client frameworks - they look great, but for someone like me whose primary work does not involve building web applications, I like reducing my own learning curve by choosing technologies that cover all of my requirements and simply using them unless some far more compelling comes along.