Almost Perfect

I came across Almost Perfect via Hacker News, a candid first-hand account of the rise and fall of WordPerfect.

It is so interesting to see how WordPerfect was blind its impending death. I am not singling out WordPerfect here, rather as a theme how corporations are all blind to their eventual death. The singular theme of the book was about Digital, and other giants of computing of the day, losing to upstarts like IBM PC; Wordstar falling on WordStar 2000, eventually overtaken by WordPerfect; the struggle of WordPerfect – even at its heyday – against an ambitious Microsoft, who left nothing to chance by owning the entire stack. There was first the struggle to the top, and then the struggle to stay at the top.

There was also blindness to people and human emotions. Peter Peterson’s service ethic came through when he said WordPerfect Corp’s mission was to build great software, not about family barbecues. He held particular management views to be the singular timeless Truth, rather than attributing some success to luck, competitors stumbling, and strategy that happened to be right for its time.

Success bred infallibility. The gods must have laughed when they made Peter’s drapery business fail, and yet the protagonist did not recognize that his success at WordPerfect was due to circumstance, not personal sagacity.

Reading along, Peter was not afraid to “make enemies” within his own corporation. So long as his idea was executed. (The spoils of winning was not shared, as managers often had their divisions split when the business grew, in order to maintain a flat reporting structure. This was well and good for God, but people resented that.) This is in contrast to Eric Ries’s Lean Startup, where Boyd’s OODA loop was employed so not to get too religious about any particular view.

Then there was a human moment, when Pete was forced out. Although he was well off financially, he begged for his job back, when he realized that the work environment meant more to him than vice versa. And there was raw anger from his daughter:

My oldest daughter, Wendy, was furious with me, however. She accused me of standing up for my principles only until I had to live with the consequences, and she was right.

Peter wrote about the lack of focus at Wordperfect, as they supported a large selection of platforms (including Amiga and Java), printer drivers1, and unprofitable products. WordPerfect for DOS supported a whole bunch of unprofitable forays. It is kind of like Microsoft, where the Office products generate most of its cash revenue.

Competitors matter too. Peter rightly respected Microsoft for their software prowress. Furthermore, Microsoft had the benefit of an integrated stack. WordPerfect for Windows stumbled along because most of the Windows developers worked for Microsoft. Microsoft was hungry enough to want the competitors software run poorer on their platform. Some of this was done by limiting the set of published APIs. At other times, by putting their components into the platform itself, so that their own software got to use the components for “free”, without paying a RAM fee.

Today, one can see Microsoft at its peak, just like WordPerfect and MicroPro. Netbooks are to PCs was the PCs were to centralized computing. A lot of software vendors for minicomputers went out of business as they hung on to their margins and big ticket items. So too will Microsoft as it sees the base of customer for installed software shrinks.

In some ways, Microsoft suffered from its own karma when it was unable to execute on Hailstorm, which was the correct vision.

Somehow, the world was not prepared to let Microsoft succeed again.

More discussions over at:

1 One wonders whether they could have achieved more success if they had worked with the printer manufacturers on a common API, like Microsoft’s GDI for printing.

Update 23 Jul 2009

Check out Malcolm Gladwell’s Cocksure on the New Yorker. He talks about overconfidence leading to failure to adapt.

JavaFX experiment

I was having a lot of problems getting the simplest test case below to run without throwing an odd exception:

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.*;
import javafx.ext.swing.SwingTextField;
import javafx.ext.swing.SwingButton;

