Begin main content

Simplicity is good, but what is it?

Rob Tannen writes an excellent article on boxes and arrows titled "Simplicity: The Distribution of Complexity".

So, given a fixed set of elements (e.g. navigation choices), there are multiple attributes of simplicity than can be addressed to varying degrees. The success or failure of a design is largely dependent on achieving the right balance among these attributes of simplicity. An infamous example of this was BMW's i-Drive controller, designed to operate a range of automotive systems from a single control. The resulting user experience was confusing and complex as BMW relied too much on mechanical simplicity (a single, clickable rotary control) at the cost of perceptual and cognitive simplicity.

It's an excellent article, go check it out.

01:32 AM, 29 May 2007 by Mark Aufflick Permalink | Comments (0)

Power and heat means the end of lazy programming

Software developers have gotten away with being sloppy because of the abundance and rate of growth of compute cycles. However, the problems of large numbers start to intrude: just as power and heat become factors in the presence of tens of millions of transistors, power and heat become architectural considerations in the presence of teraflops of computation and petraflops of storage.

-- Grady Booch, Power As A Limiting Factor

03:31 AM, 28 May 2007 by Mark Aufflick Permalink | Comments (0)

What kind of developer are you?

Mel Riffe reckon's he's a gardener or garbo*. What about you?

* Garbo is Aussie slang for a garbage/rubbish/trash/waste collector

11:06 PM, 27 May 2007 by Mark Aufflick Permalink | Comments (2)

JRuby + OODBMS

It was only last year, as I was playing around with Smalltalk that I discovered the joy of an object database.

Naturally as I began playing with JRuby I wondered about object database options for it. One of the great things about the Java linkup is the wealth of available libraries and products and sure enough I found a number of open source OO database options. GOODS (which I have used with Smalltalk) is an option, but like some others it relies on a bytecode pre-processor, which makes me nervous given how JRuby plays with the bytecode.

Playing with db4o (which has both GPL and commercial licenses) has been pretty successful for the very little time I have invested.

Unsurprisingly I discovered that trying to store a pure Ruby object yielded an ObjectNotStorableException exception. In JRuby extending Java classes is easy. I haven't discovered how to properly extend the constructor, so I ended up with the following class:

require'java'class Song<java.lang.Objectattr_writer:name,:artist,:durationdef to_s"Song: #@name--#@artist (#@duration)"endend
Creating a song object and storing it in a db4o database is simple:

include_class'com.db4o.Db4o'db=Db4o.openFile("/tmp/test_db")song=Song.newsong.name="Bicylops"song.artist="Fleck"song.duration=260putssongdb.set(song)
I can then pull song objects out of the database using QBE:

# make an unconstrained template object for QBEsong_proto=Song.newsong_proto.name=""song_proto.artist=""song_proto.duration=0results=db.get(song_proto)results.each{|s|putss}
Unfortunately I don't get a good look at the objects since they appear as a generic proxy object. to_s yields:

(G) org.jruby.javasupport.proxy.gen.Object$Proxy0

Ruby has no concept of casting or blessing the object into a different class, so I suspect that I'll have to take care of that by wrapping the db4o api with some Java to do the casting.

I can confirm that something like the objects I'm storing are ending up in the database file with the venerable strings command. Surprisingly the database binary file contains strings that look exactly like that generated by to_s. Perhaps it stores a stringified version of each object? Or perhaps to_s is proffered by JRuby as a default serialisation method.

Anyway, as I said I haven't invested much time on this (too busy watching the Monaco F1 right now...) and getting it useable may be a bit of work.

One weird thing is that the first time I run code like the above for a particular database file I get an ObjectNotStorableException exception. The db file is created though, and further runs work as described above.

11:09 AM, 27 May 2007 by Mark Aufflick Permalink | Comments (2)

Software Busting

I was browsing in Borders yesterday and couldn't help thumbing through a Mythbusters coffee table book. I found the following great quote:

Whenever an engineer builds something that's over-complicated, that's the mark of an inferior design. Simple is always better.

&#8212;Jamie Hyneman, Mythbusters

While you can't really rate Mythbusters for statistical significance, I think Jamie's on the button with this quote.

09:50 AM, 27 May 2007 by Mark Aufflick Permalink | Comments (0)

Closure candy

I love seeing someone first use closures for a real problem. If they're a long time programmer who has never used them before it takes a while, their probability filter tries to stop the neurons from connecting, and then with a spark the simple beauty emerges like a glorious dawn.

Share the joy with Jeremy Stell-Smith.

07:49 AM, 24 May 2007 by Mark Aufflick Permalink | Comments (0)

Can we build it? Yes we can!

With apologies to Bob the Builder.

There's a great discussion brewing over at Lars' blog about how to keep in a design frame of mind and not get bogged down in implementation details.

Some good ideas coming out, and some mediocre ones from me as well. Come and join in!

07:43 AM, 24 May 2007 by Mark Aufflick Permalink | Comments (0)

Camping with JRuby and NetBeans 6.0

