Begin main content

New Perl 5 OO Syntax [www.netalive.org]

This module (reformed-perl) providesw a whole bundle of OO syntax goodness for perl 5.

Personal favourites:

Sub args in definition (which is normally not possible in Perl due to lazy evaluation):

    sub method($foo, $bar)
    {
        print "First param: $foo";
        print "Second param: $bar";
    }
Implicit self, class and base:
    sub method
    {
        self->instance_method();
        class->static_method();
        base->super_class_method();
    }
Ability to override default setters (accessed by clients like a normal object hash value):
    fields foo;

    sub get_foo
    {
        print "Getting foo!";
        return self->{foo};
    }

    sub set_foo($value)
    {
        print "Setting foo!";
        self->{foo} = $value;
    }
Of course it's non-standard, but if it got adopted into, say, perl 5.9 then it could rock the Kazbah. Whatever that means.

11:25 PM, 29 Sep 2004 by Mark Aufflick Permalink | Comments (2)

Irony is not always funny

It is painfully ironic that today is the (Australian) television premiere of the movie of Black Hawk Down. I was just reading today about the militant groups in Iraq loyal to Abu Mousab al-Zarqawi. The situations I read about sound too similar to Mogadishu.

Chillingly, the best tagline that Channel 10 could come up with for Black Hawk Down was "See how Eric Bana showed Hollywood what he was made of". And if the film disturbed you, try reading the book.

Mogadishu is one of the embarrasing events that the US Army would rather forget. And you hope that the chain of command learned some lessons. The Bush Administration and the interim Iraqi President tell us how things are going swimmingly (liberal paraphrase), but the fact is that many many more American soldiers have died than the 18 at Mogadishu. Many more westerners' mutilated bodies have been dragged around the streets on film than the one US Pilot in Mogadishu. You can negotiate with warlords because they don't want to die, nor do their followers.

You aren't in control if there are no-go areas. You didn't prepare properly if you are only negotiating border security months too late.

I would like to write more, and there is so much more to say, but what would be the point. Some time ago I investigated technology contracts in Iraq to be a part of rebuilding the people, no chance of that now.

The sad thing is that if the majority of Iraq want Sharia rule, to go to war with the West and all that the insurgents ostensibly stand for, then they are welcome to start a political party. Free elections are planned for early next year. Of course they must know that the majority don't support them. But Saddam Hussein demonstrated how effectively you can take a people in a direction against their will if you are willing to use violence to intimidate them and any would be rescuers. It's just a crying shame that the rescuers who had the guts to come, didn't think through the fact that they would have to stay a while to protect the people they rescued.

08:05 AM, 27 Sep 2004 by Mark Aufflick Permalink | Comments (2)

Blogging in my pajamas

Well I'm not really. That's not to say I never have, but I'm not right now.

Although I quite like the term 'the pajamahadeen' which I picked up from this weeks Time magazine.

It's a strange world when I learn about geek cultire from Time magazine. Except, of course, blogging isn't geek culture any more, it's collaborative computing enabling vocal analysis of the establised media, politics etc.

And, of course, the odd Microsoft joke. Except that an operating system that allows an application flaw to result in the execution of data (a la the latest jpeg vulnerability) is no joke.

So in line with the new respectability of blogging (and more that I am interested in putting more effort than over some months this year) will lead to some more features around here.

First up will be a longer articles section. I'm playing with ideas, but I think the article pages will be driven by something I'm terming a "compositing" module—it will let me stitch blog entries, photos and other content together into a homogeneous article.

I'm also going to get around to uploading photos less than a year old (any day now...)

I've also made the first major colour change in a year, and I'm not sure I'm happy with it. Of course to make the site start looking nice I'm going to have to get rid of the auto-generated ascii-art headings. Like that's going to happen.

I also don't like the proscriptive "latest two" entries on my home page, or the fact that the developer blog is always at the bottom. But then I don't like "read more" links either, and it can't get too long.

I'm open to ideas—please comment.

