<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description></description><title>Philip Roberts</title><generator>Tumblr (3.0; @latentflip)</generator><link>http://blog.latentflip.com/</link><item><title>Fresh, free music with Sonic Router</title><description>&lt;p&gt;I recently came across &lt;a href="http://www.sonicrouter.com/category/sonic-router-mixes/"&gt;Sonic Router&lt;/a&gt; which have a nice collection of dubstep/electronic/hip-hop mixes from various artists. One of my favourites so far is by &lt;a href="http://official.fm/tracks/236466"&gt;Lapalux&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Bored of opening the Sonic Router homepage, finding the list of mixes, choosing a random one, hitting play, I knocked up a &lt;a href="https://gist.github.com/2584960"&gt;little Ruby script&lt;/a&gt; that opens a random one in your browser. And if you have dotjs installed there&amp;#8217;s a little snippet that will autoplay too.&lt;/p&gt;

&lt;!-- more --&gt;

&lt;div class="gist" data-gist="2584960"&gt;&lt;/div&gt;</description><link>http://blog.latentflip.com/post/22315558856</link><guid>http://blog.latentflip.com/post/22315558856</guid><pubDate>Thu, 03 May 2012 12:10:00 +0100</pubDate><category>music</category><category>code</category></item><item><title>The making of Shakey: a Realtime, Massively Multiplayer, Shakespearean parlour game</title><description>&lt;p&gt;At Culture Hack Scotland (#chscot) last weekend, we won &lt;em&gt;most playful&lt;/em&gt; and &lt;em&gt;the grand prize&lt;/em&gt; for a real-time game we made using Rails, JavaScript and Pusher. For a bit of background &lt;a href="http://blog.latentflip.com/post/22047287999/chscot2012"&gt;read this post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I thought it might be interesting to break down the technical details of how it was developed and worked. Bear in mind that apart from a tiny bit of prep work, all the code in this project was coded in 16 hours - so the architecture/code will not be optimal.&lt;/p&gt;

&lt;p&gt;Credit where it&amp;#8217;s due, the code and architecture I am talking about here was created by &lt;a href="http://twitter.com/philip_roberts"&gt;myself&lt;/a&gt;, &lt;a href="http://twitter.com/roryf"&gt;Rory Fitzpatrick&lt;/a&gt; and &lt;a href="http://twitter.com/froots101"&gt;Jim Newbery&lt;/a&gt;, with a little help from &lt;a href="http://twitter.com/leggetter"&gt;Phil Leggetter of Pusher&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;The Premise&lt;/h2&gt;

&lt;p&gt;The idea of the game was thus:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;On a big projector screen would be an image of a theatre stage complete with actors and audience.&lt;/li&gt;
&lt;li&gt;Players register by visiting a url on their phones.&lt;/li&gt;
&lt;li&gt;Players are assigned to be in the cast, or in the audience, and appear on the big screen using their twitter avatars.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The game starts&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;The actors then recite a short piece of Macbeth, reading the lines from their phones as they are prompted to do so.&lt;/li&gt;
&lt;li&gt;The audience have the option to throw tomatoes/flowers depending on how well they think the cast members are doing.&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;Getting Started [Midnight friday]&lt;/h2&gt;

&lt;p&gt;Since we wanted a game that worked in real-time, with multiple devices communicating with each other, we quickly settled on using WebSockets, which allows JavaScript on the browsers of two devices to talk to each other. We quickly settled on using &lt;a href="http://pusher.com/"&gt;Pusher&lt;/a&gt; which is a hosted solution for implementing websockets easily. We were pretty pleased with that decision as it was easy to use - the only drawback being no fallback support for the default Android browser (unless Flash lite is installed).&lt;/p&gt;

&lt;!-- more --&gt;

&lt;p&gt;The rest of the app (serving assets etc) was served from a rails app running on heroku. Here&amp;#8217;s a very rough diagram detailing the architecture.&lt;/p&gt;

&lt;p&gt;&lt;img src="https://img.skitch.com/20120501-ghbcrnnwdt9x7tk84ck4snj9p9.jpg" alt="Shakey Architecture"/&gt;&lt;a href="https://img.skitch.com/20120501-ghbcrnnwdt9x7tk84ck4snj9p9.jpg"&gt;see bigger&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ll explain what&amp;#8217;s going on a bit better below.&lt;/p&gt;

&lt;h2&gt;Getting up and running with Pusher [1am Saturday]&lt;/h2&gt;

&lt;p&gt;I quickly spiked out some JavaScript code to demonstrate two browsers talking to each other with pusher.&lt;/p&gt;

&lt;p&gt;Pusher is essentially a PubSub implementation on top of WebSockets. Pusher&amp;#8217;s normal operating mode is that you would have your server sitting on the internet somewhere &lt;em&gt;Publishing&lt;/em&gt; messages to a channel, and browsers (the clients) &lt;em&gt;Subscribe&lt;/em&gt; to those messages.&lt;/p&gt;

&lt;p&gt;In Shakey however, we wanted the game server to be running in a browser (the left hand side of the image above), so as far as Pusher is concerned, even our game-server is a client. (Yup, it is confusing, try figuring this out at 2am, after cocktails!)&lt;/p&gt;

