Hell Kitty

August 29th, 2008

cruisecontrol.rb, seed data, and FKs

November 8th, 2007

Custom cruisecontrol.rb task to handle migrations with seed data. (for when standard cruise build task yields FK constraint violations when the fixtures start loading).

#This builds from migrations each time (slower, but more reliable).  
#Must then empty seed data before tests start to delete stuff, or FK constraints get violated.  

task :cruise do
  ENV['RAILS_ENV'] = 'test'
  puts "custom cruise task invoked.  env is hardcoded to test"

  Rake::Task["environment"].invoke
  #start from scratch with just the test db
  Rake::Task["db:test:purge"].invoke
  #necessary to reconnect, as purge drops database (and w mysql the conn)
  CruiseControl::reconnect

  #run all migrations from scratch.  slow but clean
  Rake::Task["db:migrate"].invoke

  #empty the db of data - migration has loaded seed data into the tables, 
  #which'll be deleted badly by test fixtures loader.

  #NOTE: db:test:purgetwo is just a quick hack to force this identical action to be called again
  #TODO: replace with the correct way to force execution of a task in rake
  Rake::Task["db:test:purgetwo"].invoke
  #necessary to reconnect, as purge drops database (and w mysql the conn)
  CruiseControl::reconnect

  #the migration has already done a schema dump
  Rake::Task["db:schema:load"].invoke

  success = Rake::Task["test"].invoke
  success
end

Embarrassingly, this currently needs ‘db:test:purgetwo’ to exist. I just copied pasted db:test:purge task. The correct way would be to look at how to ensure task execution in rake, but debugging cruisecontrol.rb exhausted all my patience and sanity.

See also What ‘rake test’ does.

What “rake test” does - diagram

November 8th, 2007

A quick diagram to remind me what the default rails rake task “test” does. rake test task tree

This is in part-response to this cruisecontrol.rb thread.

London’s best charity shops

October 6th, 2007

Timeout magazine lists London’s best charity shops, by area:

Central | North | South | East | West

Stevie Wonder on the talk box, ++

October 6th, 2007

“Close to you” on The David Frost show, ‘72.

“Papa was a rollin’ stone” live, ‘73

Also:

“Superstition” on Sesame Street, ‘73.

Cuban Salsa in London

September 25th, 2007

The cuban style is not so popular in london; most people here dance international “cross body” styles.

Here are the best places I know about for cuban style salsa in (central) London:

Monday:

Wednesday:

  • Cuban Connection at 4 Wild Court near Holborn tube, on a Wednesday night. (Lessons: always some rueda, as well as rotating lessons on rumba, son, reggaeton, styling, etc. Recent teachers: Ariel, Rafael, Janet, and Osbanis). Club has recently had a great turnout.
Thursday: Friday:
  • Tito’s latin bar at london bridge on a Friday (Rueda-based lessons from 7pm, then club, which also plays some merengue, bachata after 10:30pm). [more info]
Saturday:
nothing I know of :(
Sunday:
  • Lessons at The Place studio (again with Salsa Caribe), Sunday 2pm
  • Rueda in the Park. My favourite, and not just because it’s free! Partner dancing as well as rueda. Hyde Park at 3:33pm (though some days it doesn’t get going until 5pm). [more info]
  • Bar Salsa on a Sunday night club @10pm. It is 70% cross-body dancers, but some regular good cuban dancers show up) [more info]

Sites with more information:

Abstract polaroid photo gallery

August 31st, 2007

Black Yellow
Originally uploaded by Grant Hamilton

gallery on flickr and at sxseventy.com.
Via information aesthetics

ruby game libraries

August 13th, 2007

Two more ruby game libraries to look at: gosu and Shattered Ruby

via Chad Fowler’s notes on the recent Ruby Hoedown event.

I hope the audio for the talk appears here.

I had set up rubygame and Ruby/SDL a while back to a point where I could code simple examples, but I wouldn’t actually want to foist the stack setup on anyone else. (In fact, for portability, something like jmonkeyengine on java, running jruby for scripting makes more sense (at least where download sizes don’t matter)).

Cuban Salsa

July 10th, 2007

I’m learning salsa, specifically cuban salsa. To this I am addicted. I’m past beginner now, and have just enough of the basics to carry me through a dance with a forgiving, preferably amnesic girl. To make any real progress beyond the basics, I know I have to go out and make a fool of myself over and over in the clubs. Here, above, is a video which demonstrates some of what I like about this style (besides the way the girls dance!) and where, I suppose, I want to get to. This guy doesn’t do any fancy moves; it’s all just style, just play. I think it also invalidates any argument along the lines of “Ah, I’m not cuban so I’ll never be able to dance like that…”.

