Archive for the ‘software’ Category

Marooned on Gilligan’s Island

Thursday, August 17th, 2006

Just sit right back and you’ll hear a tale….

Gilligan’s Island ran for 3 years and nearly every episode was roughly the same. Some discovery (read “new technology”) provides the castaways with the seed of a new approach towards getting rescued. The approach is tried, there are inevitable problems with the execution (generally introduced by Gilligan), failure ensues, and the plan is forever abandoned in favor of a completely new approach.

In 3 years of regular television, 96 episodes, the castaways worked their butts off on an amazing variety of novel ideas and still they never managed to get anywhere.

If you develop software for living, this starts to sound familiar.

A more logical approach for the castaways would be to pick a promising approach (building some sort of sea-going vessel perhaps) and refining it until it works. Its not nearly as entertaining, but its much more likely to succeed. Of course, the writers and producers are actually to blame – they introduce the plot devices and plans to keep the audience interested in trying to solve the same problem every week.

Of course, the big name producers in the software industry (Sun, Microsoft, IBM, HP) are doing the same thing to their audience (the sofware developers and IT managers). The new and novel is preferred over the tried and true because…, well because new things are just so much more entertaining! Its much more fun to do something new. Even if the old way is predictable and known to work!

Some of the shiny new things we’ve adopted and abandoned: Computer Aided Software Engineering (CASE), Artificial Intelligence (AI), Object Oriented Programming (OO), Virtual Machines, Garbage Collectors, Electronic Data Interchange (EDI), List Processing (LISP), Client-Server, n-tier, O/R Mapping tools, SGML, HTML, Web Applications, XML, .NET, the list goes on and on.

Some of these are languages, some core technologies, and some are architectural approaches. What they have in common is that the hype accompanying their introduction spurred large numbers of developers to drop whatever they were doing just as they began to master it, and run to embrace the next shiny toy. So much for the benefits of experience.

Interestingly, none of these falling stars have been completely abandoned. In fact, many of them are still around. OO programming was the panacea of choice for awhile. While the component world hasn’t quite emerged (actually – several competing worlds exist – COM, CORBA, RMI, PDO…) OO programming is now nearly ubiquitous.

AI, also a grossly overhyped technology and now considered a ‘failure’ by the purveyors of ‘conventional wisdom’ – is still making contributions towards the development of intelligent applications in the areas of manufacturing control, loan application evaluation, and consumer fraud detection. Certainly it didn’t quite live up to its hyped image, but the techniques developed to enable automated reasoning are extremely valuable where they are applicable.

Programming languages are another frequently used plot device. This used to be less of an issue. Some time before C++ started to proliferate, the developers of most operating systems defined a standard binary object file format that all compilers would generate. It was common to use FORTRAN math libraries from C, Pascal, or COBOL programs. You could mix or match to your heart’s content. The object formats were the same so the linker didn’t care.

The introduction of C++, in a misguided effort to make use of existing linker technology, introduced a technique called name mangling and essentially broke the guarantee that object files were interchangable regardless of which compiler were used. C++ code compiled with different compilers couldn’t even interoperate.

The end result was projects now had to select a single language for the entire project and stay with it. The cost of calling out to code written in other languages went up. Thus began the porting wars.

Companies now spend money to port significant portions of their existing software assets to the current darling in the language world. Even conservative aerospace companies have risked introducing new defects by porting reliable and fast math libraries written in FORTRAN to C++ just because “everything is going towards C++”.

Suckers.

They did it again with Java for the same reasons. I expect they’ll do it yet again with C# and .NET.

The real fact of the matter is that there has been no real progress in the software industry in something like 10 years. In fact we’ve lost some interoperability capabilities among programming languages.

As a side effect of changing the rules every year, experience is marginalized and hiring low cost unskilled programmers labor begins to look attractive. After all, even the old timers are going to have to learn everything all over. Thus, the endless march of new stuff for the sake of being new stuff nullifies the value of experience and hinders the development of masters in the field.

Of course, it also means that we are spending too much for each piece of functionality because everything is being done by brute force. Some of the truly elegant and productivity enhancing programming techniques have fallen into disuse because they are too mind expanding for novice developers to grasp quickly, and the top developers who can grasp them are too busy running in place to impart the advanced knowledge.

The only people benefitting from all this ‘new’ technology every year are the producers. Its all about trying to corral developers into their particular play pen and lock them in. Sun and IBM have been doing most of the rounding up lately. Microsoft is kicking off their own cattle drive with their .NET initiative.