Camp Beans!NetBeans 6.0 is shaping up as a very good Ruby development environment, and JRuby is quickly becoming a viable platform.

If you're looking for a different kind of beans with a different kind of camping, you might want to check out Big Jim's Camping Beans :)

I love what Thoughtworks Studios have done in Mingle, making it so easy to deploy by using an embedded java database (derby), JRuby and Ruby on Rails.

I also love the concepts why has used in Camping and I figured the three combined would be great for developing small (possibly embedded) websites.

Here's my somewhat ugly bullet point steps to the sample Camping Blog using NetBeans 6.0, JRuby and derby.

  • Install NetBeans 6 - M9 is the latest version at the time of writing (caveat emptor - I already logged a few bugs)

  • Unless you have Java 6, copy derbyclient.jar into {Net Beans}/ruby1/jruby-0.9.8/lib
    • If you're a Mac, you will find the {Net Beans} directory in "Show Package Contents"/Resources
    • You can get derbyclient.jar from your JDK directory if you did a full Java 5 installation, or you can get it in the full derby distribution from db.apache.org/derby


    • Install the camping gem (NetBeans Tools menu->Ruby Gems->Install New...)

    • Start the derby server in NetBeans (Tools menu->Java DB->Start)

    • Make a new "Ruby Application" project (be sure to call the main file blog.rb instead of main.rb)

    • Paste why's example blog.rb into your blog.rb

    • after the line that says require 'camping/session' add:
      gem 'ActiveRecord-JDBC'
      require 'active_record/connection_adapters/jdbc_adapter'

    • Create a file in your home directory called .campingrc with the following:
      database:
      adapter: jdbc
      driver: org.apache.derby.jdbc.ClientDriver
      url: jdbc:derby://localhost:1527/sample
      username: app
      password: app

    • In Project Properties->Run, add a configuration called camping, and add the path to the camping startup script into the ruby options field. I added:
      "/Developer/NetBeans 6.0 M9.app/Contents/Resources/NetBeans 6.0 M9/ruby1/jruby-0.9.8/bin/camping"
      , I haven't been able to simplify it with environment variables unfortunately.

    • Click the Run button (or use the Run menu)

    • Point your browser to http://localhost:3301/
    • And that's all there is to it! Note that instead of bothering to make a new database, I used one of the sample derby databases, but you can administer the derby databases in the Runtime window/tab of NetBeans.

      Sources:

      JRuby Tutorial - Going Camping
      The curse of camping

12:35 AM, 24 May 2007 by Mark Aufflick Permalink | Comments (0)

NetBeans 6.0 with Ruby support

NetBeans 6.0 is very cool for a lot of reasons, which I'll blog later.

But the jaw-droppingly cool thing is ... wait for it ... the OS X version is distributed as a shar archive!

If you don't know what a shar archive is, then I you probably weren't a Unix/Internet nerd in the 80s/early 90s (which is probably for the best).

08:34 AM, 22 May 2007 by Mark Aufflick Permalink | Comments (0)

War on Moisture

This is a hilarious Saturday Night Live sketch around the whole liquids on planes thing :)

Found via Pensieri di un lunatico minore.

Update: The YouTube video has been removed, but you can still watch it thanks to the Consumerist: http://consumerist.com/259036/.

09:09 PM, 20 May 2007 by Mark Aufflick Permalink | Comments (0)

Cross platform native text/graphics for smalltalk

Pango and Cairo bindings for Cincom Smalltalk&#8212;now that's a kick ass cross platform application development environment!

10:01 PM, 16 May 2007 by Mark Aufflick Permalink | Comments (0)

Umbrello on Mac OS X

Update: You can now download and install a (currently beta) MacOS native KDE4 environment (including Umbrello) from the Mac KDE team. See my newer blog post for more info.

Umbrello is a great open source UML modelling tool. Unlike Argo UML it supports (a subset of) UML 2.0.

Being native code based on the KDE libraries it's much faster than Java tools (like Argo UML), but that also makes it less portable. I've never seen a workable installation of Umbrello on Windows. There are some partial attempts using KDE 4, and apparently it's possible with Cygwin.

It's pretty easy to install on Mac OS X, as long as you don't mind a bit of commandline work.

First you need Apple's developer tools and X11.app. Then you need an installation of MacPorts which will do most of the hard work for you. There's no port for Umbrello, but it will install the myriad required libraries. Simply run:

sudo port install qt3 kdelibs3

and let it do the hard work.The whole process could take a few hours depending on your Mac model.

