Mary Rose Cook

196

Saw Oxes live at The Luminaire in London on Tuesday. They were pretty fucking great:

</embed>
 

163

Made up a Friday joke:

What is The RZA’s favourite programming language?

Wuby.

 

Kisses: the codename for my new app, and fun little functions

Get the indefinite article for a noun:


Convert a number like 28,947,345 to a vaguer, but more digestible, statement like 29 million:

 

Rewired State

Last Saturday, I went to Rewired State, a hackday where people made useful apps that use government data. The Guardian hosted us and gave us delicious free food. We got some free beer in the evening, too.

I did an app called Voxpomp that lets you search statements made by MPs in Parliament and then cross-reference the results with the news stories of the time.

It was a great day - lots of nice people and interesting conversations. I would love to see a Dewired State that was about using technology to let people build their own data sources and communities away from the government.

You can see all the hacks on the Rewired State project page. My favourites were:

  • One Click Organisations. Answer a few questions and the legal framework for your organisation will be drawn up. You can also use the app to maintain your members list and propose and vote on motions. I kind of wish the app could work outside of the assumption of a voting democracy, but it is only in its early stages.

  • Section 44. A place to document instances where people were stopped and searched under Section 44 of the Terrorism Act.

 

Git

I’ve been using Git for a while. I like it. However, it’s kind of like watching Angel Heart: you get to the end and you go, “Wow.” But, then, you start to recurse from the denouement and fully expand the solutions you came up with as you watched the film. Then, it becomes more like, “Whoa, that’s means that…”, “Oh, no! But he…”, “Holy shitting fuck he had sex with…”

Explaining Git to someone produces even more of a contrast between first and subsequent reactions. The person you’re explaining it to starts out like one of those people looking at a Magic Eye: “Mmmm, yeah, that’s really weird.” And then they get it and they leap backwards shouting, “It’s a fucking 3D pink dolphin.”

 

My first open source app: Playmary

Grab a copy from the Github repository. There are full set up instructions in the README.

First, I cleaned up the app folder. I put references to all my personal scripts, documentation files, deploy.rb and database.yml into .gitignore. I put database.yml in the shared folder on the server, then added a task to my Capistrano deploy.rb so it would create a symlink from shared/config/database.yml to current/config

Second, I cleaned all the secret and Playmary.com-specific stuff out of the code: Amazon AWS login details, the link to the default audiography, contact information. I put it all into shared/config/config.yml and then wrote a method that returns the data referenced by the passed key.

Finally, I had to get rid of all this secret stuff from the project’s git history. After wrestling with rebase for quite a while, I gave in. I deleted the .git folder in my local copy of the code, changed the name of the Github repository to playmary-old, created a new repository on Github called playmary and pushed my local copy of the code into it.

 

Commando

When I was at University, I started writing a game called Commando. I used the SDL graphics library with C++ and developed on Windows.

I followed a tutorial that taught the basics of movement and input. I drew some horrendous graphics of some flat buildings and a stick man holding a gun.

I got the basic stuff working so that the protagonist could move, jump, shoot and lob grenades. I added a shooting star that periodically appeared in the night sky, stars that came out, distant backgrounds that scrolled by more slowly than the buildings in the foreground. I added fountains, grenade explosions and ricochets, all based on particle effects. I added gravity.

However, the protagonist was alone. He had no one to share these beautiful things with, or kill. My development stalled, but I’m not sure why.

I’m better at finishing things these days: playmary.com, theperceptron.com and my band’s records are all complete and consumable.

However, writing games is different to making websites and writing songs. With the things I finish, the dependencies are minimal and the units self-contained. Web pages may call on central functionality, but they can be written in relative isolation. My songs have different, minimally related sections and often change key and time-signature.

Games have a few central areas of activity - the input manager, the renderer, the object update loop - that are fed by hundreds of integrated parts. They are more like people.

 

Why do Capistrano deploys of git code take so long?

  1. I am a bumbrain.
  2. I am using git. Thus, the whole repository, including all previous revisions, is kept in a folder called .git which lives inside my local code copy. A Capistrano deploy involves uploading a tarred copy of the project via ssh to the server. This is slow.

I plan to dump Capistrano and change my deployment process to: log into server, git pull from Github (only a diff, so super quick), restart mongrels.