Apr 292010
 
Flash Builder icon

Flash Builder is, speaking the King’s for a tick, pure rubbish. Adobe took its sweet time releasing this purportedly major upgrade, and I held a fool’s hope that Flex developers the world over might no longer gaze longingly at the highly functional and pleasantly integrated Silverlight tools across the aisle. Indeed, Adobe incremented the version (to 4 from 3) and switched the label (to Flash Builder from Flex Builder), but still the product is rubbish. I know it was you, Adobe. You broke my heart.

I am not alone in my sentiments. My associate Scott Selikoff focuses on Flex 4’s code verbosity and duplicate component libraries, but his verdict is the same. Rubbish. Unfortunately, Flash Builder is my primary development environment.

My present Flex frustration (Flexstration!) is resource modules, by which a developer may externalize resources into SWFs that may be loaded at run time. It sounds wonderful, but sadly the process is quite manual, requiring a human to take a number of heavy steps:

  1. Determine the resource bundles required, by running the compiler with the -resource-bundle-list option
  2. Gather the contents of the output file generated in step 1
  3. Run mxmlc from the command line — Flash Builder offers zero support here — specifying no MXML file but supplying the -locale, -source-path and -include-resource-bundles options

The poor developer must repeat this process for each resource module in each locale. As an example, let us assume the application has four resource modules and must support merely four locales: American English (en_US), British English (en_GB), Mexican Spanish (es_MX), and Spanish Spanish (es_ES). Even for these decidedly unambitious numbers, the now-heartbroken developer — or his helper monkey — must repeat the manual operations listed above 4 x 4 = 16 times. Pray for Mojo.

Of course, a clever developer could easily write a build script, perhaps leveraging Ant and Adobe’s Ant tasks for Flex. Most Flex developers, myself included, have done just that. My point is that this sort of automation of common tasks is exactly what a £400 enterprise development tool should do. Epic fail, Adobe.

[Update 21-July-2011] Corrected a typo in the “heavy steps” list.

Apr 282010
 
PowerPoint icon

In a New York Times article We Have Met the Enemy and He Is PowerPoint, published earlier this week, Elisabeth Bumiller assaults PowerPoint and its stranglehold on the daily lives of American soldiers. As presented by Ms. Bumiller, the situation is so bleak that one Army lieutenant, asked how he spends most of his time deployed in Iraq, responded, “Making PowerPoint slides.” Pressed, it turned out he was quite serious.

PowerPoint at its best is a mediocre tool to create mediocre presentations. PowerPoint in general magnifies the worst inefficiencies of big organizations and encourages the weaker tendencies of small minds within. I will not describe further my utter disdain for PowerPoint: I haven’t the language. Odds are the reader hasn’t the time.

For the poor souls conditioned to create deck after PowerPoint deck (dreck?) for the torture of their peers, mine are fighting words. Strangely the loudest dissent may well come from one known to me. Though he and I have not been in touch for a while, Adam Cooper grew up with a close friend of mine, and back when the three of us lived in NYC, we gathered occasionally on my roof deck for poker nights. Indeed, you would never suspect Adam to be a purveyor of evil, yet he is the proud author of PowerPoint Presentations That Sell. The reader might imagine my internal struggle to at once condemn dubious claims of “effective” PowerPoint and blindly promote a buddy’s book (see Figure 1). In the end, the only shared ground on which we might build a compromise may be David Byrne’s PowerPoint art (see Figure 2).

PowerPoint Presentations That Sell | by Adam Cooper

Figure 1: PowerPoint Presentations That Sell | by Adam Cooper


Sea of Possibilities | by David Byrne

Figure 2: Sea of Possibilities | by David Byrne

Apr 232010
 
Otis Redding - The Dock of the Bay

Most of us do not have a proper seat here at the Lab’s home office. Sure, our back office staff have assigned desks with chairs and cubbyholes to call their own, and sure, we consultants spend the vast majority of our time on site with clients. However, consultants on the bench (i.e., not on site with a client) must jockey for position each morning. Seating arrangements change dynamically according to the day’s work and, above all, arrival time. Smaller commodities such as Magic Mouses and Apple power adapters tend to be in short supply and on occasion are accidentally swapped or, ahem, borrowed altogether.

