Monday, April 30, 2007

Still Standing

This is really neat Sophi Hicken is a photographer who has published two books, Still Standing #1 and #2, with pictures of the grain elevators of Alberta. I remember the grain elevators on the praries so fondly, it's so sad they're gone.

just planted out my garden!

I've been starting all my little plants in the greenhouse, and just planted them out in the garden this weekend. Pretty neat, eh?

I find that this is such a nice lifestyle for me, working for myself up here on the edge of civilization. I can work on amazing complex computer programs on my great linux setup, and then when I get to an impasse, in just a few steps I'm out in my garden. I like to get to a point in my programming where I'm temporarily stuck, then go and work in the garden thinking about the problem. Often, I come up with much better solutions when I'm doing this than if I would just hammer it even harder on the computer.

Sunday, April 29, 2007

masks and illustrator cs2

I'm trying to figure out how to use masks in Adobe Illustrator C2 so that I can select only part of an image to do my slicing within.

Friday, April 27, 2007


Rush Drum Tablature. Mmm, sweet. I used to have the big Rush drum sheets with all the songs, I think I still have it somewhere. Many many hours playing along to that music there.


I was just watching pi again. What a great movie. Makes me a little intense though...


A HOF or Higher-Order Function is a function that generates other functions. Very neato. I'm having a lot of fun learning Lisp, with the coding I'm doing in Lisp, Perl and Ruby, I really see how Ruby is kind of like Lisp + Perl. Ruby is such a fascinating language, and it also looks so pretty to code.

Thursday, April 26, 2007


why the lucky stiff continues to amaze us, now with hacketyhack a way for people, especially kids, to learn programming. this should be included on the olpc (one laptop per child) laptop.

Compressing Javascript

jscsscomp is a PHP version of the packer program which has PHP, Perl, WSH and .NET versions. Neato, I think that this might be a good thing to add to my deployments with Capistrano. I would also add a comment at the top of the file with a link to the original source of the file.


Sweet, since I moved to rxvt-unicode, I've had access to 88 colors, up from 8 when using gnome-terminal. I just found the following command to list the colors I have access to in my "emacs -nw" terminals:

M-x list-colors-display

Matrix Emacs

I was watching Matrix Reloaded last night again:

alias dvd='m dvd://1 -dvd-device /dev/hdc -alang en'

And I just couldn't help but think of new ways to interact with information on the computer. I was thinking of an Emacs where you could interact with code in multiple dimensions. I use Ruby on Rails a lot, and it seems to me that there are all these interconnections between different levels of the code that interact together just like those atoms, fractals and gears on the Matrix Reloaded trailer.

Imagine a system where you could easily move between those different levels of abstraction just by using your mousewheel? With one flick you are looking at your entire codebase, zoom in a little to see a controller or model, zoom in more and you can look at the Ruby code that those models call.

And then, overlay on that the actual visitors to your website, viewing bottlenecks and performance problems just like they were problems with actual gears.

Somehow, someday, this will be natural. We, as humans, have all this excellent brain functionality to help us deal with the real world, we will integrate this more into our programming tools, making coding more engaging, more productive and more fun.

Wednesday, April 25, 2007

Capistrano 2.0 yumminess

Mmmm, Capistrano 2.0 was just released, and it looks sweet.

I use Capistrano for all my web deployment, whether it be small static sites or big Rails dynamic sites, and it's so cool.

One thing that I'm starting to get into for static sites is to have Capistrano automatically FTP the content up to my clients site, this way I only have to remember "cap deploy" for all my projects. I'm doing all my static sites within Ruby on Rails, caching the content, spidering the site with pavuk, and then FTPing the resulting HTML files up to my clients site. That works really well.

XML pervades the web

XML becomes pervasive on the web. I think it's great that a lot of web APIs support both REST and SOAP, there are some situations where I use REST and some where I use SOAP, and being able to use both is great.

This is like Amazon's S3 interface, they have both REST and SOAP APIs. It looks like more people use the REST API, and I use it myself, mostly, but I'm building a new tool for protein structure exploration that will use both, and I'm glad I have the choice.

It's all about the freedom to choose.

Space Cadet 4000

I love my Microsoft Natural 4000 Keyboard and soon I'm going to be patching my kernel to get all those extra funky keys working.

One thing I didn't like was those labels on the function keys, so one particularily obsessive morning, I sanded down all the labels. Ahhh, much better. Now I have them bound to the following keys in Emacs:

;; Function keys
(global-set-key [f1] 'help)
(global-set-key [f2] 'auto-fill-mode)
(global-set-key [f3] 'kmacro-start-macro-or-insert-counter)
(global-set-key [f4] 'kmacro-end-or-call-macro)
(global-set-key [f5] 'gblogger-new-entry-sness)
(global-set-key [f6] 'planner-create-task-from-buffer)
(global-set-key [f7] 'planner-task-in-progress)
(global-set-key [f8] 'planner-task-done)
(global-set-key [f11] 'compile)
(global-set-key [f12] 'recompile)

I've always been a fan of the Space Cadet Keyboard, and I'm thinking that it would be really cool to change the windows "Start" key to "Super" and the Caps Lock key to "Hyper". Mmmm, that just makes me happy thinking of that.

I wonder if there's a good way to put labels onto keys? Perhaps those dry transfer labels? I wonder if there are some with "Super" and "Hyper" on them...

Wired interview with Eric Schmidt

A really good interview with Eric Schmidt, CEO of Google.

Lots of good points, mostly centering around the idea of search and advertising as central to Google's strategy.

Tuesday, April 24, 2007

Playing DVDs under Linux

I used to use ogle for watching DVDs with Linux, but I just found that I could also use mplayer, and since I'm getting familar with the mplayer source code, it's probably a better solution:

alias dvd='m dvd://1 -dvd-device /dev/hdc -alang en'

Cool path splitter in Perl

Oh, this one is so neat: A little Perl regexp to get the path and filename from a string:

my($text) = "/etc/sysconfig/network-scripts/ifcfg-eth0";
my($directory, $filename) = $text =~ m/(.*\/)(.*)$/;
print "D=$directory, F=$filename\n";


Neato, CMD Bioscience, one of the companies that I'm consulting for, just launched their website. It's been a really interesting project, I did a bunch of work transforming their Perl code for Affinity into production code, and now I'm working on doing the same for Transcend.

They have some interesting ideas for how to score target/ligand dockings for proteins and peptides, these ideas are in Affinity. Transcend is their program to improve protein/protein and protein/peptide dockings.

It's been interesting to get back into Perl, during the day I work in a whole range of languages, Perl, Ruby, Javascript, Lisp and C. I love seeing the similarities and differences between these languages. Perl and Ruby have a lot in common, Ruby took a lot of it's syntax from Perl, and this makes Ruby a nice language to get things done quickly, maybe not so quickly as Perl, but still quite quickly.

coda - integrated web design environment

Coda is an integrated design environment for the web. It looks quite pretty. It has some interesting ideas that I'm going to work on integrating into Emacs. Emacs + Firefox + Firebug is my environment for building websites, it's a really sweet environment to develop inside of, and I'm always looking for enhancements.

Mozex + Firefox + Emacs = Bliss

Got some more funky integration going on with blogger. I'm really loving that integration with Firefox and Emacs with Mozdev that I have, I just have to press C-M-e inside a textbox on Firefox and it creates a new mozex buffer on Emacs.

This is really sweet when I'm editting my blogger templates, it used to be a real pain, you have to download them, open them in Emacs, save them, and re-upload them. Now, I just type C-M-e, and there they are, ready for editting in Emacs. When I save them in Emacs, the contents of the textarea on the blogger form are updated automatically. Sweet.

Also, view source is totally sweet now as well, I just type C-M-u inside Firefox and I can view the source inside Emacs.

Monday, April 23, 2007

SES - Simple Emacs Spreadsheet

I'm learning SES - Simple Emacs Spreadsheet. It looks really neato.

we are bubbling

Coding Horror says that we're in the Bubble 2.0. I definitely agree, things are really bubbling nowadays, and gives some reasons why it's different than the last bubble, including that people have always-on high-speed internet connections, that viable ad networks are emerging, Moore's law keeps happening, and open source is rocking.

Things that I'm doing to keep my own little bubble from popping.

1) Live cheaply - I'm living really inexpensively, in a great little town on the coast up from Vancouver. I have cheap hosting, I started with a $20 a month deal with Quantact, then upgraded to two Quantact servers, and then graduated to one Quantact server and on big dedicated iweb server. In a few months I'll be moving to Amazon EC2.

2) Work hard - I'm working on a whole bunch of projects, working really hard and having fun. I get up nice and early and work until noon, then go work out at the gym, then come back and read, then have supper and then work again on the computer in the evenings.

3) Exercise Lots - I go to the gym 5 days a week, and really give'r. I work really hard on the computer in the morning, and by noon, I'm going a little wiggy, so I go and work out, and it really helps me to get out of thinking small, and think about the big picture. I try to get to a point in the morning where I have a big coding problem to think of, then I can let it simmer as I warm up on the elliptical. Often, during the weightlifting part, I'm struck by the answer to my problem. I wish I would have figured this out when I was 20.

4) Have fun - Almost all the projects I'm doing are really neat, and I'm having fun with all of them. I'm doing mostly Ruby on Rails, but am doing healthy chunks of Perl, lots of XHTML/CSS and learning Lisp. Stretching your brain is really fun. Not having to do it to an externally imposed work schedule makes it possible to work really hard and not burn out.

5) Do other things - Besides coding, I'm growing quite a neat little garden, going for walks in the woods, cooking yummy meals, and drumming.

My current philosophy that I'm living by is to just work really really hard, and trust that everything is going to work out. After a year and a half, it's actually going pretty well, and I'm having the most fun of my life.

pen and vrrp for neato load balancing

pen is a really neat new load balancer for TCP protocols like http and smtp. It's better than round-robin DNS because it keeps track of users and will try to send the same user back to the same server.

But a single pen server is still a single-point-of-failure, if your pen server goes down, your website goes down. So, use the very neato vrrp to help you build the ultimate cheap cluster

Now, use this with Amazon's EC2 and you've got a really awesome, and really cheap mega-cluster.

Even easier blogging from inside emacs

I hooked up the following function and keybinding to help me post even more easily with gblogger.el. Mmm, Emacs is sweet.

;; Make a new blog entry for the sness blog
(defun gblogger-new-entry-sness ()
(gblogger-new-entry "******/posts/default")

(global-set-key [f5] 'gblogger-new-entry-sness)

Getopt::Long - uppercase/lowercase

To get Getopt::Long for Perl to not ignore the case of command line options, use:



The ActiveMessaging plugin for Rails, along with AmazonSQS looks like a great way to integrate SQS with Rails.

Introduction to ActiveMessaging for Rails is a good article that talks about this

Virtual hosting with S3

Virtually host your website with S3 - Wow, this is just so amazing, it's going to completely change the way that people do website hosting. Now, we just need a simple way for normal humans to publish their websites to S3, say through a Dreamweaver plugin.

I'm going to see if I can do this with the way I'm hosting static sites with Rails, this could make it really easy and cheap for me to host static websites for customers. Well, right now it's really easy and cheap with static Apache sites, but this way could be even easier and more scalable.

sun is music

Solar flares are music.

Minimal ZTD

Zen To Done
. Some good points:

  1. collect. Habit: ubiquitous capture.

  2. process. Habit: make quick decisions on things in your
    inbox, do not put them off.

  3. plan. Habit: set MITs for week, day.

  4. do (focus). Habit: do one task at a time, without distractions.

with planner-mode
really helps out with #1 and #3. I'm loving planner-mode, it's a
really nice way to organize lists of things to do, and is right
inside Emacs, where life is sweet.

Although I love them, one problem that I have with web-based
applications is that they are just a little too slow. This isn't
an inherent problem with web-applications, but is instead often
caused by people putting too much flash in a website. Yes, yes,
your funky javascript transitions are beautiful, but they slow
down my interaction to where it isn't quite immediate, and that
slowness just kills a certain kind of flow.

What we need is to have web applications able to present three
kinds of interfaces:

  1. Beautiful javascripty interfaces to attract users

  2. Stripped down, basic interfaces for more advanced
    users that can be selected in a preferences page

  3. APIs that really advanced users and developers can use from
    other applications.

Then I can quickly try out applications, graduate to a quicker
interface when I start using the application regularily, and
finally move to an interface from within Emacs for things that I
use all the time.

Luckily, things are moving in this general direction, and that rocks.

Rake for starting system services

A post
describing how to use Rake to start system services
. A neat
little article, and it shows how beautiful Ruby code can look.

Yahoo Grids and Rails

A Yahoo Grids Helper for Ruby on Rails. This looks really interesting, I've been wanting to try out Yahoo Grids for some time now, and with this Rails helper, it'll be easier to use.

Sunday, April 22, 2007


To Done
- A neat twist on GTD.

Some things to change

Now that I've finally got all this working, there are some things I'm
not happy with in gblogger.el, and I'm now emboldened to change some
of them. Emacs + GData + Blogger rocks.

Now that I have this working, I wonder, would it be possible to get
GMail and Emacs to work together? I don't want the VM or Gnus
integration with GMail, I just want a client to GMail that I can
interact with from Emacs, not Firefox. I'll let you know how it goes.


Yay! It works! I can post to blogger with Emacs, through GData.

It turns out that the problem was with zsh, I needed to escape the
contents of the g-auth-url-pattern with quotes. It was easy to see what
was wrong when I finally figured out why the *g auth* buffer wasn't
showing up: If you put a space before the buffer name, like " *g
auth*" it is considered a temporary buffer and isn't displayed in the
listing of buffers.

When I removed this space, and turned it into a buffer I could view, I
saw a zsh error, and immediately realized I had to put quotes around
the string. Whew, what a trial that was!

Well, I'm getting closer and closer, but I'm having real trouble
because I don't understand enough about Emacs Lisp yet. I'm getting
pretty frustrated, so I think I should just stop for now, and try
again later.

It looks like the problem is that somehow the "Auth" token in
g-cookies isn't getting set properly, it's currently nil, and should
be a long string. I was getting deep into the g-authenticate
function, but am having trouble with all the buffer stuff. Someday I
really just need to do the Emacs Introduction tutorial properly, and
understand more about how Emacs does things with buffers.

But right now, I have too much other stuff to learn about with Ruby
and Javascript, and my brain just isn't big enough to learn Lisp as
well. It's so frustrating, because I really want to start posting to
blogger from inside Emacs, but it's just not going to happen right
All I want to be,
is someone that makes new things.
And thinks about them.

Piet Mondrian

Saturday, April 21, 2007

libketama - a consistent hashing algo for memcache clients

Neat, this allows you to add and remove memcached clients as you need to. This will be very useful when using EC2.

Now, we need some good integration of memcached, S3, EC2 and MySQL.

Friday, April 20, 2007

Atom Publishing Protocol interop - Really cool, this looks like an awesome API.
I'm trying to setup blogging from inside Emacs, but I'm getting some errors, so I'm reading all about the specs to understand what's going wrong:

The Atom Publishing Protocol
Overview of the new Blogger API
Google Data APIs overview
GData Authorization for Installed Applications

Wow, this is so powerful. Google, you rock.

Thursday, April 19, 2007

I just posted a new gallery of pictures I took today of plants in my garden and greenhouse.
In the preface to Structure and Interpretation of Computer Programs, Abelson and Sussman state

“First, we want to establish the idea that a computer language is not just a way of getting a computer to perform operations but rather that it is a novel formal medium for expressing ideas about methodology. Thus, programs must be written for people to read, and only incidentally for machines to execute.”

From jrm-code-project.

Friday, April 13, 2007

The Planck Temperature, 10^32 degrees K is the hottest possible temperature, using the Standard Model.

That's so trippy, a little summary: at 10^10 degrees, particles approach the speed of light, but as we all know, you can't reach the speed of light, you just get more and more massive. So, at 10^32 degrees, each particle of matter becomes so massive, it turns into a black hole. Trip-p-y!

Wednesday, April 11, 2007

Tuesday, April 10, 2007




Posted by Picasa

Monday, April 09, 2007

Doing a little running of EC2 instances today. I <3 EC2.
A nice looking javascript rating widget. I've done my own like 4 times now, each one a different approach, and I'm still not happy with them. I've tried CSS and Javascript, but it still doesn't feel right in my Ruby on Rails projects. Maybe this one will be better.
When I was looking for my favorite internet streaming radio station, Cryosleep, I chanced upon another Cryosleep, an audio binaural beat tone generator that produces nice sounding output.

Sunday, April 08, 2007

Monday, April 02, 2007

Gotta clear out opera:

Faster ferret pagination in Rails:

Acts as Ferret tutorial:

A problem with
attachment_fu that got me for a while on Sunday, attachment_fu has
problems when you try to update an attachment. I got around it by
just deleting the record, however, this doesn't delete the data from
S3, so it's an incomplete solution.

I downloaded Mephisto
to try to track down how they are updating an attachment_fu. It looks
like they're doing the same thing I was trying:

Generating thumbnail images with with acts_as_attachment, the
predecessor of attachment_fu:

More on acts_as_attachment

The main acts_as_attachment page

ImageScience, a small library to just resize images. It's to help
replace ImageMagick, because some of these Rails people don't like
having to install all the RMagick dependencies. If the RMagick gem
could just report the error messages when it's building a bit better,
I think there would be less issues with it:

tutorial. attachment_fu is the new acts_as_attachment, and I
really like it, it's much better than than file_column. I was loyal
to file_column for almost a year, but it's time to move on:

AWS::S3 for Ruby. Really sweet.

A really great attachment_fu tutorial

setting the image directory used by attachment_fu

Installing ImageScience

attachment_fu with S3: custom path?

: RESTful Application, Dumb-Ass Recipient