Sunday, March 30, 2008


gc4r - Full featured ruby wrapper for Google Charts API. Nice.

Saturday, March 29, 2008



av mit

All MIT Courses online with audio/video.


A new version of TeX has just been released, after 10 years, version 3.1415926.

I love that TeX version numbering, it asymptotically approaches pi, adding one digit for each new version.


StrokeDB - Really interesting looking Ruby project that is an embeddable distributed document database. It is schema-free, it scales infinitely, it even tracks revisions and perfectly integrates with Ruby applications.


Name : Deep Mix Moscow Radio:
Genre : Deep House Techno Minimal Tech Dub Electronic Mixed
Public : yes
Bitrate: 128kbit/s


18.03 Differential Equations video lectures from MIT. Sweet!

Friday, March 28, 2008


SOMeJB is an experiment that used Marsyas to classify music into genres based on a number of different metrics.



Wavelets at wikipedia.

Mexican Hat Wavelet

Neat stuff!

Tuesday, March 25, 2008

Friday, March 21, 2008


From HowToUseSubdomainsAsAccountKeys

Functional testing with subdomains:
To test subdomain account keys, you can set the host parameter of the @request object in a functional test:

def test_example_test = ''

HD 189733

HD 189733, the star around which that hot jupiter like planet that they just discovered methane in the atmosphere orbits.

Wednesday, March 19, 2008

room temperature superconductivity

Wacky! Scientists in Germany and Canada announce high temperature superconductivity, albeit at very high pressures. Very interesting.

disks have become tapes

An interesting analysis of MapReduce and similar algorithms, transfer rates for disks have increased at 20% per year recently, while seek rates have only risen at 5%, so write algorithms that take advantage of transfer rates.

I certainly will have to in my new work with audio algorithms.



rescue ActiveRecord::RecordInvalid => invalid
puts invalid.record.errors


limoncello from recipezaar

15 thick skinned lemons
2(750ml)bottles 100% proof vodka
4 cups sugar
5 cups water

Maybe I'll just make a half (or 1/10) batch, but sure does sound tasty.


Loving Rails' functional testing - I'm trying to become a convert to functional testing, I love integration testing, but I think I need to do functional testing as well.


authur c. clarke

Tuesday, March 18, 2008

python 3000

Python 3000 and you - Notes from Guido van Rossum's PyCon 2008 keynote.

Sunday, March 16, 2008


google sky

Neato! Google just released google sky for your broswer. Love. it.


Dan Ingalls demos Lively at GOogle.

admin interface

Administrative Debris in which Ryan Tomayko talks about improving an admin interface.

I've been working on this big project with making an admin interface for for quite a few months now, so this post is quite relevant.


frink - is a practical calculating tool and programming language designed to help us all to better understand the world around us, to help us get calculations right without getting bogged down in the mechanics, and to make a tool that's really useful in the real world. It tracks units of measure (feet, meters, kilograms, watts, etc.) through all calculations, allowing you to make physical calculations easily, to mix units of measure transparently, and ensures that the answers come out right.

That's really cool, and when I was studying chemistry and physical chemistry, I found that the best way to make sure you were on the right path was to keep track of the units, make sure the units work out, and then focus on the numbers. It looks like this is what this tool does as well.

fast sparse

A clever trick to initialize memory to 0 the first time it is accessed, thus speeding up accesses to spare vectors.

Saturday, March 15, 2008


rest-client is a simple API for accessing REST resources with Ruby. Looks really nice and simple.

require 'rest_client'

xml = RestClient.get 'http://some/resource'
jpg = RestClient.get 'http://some/resource', :accept => 'image/jpg'

RestClient.put 'http://some/resource','my.pdf'), :content_type => 'application/pdf' 'http://some/resource', xml, :content_type => 'application/xml'

RestClient.delete 'http://some/resource'


Tips from Google on how to make your site more accessible. Important.

best cartoon ever

A very sweet cartoon I found online. I love my mom and dad.

uvic bike map

A really nice map of the bike routes around UVic.

Friday, March 14, 2008

fix the web

A really funny video about how to fix the web with greasemonkey. I've played a bit with greasemonkey, and this video makes me want to learn more.



custom ruby dates

From : dzone snippets and

