Solaris CoolStack 1.3 released

CoolStack is a collection of some of the most commonly used open source applications optimized for the Sun Solaris platform. The latest version of this software suite, Cool Stack 1.3, has just been released. Here is a brief overview:

Notable Additions

  • Python 2.5.2
  • Nginx 0.6.31
  • New Apache modules including mod_python, mod_ruby, mod_dtrace etc.

Updated Versions

  • Apache 2.28
  • Tomcat 5.5.26
  • MySQL 5.1.24
  • PHP 5.2.6
  • Memcached 1.2.5
  • Ruby 1.8.6p114 with Ruby Gems 1.1.1 and Rails 2.0.2

Other Enhancements

  • Ruby performance improvements in the order of 20-30% (with a further 8-15% coming down the line when Ruby 1.8.7 is released)
  • Better support for installing Ruby Gems that require native compilation on SPARC systems

The addition of Nginx an Python support along with the performance improvements in Ruby as well as the additional Apache modules are all very useful additions and have yet again come at just the right time for our organisation. Well done to Shanti and his team for providing almost exactly everything we were hoping for in this release, again!

To script or not to script

In an interesting article on the merits (or not) of scripting languages, James Turner outlines where some of their strengths and weaknesses lie. He uses Perl as the example in this instance but on reading the article I found that many of the pros and cons readily apply to most other scripting languages I’ve used (Tcl, Python, Bash, Sh).

In particular, his comments about them being strong on cross-platform support and weak on performance-related applications definitely ring true from my past experiences with Tcl/Tk. However, one point that he did not make, which I feel is definitely one of scripting languages’ stronger points, is in the area of custom testing and debugging, in the context of prototype product design and integration.

The likes of Perl, Python and/or Tcl really can enable you to glue together some pretty compelling, custom-made testing utilities, often without the need for complicated frameworks or other plugins. In particular, the ability to create your own extensions (using C or even SWIG) can make for some pretty powerful, tailor-made manufacturing test tools (trust me, I’ve been there!).

Of course this may not suit everyone’s needs, and there will be those that will opt for off-the-shelf products that do similar. However, if you are dealing with a newly designed product or hardware appliance featuring custom firmware not seen before, that needs to run on several different platforms, then a decent scripting language will most definitely be your friend.


Structure 101 by Headway Software nominated for Jolt award

Congratulations to the team at Headway Software whose excellent Structure 101 product has been nominated for a Jolt award (in the Design and Modeling category). The Jolt Awards are the “Oscars” of the software industry and it is a fantastic accolade for any company to even be nominated.

The very best of luck to Chris, Paul, Ian and the rest of the Headway team in March when the winners are announced.

Sources: Chris Chedgey, Reuters

Useful feature of Visual Studio XML editor