The only way off the island is to identify a technology that works for you that you can control. This probably means open source development tools. Build up your expertise with this technology, continue to refine your approach, and stick with it. You’ll be sailing home before you know it.

Two Steps Forwards One Step Back

Thursday, August 17th, 2006

The first commercial software I ever worked on produced reports from data files. I had to open the file, parse its contents, write a new file, and then close all the files. Something like 80 percent of the program was just I/O processing.

The first data base system I worked on used indexed files. It was more hierachical than relational and unexpected system failures would have you rebuilding your tables and indexes for hours on end on a regular basis to recover from partial writes. The data storage routines were in a library and were pulled in by the linker. There was no concept of locking because you knew you were the only user of those files.

It was data processing with stone knives and bear skins and we liked it fine. OK, actually it sucked but at least we didn’t have to open and close the files or parse their formats ourselves. Application development went a little faster because we could focus less on file I/O and more on code that called the data storage routines and processing steps.

That was a step forward.

Later on we got Oracle and we experiemented with embedded SQL. Thats where you write bits of SQL write into your source code and some preprocessor turns the SQL into C code and function calls. It had the effect of removing the programmer one level away from the data processing and you could specify things in terms of set operations which let you get away from writing loops. One more set of bugs eliminated.

Of course, we now had to know three programming languages, C, SQL, and the weird embedded C/SQL/ProC dialect where the two collided. Code was structured into function libraries based on business functions. A library might contain the implementation of a number of important “edits”. Basically code that checked data to make sure it obeyed certain logical constraints. Since the libraries were reusable, so were the edits and thus business logic was mostly centralized and relatively easy to maintain. The libraries were then organized into “systems”. Billing System, Order Entry System, Payment Processing System.

Step forwards.

Object Oriented Programming arose as a means of refactoring code and it gained widespread acceptance primarily because it made the newfangled graphical user interfaces so much easier to write.

Unfortunately, OO also had the effect of turing the data processing world on its ear. Numerous articles from a number of OO “Methodologists” appeared bemoaning the so-called Object-Relational “Impedance Mismatch”. The idea being that, because the two processing and representation models were so different, the translation between the models became difficult and somewhat computationally expensive.

Several brave companies jumped into the breach with products designed to map database tables directly into user interface elements. Thus, client server was born. It was a huge mistake. Client-server was a two-tier solution. You had your data storage tier which was your relational database, and then there was the user interface tier. Client server encouraged user interface programmers to build the data edits and business logic right into the user interface. Thus, the same business rule would be embodied over and over again in various screens and other user interface elements.

Step backwards.

Meanwhile, the people using Smalltalk had come up with the Model View Controller (MVC) Architecture. The model represented the business logic and entities that was common to the business. It once again centralized the edits and business rules into a single code base that could be reused across a number of applications. The views represented the user interface elements and the controller mapped the data between the model and view and provided application specific actions.

Step forwards.

Mapping the model to the database was still a problem though. The most enlightened developers realized that it was possible to apply MVC principles with the relational database being the model and the business model taking the role of the view. The controller was known as an Object To Relational (O-R) Mapping layer. This specific mapping was relatively difficult to do and only a few companies produced really good mappers. Several others produced some rather bad ones. The good ones were exemplified by Persistence, TopLink, and NextStep’s Enterprise Object Framework (EOF). They allowed a developer to specify an object model, an entity relationship model, and mapping between them without writing any special code. Business logic was associated with business objects, database consistency edits were stored in the database, and application developers only needed to write views and application controllers on top of the model to provide new business applications.

Step forwards.

Since every computer platform had a different user interface programming API, every application had to be rewritten once for each platform. This made it difficult to mix Macintoshes, Wintel machines, and Unix/X Windows machines in an enterprise. There was also the difficulty in doing remote administration of thousands of clients every time a new version of an application was completed.

Enter the world wide web.

Because web browsers behave mostly the same on all platforms, it was possible to move all the application processing to a server and serve up views rendered in HTML. This had the advantage of eliminating the client configuration and distribution issues at a cost of a loss of interactivity. Web applications could only be forms based. Things like collaborative drawing tools were not good candidates for web applications but things like order entry and online banking were mostly forms based and a good fit.

Both the two tier and three tier approaches were taken to the web. The two tier had all the same problems it always had with scattered business logic located in the user interface layer. The three tier approach simply created a hierarchy of view objects that would “draw” themselves by emitting HTML. It was better but it was no longer possible for the application to be very interactive because of the nature of HTTP request response processing. So applications got dumber and slower.