my_formats = {
:my_format_1 => '%l %p, %b %d, %Y',
:my_format_2 => '%l:%M %p, %B %d, %Y'




Happy pi day!

Thursday, March 13, 2008


What makes Mathematics hard to learn? - An essay by Marvin Minsky.


PragDave show us an interesting new library for doing testing. I've been doing tons of TDD (Test Driven Development) lately, either that or writing the tests right after I write the code, and I've found that it makes my life much better. What I find lacking though is that the reports of what fails in the tests is a bit lacking, the way that Ruby on Rails gives the whole call stack is sometimes hard to parse.

Integration tests though are much harder, and I find myself having to frequently consult the test.log file to figure out what went wrong. There must be a better way to do integration testing.

In my next big project, the Orchive, I plan to do things right, I think it's going to be RESTful, and I'm going to think hard to make a beautiful API.

paleocene-eocene climate

H. Jesse Smith

Around 55 million years ago, at the height of the Paleocene-Eocene thermal maximum, the world was a much warmer place than today. Sea surface temperatures were higher everywhere than now, and the equator-to-pole thermal gradient was much shallower. Climate for much of the past 500 million years has been warmer than it is now, and during the warm periods the surface meridional temperature gradient generally appears to have been weak. Explaining how the climate system might have transferred heat from low to high latitudes to maintain such a shallow thermal gradient has been difficult, and many hypotheses have been advanced, including those involving effects from radiative forcing by high concentrations of atmospheric carbon dioxide, more intense ocean heat transport, differences in the amounts and locations of polar stratospheric clouds, and extratropical atmospheric convection. Korty et al., using a coupled model of intermediate complexity, investigate another possibility: that tropical cyclones could have caused enough ocean surface mixing in the tropics to cool the sea surface there and drive the strong poleward heat flux needed to produce the shallow thermal gradients that seem to have prevailed during warm climates. This solution, if correct, also has implications for how we might expect the climate system to respond to anthropogenic warming. -- HJS

J. Clim. 21, 638 (2008).

Wednesday, March 12, 2008


An interview with John Carmack about ray tracing in new software.

chord geometries

Chord Geometries. Man, I am so happy to be getting into this field!


music in higher dimensions

The Geometry of Music - Dmitri Tymoczko of Princeton University has developed a theory that uses higher dimensions to explain chordal theory. Sweet stuff.

unit test errors.full_messages

I recently needed to check why a model in Rails was failing, and I found the following useful. It tells me all the errors that have occurred to stop this model from validating:

puts "errors=(#{@sness_aug01_medium_bin.errors.full_messages})"


Nanaimo, a town close to where I live, is getting totally Google Earthified.


I was building a dynamic bar graph into the Orchive website, and decided to try Gruff Graphs for it. Since I tried it last, it's really matured with a really nice Ruby on Rails plugin. It has fairly good API documentation, but to really find out how to use it, look at the test code in the gem, for example /usr/lib/ruby/gems/1.8/gems/gruff-0.2.9/test/test_bar.rb for the Bar graph.

On the plugin page, he shows a really neat way to have a controller action use send_data to send a dynamically generated png back to the browser, but doesn't really explain how to use this in your view. I found a blog post that shows how to do this, you just make an action like:

def year_graph

g ="700x400")
g.title = "Percent of Orca song digitized per Year"

g.labels = Year.labels,, "#008B00" )

g.hide_legend = true
g.minimum_value = 0
g.maximum_value = 100

:disposition => 'inline',
:type => 'image/png',
:filename => "years.png")

and then in your view, call this action as the target of an img tag:

<div class="year-graph">
<%= image_tag "/main/year_graph" %>

I then use some CSS to center this in the page:

.year-graph {
margin-left: auto;
margin-right: auto;
width: 700px;

The end result looks like:

Tuesday, March 11, 2008


Very funky website design.


The new album from the B-52's. Sweet.


pwgen is a great tool for generating a whole page of randomly generated passwords. With various command line options, you can increase the difficulty of the passwords for people to guess.

It gives you a whole page of passwords, which is a great idea in case there are people spying on your screen via Van Eck phreaking, or perhaps just reading your terminal history.

Sunday, March 09, 2008


doodle is a Ruby library and gem for simplifying the definition of Ruby classes by making attributes and their properties more declarative.

Doodle is eco-friendly - it does not globally modify Object, Class or Module, nor does it pollute instances with its own instance variables (i.e. it plays nice with yaml).

Sounds interesting.

ruby fringe

Ruby Fringe is an avant-garde conference for developers that are excited about emerging technologies outside of the Ruby on Rails monoculture.

I think that some of the coolest things happening nowadays in Ruby are outside of Rails. The more I work with Rails, the more I see its limitations, it just wasn't that well thought out before it was widely adopted. There is something to be said for a framework that just organically builds without having all the hype.

Still though, I do all my websites in Rails, and for a certain kind of website, it's pretty awesome and super fast to develop something that works.

easter eggs

RIP gary gygax

cmbr dipole

Saturday, March 08, 2008


Quotes from the Tractatus Logico-Philosophicus - I used to carry the Tractatus around with me at Pearson College, and would listen to Stockhausen in the library.


zobrist keys - A hash like technique for comparing subsequent chess board positions. Interesting.

voroni diagrams

code title

On The Use of Code in Weblog Titles - Some cute examples of using code in the title of your weblog.

lyrical links

The Lyrical Quality of Links - A paper from the ACM (the Association for Computing Machinery).

lyrical links

The Lyrical Quality of Links - A paper from the ACM (the Association for Computing Machinery).

Friday, March 07, 2008

image slicing for the hardcore

I'm working on a new version of the Orchive webpage, and after a little clicking with Illustrator and Inkscape, both excellent programs, by the way, I decided that I would rather just write a script to do the slicing for "normal", "hover" and "selected" states of hover buttons.

It turned out to be super easy. I loaded up the image in Gimp, found the X,Y coordinates of the places where I wanted to slice and used RMagick to slice up the image, like this:


require 'rubygems'
require 'RMagick'
include Magick

normal ="full_normal_state.png")

normal_left = normal.crop(0,274,125,38)

normal_home = normal.crop(125,274,180-125,38)

hover ="full_hover_state.png")

hover_left = hover.crop(0,274,125,38)

hover_home = hover.crop(125,274,180-125,38)

selected ="full_selected_state.png")

selected_left = selected.crop(0,274,125,38)

selected_home = selected.crop(125,274,180-125,38)

So much simpler. And I'm done.




haptic interaction with 2 microns precision and 40 newtons of force

Thursday, March 06, 2008

git ssh

It looks like it should be easy to use git with ssh, in fact it appears to be the default. That's cool.

It also looks like it should be fairly easy to use Capistrano with a remote git store. That's essential because I use Capistrano to do all my Ruby on Rails deployment.

capistrano with git

git and svn

how to use git and svn together.

I don't know, I think I should just move right over to git, but it might be smart to go halfway first, and use gitsvn to do them together.

moving to git

I've decided that sometime in the next few months, I'm going to move completely over to git instead of subversion, and that means that I'll be deploying all my Ruby on Rails projects with git. Here are some resources I've found:

screencast of using git with rails
git-rails - Using git with Ruby on Rails
giston - A piston lookalike for git (I use piston for installing all my Ruby on Rails plugins, piston is really awesome)
using git for Rails development - More about how they are moving the development of the Rails engine to git, but still might be useful.
git-rails at Rubyforge.

1000 true fans

Kevin Kelly (former editor of Wired magazine) has a great article about how artists just need 1000 true fans to make a living.


wicd - an open source wired and wireless network manager for Linux which aims to provide a simple interface to connect to networks with a wide variety of settings.

Tuesday, March 04, 2008


agave is an intuitive colour palette manager for linux.


s3fs - Fuse over Amazon S3. Nice.

earth and moon from mars



Design is in the details - From A List Apart.

mars avalanche

blue brain

The Blue Brain project is working on a simulation of neurons in the brain.


One of my podcast feeds, got me the DVNO video, highly recommended electro-house.

Monday, March 03, 2008


msramdmp - is a little bootable syslinux USB stick that manages to boot itself without overwriting the contents of RAM, which as was discovered recently by some Princeton researchers, can hold it's contents for some time after a computer is powered down.

I guess we now need a /etc/rc.d/init.d script that will overwrite the contents of your RAM before you shutdown your computer.

s3 faq


zblog - web log engine in zsh. crazy!

Twining motion of vines

Sunday, March 02, 2008

silent rm in zsh

Sometimes, very rarely, I want zsh to do an "rm *" without asking me for confirmation, you can do this by:

setopt rmstarsilent

Saturday, March 01, 2008


Mocks Aren't Stubs - About mocking and stubbing as it relates to Test Driven Development (TDD).

svalbard northern light research lab

'Northern lights lab' switched on - Aurora observatory opens on remote Arctic island.

game controls as art


How to tell attachment_fu to store it's files where you want it to. I use attachment_fu for all my file uploads in Rails, it rocks.

ruby try sugar

try is a little snippet for Ruby that extends the Object class so that instead of having to do:

@person ? : nil

you can instead just do:


Just add the following to your Object class:

class Object
# @person ? : nil
# vs
# @person.try(:name)
def try(method)
send method if respond_to? method