Begin main content

"Smart" Advertising and conflicts of interest

If I was paying for this banner ad placement I'd be asking for my money back!

09:17 PM, 28 Feb 2006 by Mark Aufflick Permalink | Comments (0)

It's true - a balanced diet includes chocolate!

Over a 15 year study,

...the biggest cocoa eaters were at half the risk of dying compared to men who did not eat it. (Reuters - Cocoa consumers have lower risk of disease in study)

"Before we can say cocoa can save your life, a larger study would need to be done" - I volunteer for the test group! To eliminate the psychological effects you would need a control group - but what would the control group be given as a chocolate placebo, Laxette?!

09:01 PM, 28 Feb 2006 by Mark Aufflick Permalink | Comments (0)

Apple, you make me so happy!

Last night's media event is everything I was hoping for - yes and more.

For about the last 12 months I've been telling anyone who would listen that I was going to make a home entertainment unit out of a Mac mini. Then it became the Intel Mac mini with Front Row. I was really hoping that this release would include said item, and it did. Mac per square inch

The hard drive interface has been upgraded to Serial ATA which is great for recording video. It uses shared memory for the video however. Normally this would be a kiss of death, but with all these new Intel chips I don't know what's what any more!

Perfect for home entertainment. In the words of Larry Magid, "If I were Sony CEO Sir Howard Stringer, I'd be keeping a very close eye on Steve Jobs." (CBS News)

The other great thing Apple has done is publish a Ruby on Rails tutorial on their developer site:

Sure it's nothing that you couldn't read elsewhere, but it is going to be seen as an endorsement of RoR by Apple - and that's nothing to sneeze at. Expect to see New York Times articles about how RoR is legitimised by Apple and.

07:15 PM, 28 Feb 2006 by Mark Aufflick Permalink | Comments (0)

Change to RSS feed

I have hacked my old and decrepit weblog code to generate html in it's rss content (as opposed to a single chunk of ascii as previously).

This should be in a paragraph by itself.

And this should be a link to Gumby and Friends.

Please let me know if you notice anything wierd.

07:55 PM, 27 Feb 2006 by Mark Aufflick Permalink | Comments (0)

Cross-language development []

Fun code that compiles/executes in 8 languages!

It mostly just relies on the fact that different languages have conveniently different comment characters (eg. #define would be a comment in shell or perl), but it's still kinda cute!

07:45 PM, 26 Feb 2006 by Mark Aufflick Permalink | Comments (1)

meebo meebo meebo

meebo totally rocks. It's an in-browser instant messenger that works really well. It's design is nice and clean (compare the horrible AIM Express client from AOL).

For maximum pleasure, I suggest the following:

  • Install a greasemonkey script to automatically log you in. I modified this script from to actually do the login. See my comment on that page for more details.
  • Also install this secure meebo greasemonkey script from
  • Then make a bookmark to the link:'', '', 'menubar=no,height=400,width=400, resizable=yes,toolbar=no,location=no,status=no')
  • (You might need to remove the spaces from that link)

02:11 AM, 20 Feb 2006 by Mark Aufflick Permalink | Comments (0)

60th anniversary of ENIAC - Great interview with one of the co-inventors Presper Eckert.