&lt;p&gt;This requires setting up pusher to enable client to client messages. The process for this is:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;When setting up your pusher channel, make it a &lt;a href="http://pusher.com/docs/client_api_guide/client_presence_channels"&gt;&amp;#8220;presence&amp;#8221; or &amp;#8220;private&amp;#8221; channel&lt;/a&gt;. A presence channel allows for client-client messages, and is suitable for games where you need to know &amp;#8220;who&amp;#8221; is speaking/listening.&lt;/li&gt;
&lt;li&gt;Presence channels require your users to be authenticated (you don&amp;#8217;t want any old Joe Bloggs sending messages to your other users. To do this Pusher hits an endpoint in your app (/pusher/auth), where you must check the logged in user, and tell Pusher about them (using the Pusher gem makes this easy, more info &lt;a href="http://pusher.com/docs/authenticating_users"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Once you have setup your presence channel and authentication, you can now talk to each other, as an example:&lt;/p&gt;

&lt;div class="gist" data-gist="2571207"&gt;&lt;/div&gt;

&lt;p&gt;Open game_server.html in one browser, and game_client.html on another, and an alert will appear on the server&amp;#8217;s window with the message &amp;#8220;Hello, world!&amp;#8221;.&lt;/p&gt;

&lt;h2&gt;Baby Steps&lt;/h2&gt;

&lt;p&gt;Now that we had very basic communication between a server and a client working, we could comfortably split into two teams. To keep ourselves straight, we wrote down all the messages we would need to run the game, they were.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sent from the clients&lt;/strong&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// register a new user
"player:register", "&amp;lt;username&amp;gt;" 

// audience member wants to throw flowers
"player:hurl", "&amp;lt;username&amp;gt;", "flowers" 

// a cast member has finished reading their lines
"player:exuent" 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Sent from the game-server&lt;/strong&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// starts the game
"scene:start" 

// announces which role the user is going to play
"player:assignRole", "&amp;lt;username&amp;gt;", "audience/cast" 

// player should start reading lines
"player:deliver", "&amp;lt;username&amp;gt;", {lines: '---'} 

// ends the game
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The beauty of having a nicely event-driven architecture like this was that Rory and I could develop the game-server, completely oblivious of what Jim was doing with the messages, and vice-versa.&lt;/p&gt;

&lt;p&gt;Indeed, Jim wrote his game-clients in JavaScript, and we wrote the game-server in CoffeeScript and it didn&amp;#8217;t matter a bit.&lt;/p&gt;

&lt;h2&gt;Building out the server&lt;/h2&gt;

&lt;p&gt;Now that we had the messaging setup, and the protocol designed, Rory and I focused on building out the game-server. It&amp;#8217;s responsibilities (roughly in order) were:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Grab the current scene we were going to act out, along with the characters in it.&lt;/li&gt;
&lt;li&gt;Listen for &amp;#8220;player:register&amp;#8221; events, and when one was heard, assign the new player to be in the audience or cast, and announce it to them by triggering a &amp;#8220;player:assignRole&amp;#8221; event&amp;#8221;.&lt;/li&gt;
&lt;li&gt;Wait for someone to click the &amp;#8220;start&amp;#8221; button, and when it was pressed, trigger a &amp;#8220;scene:start&amp;#8221; event to everyone, followed by a &amp;#8220;player:deliver&amp;#8221; event to the first cast member, who needed to speak, with their lines.&lt;/li&gt;
&lt;li&gt;While someone was speaking, listen for &amp;#8220;player:hurl&amp;#8221; events, and trigger the appropriate fart-noise and animation on the screen to indicate something had been thrown at the current speaker.&lt;/li&gt;
&lt;li&gt;Wait for &amp;#8220;player:exuent&amp;#8221; events, and when one was heard, send a &amp;#8220;player:deliver&amp;#8221; event to the next speaker.&lt;/li&gt;
&lt;li&gt;And so on.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;We built the server using &lt;a href="http://documentcloud.github.com/backbone/"&gt;Backbone.js&lt;/a&gt;, as it makes breaking up the code into Models (for us Player and Game), Collections (of Players) and Views (the animated Player avatars on the screen) easy.&lt;/p&gt;

&lt;p&gt;The event driven architecture was really useful again on the game-server. We wanted to add a &amp;#8220;news-feed&amp;#8221; down the side of the display, with things like &amp;#8220;@philip_roberts threw a tomato&amp;#8221;. This was in the end trivial, as we just had another little bit of JavaScript, completely independent from the rest of the game, listening for &amp;#8220;player:hurl&amp;#8221; events only, and updating a list when it did so.&lt;/p&gt;

&lt;h2&gt;Building out the clients&lt;/h2&gt;

&lt;p&gt;We left Jim to build out the game-clients that would be running on people&amp;#8217;s phones. It&amp;#8217;s role was pretty much the inverse of the server:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Register a user by sending &amp;#8220;player:register&amp;#8221; events&lt;/li&gt;
&lt;li&gt;Wait to find out which (&amp;#8220;player:assignRole&amp;#8221;) role it had been assigned&lt;/li&gt;
&lt;li&gt;If it was a cast member, wait till it received &amp;#8220;player:deliver&amp;#8221; events and display the lines to the player, and wait for the player to press &amp;#8220;done&amp;#8221;, thus triggering &amp;#8220;player:exuent&amp;#8221;&lt;/li&gt;
&lt;li&gt;If it was an audience member, display &amp;#8220;throw flowers&amp;#8221;, &amp;#8220;throw a tomato&amp;#8221; buttons, and trigger &amp;#8220;player:hurl&amp;#8221; events when clicked.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;The game-clients were also built in Backbone.&lt;/p&gt;

&lt;h2&gt;Done [4pm Saturday]&lt;/h2&gt;

&lt;p&gt;Apart from some awesome visual polish, that was pretty much it. I&amp;#8217;ve neglected to show much real code here, as it&amp;#8217;s pretty hideous, but you can &lt;a href="https://github.com/froots/scottish-play/tree/master/app/assets/javascripts"&gt;dig into the repo&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Caveats, lessons learned&lt;/h2&gt;

&lt;p&gt;A few things tripped us up using Pusher that are good to know if you are doing something similar.&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;First, the presence channel and client setup isn&amp;#8217;t that hard, but takes a minute to get your head around.&lt;/li&gt;
&lt;li&gt;When using a presence channel, all clients receive all events. You can&amp;#8217;t just send an event directly to a single client. In our case that meant we always sent the &amp;#8220;username&amp;#8221; of the intended client along with the data, and the client on the other end filtered out messages that weren&amp;#8217;t intended for them. We could have set up separate channels for each player, but decided this was simpler to manage.&lt;/li&gt;
&lt;li&gt;The exception to the above is that the client that sends a pusher event, doesn&amp;#8217;t receive the event itself. We tried to listen to events published by the game-server (which is a client remember!) within a different part of the game-server, and it doesn&amp;#8217;t work. It&amp;#8217;s easy fixed by using non-pusher events, but confusing when you bump into it.&lt;/li&gt;
&lt;li&gt;Because Pusher is hosted in the cloud, all your development/testing/production servers will be using the same pusher account (unless you setup different pusher accounts (we didn&amp;#8217;t)). This gets pretty mind boggling when 3 people are testing code on three separate machines, but they are still all interacting. We could have fixed this by setting up different channel names on each machine, but we didn&amp;#8217;t figure that out at the time.&lt;/li&gt;
&lt;li&gt;3G providers really like to screw with your internet. Before the demos everyone was asked to not use WiFi on their phones - which was less than ideal as companies like O2 like to smush websocket traffic not sent over encrypted connections. Pusher will fallback to an encrypted connection if unsecured doesn&amp;#8217;t work, but to ensure that it worked first time, Phil Leggetter from Pusher suggested we force encrypted connections: First &lt;a href="http://blog.pusher.com/2010/11/5/end-to-end-encryption"&gt;encrypt the Pusher socket&lt;/a&gt; and then serve all the assets over ssl (easy done with heroku, just stick https in front of the urls).&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;And finally&lt;/h2&gt;

&lt;p&gt;If you have any questions about what we did, (or if you want the four of us to make you an ace multiplayer game!), just get in touch &lt;a href="https://twitter.com/philip_roberts"&gt;on twitter&lt;/a&gt;.&lt;/p&gt;</description><link>http://blog.latentflip.com/post/22215449880</link><guid>http://blog.latentflip.com/post/22215449880</guid><pubDate>Tue, 01 May 2012 22:35:00 +0100</pubDate><category>code</category><category>culturehack</category></item><item><title>Giving up on self-defeating self-talk</title><description>&lt;p&gt;The mind is a powerful thing.&lt;/p&gt;

&lt;p&gt;It can convince us that ghosts exist; that the position of the planets demonstrably affects our lives; that the answer to the &lt;a href="http://en.wikipedia.org/wiki/Monty_Hall_problem"&gt;Monty Hall problem&lt;/a&gt; is not &amp;#8220;choose the other door&amp;#8221;.&lt;/p&gt;

&lt;p&gt;It can convince us we hate foods that we later come to love; that the aged mouldy excretions of a cow&amp;#8217;s mammary glands are in fact a delicacy.&lt;/p&gt;

&lt;p&gt;It can convince us that innocuous eight legged beasts 1/60,000 of our own weight are terrifying; whilst striped, fierce, clawed, fanged creatures 5 times our weight are cute.&lt;/p&gt;

&lt;p&gt;It can convince us that other human beings don&amp;#8217;t deserve to live because of the colour of their skin, or the country they were born in.&lt;/p&gt;

&lt;p&gt;It can convince us to &lt;em&gt;end our own lives&lt;/em&gt;.&lt;/p&gt;

&lt;hr&gt;&lt;p&gt;Might it not be then, that this mind of ours, while powerful, is often pretty stupid.&lt;/p&gt;

&lt;p&gt;That perhaps sometimes we should question the validity of what it tells us, or ignore it completely.&lt;/p&gt;

&lt;p&gt;That when it says &amp;#8220;you suck&amp;#8221;, or &amp;#8220;you are stupid&amp;#8221;, or &amp;#8220;you are not worthy&amp;#8221;, that perhaps it is &lt;em&gt;wrong&lt;/em&gt;. That perhaps we should not give into, or even &lt;em&gt;enjoy&lt;/em&gt; this feeling, and fight it instead. Banish it along with all the other myths, and fallacies, and fantasies, and biases that a mind crafted over 3.8 billion years comes up with when it is placed in a modern world free of &lt;em&gt;genuine&lt;/em&gt; threat and scarcity.&lt;/p&gt;

&lt;p&gt;Perhaps.&lt;/p&gt;</description><link>http://blog.latentflip.com/post/22185478819</link><guid>http://blog.latentflip.com/post/22185478819</guid><pubDate>Tue, 01 May 2012 10:56:00 +0100</pubDate><category>brains</category><category>biases</category><category>fallacies</category><category>metathought</category></item><item><title>Posing with our champagne after winning Culture Hack Scotland...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_m3awniviFI1qzmkoso1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Posing with our champagne after winning Culture Hack Scotland 2012 with @roryf, @praymurray, @froots101, @druichmckay and @suchprettyeyes.&lt;/p&gt;</description><link>http://blog.latentflip.com/post/22127843047</link><guid>http://blog.latentflip.com/post/22127843047</guid><pubDate>Mon, 30 Apr 2012 17:33:18 +0100</pubDate></item><item><title>A Shakey Victory: Culture Hack Scotland 2012</title><description>&lt;p&gt;Having just returned home from Culture Hack Scotland 2012, I can safely say that it is one of my favourite tech events of the year. Since anyone who wasn&amp;#8217;t there will have seen all my tweets without knowing what I was up to, I thought I should give a run down of what I&amp;#8217;ve been up to for the last 24 hours.&lt;/p&gt;

&lt;h3&gt;Culture Hack what?&lt;/h3&gt;

&lt;p&gt;Culture Hack is a 24 hour long hackathon. This year it was held at SocietyM in Glasgow - a beautiful coworking space under the equally cool CitizenM hotel.&lt;/p&gt;

&lt;p&gt;The basic premise is thus: lots of cultural organisations (festivals, museums, libraries, universities) generate a crap load of interesting data that they don&amp;#8217;t do anything with or share. Meanwhile there are lots of developers and designers who would love to build useful/interesting/cool things using this data, but they don&amp;#8217;t get the chance. Culture Hack is an event that encourages these organisations to share their data, and see what cool stuff developers and designers can do with it in under 24 hours.&lt;/p&gt;

&lt;p&gt;This years data included things like:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;full event listings from numerous festivals in Scotland (Glasgow International, the Edinburgh Festivals, Arika)&lt;/li&gt;
&lt;li&gt;electricity, water, gas usage data for some of Edinburgh Universities buildings recorded every half hour for the last year&lt;/li&gt;
&lt;li&gt;data and images of the National and Glasgow museums&lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;Our hack: Shakey, a Massively Multiplayer, RealTime, Macbeth Parlour game&lt;/h3&gt;

&lt;p&gt;This year I teamed up with the hugely talented &lt;a href="http://twitter.com/#!/froots101"&gt;Jim Newbery (@froots101)&lt;/a&gt;, &lt;a href="http://twitter.com/#!/roryf"&gt;Rory Fitzpatrick (@roryf)&lt;/a&gt; and &lt;a href="http://twitter.com/#!/praymurray"&gt;Padmini Murray (@praymurray)&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Jim, Rory and I had met up in the pub the night before, and discussed using one of the datasets: a fully digitised, annotated and computer friendly copy of Macbeth, to create a massively multiplayer, realtime parlour game. We met Padmini on the night who came on board as producer, Shakespeare expert and all-round great gal.&lt;/p&gt;

&lt;p&gt;The idea of our game was to merge Shakespeare&amp;#8217;s Macbeth, with modern technology (computers, projectors, mobile phones and realtime tech). Here&amp;#8217;s a photo of the game in action during our live demo:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://farm8.staticflickr.com/7062/7123158567_95ff376ef4_c.jpg" alt="Shakey Live"/&gt;&lt;/p&gt;

&lt;p&gt;It works something like this:&lt;/p&gt;

&lt;!-- more --&gt;

&lt;ul&gt;&lt;li&gt;On the big screen there is a picture of an empty theatre stage&lt;/li&gt;
&lt;li&gt;Everyone in the room can join the game by visiting a link on their smartphones/computers, and entering their twitter handles&lt;/li&gt;
&lt;li&gt;The game puts most people into the audience, and a few people are selected to be in the cast. Everyone&amp;#8217;s twitter avatar&amp;#8217;s appear in the proper place on the screen&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The game begins&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;The cast are now prompted when it&amp;#8217;s their turn to recite lines from Macbeth, with the lines appearing on the screen.&lt;/li&gt;
&lt;li&gt;Meanwhile everyone in the audience has the option to &amp;#8220;throw a tomato&amp;#8221; or &amp;#8220;throw flowers&amp;#8221; which are animated on the screen behind the cast with appropriate fart/splat noises (of course)&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Here&amp;#8217;s a clearer screenshot of the projected image halfway through another game, along with what an audience member sees on their phone:&lt;/p&gt;

&lt;p&gt;&lt;img src="https://img.skitch.com/20120429-ckukqquy99r7jhh179t7gqdchg.jpg" alt="Shakey App Screenshot"/&gt;&lt;/p&gt;

&lt;p&gt;Note in particular:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;The awesome stage design, by &lt;a href="https://twitter.com/#!/duichmckay"&gt;Duich McKay&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The wicked Macbeth, Lennox, Porter and Macduff characters by &lt;a href="http://twitter.com/#!/suchprettyeyes"&gt;NIcola Osborne&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The tomato/flower splats on Macduff as animated and sonified by &lt;a href="http://twitter.com/#!/roryf"&gt;Rory&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Terrible grammar&lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;The Tech&lt;/h3&gt;

&lt;ul&gt;&lt;li&gt;Jim wrote a little Ruby on Rails app that imported the Macbeth script and characters into a database&lt;/li&gt;
&lt;li&gt;Pretty much everything else was written in JavaScript/HTML/CSS. The computer hooked up to the projector acted as the game server: animating the screen, keeping score, sending lines to phones, and listening for hurled tomatoes/flowers.&lt;/li&gt;
&lt;li&gt;Communication between all the phones and the game server was done over websockets using &lt;a href="http://pusher.com/"&gt;Pusher&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Building something so real-time was fairly new to us all, and mind-meltingly confusing, but I think we were all pretty chuffed with what we achieved in such a short space of time. Once I&amp;#8217;ve recovered I&amp;#8217;ll try and write the tech stuff up in a little more detail&lt;/p&gt;

&lt;h3&gt;The demo&lt;/h3&gt;

&lt;p&gt;At the end of the day, everyone demos their hacks, and prizes are awarded. Our demo went pretty well, until 100 people in the room tried to throw tomatoes - promptly crashing Google Chrome on my computer. Apparently 1400 tomatoes/minute were being thrown!&lt;/p&gt;

&lt;p&gt;Our hack was awarded most playful &lt;em&gt;and&lt;/em&gt; the overall grand prize winner. Not bad for 24 hours work! Look out for a video of our demo soon - I can&amp;#8217;t wait to see it myself.&lt;/p&gt;

&lt;p&gt;&lt;img src="https://img.skitch.com/20120429-8qt7edhfhycjxuenpd2q2stxau.jpg" alt="Porter"/&gt;&lt;/p&gt;</description><link>http://blog.latentflip.com/post/22047287999</link><guid>http://blog.latentflip.com/post/22047287999</guid><pubDate>Sun, 29 Apr 2012 15:04:00 +0100</pubDate><category>culturehack</category><category>code</category><category>events</category></item><item><title>Founder depression, and a meetup proposal.</title><description>&lt;p&gt;As both a &lt;a href="http://blog.latentflip.com/post/19403885675/generalists-founders-imposters"&gt;capital-F founder&lt;/a&gt; and developer, the last 12 months have been tough. I have personally been stuck in some pretty deep lows, and of the assumption that I was the only one struggling with a lot of questions about who I am, what I am doing, and whether I&amp;#8217;m good enough to do it.&lt;/p&gt;

&lt;p&gt;The last couple of months have been a lot better, triggered by a few things:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Going to the doctor:&lt;/strong&gt; who said lots of nice things like &amp;#8220;what you are doing sounds really hard&amp;#8221;, &amp;#8220;the most common thing I see in this room is depression&amp;#8221;, &amp;#8220;yes it looks like you have mild depression&amp;#8221;, &amp;#8220;here&amp;#8217;s some practical things you can do that aren&amp;#8217;t drugs&amp;#8221;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Speaking to an (off-duty) counsellor:&lt;/strong&gt; possibly the most &amp;#8220;productive&amp;#8221; hour I have spent in a long time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Writing that &lt;a href="http://blog.latentflip.com/post/19403885675/generalists-founders-imposters"&gt;blog post&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;But the most powerful thing has been opening up to a number of different founders and developers about what I&amp;#8217;ve been going through, and them replying with &amp;#8220;&lt;strong&gt;wait, I say those things all the time too - I thought I was the only one&lt;/strong&gt;&amp;#8221;. The following relief of finding someone else going through the same stuff has been palpable for both of us.&lt;/p&gt;

&lt;hr&gt;&lt;h3&gt;A proposal&lt;/h3&gt;

&lt;p&gt;As a result of this, I am thinking of starting a meetup/support-group in Edinburgh to help founders, developers, and anyone building products share some of their &lt;em&gt;personal&lt;/em&gt; experiences with this stuff and learn from each other.&lt;/p&gt;

&lt;p&gt;I haven&amp;#8217;t got it all figured out yet - so I&amp;#8217;m looking for feedback, but here&amp;#8217;s some rough thoughts:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Non-technical/business&lt;/strong&gt;: we have plenty of technical meetups, this is a place to reflect on our &lt;em&gt;selves&lt;/em&gt; rather than code/biz. Clearly a lot of our emotions are affected by the work we are doing - but the focus is definitely on the personal stuff.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Open to anyone related to running businesses/building stuff&lt;/strong&gt; (not just founders)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Confidential:&lt;/strong&gt; at the meetup: share, otherwise: shush. :)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Supportive, not dismissive&lt;/strong&gt;: I think this goes without saying. None of this: &amp;#8220;oh, sure, that&amp;#8217;s easy, you can just fix yourself by … eating more! My problem is much more serious!&amp;#8221;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Small&lt;/strong&gt;: I&amp;#8217;m not sure how we would manage this if the group became a run away success, but I think at least initially it would be good to try and keep the groups small as sharing this stuff is hard enough as it is.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Format&lt;/strong&gt;: As a first meeting, I am thinking I would talk about some of the stuff I&amp;#8217;ve been going through, and see if we can use that to kick-start a bit of a group discussion and take it from there.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;When/where?:&lt;/strong&gt; I&amp;#8217;d like to have a first meeting soonish, but I haven&amp;#8217;t got a venue - so if anyone has any thoughts for somewhere that&amp;#8217;s free, I&amp;#8217;d love to hear them.&lt;/li&gt;
&lt;/ul&gt;&lt;hr&gt;&lt;p&gt;So what do you think? If you are at all intrigued, I&amp;#8217;d really appreciate it if you&amp;#8217;d fill in &lt;a href="https://docs.google.com/a/latentflip.com/spreadsheet/viewform?formkey=dFFoLTV4d3BTTzBLX3BWemxnVEZVeWc6MQ#gid=0"&gt;this quick form&lt;/a&gt; just so I can gauge interest (and collect feedback if you have any). Thanks!&lt;/p&gt;</description><link>http://blog.latentflip.com/post/21429531320</link><guid>http://blog.latentflip.com/post/21429531320</guid><pubDate>Fri, 20 Apr 2012 10:43:00 +0100</pubDate></item><item><title>We recently had a Rubik’s Cube themed party for everyone...</title><description>&lt;iframe width="400" height="300" src="http://www.youtube.com/embed/DnGWXlBpSpY?wmode=transparent&amp;autohide=1&amp;egm=0&amp;hd=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0&amp;showsearch=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;We recently had a Rubik’s Cube themed party for everyone who has been helping out at &lt;a href="http://techcube-ed.tumblr.com/"&gt;TechCube&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Since I was on playlist duty, I figured we needed some appropriate visuals and whipped up a little visualizer that responds to the music in Processing. Particularly cool was that since it was projected onto the ceiling it could be seen from the street below.&lt;/p&gt;

&lt;p&gt;Blog post coming soon.&lt;/p&gt;</description><link>http://blog.latentflip.com/post/20296375204</link><guid>http://blog.latentflip.com/post/20296375204</guid><pubDate>Sun, 01 Apr 2012 18:52:09 +0100</pubDate><category>code</category><category>processing</category></item><item><title>A Short Lesson in Perspective</title><description>&lt;a href="http://www.thesfegotist.com/editorial/2012/march/14/short-lesson-perspective"&gt;A Short Lesson in Perspective&lt;/a&gt;: &lt;blockquote&gt;
  &lt;p&gt;It is a universal truth that all artists [and developers!] think they a frauds and charlatans, and live in constant fear of being exposed. We believe by working harder than anyone else we can evaded detection. The bean-counters rumbled this centuries ago and have been profitably exploiting this weakness ever since. You don’t have to drive creative folk like most workers. They drive themselves. Just wind ‘em up and let ‘em go.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A profound piece on business and creativity. Read. (with thanks to &lt;a href="http://twitter.com/roanlavery"&gt;@roanlavery&lt;/a&gt;.&lt;/p&gt;</description><link>http://blog.latentflip.com/post/19745008689</link><guid>http://blog.latentflip.com/post/19745008689</guid><pubDate>Thu, 22 Mar 2012 20:41:09 +0000</pubDate></item><item><title>Generalists, Founders and the Impostor Syndrome</title><description>&lt;p&gt;As the technical co-founder of a web startup, it&amp;#8217;s easy to think of yourself as a software engineer first and a founder second. This is patently wrong and potentially dangerous for your mental health.&lt;/p&gt;

&lt;p&gt;To make my case, here is a list of job titles that I could quite easily give myself based on the work I have done &lt;em&gt;this week&lt;/em&gt;.&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Business analyst (considering the benefits and implications of switching payment provider)&lt;/li&gt;
&lt;li&gt;SysAdmin&lt;/li&gt;
&lt;li&gt;Data analyst (running analytics on some data to see if it can help us find a solution to &amp;#8220;the big problem&amp;#8221;)&lt;/li&gt;
&lt;li&gt;System architect (planning how our application should integrate with a new API)&lt;/li&gt;
&lt;li&gt;Rails developer (integrating our web application with the new API and a new payment provider)&lt;/li&gt;
&lt;li&gt;JavaScript developer (building our backbone.js based webapp)&lt;/li&gt;
&lt;li&gt;Front-end developer (building out the HTML and css for our webapp)&lt;/li&gt;
&lt;li&gt;UI/UX Developer (trying to improve our sign-up flow)&lt;/li&gt;
&lt;li&gt;Marketing (improving our pricing plan communications, blogging about our company&amp;#8217;s second birthday)&lt;/li&gt;
&lt;li&gt;Copywriter (both in-app microcopy, and marketing copy on our website)&lt;/li&gt;
&lt;li&gt;Design (designing/building a page to thank our Founder members: &lt;a href="http://floatapp.com/founder_plan"&gt;http://floatapp.com/founder_plan&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Customer support (interacting with users via email and phone calls)&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;I don&amp;#8217;t say all this to boast or complain, it&amp;#8217;s simply a fact. As the technical half of a two-person company, I have to cover a number of different roles.&lt;/p&gt;

&lt;p&gt;Truthfully, I love it. I have been, and always will be, a generalist. However, I also push myself to be the best at every individual thing that I do—no small feat given the list above—and this is where the &lt;a href="http://en.wikipedia.org/wiki/Impostor_syndrome"&gt;imposter syndrome&lt;/a&gt; kicks in. Instead of evaluating my performance holistically, I tend to compare myself against experts in each of the roles I perform.&lt;/p&gt;

&lt;p&gt;For example, with my JavaScript developer hat on, I think of myself as a JavaScript developer, not a founder. This means I start comparing myself to other JavaScript developers (like some of the &lt;a href="https://github.com/jashkenas"&gt;best&lt;/a&gt;, &lt;a href="https://github.com/derickbailey"&gt;in&lt;/a&gt;, &lt;a href="https://github.com/maccman"&gt;the&lt;/a&gt;, &lt;a href="https://github.com/froots"&gt;business&lt;/a&gt;. At that point I start to feel inadequate. The trouble is, I do this for all my hats: compare myself to the best in the business for each vertical. At that point I start to feel &lt;em&gt;really&lt;/em&gt; inadequate.&lt;/p&gt;

&lt;p&gt;Having spoken to two other co-founders with similar feelings this week, it&amp;#8217;s clear that this is a foolish mindset. A more appropriate perspective is:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;I am a capital-f Founder, not a JavaScript developer, or Rails developer, or designer or customer-support guy. I will still strive to be the best in the world at each of my hats, but if I don&amp;#8217;t quite make it that&amp;#8217;s okay—I&amp;#8217;ll just hire them one day instead.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This shift in thinking has a had a massive positive effect on my mental health—but I&amp;#8217;d love to hear what other founders think?&lt;/p&gt;</description><link>http://blog.latentflip.com/post/19403885675</link><guid>http://blog.latentflip.com/post/19403885675</guid><pubDate>Fri, 16 Mar 2012 17:55:00 +0000</pubDate><category>brains</category></item><item><title>Mandelbrowser - Google Maps for fractals</title><description>&lt;p&gt;&lt;img src="https://img.skitch.com/20120224-ka2ufitu9i8kny66wg6isdny4p.jpg" alt="Mandelbrowser Screenshot"/&gt;&lt;/p&gt;

&lt;p&gt;A while ago I made a &lt;a href="http://mandelbrowser.heroku.com/#-0.4998193359374997,-0.4990869140624997,-0.519267578125,-0.518779296875,800"&gt;tool&lt;/a&gt; that lets you explore the Mandelbrot Set (a famous fractal) using an interface a bit like google maps.&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s rendered using the &amp;lt;canvas&amp;gt; element, and JavaScript. It performs awfully, and the code is hideous - but it does makes pretty pictures, eventually!&lt;/p&gt;</description><link>http://blog.latentflip.com/post/18198517292</link><guid>http://blog.latentflip.com/post/18198517292</guid><pubDate>Fri, 24 Feb 2012 18:59:00 +0000</pubDate><category>code</category><category>fractals</category><category>javascript</category></item><item><title>Collider - a d3.js game</title><description>&lt;p&gt;&lt;img src="https://img.skitch.com/20120224-ksui49113jgk7tii95wdxw1jha.jpg" alt="Collider"/&gt;&lt;/p&gt;

&lt;p&gt;I made a &lt;a href="http://latentflip.github.com/LearningD3/collider/"&gt;quick game&lt;/a&gt; using D3.js as a way to learn, and show, how it works. It feels like jQuery++, with extra confusion.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve &lt;a href="http://latentflip.github.com/LearningD3/collider/docs/collider.html"&gt;documented the source&lt;/a&gt; pretty thoroughly to show how it fits together:&lt;/p&gt;</description><link>http://blog.latentflip.com/post/18195267992</link><guid>http://blog.latentflip.com/post/18195267992</guid><pubDate>Fri, 24 Feb 2012 17:43:00 +0000</pubDate><category>game</category><category>code</category><category>d3</category><category>javascript</category></item><item><title>Float and backbone.</title><description>&lt;iframe src="http://player.vimeo.com/video/36975603" width="400" height="300" frameborder="0"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Float and backbone.&lt;/p&gt;</description><link>http://blog.latentflip.com/post/17774186132</link><guid>http://blog.latentflip.com/post/17774186132</guid><pubDate>Fri, 17 Feb 2012 18:27:40 +0000</pubDate></item><item><title>Live-coding a simple backbone.js app</title><description>&lt;iframe src="http://player.vimeo.com/video/36975604" width="400" height="300" frameborder="0"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Live-coding a simple backbone.js app&lt;/p&gt;</description><link>http://blog.latentflip.com/post/17774146529</link><guid>http://blog.latentflip.com/post/17774146529</guid><pubDate>Fri, 17 Feb 2012 18:26:40 +0000</pubDate></item><item><title>A few live coding tips</title><description>&lt;p&gt;Last night at &lt;a href="http://scotrug.org"&gt;Scotrug&lt;/a&gt; I live coded some of &lt;a href="http://addyosmani.github.com/todomvc/"&gt;ToDoMVC&lt;/a&gt; in Backbone.js to introduce Rubyists to Backbone and how it looks &amp;amp; feels.&lt;/p&gt;

&lt;p&gt;Since it went surprisingly well, I thought I&amp;#8217;d share a few quick tips:&lt;/p&gt;

&lt;h3&gt;Keep it simple&lt;/h3&gt;

&lt;p&gt;The todo list app I wrote is very simple (and I didn&amp;#8217;t even finish it), but complex enough to demonstrate the basic elements and power of backbone.&lt;/p&gt;

&lt;p&gt;The power of live coding isn&amp;#8217;t to show off how fast you can type, how complicated you can make something, or even really to show people code, but to give you a stage to talk through the elements and design choices of what you&amp;#8217;re building. The simpler it is, the more time and energy you&amp;#8217;ll have to talk.&lt;/p&gt;

&lt;h3&gt;Think of your audience&lt;/h3&gt;

&lt;p&gt;I thought pretty hard about what I could expect my audience to know, and what I couldn&amp;#8217;t. You want to remove as much extraneous talk and code as possible - so if you&amp;#8217;re confident that most people will know something, don&amp;#8217;t just throw it in anyway. Keeping it out will keep their minds clear for the important stuff - and give you less code to make mistakes on.&lt;/p&gt;

&lt;p&gt;The flip side of course is that you need to make sure you set the stage for what you are doing, and don&amp;#8217;t assume too much of your audience, or you&amp;#8217;ll lose them quickly.&lt;/p&gt;

&lt;h3&gt;Think like a beginner&lt;/h3&gt;

&lt;p&gt;In the demo, I did a lot of back and forth between writing a little bit of JS in VIM, then using Chrome&amp;#8217;s console to play with the code I had just written (&lt;a href="http://blog.dotsmart.net/2011/09/30/change-font-size-in-chrome-devtools/"&gt;here&amp;#8217;s&lt;/a&gt; a quick guide to increasing the font size so the audience can read it). I got a couple of compliments on that approach, I think because it helped me drive home the point at each step - rather than just diving ahead and writing the whole app at once.&lt;/p&gt;

&lt;p&gt;I also added a couple of small &amp;#8220;deliberate mistakes&amp;#8221;, mostly around JavaScript&amp;#8217;s async nature, to keep people thinking, and not just drifting off because everything was going too smoothly.&lt;/p&gt;

&lt;h3&gt;Practice, publicly&lt;/h3&gt;

&lt;p&gt;My preparation for the demo went something like:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Built the app up from scratch completely, keeping a README explaining what I was doing and why, and carefully committing at every logical step.&lt;/li&gt;
&lt;li&gt;Dumping it all and doing the same thing again from scratch a couple of days later.&lt;/li&gt;
&lt;li&gt;Going through the commit logs and deciding what stuff was extraneous, and where I should actually start my live coding (I didn&amp;#8217;t want people to get bored watching me setup a rails app).&lt;/li&gt;
&lt;li&gt;I then put a shout out on twitter to see if anyone wanted a one-on-one tutorial. Thankfully @ryanstenhouse did. So I took him through the demo from start to end in a bar. This was the best prep. I did: it added a bit of pressure, and weeded out a few more mistakes I was likely to make. His enthusiasm also gave me the confidence that it was a good idea, and people would find it interesting. It also meant I had an ally in the audience who could help spot my bugs if something went really wrong.&lt;/li&gt;
&lt;li&gt;I did a final run through, recording myself via quicktime to get an idea of how long it might take, and to help me focus on slowing down and not making mistakes.&lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;And finally&amp;#8230;&lt;/h3&gt;

&lt;p&gt;Pray that the demo gods are on your side&amp;#8230;&lt;/p&gt;

&lt;p&gt;Look out for the video which should be popping up online in the next week or so.&lt;/p&gt;</description><link>http://blog.latentflip.com/post/17761189113</link><guid>http://blog.latentflip.com/post/17761189113</guid><pubDate>Fri, 17 Feb 2012 11:16:33 +0000</pubDate><category>code</category><category>talks</category><category>javascript</category></item><item><title>Over the Blue Moon.</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lxp1ikopgJ1qzmkoso1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Over the Blue Moon.&lt;/p&gt;</description><link>http://blog.latentflip.com/post/15725645379</link><guid>http://blog.latentflip.com/post/15725645379</guid><pubDate>Thu, 12 Jan 2012 16:23:08 +0000</pubDate></item><item><title>"Time is not a nice person, I know because the signs said it.
Time can be generous, but ultimately,..."</title><description>“Time is not a nice person, I know because the signs said it.
Time can be generous, but ultimately, time is indifferent.
Time does not give two damns or a fuck.
So what will you do? What will we do . .?”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Pase Rock
From Sign (feat. Pase Rock) by Nujabes on Modal Soul&lt;/em&gt;</description><link>http://blog.latentflip.com/post/15725560708</link><guid>http://blog.latentflip.com/post/15725560708</guid><pubDate>Thu, 12 Jan 2012 16:20:27 +0000</pubDate></item><item><title>Departing the North Sea on New Years Day 2012.</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lxohvnocfz1qzmkoso1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Departing the North Sea on New Years Day 2012.&lt;/p&gt;</description><link>http://blog.latentflip.com/post/15717089931</link><guid>http://blog.latentflip.com/post/15717089931</guid><pubDate>Thu, 12 Jan 2012 09:18:59 +0000</pubDate></item><item><title>A wee whisky cocktail.</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lxltd6qai71qzmkoso1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;A wee whisky cocktail.&lt;/p&gt;</description><link>http://blog.latentflip.com/post/15637262630</link><guid>http://blog.latentflip.com/post/15637262630</guid><pubDate>Tue, 10 Jan 2012 22:34:18 +0000</pubDate></item><item><title>Faster rake tasks in Rails</title><description>&lt;p&gt;Rake tasks are awesome for project specific scripts among other things, but in rails projects they suck for short tasks that don&amp;#8217;t depend on rails. Here&amp;#8217;s why:&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;You type &lt;code&gt;rake my_task_that_doesnt_depend_on_the_rails_environment&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Rails loads (10-20 seconds)&lt;/li&gt;
&lt;li&gt;Only then does your superfast rake task run. Boring!&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;Looking for a solution I came across Xavier Shay&amp;#8217;s &lt;a href="http://rhnh.net/2010/09/07/speeding-up-rails-rake"&gt;attempt&lt;/a&gt; to deal with this.&lt;/p&gt;

&lt;p&gt;His solution is to maintain a list of rails tasks which depend on Rails (like &lt;code&gt;rake db:migrate&lt;/code&gt;) in your Rakefile, and have the Rails environment autoload when any of those tasks are called. Any tasks in lib/tasks will now run nice and fast.&lt;/p&gt;

&lt;p&gt;This helped, but it means you have to maintain a list of all the Rails tasks you may want to use (and any rake tasks included by gems used in your app) in your Gemfile, or remember to append &lt;code&gt;LOAD_RAILS=1&lt;/code&gt; to your rake call to force rails to load.&lt;/p&gt;

&lt;p&gt;Because I can&amp;#8217;t be bothered trying to remember which of my tasks depend on rails, I modified his Rakefile to autoload the Rails environment if Rake can&amp;#8217;t find a task (on the assumption that it&amp;#8217;ll be hidden in Rails/gem somewhere. This has the side-benefit of loading the &lt;code&gt;:environment&lt;/code&gt; task, that any tasks which require the Rails environment depend on, if and when needed.&lt;/p&gt;

&lt;p&gt;If you have any thoughts I&amp;#8217;d love to hear them, the &lt;a href="https://gist.github.com/1584072"&gt;gist is here&lt;/a&gt;.&lt;/p&gt;

&lt;script src="https://gist.github.com/1584072.js?file=Rakefile"&gt;&lt;/script&gt;</description><link>http://blog.latentflip.com/post/15622557834</link><guid>http://blog.latentflip.com/post/15622557834</guid><pubDate>Tue, 10 Jan 2012 16:39:00 +0000</pubDate></item><item><title>Courgette Frittata</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lxjqcgKd8A1qzmkoso1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Courgette Frittata&lt;/p&gt;</description><link>http://blog.latentflip.com/post/15576186788</link><guid>http://blog.latentflip.com/post/15576186788</guid><pubDate>Mon, 09 Jan 2012 19:33:52 +0000</pubDate></item></channel></rss>