6 billion others

July 10th, 2007

beautiful “6 billion others” portraits project.
“A future online repository of thousands of video & audio testimonies as a portrait of contemporary mankind”.

Check out “portraits” and “testimonials”.

Via information aesthetics.

Clean City: São Paulo goes advertising-free

April 20th, 2007

See this BoingBoing post linking to this two-page article and a São Paulo No Logo flickr set.

Here’s more on the “clean city” laws, exceptions, and fines (in portuguese).

While the desolate-looking photos in the flickr set are interesting, I wonder if the empty billboard frames have been cleared down, or replaced with some art, or murals, information, etc.

Sitting waiting on the tube, how cool would it be to get to stare across at prints of fine art, good photos, a well done mural or “graffiti”, some classic poems, a big map of the local area for each station / some history of the area, a “what’s on” for the month, or just an occasional refreshingly bare wall. Anything but those insipid oppressive posters we daily try to avoid looking at.

I think I posted this “light criticism” project a while back from the Anti-Advertising Agency, about “New York’s True Graffiti Problem”.

See also: Reverse Graffiti artist decorates dirty tunnel walls.

web sites for good

April 20th, 2007

“… the Web 2.0 generation, with its YouTube and Twitter mania, has gotten a particularly bad rap for self-obsession and indulgence.”

Article: “Responsibility is in their sites. / Web entrepreneurs have an eye on social need” - San Francisco Chronicle. A step in the right direction, at least.

The article mentions Jarkko Laine’s DoTheRightThing.com.

Complex Stereo Sound Generator for Sound Effects and Music Synthesis

April 4th, 2007

MAKE point at GetLoFi’s post on Complex Stereo Sound generator kits (~35 euros, shipped).

People Pixels: Pole Position

April 3rd, 2007

Pole Position, stop-mo animation filmed with humans for pixels. Great sfx.

via information aesthetics.

Caboose: Rails Sample App

April 3rd, 2007

This Rails sample app from Caboose is “intended to be an example of “better practices”, but with the intention of ultimately being “best practice” through collaboration and iterative improvement.”

“The application implements:

  • a user model with a few extra fields (last login, timezones)
  • restful authentication.
  • full timezone support
  • basic views implemented with Yahoo! YUI CSS grids.
  • behavioral testing with rspec, including good example of mocking in controller specs.
  • exception notification”

OSS translation into South Africa’s languages

March 30th, 2007

http://translate.org.za/ is “a non-profit organisation focused on the localisation, or translation, of Open Source software into South Africa’s 11 official languages.” Via “Software in your language”, O’Reilly Radar post.

Ruby subversion pre-commit hook to prevent conflicting Rails migrations

March 29th, 2007

I was just about to roll my own and thought I’d better look on the internets: This svn pre-commit hook will stop you committing the migration

042_add_versioning_for_user_details.rb

when someone else already checked in a migration with the same number

042_do_something_else.rb

It looks well thought out but I haven’t tested it yet. It’s only looking up the existing migrations if it sees you’re checking in a migration, so this hook shouldn’t slow down other check-ins much.

Video: Concurrency and Erlang

March 21st, 2007

Concurrency and Erlang: video of a great introductory presentation by Andre Pang given at linux.conf.au in January 2007. ~40mins. His slides are here and he lists many other resources on this page dedicated to the talk. Not to be confused with Erlang: The Movie, which is awesome in its own way.

Andre’s video is also cataloged at BestTechVideos.com, which seems to be a good place to find most of the free rails screencasts aggregated, if you’re having trouble keeping up…

mp3s from future of web apps, london 2007

March 20th, 2007

the mp3s from future of web apps talks (the London version) are up. I think the best version of the OpenID talk is actually here.

One attendee’s highlight announcements.

I’m referred to the following talks, initially: Simon Willison, CTO Amazon, Phil Wilkinson, Soocial, Kevin Rose, Netvibes.

speechless: interactive speech synthesis toy

March 20th, 2007

speechless, by Alex McLean.

“The idea is to use festival speech synth to turn what people type into rhythms, giving them a simple multi-user interface for playing words together.” More here, or at wednesday’s Dorkbot London.