Step sideways.

The two tier people caught hold of XML and XSL which appear to address some of HTML’s shortcomings. They began to look at web requests as document processing rather than events for a user interface. Except that databases aren’t really documents. So to get the database to participate in the XML oriented applications, new mapping models to go from relational databases to XML documents were created. Of course, unlike objects, XML documents are essentially inanimate data lacking behavior. The behavior is supposed to be provided by applying style sheets and transformations to the XML to produce new XML.

Giant step backwards.

Mapping relationally structured data into intelligent objects eliminates work and ultimately bugs because the objects enforce their own constraints and business rules. Mapping relationally structured data into hierarchically structured data has limited value other than as a streaming format. The data remains independent of the rules that transform the data and maintain its integrity.

There are lots of other inappropriate applications of XML. I’ll discuss more of them later.

Wikis – The new generation.

Wednesday, August 16th, 2006

Scoble is investigating collaborative tools – primarily chat and wiki tools. Seaside and Squeak are powering some really cool new capabilities. Like LogoWiki, a wiki that allows people to embed executable Logo programs. Useful for making educational sites about geometry and introductory programming. LogoWiki is built upon Pier, a wiki so rich in features that it approaches the level of a content management system. Given that the wiki was invented by a Smalltalker, this seems like a return to wiki’s roots.

Software in Europe

Thursday, July 6th, 2006

Scoble talks about tech in Europe. Since I worked in Paris for a year immediately after working three years in Silly-con Valley, I’ll weigh in here.

First, I think the valley is actually an obstacle to doing business. The number one cause is the cost of housing. I work in Seattle. When I price houses in the bay area, they cost just about twice what my house costs. Since I measure salaries in median home price multiples, I’d have to take a 50% pay cut to move there. All bay area companies freak when I simply double my salary when asked about my expectations.
Second, the local talent is overrated. Its young (people with low overhead who don’t mind paying $1500 for 400 square feet of living space), but inexperienced. So you need more boy wonders to get the same job done as you might if you hired seasoned professionals. Given a million$ budget, I’d prefer to hire 5 senior guys at $200k rather than 20 at $50k. I’ll get more done.

Furthermore, its a myth that the valley has the biggest talent pool. Denver Colorado has more programmers per capita than any other city in the USA. This is largely due to the concentration of telcos in Denver. The cost of housing is still sane (even a little depressed because of the telco industry’s woes), and these people know how to build for scale.

Getting back to Europe, I met some phenomenally sharp people in Paris. There’s a vibrant core there and they also have their geek functions. Furthermore, they seem less influenced by the fashion crazes that brought us garbage like Java and J2EE. There are at least 4 Smalltalk oriented conferences in Europe each year – compared to only one in the USA, and a lot of interesting research in how to build systems better happens in Europe.

As to the smoking angle, hooey. American geeks don’t smoke much? Extrapolate to Americans don’t smoke much. Euro geeks smoke about as much as Europeans. I did find the smoking annoying for the first couple months, then I got used to it. (People smoked at their desks in our office). Smoking is gradually falling out of favor in Europe, and if geeks don’t like smoking, they can have a non-smoking office. Not a factor.

Europeans are better at integrating tech into their lives than Americans. (Just compare a Euro cell phone with the garbage being pushed by Verizon, Cingular, etc). They also balance their lives and walk away from their computers to think now and then. They take holidays. Much was dicussed at gnomedex about the echo chamber. Europeans are better at leaving the echo chamber and experiencing life. The wide range of cultures in a smalll geographic region give them better perspective. They get 6-8 weeks of vacation, free health care, and job security/unemploymnent benefits lasting upto a year.  Tech workers want to give this up?  Don’t think so.  This is a key advantage.

If I had my choice, I’d live in Europe over California in a minute.

I am such a rotten user of software

Friday, June 30th, 2006

Confession time – I love to write software (in an appropriately expressive language).

But I hate to use it.

I suspect what makes me good at writing software – reducing problems to their essential elements and producing minimally sufficient solutions – makes me a an uninspired user of software. I don’t care for the details and don’t go digging into all the features. I have a task, I want to accomplish it, the rest is distraction. I suspect this is why I think the last tolerable version of MS Word was v3.2 for the Macintosh.

Which brings me to what set this post off. I’ve just figured out that comments are moderated on this blog software and I haven’t been checking for them. So they haven’t been showing up. I suspect this is disappointing for commenters. So I have approved the backlog and promise to approve more regularly from here on out.

