Home    Products    Blog    Contact   

Topten Software Blog

Full Index | RSS Feed


Cantabile + Topten vs iTunes Logos

Is it just me, or does the new iTunes logo look remarkably similar to the Cantabile and Topten logos? Hrm.....

LogoRipOff

Posted 1 day ago

Share This Read or Leave Comments (0)

MiniME- Now with added lint!

MiniME now has a pretty good set of lint style code quality checks.

I won't go into all the gory details here because you can read about it here.

I've run this over jQuery, jQuery UI and a number of other scripts and it shows up a good set of warnings, all of which I think are reasonable. I've tried to balance MiniME's lint warnings to make them useful but not overbearing with nit-picking on things that really don't matter (like whitespace for example).

The new build is available now from the MiniME Project Page.

Posted 1 week ago

Share This Read or Leave Comments (0)

MiniME JavaScript Minifier

Recently I've been doing a lot of client side JavaScript web programming and it became apparent that I needed a good minifier. In the past I've used YuiCompressor and Google's Closure Compiler, both of which worked well - but I think I just wanted something a little different.

Or perhaps I didn't want to introduce a dependence on the Java Runtime in my build environment, perhaps I was just interested in the challenge of writing my own, or perhaps it was a case of not invented here syndrome. Either way, the result is MiniME!

MiniME is a JavaScript minifier written entirely in C#. It can be invoked through the command line, or programatically from .NET code and runs under Windows or Mono 2.6 and later.

MiniME supports all the things you'd expect from a JavaScript minifier - removal of comments and whitespace, obfuscation of local variables, parameters and functions. It can automatically detect and remove constants (great for enums).

By default MiniME does nothing that might cause your script to no longer work, so member variable and methods are not obfuscated. With a few simple comment directives however you can select members that are safe for obfuscation and thereby further reduce the size of your code.

It supports opt-in comment preservation (for copyright notices), combining of multiple scripts into one library, command line response files, file change detection and a few other miscellaneous features.

So what sort of size reduction will MiniME yield? In short it's better than YuiCompressor, but not quite as good as Closure. Here's a quick comparison:

File Original Size Yui Closure * MiniME
jQuery-1.4.2.js 170,095 79,702 71,850 73,763
jQuery-ui-1.8.2.js 352,216 207,928 192,217 195,909
"mylib" ** 108,079 46,833 42,977 33,367

* Closure was run in simple optimization mode.
** mylib is a placeholder name for a library I'm working on. It has a few directives to enable obfuscation of internal members - hence the smaller size.

So as you can see, MiniME doesn't do too bad a job for a quick little project written over a few weeks.

More information, download and source code for MiniME can be found here: http://www.toptensoftware.com/minime.

Posted 3 weeks ago

Share This Read or Leave Comments (1)

VBoxHeadlessTray Updated for VirtualBox 3.2

VBoxHeadlessTray has now been updated to work with VirtualBox 3.2.

Full instructons, download and source code here.

Posted on May 26, 2010

Share This Read or Leave Comments (0)

Upgrading Ubuntu 9.10 Server to Mono 2.6

In my last post I described how to setup a Ubuntu 9.10/Mono/Apache/ASP.NET development server.

For the project I'm working on, we're trying to use SubSonic for ORM, but we're seeing problems like this:

System.InvalidOperationException: Too much method candidates

Basically it's caused by a bug in the Mono 2.4 runtime and the work around is to upgrade to 2.6. Unfortunately, search as I might, I couldn't find a pre-made package to install this, so had to resort to building from source. Luckily most of the hard work has been done by Patrick McEvoy, but I did encounter a few problems:

  1. In Patrick's list of prerequisite, replace libcairo-dev with libcairo2-dev
  2. On Ubuntu server, you'll also need libxul-dev
  3. And finally, you'll also need Mono 1.0 installed - mono-1.0-devel

So the full set of commands to do all this:

sudo apt-get install build-essential automake libtool gettext mono-devel subversion libpng-dev libtiff-dev libgif-dev libjpeg-dev libexif-dev autoconf automake bison flex libcairo2-dev libpango1.0-dev libxul-dev mono-1.0-devel
wget http://patrick.qmtech.net/downloads/mono_parallel.sh
sudo sh mono_parallel.sh

After a successful build you should be able to run mono-2.6 --version and confirm that it's built and installed correctly.

Next, we need to reconfigure Apache and mod_mono to use the new version of mono. Firstly, create a copy of the file used to launch the mono server:

    cd /usr/bin
    sudo cp mod-mono-server2 mod-mono-server2.6
    sudo vi mod-mono-server2.6

Edit the file to contain:

#/local/local!/bin/sh
export MONO_GAC_PREFIX=/usr
exec /usr/local/bin/mono-2.6 $MONO_OPTIONS "/usr/lib/mono/2.0/mod-mono-server2.exe" "$@"

Next, edit the mod-mono config file to use the new launch script:

   sudo vi /etc/mono-server2/mono-server2-hosts.conf

And add .6 to the end of the MonoServerPath line:

# Default configuration, don't edit it!
<IfModule mod_mono.c="">
    MonoUnixSocket default /tmp/.mod_mono_server2
    MonoServerPath default /usr/bin/mod-mono-server2.6
    AddType application/x-asp-net .aspx .ashx .asmx .ascx .asax .config .ascx
    MonoApplicationsConfigDir default /etc/mono-server2
    MonoPath default /usr/lib/mono/2.0:/usr/lib
</IfModule>

Posted on March 4, 2010

Share This Read or Leave Comments (0)

« Older Articles