Begin main content

Off to the Motherland

Well I'm off to the motherland for a quick trip. Kath is presenting at an education conference and I'm tagging along as a conference-spouse.

I *really* hope we win this test, otherwise I will have to hide my Aussie accent in shame...

02:14 AM, 26 Aug 2005 by Mark Aufflick Permalink | Comments (1)

Social bookmarks as a Podcast [blog.del.icio.us]

For those of you who don't know, del.icio.us is a free bookmarking service where you can keep your bookmarks well organised, and browse through other people's bookmarks. You can do neat stuff like see who else bookmarked the same thing that you did, or see what people are bookmarking with particular tags. (For instance if you're a Ruby programmer, following http://del.icio.us/tag/ruby gives you an insight to whats new & happening on the web with regards to Ruby.

dsl.icio.us is what powers my site's "Recent Links" box that you will see just to the left. You can see every link I have ever bookmarked with del.icio.us at http://del.icio.us/aufflick .

Well the del.icio.us guys have just had a brilliant idea, and added enclosure support to their RSS feeds where the enclosure is driven by the file extension of the bookmarked url (not foolproof, but very simple & intuitive). What does this mean for you? Well, take this example:

http://del.icio.us/rss/tag/system:filetype:mp3+mashups

That's an iTunes compatible Podcast reflecting every mp3 file that any del.icio.us user has bookmarked and tagged with the keyword mashup.

Pretty damn cool if you ask me!

02:18 AM, 22 Aug 2005 by Mark Aufflick Permalink | Comments (1)

Pretty Printing objective C with GNU a2ps

a2ps includes a stylesheet for objective c, but it's not mapped to anything. Plus, the .m extension is mapped to "octave" files (which I guess is some music notation format system...).

To have a2ps recognise and nicely print your Objective C source files, you just need to make the following changes to /usr/share/a2ps/sheets/sheets.map

Search for "octave" and comment out those lines like so:

# octave files
#octave:	/*.octavescript/
#	/*.m/
Then add a line for objective c like so:

# objective C
objc: /*.m/
If you also want your header files to be highlighted with the objective c stylesheet (instead of the default c stylesheet), use the following entry instead:

# objective C
objc: /*.m/
      /*.h/

11:17 PM, 16 Aug 2005 by Mark Aufflick Permalink | Comments (0)

RAID1 Installation of an Apple XServe G5

This is a re-post (an accidental click lost my last post), so it's shorter and less entertaining that it otherwise would have been.

I encouraged a friend to buy an XServe for his business, so it of course became my job to install it. I also told him to buy a second drive so we could set up drive mirroring.

So far so good. Connecting Point in Melbourne were able to ship an XServe G5 to Sydney faster than we could get one in Sydney, and it faithfully arrived a few days later.

All good so far.

I performed the very simple remote installation assistant/wizard - nice and easy. Except it didn't ask me about disk partitioning. Hmm. The supplied OSX Server manual (which is marked as for MacOS X Server 10.3 and above) was fairly useless for setting up a headless XServe G5 with OS 10.4 (supplied). It contained useful suggestions like "connect a monitor to your server" and "consult the XServe manual for instructions on how to boot your XServe from the internal optical drive". The (fairly thick) manual supplied contained very thorough information on booting from an external optical drive, but not the internal one.

I also couldn't install the OS X Server admin tools on my 10.3 Powerbook (which the manual promised that I could) - luckily my friend had 10.4 on his 12" Powerbook. That won't help his office once he goes overseas, but hopefully the iMac that we killed by running a 10.4 upgrade on it will be fixed soon!

Thankfully, AFP548.com have a great article called Headless Xserve G5 installation instructions.

The instructions are for 10.3, but the only difference in 10.4 was some slight name and location changes of the command line tools - otherwise it all worked perfectly.

One thing that did have me freaked for a little while was that the installer command line tool counts up to %1.0000 - when it only got to %0.0500 in 5 minutes I thougt I was in for a long night!

I still have to figure out how to do software updates and shutdowns remotely with an admin tool, since I don't want to ask my friend's staff to ssh in as root to their server...

All in all it was a little disappointing. By far the easiest commercial Unix installation I have ever done, but I was really hoping that it would be a Mac quality experience which it just wasn't.

07:03 PM, 15 Aug 2005 by Mark Aufflick Permalink | Comments (1)

This technical whitepaper presented to the 5th USENIX Conference on Object Oriented Technologies way back in 1999 has prompted something of a renaissance in my thinking towards OO programming in scripting or "agile" languages such as Perl, Ruby and Tcl.

Gustaf Neumann (also member of the OpenACS team) and Uwe Zdun present some fascinating ideas, which get to the heart of what has been troubling me for some months now. The driving force behind this paper, in a few nutshells, is:

"[Agile] languages provide features like dynamic extensibility and dynamic typing with automatic conversion that make them well suited for rapid application development.

and:

"Large applications typically entail complex program structures. Object-orientation offers the means to solve some of the problems caused by this complexity, but focuses only on entities up to the size of a single class. The object-oriented design community proposes design patterns as a solution for complex interactions that are poorly supported by current object-oriented programming languages.

and yet (generalising for all scripting languages):

Since [agile languages are] designed for glueing components together, [they are] equipped with appropriate functionalities, such as dynamic typing, dynamic extensibility and read/write introspection. Many object-oriented [Agile languages and extensions] do not support well these abilities in their language constructs. They integrate foreign concepts and syntactic elements (mostly adopted from C++). Even less appropriate is the encouraged programming style in structured blocks and the corresponding rigid class concept, which sees classes as write-once, unchangeable templates for their instances. This concept is not compatible with the highly dynamic properties of the underlying scripting language.

Taking Perl, which I do a lot of OO development with, I can agree completely. Perl gives you these amazing flexibilities with which to block together your requirements in double time. When you start to want to develop larger systems you turn to your abstraction of choice - mine is OO (for you it may be functional programming or somethig else).

Once you have signed on to the OO bandwagon, you get design patterns and all sorts of mental tools to help you, but you start to find that your flexible "agile" language of choice starts to become, well, less agile.

Allow me an example. On a large telco project, we wanted to introduce heavy-weight error handling, to allow full error detail to be passed around to logs, web front ends, SNMP traps, tyou name it. One of my (blog-less) colleagues, Ryan, came up with a good system that used source filters to take care of clearing the error stack so you didn't have to remmember to. Source filters are a great example of a flexibility that an Agile language can offer you, but they are a sledge hammer ill-suited to OO code. For example, how about automatically bubbling the error up from one method call to the next. We didn't want to use exceptions, because we wanted to be able to raise non-fatal errors that would not alter the flow of execution. We resorted to requiring the developer to remember to surface any errors that might have been generated by a method call, but this is error prone and nigh-impossible to test for.

What we really wanted in this case, was a way to hook into the inputs and output of every method call. I discovered that apparently people have thought of this before ;) and called it Aspect Computing. This turned out to be devilishly difficult to implement in OO Perl (and frustratingly it is apparently possible in Windows COM development).

It is exactly this filtering example that Uwe and Zdun describes in the whitepaper.

My example may not have made any sense to you - it is perhaps too specific. To make sure I haven't put you off reading the paper, allow me to paste in the paper's conclusion:

The intention of this paper is to show that object-oriented scripting languages and the management of complexity are not contradictory and that it is possible to handle complexity with a different set of advantages and tradeoffs than in ``systems programming languages''. Scripting is based upon several principles of programming, like using dynamic typing, flexible glueing of preexisting components, using component frameworks etc., that can lead towards a higher productivity and software reuse. We have introduced a new language construct, the filter, that offers a powerful means for the management of complex systems in a dynamic and introspective fashion. It would have been substantially more difficult to implement dynamic and introspective filters in a systems programming language. We believe that both scripting and object-orientation offer extremely useful concepts for a certain set of applications and that our approach is a useful and natural way to combine them properly.

But please do youself a favour and go read it yourself: Filters as a Language Support for Design Patterns in Object-Oriented Scripting Languages.

06:32 AM, 14 Aug 2005 by Mark Aufflick Permalink | Comments (0)

Adding C to your Perl is easy!

Looking for optimisation options for a client Perl project, I starting thinking about implementing some of the tight loops in C instead of Perl.

There is a CPAN module Inline that makes it easy to inline other languages inside Perl modules (or scripts). With Inline::C you can inline C code, and it will be wrapped, compiled and linked for you (it's only re-compiled if your source changes).

You can call C procedures from Perl, and Inline::C will translate simple scalars for you (int, char *, etc). Or you can use the perl api C macro's to realtively simply access arrays and hashes etc. You do need to increment and decrement the scalar reference counts your self, but if you've been a heavy Perl programmer for a while you probably are used to keeping reference counts in mind.

To whet your appetite, it goes something like this (example simplified from Inline::C-Cookbook

#!/usr/bin/perl

print "SQRT(9^2 + 5^2) = ", pyth(9, 5), "\n";
    
use Inline C => <'END_C';

double pyth(int x, int y) {
        return sqrt((x * x) + (y * y));
}

END_C

03:00 AM, 12 Aug 2005 by Mark Aufflick Permalink | Comments (0)

Looking for new Noise Cancelling Headphones

Well I'm preparing for another overseas trip, this time to London - Kath is presenting at a conference and I'm just a passenger!

But my Sony MDR-NC5 noise cancelling headphones are a little the worse for wear. The (non-replaceable) outer foam cover has all but disintegrated which makes them a tad uncomfortable. The noise-cancelling intermittently cuts out in the left channel and I need to jiggle the cable where it comes out of the right ear (where the battery is).

So I'm starting to look around. Obviously the Bose units would be great, but too expensive for me. I found a reasonable collection of reviews on this CNet page. Based on the user feedbacks it sounds like the Panasonic RP-HC100 (review) units are a good option. The reviewer specifically compares them with my Sony model quite favourably. Reading the user reviews for the various headphones, it seems that the CNet reviewer was placing more of a premium on absolute sound quality rather than the noise cancelling and practicality so much. The user reviews (ie. people who actually use the headphones on planes and in noisy environments) seemed to rate the Panasonic higher and the Seinheisser PXC 250 (review) lower (which was another option I considered alongside the PXC 150, which is presumably worse).

Does anyone have any recommendations? I'm sure one or both of the Tram Town boys have an opinion on noise cancelling audio equipment :)

Update: Unfortunately the RP-HC100 is a superceded product.

Update: It seems the updated Sony model (the MDR-NC6) has the same comfort issues as my old NC-5 (see user review on the Apple Store).

Update: The mid-range Sony MDR-NC20 cans are nearly universally loved (wheras most of the models get mixed reviews) - see the Amazon customer reviews.

Helpfully, Digital City here in Sydney has 10% off headphones at the moment, but Australian prices are inexplicably higher than overseas prices. The MDR-NC20s sell in the US for $USD77-119 (which translates to $AUD102-158), but even including the 10% discount we're talking $AUD269. That's 70% ON TOP! Sheesh.

I've emailed some outlets in Changi Airport to see what price they can do on the Sony MDR-NC20, JVC HA-NC100 and Panasonic RP-HC100 (since some online retailers are listing it as still in stock).

04:04 AM, 11 Aug 2005 by Mark Aufflick Permalink | Comments (2)

PDF Plugin's for Safari (plus a World Clock for good measure)

I made the mistake of installing Adobe Acrobat Reader 7 on my mac which also installed a safari Plugin. In principal this is great, because I prefer pdf's to open in browser tabs than in an external app, but on my original model titanium G4 powerbookk, it's a tad slow to say the least.

While Googling how to remove it, I came across an excellent Quartz based PDF plugin for safari from Schubert-IT. I'm not sure if I prefer it yet, but it seems pretty good.

While I'm plugging shareware Mac software, I think I love World Clock Deluxe from MaBaSoft enough to deploy some permanent disk and cpu to it (both scarce on my TiBook) and register it. It's great when you want to iChat/Skype someone overseas and want to be sure of the time.

12:06 AM, 11 Aug 2005 by Mark Aufflick Permalink | Comments (0)

Apple's Mighty Mouse [www.apple.com]

I have a love for input devices: mice, trackballs, touch screens, (remember light pens?), and for the Macontosh.

Apple has finally begun to apply a little bit of innovation to the humble mouse and the result is the (less humble) Apple Mighty Mouse!

In a sign of the influence Apple is regaining, the media lemmings have written a slurry of articles - all about a mouse! The New York Times published a remarkably well thought out article "Apple Offers a Mouse to Counteract the One-Button Blues".

10:49 PM, 02 Aug 2005 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