As such, one day a few of us discussed how the Lab might build pluggable workstations for our wandering herd of benched consultants. In an ideal setup, a 49er may set down at any workstation with his laptop and expect to find power, ethernet, a keyboard and a widescreen monitor at their disposal. Unfortunately this involves a hot mess of cables, all of which may be subject to the aforementioned borrowing. We had thought of docking stations, but most consultants have MacBooks, and one cannot dock a MacBook.

Or so we assumed. By chance, the other day my brother came across Henge Docks. They claim to have “created the first truly comprehensive docking station solution for Apple’s line of notebook computers”. Quality and usability are unknown, but the potential is there for a wonderful product.

Henge Dock with monitor

Figure 1: MacBook in a Henge Dock

Four Points per Squid, M’Lord

 Comments Off on Four Points per Squid, M’Lord
Apr 162010
 
Boots advert, Christmas 1913

Boots the Chemist is an English icon. Spend a day in London and you cannot miss the ubiquitous sign of white cursive in a blue oval. As it happens, Londoners tell me, Boots also has an excellent customer loyalty program (programme?) in the Advantage Card. I journeyed online to sign up — four points per £1! — and discovered in the Title field the most incredible menu (see Figure 1).

Note that after Lady and Lord comes the mysterious acronym, RH. This Yank suspects it stands for Royal Highness.

Boots Advantage Card Registration Form

Figure 1: Lord Cohen gets a Boots Advantage Card

[Update 17-April-2010] Miss Anky, my host and frequent London guide, suggested Right Honourable, an honorific title reserved for prime ministers and barons, as an alternative meaning for RH. However she did not discount my earlier Royal Highness theory, so the true meaning remains a mystery.

Apr 132010
 
Golden Buddha

In my previous article, Achieving Nirvana on Mac OS X, I set up a Nirvana server on port 8887 and imported a realm for the TradeSpace demo. The TradeSpace demo instructions had impudently asked me to run two .BAT scripts, setup.bat and startall.bat, and when we left off, I performed manually the equivalent operations for the former. Today I will tackle the latter which, according to the instructions, will create and populate the demonstration news and rates channels in our Nirvana realm.

The script contains only two simple lines to run two other scripts, startnews.bat and startrates.bat, and thankfully these secondary scripts are short and sweet. Inspecting them, .BAT-style rem comments redacted:

#startnews.bat
set CLASSPATH=%CLASSPATH%;..\classes
java -cp "%CLASSPATH%;..\classes" -DRNAME=nhps://showcase.my-channels.com:443 -DRNAME2=nsp://localhost:9000 -DCHANNAME=/showcase/consolidatedrss com.pcbsys.demos.feedsimulators.NewsFeeder

#startrates.bat
set CLASSPATH=%CLASSPATH%;..\classes
java -cp "%CLASSPATH%;..\classes" -DRNAME=nsp://localhost:9000 -DRNAME2=nsp://localhost:9000 -DCHANNAME=/showcase/stockindices com.pcbsys.demos.feedsimulators.Stockindices

It is clear I must run two Java programs. Unfortunately, my herculean efforts to run them from the terminal end as assorted failures, from Java classpath issues to brutal Mac OS X crashes (see Figure 1).

Instead, I launch Eclipse, create a Java project, and add the Java source from the TradeSpace demo package (in my case, ~/Sites/nirvana/demo/src/java/tradespace). I also add three entries to the build path:

  • External Class Folder – /Applications/Nirvana_5.1.6710/classes
  • External JAR – {NIRVANA_HOME}/lib/nClient.jar
  • External JAR – {NIRVANA_HOME}/lib/swing-layout-1.0.jar

Now I create two launch configurations:

Main Class: com.pcbsys.demos.feedsimulators.NewsFeeder

VM Arguments:
-DRNAME=nhps://showcase.my-channels.com:443
-DRNAME2=nsp://localhost:9000
-DCHANNAME=/showcase/consolidatedrss

Main Class: com.pcbsys.demos.feedsimulators.Stockindices

VM Arguments:
-DRNAME=nsp://localhost:9000
-DRNAME2=nsp://localhost:9000
-DCHANNAME=/showcase/stockindices