Gnomedex is imminent

Wednesday, June 28th, 2006

And I am psyched. Should be lots of fun. I’ll be staying at Bell Harbor Marina aboard my sailing yacht Aurora on B-Dock. It’ll be the one with the hammock on the foredeck.

I’m still looking for the killer startup idea and ideal partner(s). Perhaps I’ll stumble onto something there. If you are going to Gnomedex and want to talk about doing something cool, find me. Look for the loudest Hawaiian shirt you can find.

Switchers

Tuesday, June 27th, 2006

Mark Pilgrim is going off about how he’s moving away from the Mac OSX and onto Ubuntu because he’s unhappy with the amount of work involved in data preservation.  Tim Bray is also discussing this.
That’s all well and good, but this isn’t remotely related to the Mac itself.  It is a universal problem.

I did a lot of song writing in the ’80s and have a lot of original music as sequences that were built using an Ensoniq ESQ-1 keyboard/sequencer and dumped as MIDI sysex data to a Mirage sampler and saved on floppy disk.

I still have the Mirage (although its getting more and more “quirky”) and the ESQ-1 and I’m “converting” the data by actually loading it into my old synth stack and “playing” it while having Digital Performer “record” the data stream in slaved sync mode.

This is the original source material.  I used to have versions of this material in Studio Vision format.  However, while I was off exploring the world and had my stuff mothballed, Gibson bought Studio Vision and promptly killed it.  Macs moved to Mac OS X from MacOS, and Studio Vision is copy protected (like all music production software apart from Garage Band).  So the Studio Vision versions were lost.

The Digital Performer file formats are proprietary too.  If you want to maintain total data fidelity, you have to archive the program, the OS, and the original machine.  Otherwise, its all lossy conversions again.  Switching to Ubuntu won’t mitigate this.

Java Swing returns

Tuesday, June 20th, 2006

Sun presented all day yesterday at work. I attended the session on desktop Java. So far as I can tell, the key changes are better windows integration (don’t care), an effort to get vendors to preload the JRE on both windows and linux, and a wizzy new demo app that makes heavy use of J2D to look a bit like a Mac OS X widget with lots of translucency, fades, throbs, and visual effects lifted right off of OS X.

I will say that the demo app was pretty, but having written swing and J2D in the past, I know how much work went into that app and I shudder at the level of effort it would take the average developer to replicate it. Most of the UI elements are not in the standard Swing package and are custom widgets making use of Java 2D graphics. Those that are swing widgets have been subclassed and had their rendering code replaced with some fancy hollywood quality graphics.

The NetBeans GUI builder (Matisse I think) was also shown. It looks so-so and it uses code generation which naturally makes it nearly useless.

The Q&A was also rather brutal with one attendee asking “why does it take 10 pages of code to replicate what I can do in six lines of HTML?” Their answer – they are working on a new app framework to hide the complexity of the Swing framework. Hello? Why isn’t the first framework simpler? Abstracting a framework behind a framework is excessive. No wonder the thing crawls at times.

My question/comment was to suggest that they bail on code generation and focus on the real pain point. Intelligent default sizes for widgets. For example, I constructed a standard outlook-style browser with a vertical split pane that has a scrolling list on the left and content area on the right. If there are no items in the list, it initially displays at something like 4 pixels wide. If I populate it with items first, it displays at a reasonable initial size.

So, under what circumstances does Sun imagine I might want a 4-pixel wide list? If I did want one that narrow, what are the odds that I’d want it to expand to 100 pixels when I added data? I’d say that Swing remains a nightmare framework of poorly chosen defaults, code generation gui builders, and ugly rendering. It can be improved with Java 2D rendering, but at that point, you might as well write all your own widgets as its not that hard to do raw mouse/keyboard event tracking.
Once again, Sun spends vast amounts of time, energy, and cash gazing at their navels instead of simply adopting proven solutions.

LinkedIn is best lead source

Wednesday, May 31st, 2006

My networking meet with the “Queen of VCs” yielded a bunch of email addresses to people who don’t respond to email. I’ve had much better luck digging through LinkedIn’s listings and have a couple meetings with founders this week to discuss their ideas.

More after the meets.

BadPage.info has a new purpose?

Wednesday, May 17th, 2006

Scoble claims that the MS Word team finally generates clean html. I’ll believe it when it passes checks at http://badpage.info with no warnings or errors.

It will be nice for people to actually care about web standards.  The web 2.0 people have to because bad dom’s leads to broken javascript.  But so many large websites are still awful.