I know you're reading this—I have the usage stats to prove it ;) Yes, that includes you Croatia.

07:03 AM, 27 Sep 2004 by Mark Aufflick Permalink | Comments (0)

Design (and other) Patterns

After first (and often) reading articles about design patterns in various Java and other journals, I decided (rather too quickly) that it was all just hype—or worse, it was force fitting canned solutions to make up for the lack of innovation in many development teams.

Today I had some reading time up my sleeve, so I thought I would learn what I was actually talking about when I documented the object factory I wrote yesterday. This led me on a journey of discovery about Patterns, Design and otherwise.

I learnt that Patterns—far from being canned solutions for enforcing re-use by medeocre developers—is actually a first class computer science concept/theory/philosophy. The journey often threaded to and from my recently added must-read blogger Grady Booch, which was a pleasent surprise.

For starters, the Hillside Group linked me to a fantastic introduction to Design Pattern theory and philosophy:

Patterns and Software: Essential Concepts and Terminology[cmcrossroads.com]

From my new and limited understanding so far, I don't think that half of the "patterns" I have read about in Java or C++ journals meet the tests in the above document by Brad Appleton. Unfortunately this type of pattern thinking wasn't popularised by the time I was studying computer science at Uni. There also seems to be a misconception that applying patterns means using an object oriented language, but I don't see that that is necessarily true. A software framework will necessarily have to be implemented in a language, and a description of a pattern should include code examples, but I see this concept, or school of thought, should be able to transcend languages and become almost a description of good software engineering. Hmm, I'm not sure that explauins my thought or even make sense, but I can always edit later!

Appleton quotes Reengineering the Application Development Process (Michael Beedle) likening the effect of using> patterns to the generation of emergent behaviours.

The article segues to Pattern Catalogs and Systems, which makes me think if Perl's CPAN. CPAN is a most like a repository of frameworks in this terminology (although much of the modules in CPAN do not meet the formal definition for a framework). CPAN is one of Perl's best assets and is unchallenged by any similar competitor. Imagine a similar library existed that was a global centre for:

  • Pattern proposal, certification and definition (in a standardised pattern language)
  • Pattern implementation (in whatever language you need - of course implementation coverage would vary)
  • Pattern system proposal, certification and definition
  • Software framework glue (which is really an implementation of a pattern system)
  • etc. etc.
  • CPAN works, and it's not anarchy. If we could agree to not have language wars, I think such a system could be immense. Of course the barriers to creating such a library as authoritative are huge, but that's an issue left to the reader ;)

    Being a product of the early 90s, I didn't study patterns at University (who needs patterns when you can program in Miranda, Pascal AND macro-assembler ;) so I have some catching up to do. Should make for interesting reading over the next few weeks (and a dent in my book budget...)

06:29 AM, 27 Sep 2004 by Mark Aufflick Permalink | Comments (0)

Visualising complex data & Relationship oriented computing

Methods of visualizing complex data sets is an interest of mine—perhaps a throwback from my Geomatics studies.

When I was at University we used a 3D GIS system on a Silicon Graphics workstation. You wore LCD based 3D glasses which synced via infrared to the screen (displaying alternate angles on every screen refresh). Navigation was provided by a horible HID (human input device) called a rat. It was very non-intuitive.

I was also facinated by Apple's attempt to present a 3D view of the complex relationships of Internet content, but navigable in 2D. Known variously as Project X and HotSauce, the data format was trialled by a number of companies including Yahoo, who provided the ability to "fly" through their 'Net index with the Apple tool. It was one of the many cool things to come from Apple's ATG (Advanced Technology Group) that was discarded never to be seen again.

I recently became aware of a new open source Java library that helps you present various types of 2D navigation of your complex (possibly multi-dimensional) data called prefuse You can view some cool java applet demo's and download the code from http://prefuse.sourceforge.net/