Stage {
title : "MyApp"
scene: Scene {
width: 200
height: [...]

JavaFX Custom Cursors

Setting custom cursors with JavaFx is relatively straightforward, but for one little catch. Your image has to be 32×32. If you want a 16×16 icon, simply leave the rest of the image transparent.

import java.awt.Toolkit;
import javafx.scene.Cursor;
import javafx.scene.image.Image;

public class ColorChooser extends Cursor
{
public override function impl_getAWTCursor(): java.awt.Cursor {

[...]

JavaFX Introspection

Just sharing some code snippets for deserialization of JavaFX objects.

function getValueType(obj:Object,name:String):String
{
var context:FXLocal.Context=FXLocal.getContext();
var objectValue:FXLocal.ObjectValue = new FXLocal.ObjectValue(obj,context);
var cls:FXClassType = objectValue.getClassType();
var varType:FXType = cls.getVariable(name).getType();
println("{name} {varType}");
if (varType instanceof FXSequenceType)
{
[...]

Ego-Trip Programming

It’s Saturday morning and I’m bored.
I might go create something whose sole purpose is to praise me.

while 1:
print "I praise Chui, who created me for the purpose of praising him."

JavaFX binding in sequences

I had a Group of circles, i.e.
var circles:Circle[];
var group:Group = Group { content: [circles] };
strangely, I couldn’t get newly inserted circles to render.
It turns out that you have to bind group.content to ensure that changes in circles are reflected in group.content.
Here’s a test routine.

import javafx.scene.*;
import javafx.scene.paint.*;
import javafx.scene.shape.*;
import javafx.stage.*;

var lines = for (i in [1..10])
[...]

SQL Server ARITHABORT

Just a reminder to myself. The next time I see an ARITHABORT error, try these
1) SET ARITHABORT OFF
2) Change SQL Server compatibility from SQL 2000 to SQL 2005

Tags: mssql

Applet for Submitting Screenshot

Submitting screenshots through the web takes several steps more than it ought to. Firstly we have to paste it into mspaint.exe, save it to disk, only to then fiddle around with the File upload to look for the file again.
Another way to do it is via a signed applet. Unfortunately, the signed applet is unable [...]

A list of people doing interesting work on the JVM

Andrew Haley Zero, Shark – llvm code generators
Gary Benson RedHat. Zero and Shark
Volker Simonis – SAP JIT group, how to build HotSpot
Pekka Jato – JIT compiler for Java
Jevgeni Kabanov Class reloading using serialization to patch runtime instances
I’m sorry if I missed your name here. Please leave a comment here if you wish to be [...]

EvServer – a scalable Etherpad clone

Something to read later.
I first heard of Etherpad on IT Conversations. Etherpad enables users to edit the same text area, using serialized javascript functions to transmit diffs.
Marek implemented a scalable etherpad clone using Erlang and RabbitMQ. All in six afternoons.

Sales Copy

A long sales copy that doesn’t read like one – Harry Wong

4GL Patterns #13 – Read Only Fields

Some data dictionary mark certain fields as being read-only. Why should fields ever be read-only? How do they get edited in the first place?
Possible justifications:

The field represents a permanent record, i.e. it behaves more like a document than a database field. A field can be set at record creation time and no-other.
The field represents an [...]

Database Patterns realized with AribaWeb

Take a look at aribaweb.org (viaTheServerSide).
AribaWeb is a 4GL RAD for web applications running on a Java stack.
It uses an approach described in data dictionaries as a database pattern to generate metadata-driven UI.
The Ariba toolset seems reasonably mature from the screencasts, although one has to be wary because a lot of the AJAX work [...]

JavaFX redux

Having spent a few weeks experimenting with JavaFX, and creating several examples, here is an assessment of whether JavaFX succeeds in it’s objective of being a graphics DSL. Bear in mind that I am evaluating it in terms of it’s ease in being a graphics DSL – if it makes my life easier, it succeeds. [...]

Visualizing Sub Prime Losses with JavaFX

Click on image above to launch via WebStart
Drawing rectangles is pretty straightforward in JavaFX. I decided to add a little bit of animation so that the pieces of the puzzle “fall” into place. This is done by applying ParallelTransition which combines ScaleTransition, RotateTransition and TranslateTransition.

Taxi Driver MBA

More here:
“A taxi driver must also have scientific methods,” he said. I was surprised and I got curious: “What scientific methods?”

Launching JavaFX script via a jar file

Steps:
1. Use javafxpackager to create the .jar file (it will be created in the dist directory). Make sure the dist directory is empty, or you’ll find your jar file growing bigger each time.

javafxpackager -appClass fisheye -src .

2. Launch the jar file, and don’t forget to include the path to the JavaFX libraries

java [...]

JavaFX TextAlignment Gotcha

Here is a minimal test case illustrating how exasperating the default JavaFX Text node can be, especially when aligning text.
You’d be surprised to note that both pieces of text below are aligned using TextAlignment.CENTER.

import javafx.scene.text.*;
import javafx.scene.layout.*;

VBox
{
translateY:10
content:
[
Text {
[...]

JavaFX Experiments – Order of Declaration Matters

Given the following piece of JavaFX Script

import javafx.scene.CustomNode;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.shape.Rectangle;
import javafx.scene.paint.Color;
import java.lang.Math.sqrt;

class C extends CustomNode
{
// Test #1: Commented out
//var node: Group = Group {};

protected override function create():Node
{
return node;
[...]

Buddhist Settlements in Burma

Calling oneself a Buddhist is no justification for seizing land from other ethnic groups. http://news.bbc.co.uk/2/hi/asia-pacific/7872635.stm