(I actually had to provide a bit of manual intervention, fetching hicolor-icon-theme-0.10.tar.gz from http://blfs-packages.mirror.shizu-net.jp/svn/h/ since the main site (freedesktop.org) was down. I'm sure that will be fixed by the time you read this.)

Now to install Umbrello itself. Download the latest version from http://uml.sourceforge.net/download.php and follow the "Source Code" instructions on http://uml.sourceforge.net/install.php. You will need to specify the qt and jpeg directories and turn off aRts support. If that makes no sense to you, the instructions boil down to:

tar jxf umbrello-1.5.7beta1.tar.bz2

cd umbrello-1.5.7beta1

./configure --prefix=/opt/local --with-qt-includes=/opt/local/include/qt3/ --with-qt-libraries=/opt/local/lib/qt3/ --with-extra-libs=/opt/local/lib --with-extra-includes=/opt/local/include --without-arts

make

sudo make install

Now you have a working Umbrello! Simply start X11.app and run /opt/local/bin/umbrello (you might want to add it to the "Applications" menu of X11.app via the "Customize Menu..." option).

It shouldn't be too long before we can have a native Umbrello.app. Trolltech has released a MacOS native Qt and it's certainly something that the KDE people are looking at.

Update: Umbrello 1.5.7 is now released - update your download accordingly.

Leopard Update: A kind anonymous poster gives this ./configure line for building in Leopard, but I haven't tried it yet:

For anyone having problems compiling umbrello in Leopard, use use this ./configure combo:

env LDFLAGS=-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib ./configure --prefix=/opt/local --with-qt-includes=/opt/local/include/qt3/ --with-qt-libraries=/opt/local/lib/qt3/ --with-extra-libs=/opt/local/lib --with-extra-includes=/opt/local/include --without-arts

08:19 AM, 14 May 2007 by Mark Aufflick Permalink | Comments (25)

GOODS OO Database

I played with GOODS a little while aback with Smalltalk. Now I *love* relational databases. There are so many real world business problems that relational databases map very well and provide fast access to. I also rail against simplistic object-relational mapping with other developers semi-regularly!

But if what you want to do is store and retrieve objects, then an OO database is, at least in some cases, the most appropriate tool. We all love garbage collection in ram (well - I do anyway!), why not let it take care of your persisted objects? And who would say no to the database automatically upgrading accessed objects when your class gets new or different instance variables?

While it's not quite with the theme of the intended use patter of GOODS, I'm going to play with Pogo - a Perl API for GOODS. Unfortunately I don't yet have it compiling on Mac OS X but it compiles fine on my Linux box.

One of the problems with mapping a Perl or Ruby class to an OO database is that we can't reliably introspect the instance variables (let alone their type). I'm not quite sure how to handle that yet - whether there should be an API to make promises about your object. Another problem is that variable types aren't fixed. The biggest of this class of problem is that, especially in Perl, it's not uncommon to be able to use an object or a primitive (string etc.) interchangably eg. you might provide an URL object that can be used like a string in string context, but in reality it's a reference to an object - ideally we'd like the whole object to be stored.

Being more Smalltalk like Ruby may be better suited, but unfortunately there's no Ruby bindings for GOODS and I don't have the time or the in-depth understanding of the Ruby object internals to pull that off right now. There are a few references to a (now defunct) source forge project ruby-goods, but sourceforge's CVS archive shows no files.

I'll keep you posted!

12:21 PM, 13 May 2007 by Mark Aufflick Permalink | Comments (0)

Cool design gear

j-me Shoe RackI found a site where you can buy small run design products by small design firms (they may prefer 'boutique' or similar ;). I especially like this shoe rack (which I think I saw linked on trend hunter), but there are lots of other great designs as well.

Their product selection is of a similar vein to Top 3 by design (for my Australian readers). Check it out: GENERATE.

Update: Along a similar vein I'm pretty excited about a forthcoming venture: Skrifter - The best of Denmark for your Home & Family. More news as it comes to hand :)

12:19 AM, 09 May 2007 by Mark Aufflick Permalink | Comments (0)

Joost and Randomness

Random Good Stuff has been in my must-read rss list for a long time. I mean who doesn't like random good stuff like geeky clock radios, portable BBQs and Donald Trump selling steaks?!

In the 2007 netosphere it doesn't get much more good than Joost and guess who is giving away invites?

01:26 AM, 07 May 2007 by Mark Aufflick Permalink | Comments (0)

XML

Blog Categories

software (41)
..cocoa (23)
  ..heads up 'tunes (5)
..ruby (6)
..lisp (4)
..perl (4)
..openacs (1)
mac (21)
embedded (2)
..microprocessor (2)
  ..avr (1)
electronics (3)
design (1)
photography (26)
..black and white (6)
..A day in Sydney (18)
..The Daily Shoot (6)
food (2)
Book Review (2)

Notifications

Icon of envelope Request notifications

Syndication Feed

XML

Recent Comments

  1. Mark Aufflick: Re: the go/Inbox go/Sent buttons
  2. Unregistered Visitor: How do make a button to jump to folder
  3. Unregistered Visitor: Note I've updated the gist
  4. Unregistered Visitor: umbrello is now an available port on macPorts
  5. Unregistered Visitor: Updated version on Github
  6. Unregistered Visitor: Modification request.
  7. Unregistered Visitor: Accents and labels with spaces
  8. Unregistered Visitor: Mel Kaye - additional info
  9. Unregistered Visitor: mmh
  10. Mark Aufflick: Thank you