Simplicity is good, but what is it?
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?
* 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
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)"endendCreating 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
Whenever an engineer builds something that's over-complicated, that's the mark of an inferior design. Simple is always better.—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
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!
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
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
- If you're a Mac, you will find the {Net Beans} directory in "Show Package Contents"/Resources
- 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:
12:35 AM, 24 May 2007 by Mark Aufflick Permalink | Comments (0)
NetBeans 6.0 with Ruby support
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
10:01 PM, 16 May 2007 by Mark Aufflick Permalink | Comments (0)
Umbrello on Mac OS X
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:
and let it do the hard work.The whole process could take a few hours depending on your Mac model.
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:
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
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:
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 (24)
GOODS OO Database
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
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
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)
Archive
| May 2007 | ||||||
| S | M | T | W | T | F | S |
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | ||
March 2012
February 2012
November 2011
October 2011
April 2011
March 2011
January 2011
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
December 2003
November 2003
October 2003
September 2003
August 2003
Blog Categories
software (40)..cocoa (21)
..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
Request notifications






