Monday, May 28, 2012

The Universal Standard Library

When the revolution comes, the creators of standard libraries are going to have some explaining to do.

Below is the Top 20 from the (mostly meaningless) TIOBE popular programming languages chart, and the name of the function to transform a string to upper case in that language:

C++transform (with toupper parameter)
(Visual) BasicUCase
Visual Basic .NETToUpper
Delphi/Object Pascaluppercase
Lispstring-upcase (Common Lisp)
Logo (really?)instruct turtle to take bigger strides

(This list was quickly researched so if I got your favourite language wrong, then please feel free to rip me apart in the comments.)

Even ignoring the capitalization of the function names, it astonishes me that there are very few cases where the name is the same in different languages. I'm the kind of demented person that works in different languages for different jobs and this diversity gets very annoying. It is not unusual for me to work in 3 or 4 different languages in a week and I can tell you that remembering the language syntax is much easier than remembering all of the different names of all of the different common functions.

Now you may think this is a minor gripe but the "upper case" example is obviously only one of hundreds of commonly used functions. The inconsistency is nothing if not consistent.

The Solution

The CSIRO (Australia) has calculated in a 2010 study that the amount of time wasted annually by the estimated six million professional software developers world-wide due to inconsistent standard library naming is equal to the GDP of Portugal [citation needed].

Being the nice guy that I am, I will single handedly solve this issue once and for all by:

  • Creating a new set of namespaces, class names (if needed), function names and type signatures (if needed) that will be known as the "Universal Standard Library Specification" (USLS). The USLS committee will consist of one person - me. All decisions will be final.
  • Standard library implementors will implement the standard. This will be done initially with aliases and wrapper functions. Minor variations due to allowable characters in identifiers (eg. - ? !) will be acceptable upon payment of a nominal fee per variation to the USLS committee.
Of course the USLS project will initially make the inconsistency problem even worse by introducing yet another set of names and polluting the internal consistency of existing code-bases. Making the situation much, much worse to solve the problem is unfortunately unavoidable during the transition period. The USLS committee expects the transition period to last for no more than 30 - 50 years before the USLS becomes commonplace.

If you support my project please leave feedback in the comments. If the support is large enough then I will be starting a Kickstarter campaign in the coming days to raise money to buy the USLS a Nissan GTR. The powerful 4WD sports saloon will be required to carry USLS documents to standard library implementors in a timely manner.

Wednesday, September 15, 2010

My First iPad app

My first iPad app, French in Space, was approved for sale in the App Store today.

I've been building a few iPhone apps for clients this year and it has been a lot of fun.  I like Objective-C, (although I know a lot of people don't), and working with the devices couldn't be easier.  There has been lots of talk about App Store censorship, policies and such, but I'm not too fussed about it.  The truth is, Apple has done a great job as far as making it easy to develop and debug on the device, so they win my vote there.

I spent a few weeks in France last year with my lovely wife for our tenth wedding anniversary and as anyone who knows me will attest, I just wont shut up about the trip, even a year on.  I really hope to go back there one day.  Part of the fun was learning the language and watching the locals cringe at our awful grammar and pronunciation.  I hope to be a bit more fluent on our next trip, but motivating yourself to learn a language can be tough (or at least it is for me).

So basically, I wrote my little iPad game for myself to make increasing my French vocabulary a little less boring.  Even if the app never sells a copy (apart from the test copy I bought) I will still add extra features and levels to it in the coming months.  I have heaps of ideas, but it was getting to the stage where I just needed to ship something so I could tell myself that I had something out there for people to see (and possibly poke fun at).

I find building software for myself a very relaxing process.  Despite the fact that I found myself working at some very odd hours, the lack of pressure is a nice change.  I really had to give myself a deadline for shipping something otherwise I would have tinkered forever, which I am sure is a common trap.

Anyway, if you are interested in seeing what the little app is like, I have built a web-site with screenshots and a dinky demo video.

Monday, August 24, 2009

Spring is almost here. Time to clean out your old crap code.