I had the privilege of seeing UNIVAC when I was at the Melbourne UniversityComputer Science Department (gotta love that they're sticking with their domain :) Apparently they powered it up sometimes and it worked, but due to lack of spare tubes they didn't do it very often.

08:15 PM, 16 Feb 2006 by Mark Aufflick Permalink | Comments (2)

Opensource server software will ultimately be better than "enterprise" options

I'm currently working out how to extract some historical information from Computer Associates autosys. For those who don't know, autosys is an "enterprise" job scheduling system. Think a multi-machine cron on steroids with depedency management.

I'm sure it's not worth nearly what we pay for it, but for all my complaints it's quite a capable system.

I'm not that familiar with autosys yet, so I went to look for documentation from the vendor.

That was mistake number one. The Computer associates website is confusing to start with. Many clicks later I was able to find the link to access the pdf manuals for autosys but I had to register. So register I did, but the link that was emailed to me to verify my registration didn't work in firefox! Luckily (for sufficiently small values of luck) I am on a windows machine so I could open the link in MS internet explorer and validate my account. The whole process was futile however, as CA only allow you to download the documentation for the most recent version. This site is running a major version behind, so the manuals that were there were no use.

I managed to track down the relevant version of manual by searching for 'autosys' on our internal wiki - a victory for collaborative distribution of knowledge over the company who should be trying to help me 'leverage our investment in job scheduling infrastructure', whatever that means.

The manual, however, is woeful. It's badly written, verbose in the fluff and disturbingly lacking in detail. I have been unable to find much of the information I need and will have to resort to poking around the database (which thankfully is Sybase not proprietory to the product). If that doesn't answer my questions I'm kinda stuck. I can't read the source code (obviously) and the (non-authorised) mailing lists haven't had any traffic in the one week I've been monitoring them.

Speaking of Sybase, it is also hard to get good documentation on that as well, but let's not get into that here.

The problem is that job scheduling is incredibly boring. Why would CA bother to soend time and money producing good documentation since the people who actually use it don't make the purchasing decisions.

Compare this to a (hypothetical) open source job scheduling project. The people who write the code would be actual users of the system. It will be valuable for them to document it becuase that will help them and their co-workers. A mailing list would have developers and users swapping problems and solutions. If the original authors got bored or went out of business or whatever there would be no problem because the other users can continue the development (or hire someone to do it if they don't have the skills). For the licensing and management costs of these sorts of "enterprise" software products, it would be very viable to hire a developer or two to keep an opensource alternative humming. And when your boss wants you to implement some sort of job schedule not supported, you can add that feature and fold it back in for everyone else.

I know that this is all obvious stuff, and most people in the opensource community knows that it is true, but it is still often thought that the major benefit of opensource is cost and that if you've got money to burn you are probably better off buying a commercial product that will come with support and documentation (and someone to blame).

My experience is that exactly the opposite is true. Now if I can just get some budget to implement an open source job sceheduling tool...

08:35 PM, 15 Feb 2006 by Mark Aufflick Permalink | Comments (0)

Mysql stupidity and overriding ruby methods

I *knew* I would regret using mysql for this project instead of postgresql. "But it's only got 3 tables" I said to myself...

Who knew that by default mysql selects were case insensitive?! I'm not talking about LIKE being case insensitive (although they are case insensitive too, just like in my nemesis Sybase), I'm talking about select * from foo where bar = 'aaa' finding a record where bar = 'AAA'. That's cruel and unusual.

The solution, in this particular incarnation of mysql anyway, is to make the column a "binary varchar" column. I'm not sure how that differs to a normal varchar (perhaps normal varchars are stored as analog vector data instead of binary data) but it works just like a normal varchar, and select matching is case sensitive. Phew, off the hook.

Except... Active Record (from Ruby on Rails) says "aha - it's a binary column, so it must be a blob. I'll pack the data in using some mysql binary quoting syntax that your particular version of mysql doesn't support." And you get this:

.../active_record/connection_adapters/ abstract_adapter.rb:88:in `log': Mysql::Error: You have an error in your SQL syntax near ''333630204465677265657320466f637573' WHERE id = 1' at line 1: UPDATE customers SET `username` = NULL, `password` = NULL, `name` = x'333630204465677265657320466f637573' WHERE id = 1 (ActiveRecord::StatementInvalid)

Right... :(

Thankfully, overriding a method in the symbol table (or whatever the ruby runtime nomenclature for the Ruby equivalent is) is just as easy as in Perl. In the model ruby file in question, I just added:

module ActiveRecord
  module ConnectionAdapters
    class MysqlAdapter
      def quote(value, column = nil)
and all is well. Sigh.

08:54 AM, 13 Feb 2006 by Mark Aufflick Permalink | Comments (0)

Doing autosys / autorep searches in an emacs buffer

I'm going to need to start an emacs code page - It's actually quite easy once you get the hang of lisp. I'm surprised it took me so long to realise that if you think like TCL then you're half way there!

(defun arep (arep-job)
  "Lookup a JOB with autorep"
  (interactive "sJob: ")
  (setq arep-query (concat "%" arep-job "%"))
  (setq arep-buffer-name (concat "*autorep " arep-query "*"))
  (pop-to-buffer arep-buffer-name)
  (setq buffer-read-only nil)

  (call-process "autorep" nil arep-buffer-name t "-j" arep-query)

  (highlight-regexp "__+" 'hi-red-b)

  (call-process "autorep" nil arep-buffer-name t "-j" arep-query "-q")

  (highlight-regexp "----+" 'hi-red-b)
  (highlight-regexp "^ *[^#: ]+:" 'font-lock-builtin-face)
  (highlight-regexp "#.*$" 'font-lock-comment-face)
  (goto-line 1)
  (setq buffer-read-only t)
  (set-buffer-modified-p nil)
Update: If you like the above, you'll love jil-mode.el - I should be able to replace the bodgy highlight-regexp with it. I had to make the following change to correctly highlight lines preceded with spaces:
(defconst jil-font-lock-keywords
  '(("^[ \t]*\\(\\(\\sw\\|\\s_\\)+\\)\\>:" (1 font-lock-constant-face))
    ("<\\([^>\t ]+\\)\\([\t ]*\\([^=>]+\\)=\\([^>\t ]+\\)\\)*>"
     (1 font-lock-builtin-face)
     (3 font-lock-type-face nil t)
     (4 font-lock-variable-name-face nil t))
    ("\\<\\(SUCCESS\\|FAIL\\|AND\\|EXITCODE\\)\\>" (1 font-lock-function-name-face)))
  "Additional expressions to highlight in Assembler mode.")

08:54 PM, 12 Feb 2006 by Mark Aufflick Permalink | Comments (0)

Search ruby docs (ri) in emacs

It's far from perfect, but it's a start and it applies ansi colors. My emacs lisp is pretty bad, so please feel free to provide enhancements.

Note one MAJOR bug is that if you have a buffer called *shell* it will switch there instead of your docs (so rename your shell buffers to something else). What I really need to do is figure out how to use ansi-color.el outside the interactive shell.

(defun ri (ruby-class-name)
  "Lookup a class in ri and put it into a buffer"
  (interactive "sClass: ")
  (let* ((explicit-shell-file-name "ri")
         (explicit-ri-args '("-T" "-f" "ansi"))
         (rishell-buffer-name (concat "*ri " ruby-class-name "*")))
    (comint-check-proc rishell-buffer-name) ; see shell.el
    (if (not (get-buffer rishell-buffer-name))
          (setq ansi-color-for-comint-mode t)
          (add-to-list 'explicit-ri-args ruby-class-name)
          (rename-buffer rishell-buffer-name)
    (pop-to-buffer (get-buffer rishell-buffer-name))
    (setq buffer-read-only t)
    (setq buffer-modified-p nil)
    (goto-line '1)

09:45 AM, 12 Feb 2006 by Mark Aufflick Permalink | Comments (0)

Language translation software

I am often surprised by how readable automatically translated web pages are. They are, howver, never without humour. Take for example this german article on file monitoring and replication.

The acronym FAM is supposed to stand for File Alteration Monitor but I can only assume that the author mistakenly thought it stood for File Ancestor Monitor, because whatever the German was ended up translated as file old person ration monitor although I have no idea where the ration came from!

Then the author talks about the complicated configuration files for the changedfiles program. Obviously the English phrase "that sucks" is fairly common across nationalities because there is a single word sentance Suction. I Must remember to use that in my writing! Sybase has no support for sequences. Suction. I love it :)

04:22 AM, 12 Feb 2006 by Mark Aufflick Permalink | Comments (0)

Aerogel that you can buy! []

Small pieces from $USD30!

For those who have no idea what I'm raving about, Aerogel is composed of 99.8% air - it's density is just 3 milligrams per cubic centimeter and weighs only three times that of air. Aerogel can support thousands of times its own weight and its melting point is 2,200 degrees F (1,200 degrees C).

It's just plain cool. Or hot, depending on how you look at it.

03:25 AM, 07 Feb 2006 by Mark Aufflick Permalink | Comments (0)

George Bush was there, so was King Abdullah and many others.

In a truly awesome and refreshingly puncchy speech, Bono talked about God and justice. Here's a little taster, but go read the whole thing - you won't be disappointed.

That's why I say there's the law of the land... and then there is a higher standard. There's the law of the land, and we can hire experts to write them so they benefit us, so the laws say it's OK to protect our agriculture but it's not OK for African farmers to do the same, to earn a living?

As the laws of man are written, that's what they say.

God will not accept that.

Mine won't, at least. Will yours?

11:14 PM, 05 Feb 2006 by Mark Aufflick Permalink | Comments (0)

The Mythbusters crew all used to work at ILM (George Lucas's Industrial Light and Magic special effects company) - who knew!

This is a cool interview on the starwars site - now can we see C3PO replace buster ? :)

05:27 PM, 02 Feb 2006 by Mark Aufflick Permalink | Comments (0)

PS: I bought the Pick Axe book

Programming Ruby (Second Edition) . It's like the Camel book for Ruby.

09:34 PM, 01 Feb 2006 by Mark Aufflick Permalink | Comments (0)

The Apple Way?

I just saw The Apple Way in a local bookstore.

From the back cover:

The Apple Way reveals the secrets and management principles that keep Apple ahead of the curve--including innovative product development, cutting-edge marketing strategies, sleek design and packaging, and a high-performance corporate culture. You'll discover how Apple combines consistency with continuity and follow-through, and balances vision with practicality.

I have read way too many Apple/Steve Jobs books than is healthy, worked in the management of an Apple reseller here in Australia and basically ingested as much Apple as possible. I can tell you that the book is lying! There has been no contiguous strategy at Apple, other than letting smart people do stuff under the influence of the reality distortion field. Unless you count Steve swearing at his staff, there is no "high performance corporate culture". Apple has worked when it has embraced it's geek culture - design geekiness as well as technical geekiness.

I like Apple. There are a lot of good and bad lessons that can be learnt from Apple. I even like what I know about Steve Jobs. Given the chance to work in a Steve Jobs company, I would jump at it.

Having said that, it is precisely by not following reasonable, responsible rules that Apple beats the curve. Be very wary of any book that pupports to tell you "how Apple does it".

09:30 PM, 01 Feb 2006 by Mark Aufflick Permalink | Comments (0)

User login in 5 minutes flat

Thanks to LoginGenerator my rails app now has barebones (but funtional) user authentication.


Lars always said it was going to be this good :)

09:08 AM, 01 Feb 2006 by Mark Aufflick Permalink | Comments (0) is down!

It sure is going to be hard to learn ruby and rails (from scratch) plus rewrite a client's website in one night without documenation! I have emailed the admin, hopefully he is in a different timezone and will be up soon :)

07:38 AM, 01 Feb 2006 by Mark Aufflick Permalink | Comments (0)

Web file uploading the EASY way

Yes why, Ruby is indeed poignant. Uploading files with cgi/perl/mason/aolserver is a pain in the butt. With ruby, it's:

def upload_customers
file_content = @params["customers_prn_file"].read

It's almost too easy!

06:37 AM, 01 Feb 2006 by Mark Aufflick Permalink | Comments (3)

Getting Ruby on Rails up on Mac OS X

So to add some spice, I'm not even going to use my trusty Linux workstations (yes, I have two) - It's my lovely shiny Powerbook all the way baby.

Here's all it took:

  1. Have Darwinports already installed (you know you should)
  2. install a reasonable version of ruby sudo port install ruby
    wait a while
  3. install MySQL (I told you we all need some grit) sudo port install mysql4
    wait another while
    Well, that was the plan, but the port is refusing to compile, so I have used a MacOS X mysql package
  4. install ruby gems sudo port install rb-rubygems
  5. install the mysql ruby driver sudo gem install mysql -- --with-mysql-dir=/opt (or supply /usr/local/mysql if you are using the package installed mysql like me)
  6. install rails sudo gem install rails --include-dependencies

MacOS X has an older version of ruby installed, so make sure that your path has /opt/bin first, so that you get to use the Darwinports version first.

I thought I would *really* get into the whole Rails vibe and I started downloading the TextMate demo. But thankfully it's a sizeably package and during the download I came to my senses and kept using GNU Emacs under X11.

For the pleasure of emacs users out there, here are the ruby related portions of my .emacs (which could do with some tweaking I'm sure) can be found in my cvs repository: You can get the .el files from the ruby cvs repository

03:21 AM, 01 Feb 2006 by Mark Aufflick Permalink | Comments (0)

Ruby on Rails to the Rescue!! (Or to my demise... we shall see)

Well, I've played around before, but always retreated to my trusty friends Postgres, OpenACS and Perl.

Ok, so I also have to deal with Sybase, but everyone needs a little grit in their life (otherwise we wouldn't appreciate the pearls!)

But I need to finally release some code that's been stewing in my CVS for 10 months and I don't like how I did it. So I'm going to rewrite the whole stinking thing in Ruby on Rails tonight. You heard me - in one night.

I'll keep you posted :)

02:59 AM, 01 Feb 2006 by Mark Aufflick Permalink | Comments (0)


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) and white (6)
..A day in Sydney (18)
..The Daily Shoot (6)
food (2)
Book Review (2)


Icon of envelope Request notifications

Syndication Feed


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