I had to do some Windows Mobile development recently (Visual Studio 2005, C# and .NET Compact Framework) and needed to create an XML file with text that contained some Scottish Gaelic characters in it. My understanding of XML files isn’t what it should be so I soon ran into a few funnies. Whenever i tried to load the document using the XmlDocument.load() method, the application threw an exception for which no explanation was given.

Since the amount of text was quite small, I simply pasted the the paragraphs I needed to display within my application (from Word) into a VI editor and saved the file with a .XML extension from there. I figured VI would do a decent job of removing all of the formatting from Word. However, doing this doesn’t really save the file as a proper XML file with the appropriate encoding.

Fortunately, Visual Studio provided a tidy solution. All I had to do is open my XML file from Visual Studio and then open the Properties of the document (View, Properties). Studio recognised that my file was an XML document (of sorts) and took a guess at the type of encoding it was using (Western European – Windows). I then changed the encoding to UTF-8 and re-saved the file with a different name (File, Save As), after which the XmlDocument.load() method worked just fine.

It looks like the re-saved file is now using 2 bytes for each of the special characters whereas before it only used one (I presume that the “U” in UTF-8 at work, as in, Unicode) and my Windows Mobile application worked a treat after that.

Solaris CoolStack 1.2 released

CoolStack is a collection of some of the most commonly used open source applications optimized for the Sun Solaris OS platform. I’ve been tracking the release of the next version, CoolStack 1.2, for some time and see that it has just been released. Here is a brief overview of what it gives you:

  • Apache 2.2.6 with mod_jk-1.2.25, mod_proxy and SMF support.
  • PHP 5.2.4 with FastCGI support.
  • APC 3.0.14.
  • MySQL 5.0.45 with ndbcluster and SMF support.
  • Memcached 1.2.2.
  • Squid 2.6.16 with SMF support.
  • Tomcat 5.5.23 with SMF support.
  • Ruby 1.8.6 with RubyGems and Rails 1.2.3.
  • lighttpd 1.4.18.
  • Perl 5.8.8 with DBI-1.59, DBD-mysql-4.005 and Sys-Syslog-0.18 extensions

As you can see, CoolStack is now a pretty serious software bundle and there isn’t much it doesn’t give you (although DTrace support for Ruby would be a useful addition). The addition of Tomcat and SMF support (SMF allows easier management of Solaris services) along with the additional Apache modules and updated revisions of Apache, MySQL, Ruby and Rails tick a large number of boxes in our organisation as we previously had to build several Apache modules by hand, struggled with lack of Perl DBI/DBD extensions and spent far too long constructing SMF manifests for many of the applications.

So, well done to Shanti and his team for providing almost exactly everything we were hoping for in this release! CoolStack has now become an integral part of our software infrastructure, reducing our service deployment times considerably.

TWUIK from Tricast Media

TWUIK is the name of a UI technology developed by Tricast Media that claims to bring flash-like graphics, animations and advanced user interactivity to mobile application development. They have provided a very good website containing lots of impressive screen shots, demos and a good tutorial on how to create a Media Center Application using TWUIK.

It looks to be a very interesting product and I’ll certainly be downloading a trial copy …

Using a different diff with Subversion

If like me, you’re not too keen on the sometimes cluttered output produced by a Subversion diff command (svn diff), here is a way to use Unix diff with Subversion instead. I’ve also used the -b parameter to ignore whitespace differences.

$ svn diff --diff-cmd diff --extensions '-b'

It looks a little messy at first but you could probably alias it quite easily using something like:

alias "svn_diff_b"="svn diff --diff-cmd diff --extensions '-b'"

in your .bashrc (or equivalent) file.

Adding XML support to Selenium Remote Control

If you are one of the chosen few using (or having to use) the Selenium suite of software test tools, then you may have discovered that it does not natively support XML content. Here is a useful way to modify it so that it does:

  1. Download the latest version in JAR format from your usual Maven repository (e.g. selenium-server-0.9.0.jar)
  2. Unpack this JAR somewhere on your system
  3. $ cd /tmp
    $ mkdir ss090 ; cd ss090
    $ jar xf ~/Desktop/selenium-server-0.9.0.jar

  4. Edit the file /tmp/ss090/core/scripts/selenium-browserbot.js and locate the getBody function (line 1573 approximately)
  5. Modify this function as follows:
  6. PageBot.prototype.bodyText = function() {
    if (this.getDocument() instanceof XMLDocument) {
    return new XMLSerializer().serializeToString(this.getDocument());
    } else {
    return getText(this.getDocument().body);

  7. Repack the JAR taking care to specify the correct MANIFEST file:
  8. $ cd /tmp/ss090
    $ jar cfm selenium-server-xml-0.9.0.jar META-INF/MANIFEST.MF *

  9. If you want to produce an MD5 signature for this JAR file, you can do so using the md5sum program.

Happy Trails …

Alert after Alert in J2ME

I just discovered a very nasty restriction in J2ME concerning Alerts whilst developing a MIDP 2.0 application for a Nokia E70 Mobile Phone (running Symbian 60 3rd Edition). As has become common now, the code I had worked find in the Sun Wireless Toolkit emulator but not so on the E70. Anyway, here’s the deal …

If you display an Alert object (e.g. a Yes/No dialog), and then (as a result of the user selecting Yes or No) try to display another Alert object after that, the phone will generate an IllegalArgument exception. This is because of the default behaviour of the Display.setCurrent(Displayable) method which assumes that you want to return to the object that created the Alert after the new alert is dismissed. Now, in my view, this is a reaonable thing to want to do. However, the exception that is thrown suggests that an “Alert cannot return to an Alert” which is not documented anywhere that I’ve seen.

So, the solution was to use the Display.setCurrent(Alert,Displayable) method and ensure that the second parameter is never another Alert.

Thanks to Naomi and Brian for their help on this.

“OK to use Airtime” on Mobile Emulators

If you are developing a J2ME application that connects to the Internet and are using a Mobile Emulator then you will invariably have to put up with the repeated messages that ask if it is OK for your phone to use Airtime (i.e. connect to the Internet). Not only is this very annoying but it also has the potential to prevent proper automated testing from being carried out.

This actually happens when your application has not been properly signed but only seems to happen in the Emulator (it does not happen on my Nokia E70). Until now, I was of the impression that the only way around this was to purchase a full digital signing pack from the likes of VeriSign etc. Gladly, this is not the case …

We overcame this problem using the latest Sun Java Wireless Toolkit and NetBeans as follows:

  1. Start the Sun Java Wireless Toolkit “KToolbar” application and select Edit, Preferences
  2. Locate the Security category and select the following settings
    • Security Policy: MSA
    • Security Domain: manufacturer
  3. Save these preferences
  4. From your NetBeans project, select the project properties.
  5. Locate the Signing settings (inside the Build settings) and select the following settings:
    • Sign Distributon: Yes (or checked)
    • Keystore: Built-in keystore
    • Alias: untrusted
  6. You might also need to Export this key to the Java SDK/Emulator using the button provided
  7. Save these settings and rebuild your project

Hopefully the next time you launch your application from the emulator will no longer ask permission to use Airtime.