I took this pick this morning on the way to work. Obviously someone is cleaning out their old legacy code:

Tuesday, March 24, 2009

My summer project: IcePin - a Ruby editor in Ruby

I read recently that a guy called Daniel Lucraft has written a text-editor in Ruby called Redcar. It was a relieft to see that there is more than one person silly enough to do what I have spent the last couple of months doing.

My editor is called Icepin. Here is a screen-shot (click for full-size):

Daniel's editor is a clone of TextMate for Gnome. Icepin is a clone of Emacs for Mac/Linux/whatever using the wxRuby toolkit. I did not look at the Emacs source-code at all, but have certainly copied many of the things that I like about Emacs. Icepin is 100% pure Ruby.

So why, you may ask, have I wasted countless hours building my own editor when there are so many excellent editors available? Why does anyone do anything, I guess. Personally, I loved using Emacs because of the huge number of available modules. However...

...there was a plugin that I was using called yasnippet that had a bug in it (which is now fixed). I tried to fix it myself and realized that as much as I tried, I really couldn't learn to love LISP. I really want to love it, I promise, but I am possibly just not smart enough to program anything useful in it.

My day job is Ruby programming and I am fairly comfortable with it. So the obvious choice would be to use TextMate, which allows you to write extensions in Ruby/Python/etc. However TextMate does not have split windows, and I really cannot live without them. TextMate 2 (with split windows) seems to be vapourware.

As you can see from my screenshot, IcePin has split windows. It has basic editing features, unlimited undo, search/replace, syntax highlighting, unlimited buffers and that is about it. It is about 5x as good as Windows Notepad, as opposed to about 100x to 1000x as good for most popular editors (TextMate, Emacs, vim, etc). I am guessing that it is nowhere near as powerful as Daniel Lucraft's Redcar editor, but I haven't had the chance to try his out.

I haven't added a new feature to IcePin in about 3 weeks and I think I may have become bored with it. I have been using it exclusively for all my programming since the start of the year (when it was two weeks old, called Roomacs and running in a terminal using ncurses) and I must say it is fun to use your own software all day. It is also nice to be the only user world-wide, in a strange way. Now it is at the stage that it does everything that I need, I think I will leave it for a while and play with another pet project.

Sunday, November 2, 2008


My desk at The OpenHub has been getting crazy messy lately so I decided that I needed to either throw away some junk or come up with a storage solution. Since I am a die-hard hoarder, I decided on the latter.

Measuring up the desk, I didn't have a lot of room once the MacBook and 24" screen were in place. I needed something tall and narrow. I didn't like the look of the stacking document trays at the newsagent - they were expensive and nasty - so I decided to make a little bookshelf. I need to get my cabinet-making skills as I am trying to convince my wife that I can build us a new kitchen, rather than spending $20,000.

Since I needed a tall and narrow bookshelf that would fit in only about 28cm of space, I decided to keep with the nerdy environment at work and build my shelves using an Apple Macintosh as a template. Here is the finished Shelfintosh, next to my template:

The template Mac Classic was sitting quite close to the table-saw during the construction of of the bookshelf, so chances are it is full of MDF dust now. Poor thing.

Three plastic document trays would have cost me about $15 at Officeworks, but I built my nerdy bookshelf using about $4 of 12mm MDF. If I hadn't spent about $1k in tools, I think you would agree that I am well ahead.

P. S. Yes, I have undeleted my blog. For my dozen or so readers, I am sure this is fantastic news. I will be writing sporadically, as always. I think the theme will be a bit different to my old blog. Mostly it will be showing the results of some little project, like this post. Of course most of my projects are programming related, so it will still be an unashamedly nerdy blog.

My next post will be about a couple of useful scripts that I am working on to automagically arrange my windows in Mac OS X, after a very useful tip-off from my desk-buddy John.

Sunday, June 29, 2008

I deleted my blog

Hello web-surfer,

I deleted my blog because I was sick of it. Sorry for any inconvenience. It was 71 posts of shit.