I launch both configurations in debug mode. Inspecting the Nirvana Enterprise Manager, I can see activity in the Event History chart and the Event Status table. I navigate to http://localhost:8887/ in a browser once again and click on the Flex link under the Web Client Demos section. The Flex client starts up and loads the news and rates data (see Figure 2). Voilà.

Mac OS X Crash Screen

Figure 1: Mac OS X Epic Fail


TradeSpace Web Client Demo in Flex

Figure 2: TradeSpace Web Client Demo in Flex

Apr 062010
 
"Giant Buddha" on Lantau Island, Hong Kong

Here at Lab49 we develop right on technology’s bleeding edge. Innovation requires investigation, and so in its wisdom the Lab encourages a culture of research. Our own Matt Davey championed an internal venture, now involving a small team of 49ers, to demonstrate a new risk management architecture. While the project at its core focuses on back-end technologies such as data stores, for this article I will discuss mostly middleware.

Early on (and prior to my involvement) the team planned to create a straightforward Microsoft Silverlight front-end that connected to Nirvana middleware. We have since added a twist: the team will build two front-ends in parallel, one in Silverlight and one in Adobe Flex. Given the political intesity surrounding RIA technologies, I have no doubt this will be an interesting experiment. With luck it will also be informative beyond the usual Flex versus Silverlight religiosity, as we will be able to judge how easily each platform integrates with a proven middleware product in Nirvana. Of course, to begin I must install Nirvana Enterprise on my trusty MacBook Pro.

The shop behind Nirvana, my-Channels, provides a free developer edition. Generally I work on a Mac, so I grabbed the Mac OS X package. They also provide official installation instructions, but unfortunately the curtains do not match the carpet, as it were. There are instructions for Win32, Linux/Solaris and Generic Unix, but there is not a word about OS X. A reasonable man might assume Generic Unix is the appropriate replacement, but he would be wrong. The good news is that when I download and unzip nirvana_osx_novm.zip, out pops a proper OS X application install.app. I launch the installer and go with the defaults most of the way. I do choose a custom data directory, ~/Documents/nirvana_data. Installation proceeds without trouble, using the default /Applications/Nirvana_5.1.6710, henceforth called {NIRVANA_HOME}, for the Nirvana application folder.

Moving on, I download the TradeSpace demo package tradespace_demos.zip, which is free on the my-Channels downloads page. The demo instructions recommend unzipping to the Nirvana application folder, but instead I choose ~/Sites/nirvana/demo. Following the Environment Configuration section of the demo instructions, I update ~/Sites/nirvana/demo/cfg/demo.xml.

  • Update value of property BasePath to ~/Sites/nirvana/demo/www.
  • Update value of property port to 8887. This number is somewhat arbitrary, though I recommend avoiding the default 80.

Now I am able to launch the Nirvana server. In the Finder, I navigate to {NIRVANA_HOME}/server/nirvana and double-click the Start Nirvana Realm Server alias. A Terminal window opens and launches the Nirvana server, which in turn prints some server and environment details to the console. The server lives. The next section of the instructions, Interface, Plugin and Channel Setup, suggests I open an item from my Windows Start menu and then execute a pair of .BAT scripts. This is clearly impossible on OS X, and the instructions offer no alternative. I am on my own.

I open the first script, setup.bat, in a text editor and see a single command, nimportrealm ..\cfg\demo.xml -all. This implies the next step is to import the demo realm, and fortunately I can do this by GUI. I navigate to {NIRVANA_HOME}/Administration/nirvana/ and double-click the Nirvana Enterprise Manager. I find my default realm nirvana under the Realms node and right-click to bring up the context menu, selecting Import Realm from XML. I find the demo.xml file from earlier and click Import All. After I click OK, a directory showcase with four channels appears beneath my realm nirvana. To confirm the server is operational, I head to http://localhost:8887/ in a browser, and sure enough, a welcome page congratulates me.

For my encore, I will take care of the second .BAT script, startall.bat, and at last connect a Flex client to Nirvana.

[Update 13-April-2010] Continue with the follow up article, Achieving Nirvana with Flex.