(Thanks to forresto on the "Related projects" mailing list of the touchgraph sourceforge project : http://touchgraph.sourceforge.net/ for mailing the link to prefuse).

A very interesting use of prefuse is Vizster—a project by Professor Marti Hearst of the University of California, Berkeley (http://www.cs.berkeley.edu/~jheer/infovis/final/).

Vizster is an interactive visualization tool for online social networks, allowing exploration of the community structure of social networking services such as friendster.com, tribe.net, and orkut.

PS: Sorry for the inconsistant spelling of visualising / visualizing - I just wanted to make sure all English speakers could find this page with a search tool.

01:20 PM, 24 Sep 2004 by Mark Aufflick Permalink | Comments (0)

Making Emacs shell work with Rational ClearCase

I was having a problem where the emacs shell was flakey when started from a shell within a clearcase view.

If the shell was csh (urgh), M-x shell would result in an error about a bad tty.

If the shell was bash, then all would seem fine, but I could not interrupt a subprocess (eg. with C-c C-c). I presume that emacs decided it was not the process owner, but I never delved into the C source.

My solution was to subclass the emacs shell to run bash directly with some funky environment munging.

Based on a post to the help-emacs-windows mailing list by Theodore Jump (read in archive), I cooked up the following proc:

(defun bash ()
  "Load Bourne Again Shell for interactive shell processing"
  (interactive)
  (require 'shell)
  (let ((binary-process-input t)        ; for 19.x
        (binary-process-ouput nil)      ; for 19.x
        (coding-system-for-write 'no-conversion) ; for 20.x
        (coding-system-for-read 'iso-latin-1-unix) ; for 20.x
        (explicit-bash-args '("-i"))
        (explicit-shell-file-name "")
        (original-shell (getenv "SHELL"))
        (ori-sfn shell-file-name)
        (w32-quite-process-args ?\")
        )
    ;; Wipe out PID in case emacs is called from
    ;; Cygwin32 built BASH (this causes problems)
    (setenv "PID" nil)
    (setenv "SHELL" "/bin/bash")
    (setq-default shell-file-name (getenv "SHELL")
                  explicit-shell-file-name shell-file-name)
    (message (format "invoking bash ... %s" shell-file-name) )
    (shell)
    (setq-default shell-file-name ori-sfn)
    (setenv "SHELL" original-shell)
    )
  )
So now instead of M-x shell I invoke M-x bash and all is good - interrupts, vobs, tab completion and all :)

There is, though, a slightly annoying echo of the commandline when you hit enter - I will investigate later.

12:10 AM, 23 Sep 2004 by Mark Aufflick Permalink | Comments (0)

Apple iPod + hp = Apple iPod... [www.shopping.hp.com]

Well we talked about it, and here it is. You can buy the "Apple iPod + hp" from Hewlett Packard. It's only in 20 Gb or 40 Gb models, and it's even exactly the same colour scheme.

Makes you wonder what the "+ hp" part of the equation gives. Oh that's right - invent...

Such a shame. I wonder if I can make my HP48 Calculator play mp3s :)

07:21 AM, 21 Sep 2004 by Mark Aufflick Permalink | Comments (0)

James Turner is, among other things, the senior editor of LinuxWorld magazine and a committer to the Apache Jakarta Struts project. He has also published two books relating to Java and has five years experience with the language.

Which makes it all the more refreshing that he can see the problem in the Java community so clearly:

Java is a great language being destroyed by Rampaging Computer Science

He summs up this viewpoint article with:

The long and the short of it is that, in my opinion, Java is a great language being destroyed by Rampaging Computer Science. There's a time for elegance, and a time for usability. If developers want to make the internals of packages flexible and extensible, that's all well and good. But the external interfaces should be clean, simple to use, and have wrappers for the most commonly accessed functionality. For example, in a PGP package, I should be able to encrypt or decrypt a file in 5 lines of code or less. After all, I can do it in Perl in 3.

Shh. Don't anyone tell Larry Wall - he'll prove that Perl can do it in two.

10:20 PM, 20 Sep 2004 by Mark Aufflick Permalink | Comments (0)

A year of your life? [ifoundsomeofyourlife.blogspot.com]

The author of the linked blog (i found some of your life.blogspot.com) found a camera flash card in a taxi. It contains almost exactly a years worth of photo's taken by the unknown owner.

As the finder was unable to contact the owner, he has decided to post an image a day to the Internet - combined with fictional commentary for your enjoyment.

I'm not sure of the ethics here, but it is really quite, um, something!

If you want to start at the start, you will need to catch up from July 26th by clicking here.

02:00 AM, 20 Sep 2004 by Mark Aufflick Permalink | Comments (0)

I honestly have no idea how this has missed my attention previously.

Amazon's a9.com search engine takes google results (ie. it uses google) and adds more stuff:

  • Amazon's search inside book
  • Google images (presented with each search)
  • IMDB (Internet Movie Database)
  • Reference sites (dictionary etc.)
  • They even have their own version of the Google Toolbar at http://toolbar.a9.com/ and if you use Firefox you can add a9 to your search bar (go to http://mycroft.mozdev.org/download.html and search for a9).

    Some of the Google keyworkds work, like site:, but not all of them.

    I like it so far.


    On further investigation, the data gathering undertaken by a9 is pretty amazing. Every link you click, you may notice, redirects via a9.com and stores the click in your preferences.

    You may prefer to use generic.a9.com which doesn't store any details in your Amazon profile.


    I also just re-discovered vivisimo.com and it's fantastic results clustering. I'm going to give it a shot as my main search engine for a few days. I'll let you know how I go. (As with a9, you can download a search plugin for Mozilla for it).

09:33 PM, 19 Sep 2004 by Mark Aufflick Permalink | Comments (0)

Semi from Tram Town is the first person I have heard with good things to say about the Thunderbirds movie.

I used to watch Thunderbirds every Saturday morning—way back when TV wasn't 24 hours a day and early morning had music clips instead of ad's because no-one would buy the slots (except perhaps for Franco Cozzo. Megalo Megalo Megalo.)

I'll probably have to hurry, i can't imagin it will survive long in the Australian box office.

08:45 PM, 19 Sep 2004 by Mark Aufflick Permalink | Comments (1)

Grady Booch (currently of IBM) is pasionate about the way we develop software. Why?

Despite its transparency, as Bjarne Stroustrup has observed, "our civilization runs on software." It is therefore a tremendous privilege as well as a deep responsibility to be a software developer. It is a privilege because what we do collectively as an industry has changed and will continue to change the world. It is a responsibility because the world in turn relies on the products of our labor in so many ways.

The book is being made available online once you have regitered and logged in, but I was not able to find any chapters with actual content...

Grady's site has other good stuff though.

The site can also be painfully sluggish (perhaps because it is written in java? :P)

08:36 PM, 19 Sep 2004 by Mark Aufflick Permalink | Comments (0)

Ian Kallen, Manager of systems and software at Salon.com presented this, um, presentation about their choice of publishing and workflow framework. If you know about these topics already you can quickly skip through nearly half the slides.

His conclusion is to go with Apache, mod_perl and mason over a fairly large range of open source and commercial options.

I whole heartedly agree with nearly all of his reasoning.

However, I think that he missed a great possibility (especially with regards to workflow) when he disregarded the ArsDigita Community System (now OpenACS) with the following silly (and unprofessional) takedown:

Phil Greenspun has spoke extensively but unconvincingly of the virtues of the AOLServer. We don't agree that Tcl is the world's greatest language and Alex seems nice and everything but a good dog doesn't make a good publishing technology.

OpenACS addresses many of his complaints against the other competitors and shares most (not all) of it's flaws with his chosen platform.

mod_perl and mason is a killer combination that I am growing to love, but in situations where OpenACS is an appropriate choice, it can save you 6 months to a year of development time. Seriously.

07:46 PM, 19 Sep 2004 by Mark Aufflick Permalink | Comments (0)

Silicon Valley Road Trip Doco [www.stage4.co.uk]

As reported by MacSlash:

In Search of the Valley will visit places and people of historical and personal significance, including but not limited to: local artists, hackers, hobbyists, venture capitalists, academics, and robots!

I can't wait to see the interviews with Andy Hertzfeld, Jef Raskin and Woz :)

One of the great looking places they visit is the DigiBarn computer museum.

Stop Press: From Grady Booch's IBM blog, I also found this nice in-browser photo tour of Silicon Valley: http://www.riehle.org/ageekstour/

02:04 AM, 17 Sep 2004 by Mark Aufflick Permalink | Comments (0)

The results are quite interesting - depending on your density of XML tags, the results can be quite different.

01:58 AM, 17 Sep 2004 by Mark Aufflick Permalink | Comments (0)

A little Small talk

Smalltalk, as the computer scientists and/or Historians among you will know, is the ante-sescendant of nearly every Object Oriented programming language there is. It's ideas are most cleanly followed by Objective C and much less by C++ and Java.

There is an opensource GNU Smalltalk compiler and it's documentation includes a good smalltalk tutorial.

I have to say I really like it. Now to find a place to use it...

Here are two histories of smalltalk I have found:

01:37 AM, 16 Sep 2004 by Mark Aufflick Permalink | Comments (0)

Here is the best clear explanation of perl's command line options I have ever read. I have linked straight into page two which covers the options most useful for writing perl one-liners.

It makes so much sense that you will find yourself having to refer to the documentation less than you used to.

09:16 PM, 15 Sep 2004 by Mark Aufflick Permalink | Comments (0)

RSI - a good reminder [www.onlamp.com]

This onlamp.com article is a good reminder to take RSI seriously, and links to some really good looking ope source software enforcing micro-breaks etc.

For Windows and Linux there is the excellent Workrave: http://www.workrave.org/

For Mac OS X, AntiRSI (http://ozy.student.utwente.nl/projects/antirsi/) is very nice looking and well integrated with OS X. It has the basics, but it's not as advanced as Workrave.

A friend of mine once got extremely bad RSI (from her violin playing of all things) and required a hired note-taker to go to class with her for over a year. I think it's worth taking some precautions to avoid a similar fate. After all, if I can't type I'm not earning any money...

08:45 PM, 15 Sep 2004 by Mark Aufflick Permalink | Comments (0)

Wind Energy now cheaper

There are various recent reports of wind power now being cost-effective (eg. this slightly useless article linked to by slashdot).

Someone suggested that converting 3% of America's farmland to wind power would provide 95% of America's electricity requirements.

Let's pretend that all that we read about wind power is true (and there are many opposing views) - ultimately we are removing energy from a system that has previously been untapped. And 95% of America's electricity requirements is a LOT of energy.

What will the effect of that be?

One slightly preposterous thought of mine is that the earth's rotation could be slowed. Well - we would be creating quite a strong opposing force...

I read someone suggesting that removing energy from the atmosphere would help combat global warming - sounds silly at first, but if you look at the net equation it seems plausable.

I think the pundits from Tram Town may well have something to add here...

01:15 AM, 15 Sep 2004 by Mark Aufflick Permalink | Comments (1)

Sawfish - still the best ever window manager

Sawfish is by far my favourite window manager.

It's lite, very functional and very customisable. Like Emacs, it is completely extensible by writing lisp functions. Also like Emacs, some standard functions are in fact in lisp themselves.

On machines without full gnome installs (or perhaps without the resources for the insanely resource-hungry gnome-panel), you can build up a good level of UI functionality with lisp add-ins.

The most important extension is the pager by Daniel Pfeiffer sawfish.wm.ext.pager.

I'm still looking for a window/icon dock a la twm or NeXT - maybe time to learn some more lisp...

Sawfish used to be THE window manager - it was the default for GNOME and thus RedHat. As of GNOME 2 and RedHat 9, metacity has replaced it as the default and sawfish development seems to have disappeared into a black hole.

Funny thing is, that doesn't matter. Sawfish still has more features than metacity, and if you want an extra feature, it's just a short lisp proc away.

A good source of info and lisp snippits is the Sawfish wiki: http://sawfish.uberstyle.net/ and this sawfish lisp repository: http://www.sics.se/~lofgren/sawmill/repository.html

Update: See this blog entry for info about cygwin and sawfish.wm.ext.pager under cygwin.

10:30 PM, 14 Sep 2004 by Mark Aufflick Permalink | Comments (2)

Rational ClearCase (and Emacs integration)

Once again, Emacs rocks! Here at my new client we use Rational ClearCase for source and release control. As a very long time CVS user it's taking a little getting used to.

It's underlying concepts are far more advanced than CVS and going back to CVS will hurt once I'm used to ClearCase.

Amusingly, ClearCase is just as syntactically confusing as CVS (what is it with source control software...) and has even LESS consistant command line arguments!

Once again, Emacs integration is sweet - once you install Kevin Eslar's excellent clearcase.el - which will save my noggin from those crazy commandline options.

I plan to extend clearcase.el with some labelling menu options (which we use as release tags) and fold them back into the release. More to come...

01:42 AM, 14 Sep 2004 by Mark Aufflick Permalink | Comments (0)

A new spin on replacing my Newton

I LOVE the Newton OS - even though it hasn't been updated in 6 years or so.

I love pen-based computing.

But when I saw the new Windows CE based Psion (the Psion Teklogix NETBOOK PRO) It occurred to me that it might be the size that is the killer feature.

In between a Palm and a sub-notebook, the Psion has a near full-sized keyboard and a relatively powerful processor

Once you can get Linux on there, it will be a absolute rip-snorter of a portable device.

08:18 PM, 12 Sep 2004 by Mark Aufflick Permalink | Comments (0)

And you can launch them for only about $40,000 USD as well! The only snag is that your satellite has to fit into a 4 inch square box... Which is quite big with miniture electronics these days.

And off the shelf equipment like PDAs are exactly where these researchers are getting their kit. Professor Twiggs of Stanford University says of PDA manufacturers "They didn't know it but they're building stuff for us".

Professor Twiggs concludes:

"you don't know what the heck you're going to do with this little box when you build it or what markets will be enabled. But it's so cool, you've got to do it,"

Bring it on!

02:01 AM, 09 Sep 2004 by Mark Aufflick Permalink | Comments (0)

Speaking of Perl... [www-106.ibm.com]

Perl inspires many well-written articles. More, it seems, than any other language - possibly because of it's linguistic design??

IBM's people have written many, and this link takes you to a list of some of them:

08:01 PM, 07 Sep 2004 by Mark Aufflick Permalink | Comments (0)

Software Patents

I'm not going to add to the volumnous literature written about software patents, but The following letter from Donald Knuth to the US Patent Office is a very clear and concise argument - worth the short read.

http://lpf.ai.mit.edu/Patents/knuth-to-pto.txt

11:53 PM, 06 Sep 2004 by Mark Aufflick Permalink | Comments (0)

My friend Lars has posted a good summary of the reason behind the rise of scripting languages - and why some of them are so bad!

I would modify his article to point out that although Perl is somewhat of an "accidental" language, it was grown by people who actually know about things like compiler theory. And the OO structures available in Perl are really quite excellent when you become familiar with them.

09:19 PM, 06 Sep 2004 by Mark Aufflick Permalink | Comments (0)

Favourite TV Scientists [www.cnn.com]

I dislike just re-posting links, but it's been a long time between blogs (I've been quite sick) and this is definately news-worthy!

In a recent poll of the public's most favourite TV Scientists, Dr. Bunsen Honeydew and his assistant Beaker (of the Muppets) resoundingly beat Dr. Spock and Agent Sulley by a factor of 2 to 1.

Roland Jackson, of the British Association for the Advancement of Science said "They are accessible, humorous and occasionally blow each other up".

I wonder what the result would have been had the guys from the Curiosity show been included in the poll... well I'm glad you asked...

07:09 PM, 06 Sep 2004 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