<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Jamie Matthews - Blog</title><link>http://j4mie.org</link><description>Latest blog posts by Jamie Matthews</description><atom:link href="http://j4mie.org/feed/" rel="self"></atom:link><language>en-GB</language><lastBuildDate>Fri, 28 Jan 2022 15:20:00 -0000</lastBuildDate><item><title>Another new start for j4mie.org</title><link>http://j4mie.org/blog/another-new-start-for-j4mie-org/</link><description>&lt;p&gt;After running on Wordpress on shared hosting for many years, I've finally moved this site onto my &lt;a href="http://www.linode.com"&gt;Linode&lt;/a&gt; VPS, and yes, I've written my own blog engine in &lt;a href="http://www.djangoproject.com"&gt;Django&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;A lot of the old posts were irrelevant and uninteresting, and didn't get any traffic anyway, so I've removed those. The more popular stuff has been migrated over, and I'm using &lt;a href="http://docs.djangoproject.com/en/dev/ref/contrib/redirects/"&gt;Django's redirects app&lt;/a&gt; to make sure I don't lose too much Google juice. I've imported all the comments into &lt;a href="http://disqus.com"&gt;Disqus&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This site is also using lots of shiny HTML5 and CSS3 hotness, and is therefore entirely incompatible with Internet Explorer. Oh well.&lt;/p&gt;
&lt;p&gt;Do let me know what you think, or if you find any problems.&lt;/p&gt;</description><guid>http://j4mie.org/blog/another-new-start-for-j4mie-org/</guid></item><item><title>Idiorm - a simple ORM for PHP</title><link>http://j4mie.org/blog/idiorm-a-simple-orm-for-php/</link><description>&lt;p&gt;Just a quick update on a little project I've been working on over the past few months. &lt;a href="http://github.com/j4mie/idiorm"&gt;Idiorm&lt;/a&gt; is &amp;ldquo;a lightweight nearly-zero-configuration object-relational mapper and fluent query builder for PHP5,&amp;rdquo; and is released under a BSD license.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://github.com/j4mie/idiorm"&gt;Idiorm on GitHub.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The starting point for Idiorm was the topic of my talk at BarCampBrighton last year: &amp;ldquo;&lt;a href="http://www.slideshare.net/j4mie/minimalism-in-web-development"&gt;Minimalism in Web Development&lt;/a&gt;&amp;rdquo;, the idea that for many purposes, simpler solutions are often preferable to complex ones.&lt;/p&gt;&lt;img src="http://github.com/images/error/octocat_happy.gif"&gt;

&lt;p&gt;Idiorm lets you start using an ORM in your application with almost no effort. No XML files, model classes, database introspection or code generation is required: You just need to tell the ORM how to connect to your database, and away you go.&lt;/p&gt;

&lt;p&gt;The &lt;a href="http://en.wikipedia.org/wiki/Fluent_interface"&gt;fluent interface&lt;/a&gt; allows you to build most basic queries without writing any SQL, and gets out of the way when you need to do something more complex (both raw WHERE clauses and complete raw queries are supported). Once you have one or more instances of the ORM class (representing the rows in your database tables) you can access the data in them directly as properties of the objects (using PHP's magic __get and __set methods internally), modify and save them, as well as delete them. For full documentation and lots of code samples, see the &lt;a href="http://github.com/j4mie/idiorm#readme"&gt;README file&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Obviously, such a simple project (the whole ORM class is only about 600 lines of code) would probably never be used in a huge, complex PHP application. The main drawback to using a generic ORM class instead of domain-specific model classes is that you can't attach your own behaviour to the models. So the (extremely sensible) idea of placing most of your business logic in your models (&lt;a href="http://weblog.jamisbuck.org/2006/10/18/skinny-controller-fat-model"&gt;Skinny Controller, Fat Model&lt;/a&gt;) isn't possible with Idiorm as-is.&lt;/p&gt;

&lt;p&gt;I have three answers to this problem. The first is that many applications simply don't need any business logic more complex than basic CRUD operations, for which Idiorm is perfect. Secondly, one clear use case for Idiorm is to clean up legacy applications which are littered with raw SQL statements, usually passed directly into some custom-written &amp;ldquo;database abstraction&amp;rdquo; class or set of functions. Here, the application is &lt;em&gt;already&lt;/em&gt; a mess, and in the absence of a complete rewrite, integrating Idiorm can only make things better. Finally, there's no reason why you couldn't build a full model layer as a lightweight wrapper &lt;em&gt;on top&lt;/em&gt; of Idiorm. This would probably take the form of a factory object which returns instances of the correct model class, using Idiorm to populate them with data. I have a rough-and-ready implementation of this idea on my laptop which I may release at some point, but it's easy enough to build yourself. If you're using PHP 5.3 (and so have access to late static binding), you could even code up a pretty nice implementation of the active record pattern around Idiorm.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I have now released &lt;a href="http://github.com/j4mie/paris"&gt;Paris&lt;/a&gt;, which is an Active Record implementation built on top of Idiorm.&lt;/p&gt;

&lt;p&gt;So to summarise, Idiorm isn't really intended to replace something like &lt;a href="http://www.doctrine-project.org/"&gt;Doctrine&lt;/a&gt; or &lt;a href="http://www.propelorm.org/"&gt;Propel&lt;/a&gt; (or &lt;a href="http://ar.rubyonrails.org/"&gt;ActiveRecord&lt;/a&gt;, or &lt;a href="http://docs.djangoproject.com/en/dev/topics/db/"&gt;Django's ORM&lt;/a&gt;, or &lt;a href="http://www.sqlalchemy.org"&gt;SQLAlchemy&lt;/a&gt;, etc). It's designed to be a quick and easy solution to database abstraction in small-to-medium sized applications. And let's face it - most of us are building small-to-medium sized applications. We're building bicycles, not space shuttles. If Doctrine is a rocket engine, Idiorm is a &lt;a href="http://en.wikipedia.org/wiki/Bottom_bracket"&gt;bottom bracket&lt;/a&gt;. But if all you want to do is get to the corner shop, a bicycle is a much quicker way to travel.&lt;/p&gt;

&lt;p&gt;Finally, if you think you'd find Idiorm useful, please let me know. Fork the project, make suggestions using &lt;a href="http://github.com/j4mie/idiorm/issues"&gt;GitHub's Issues system&lt;/a&gt; or just leave a comment on this post.&lt;/p&gt;</description><guid>http://j4mie.org/blog/idiorm-a-simple-orm-for-php/</guid></item><item><title>Brian Eno and Generative Art</title><link>http://j4mie.org/blog/brian-eno-and-generative-art/</link><description>&lt;p&gt;&lt;img src="/static/post_content/brian-eno-and-generative-art/Brian_Eno.jpg" alt="Brian Eno" /&gt;&lt;/p&gt;

&lt;p&gt;Tonight, I'm heading to &lt;a href="http://brightondome.org"&gt;Brighton Dome&lt;/a&gt; to see &lt;a href="http://www.brightonfestival.org/Event_Details.aspx?eid=3538"&gt;a performance&lt;/a&gt; of Brian Eno's seminal album &lt;em&gt;Apollo&lt;/em&gt; as part of Brighton Festival, which Eno is curating this year. &lt;/p&gt;

&lt;p&gt;Two years ago, I wrote an essay about Eno (and the wider theme of generative art) as a piece of coursework for a course called &amp;ldquo;Generative Creativity&amp;rdquo; (part of the &lt;a href="http://www.informatics.sussex.ac.uk/research/groups/easy/MSc/"&gt;EASy MSc&lt;/a&gt; at the University of Sussex). I thought today might be a good opportunity to put it online for posterity. Below is Part One of the essay, which is essentially a short biography of Eno, concentrating on his contribution to generative art and music.&lt;/p&gt;&lt;h3&gt;Part One: Brian Eno&lt;/h3&gt;

&lt;p&gt;Generative approaches are gaining popularity in the creative arts, and their application to music is one of the most promising and active. The term &amp;ldquo;generative music&amp;rdquo; was coined by Brian Eno, and his contributions to the field have been increasingly ambitious since his early experiments in the 1970s.&lt;/p&gt;

&lt;p&gt;In the mid-sixties, Eno became interested in the school of musical minimalism, including composers such as Terry Riley, Philip Glass and Steve Reich. In particular, Reich's 1965 piece &lt;em&gt;It's Gonna Rain&lt;/em&gt; fascinated Eno. It is based on a tape recording of an American preacher saying the eponymous phrase. The recording was looped and played on two identical tape machines simultaneously. Due to slight inconstancies in the playback speed of the machines, the two loops gradually drifted out of sync. After some time, the listener becomes entirely habituated to the speech itself, and the perception of the artefacts created by the slowly shifting phase of the recordings becomes the main focus of the work. This notion of a very simple process being used to create a constantly changing and unpredictable musical texture became a foundation of Eno's career.&lt;/p&gt;

&lt;p&gt;His work in the early 1970s was the beginning of his foray into &amp;ldquo;ambient music&amp;rdquo; (another phrase he coined). This genre is usually described in terms of the output itself and its appreciation as a musical &amp;ldquo;background feature&amp;rdquo; of the environment &lt;a href="#ref1"&gt;[1]&lt;/a&gt;. However, Eno saw the underlying process, the &amp;ldquo;idea that it's possible to think of a system or a set of rules which once set in motion will create music for you,&amp;rdquo; as the guiding principle of his work. &lt;a href="#ref2"&gt;[2]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The 1975 track &lt;em&gt;Discreet Music&lt;/em&gt; used a very similar approach to Reich's imprecise tape machines. Eno used a long-delay tape echo, fed with two simple melodic lines of different lengths from a synthesiser. The timbre of the lines was occasionally modified using a graphic equaliser, but the main interest of the piece is the interaction of the two lines with themselves and each other as they are shifted in time by the echo unit.&lt;/p&gt;

&lt;p&gt;Similar processes underlie many of Eno's ambient albums, with varying contributions from live performers, and more &amp;ldquo;standard&amp;rdquo; studio manipulation and production techniques. On a piece from &lt;em&gt;Ambient 1: Music for Airports&lt;/em&gt; he used six simple building blocks, composed of sung notes recorded on tape loops of differing lengths. These elements do not change throughout the piece, but their specific configurations and clusterings are highly unlikely to repeat themselves. On the record, the track is eight minutes long, but this is merely an excerpt from a potentially infinite piece of music.&lt;/p&gt;

&lt;p&gt;In the following decades, Eno began to notice parallels between his analog, studio-based techniques and certain concepts from science and computing. Cybernetics, the study of feedback in complex systems such as living organisms, provided a way to study how stable patterns could emerge without external control. Eno saw connections to self-regulating stability in group improvisation, where musicians may have only loose guidance in what to play but environmental factors such as the resonant frequency of the room may influence the outcome of the performance. He wrote several essays on the subject, including one called &amp;ldquo;Self-Regulation And Autopoiesis In Contemporary Music.&amp;rdquo; &lt;a href="#ref3"&gt;[3]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;He became fascinated with John Conway's &lt;em&gt;Game of Life&lt;/em&gt;, in which simple rules applied to a grid of cells produce patterns which persist through time and space. He wanted the dynamics of the simulation to &amp;ldquo;become intuitive&amp;rdquo; to him. &amp;ldquo;I wanted to be able to understand this message that I'd found in the Steve Reich piece [...], in my own work, and now in this. Very, very simple rules, clustering together, can produce very complex and actually rather beautiful results.&amp;rdquo; &lt;a href="#ref2"&gt;[2]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At the same time, his own work was becoming more sophisticated. He began to move from directly interacting with patterns of sounds, to manipulating &lt;em&gt;rules about how sounds were made&lt;/em&gt;. Computers presented an obvious tool with which to explore this idea. He became aware of a piece of software called Koan Pro, which could be used to control a hardware synthesiser on a computer's sound card. Koan follows a set of rules which specify the parameters for around 150 elements of each composition, such as the instruments used, the timbre and attack of each note, and the relative proportion of each interval in the scale used to build the music. These rules are followed probabilistically, and form what Eno calls a musical &amp;ldquo;seed,&amp;rdquo; a framework within which the machine improvises to produce unpredictable and infinite pieces of music. &lt;a href="#ref4"&gt;[4]&lt;/a&gt; In 1996 he released &lt;em&gt;Generative Music 1&lt;/em&gt;, an &amp;ldquo;album&amp;rdquo; containing twelve of these seeds on a floppy disk. Listeners ran a version of the Koan software on their own computer, which generated the music based on Eno's rules.&lt;/p&gt;

&lt;p&gt;Eno has also worked in the visual arts, often combining projector-based installations with his generative music systems to produce hybrid pieces. However, his recent work conflicts in some ways with his guiding principle of generating the complete piece from simple foundations. Rather than using the computer as a &amp;ldquo;way of growing little seeds&amp;rdquo; &lt;a href="#ref2"&gt;[2]&lt;/a&gt;, his 2006 work &lt;em&gt;77 Million Paintings By Brian Eno&lt;/em&gt; comprises a corpus of more than 300 of his own hand-drawn images, and combines and overlays them to produce a continually changing visual experience.&lt;/p&gt;

&lt;p&gt;Brian Eno sees generative music as a third alterative to recorded music and live music. &amp;ldquo;Like live music, it is always different. Like recorded music, it is free of time-and-place limitations.&amp;rdquo; &lt;a href="#ref5"&gt;[5]&lt;/a&gt; His contributions to the field have been varied and creative, and his future work (including a generative soundtrack to the forthcoming video game Spore) promises to continue his exploration of this new medium.&lt;/p&gt;

&lt;h3&gt;References&lt;/h3&gt;

&lt;p id="ref1"&gt;[1] Brian Eno. Music For Airports, Liner notes, September 1978.&lt;/p&gt;

&lt;p id="ref2"&gt;[2] Brian Eno. Generative Music. Transcript of talk from Imagination Conference, San Francisco, June 1996. Available from: &lt;a href="http://www.inmotionmagazine.com/eno1.html"&gt;http://www.inmotionmagazine.com/eno1.html&lt;/a&gt; [cited 16th February 2008].&lt;/p&gt;

&lt;p id="ref3"&gt;[3] Brian Eno. Keyboard Wizards, Winter 1985. Available from: &lt;a href="http://music.hyperreal.org/artists/brian_eno/interviews/keyb81.html"&gt;http://music.hyperreal.org/artists/brian_eno/interviews/keyb81.html&lt;/a&gt; [cited 16th February 2008].&lt;/p&gt;

&lt;p id="ref4"&gt;[4] Andy Oldsfield. Brian Eno's Generation Game [online]. July 1996. Available from: &lt;a href="http://music.hyperreal.org/artists/brian_eno/interviews/ind96d.html"&gt;http://music.hyperreal.org/artists/brian_eno/interviews/ind96d.html&lt;/a&gt; [cited 16th February 2008].&lt;/p&gt;

&lt;p id="ref5"&gt;[5] Richard Williams. The Brain of Brian. The Guardian, May 1996. Available from: &lt;a href="http://music.hyperreal.org/artists/brian_eno/interviews/guard96a.html"&gt;http://music.hyperreal.org/artists/brian_eno/interviews/guard96a.html&lt;/a&gt; [cited 16th February 2008].&lt;/p&gt;</description><guid>http://j4mie.org/blog/brian-eno-and-generative-art/</guid></item><item><title>Maps and Parking Tickets</title><link>http://j4mie.org/blog/maps-and-parking-tickets/</link><description>&lt;img src="/static/post_content/maps-and-parking-tickets/appscreens.jpg" alt="hereit.is and iwillpayyourparkingticket.com" title="appscreens" width="450" height="379" class="size-full wp-image-146" /&gt;

&lt;p&gt;Over the last few months, I've been kicking around a couple of little spare-time projects, and I've finally got round to writing a blog post about them. Both are fairly simple, but each represents a stepping stone in my efforts to bootstrap my brain into understanding the architecture and design of web applications.&lt;/p&gt;&lt;p&gt;&lt;a href="http://hereit.is"&gt;&lt;img src="/static/post_content/maps-and-parking-tickets/hereitisbanner.png" alt="hereit.is logo" title="hereit.is logo" width="450" height="63" class="size-full wp-image-159" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;First, &lt;a href="http://hereit.is"&gt;http://hereit.is&lt;/a&gt;, a service for creating short urls for geographical locations. The idea is that you use the map on the homepage to find a location, and then create a short url to represent that location (such as &lt;a href="http://hereit.is/brighton"&gt;http://hereit.is/brighton&lt;/a&gt;). You can then share this url by email, on the phone, on Twitter, etc. When the recipient(s) of the link visits the url, they are shown a simple landing page containing the map, with a link to Google Maps from where they can plan routes, see satellite imagery, and so on.&lt;/p&gt;
&lt;p&gt;Despite its simplicity, hereit.is is built using modern web application principles. It has an &lt;a href="http://en.wikipedia.org/wiki/Model–view–controller"&gt;MVC architecture&lt;/a&gt; and its design is quite closely based on that of &lt;a href="http://www.djangoproject.com/"&gt;Django&lt;/a&gt;. I decided to implement it in PHP (which I spend all day using at work), partly to prove to myself that it is at least &lt;em&gt;possible&lt;/em&gt; to construct well-architected applications with this badly-assembled mess of a language. I now know that if I had used Django itself, the whole project would probably have taken me about half an hour - but the project itself wasn't really the point. The point was to learn how frameworks are put together, and I have definitely succeeded at that.&lt;/p&gt;
&lt;p&gt;I also wanted to get my head around &lt;a href="http://en.wikipedia.org/wiki/Representational_State_Transfer"&gt;REST&lt;/a&gt;, so hereit.is has simple API which you can use to create locations, and retrieve GeoJSON and KML representations of places. See the &lt;a href="http://hereit.is/api.html"&gt;API documentation&lt;/a&gt; for more information.&lt;/p&gt;
&lt;p&gt;For the front-end design, I took advantage nifty CSS3 tricks, such as &lt;a href="http://www.css3.info/preview/rounded-border/"&gt;&lt;code&gt;border-radius&lt;/code&gt;&lt;/a&gt; and &lt;a href="http://www.css3.info/preview/box-shadow/"&gt;&lt;code&gt;box-shadow&lt;/code&gt;&lt;/a&gt;. The main page of the site uses no images at all in its design, the idea of which appeals to the minimalist in me (of course, the map itself uses images). Even the logo is a Unicode character, inserted into the heading text with the &lt;a href="http://www.w3schools.com/CSS/CSS_pseudo_elements.asp"&gt;&lt;code&gt;:before&lt;/code&gt; pseudo-element.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I was invited to give a talk about hereit.is at &lt;a href="http://www.fivepoundapp.com/"&gt;£5 App&lt;/a&gt;, the brilliant monthly-ish meeting organised by &lt;a href="http://ianozsvald.com/"&gt;Ian Ozsvald&lt;/a&gt; and &lt;a href="http://www.psychicorigami.com/"&gt;John Montgomery&lt;/a&gt;. I gave a fairly high-level overview of how hereit.is works, and the talk should be fairly accessible (I hope) to the less technical types. You can see the talk on Vimeo here: &lt;a href="http://vimeo.com/5664789"&gt;http://vimeo.com/5664789&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;object width="400" height="300"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=5664789&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=5664789&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;p&gt;&lt;a href="http://vimeo.com/5664789"&gt;£5 App #18 - Jamie on HereIt.Is&lt;/a&gt; from &lt;a href="http://vimeo.com/user1893982"&gt;Ian Ozsvald&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.iwillpayyourparkingticket.com"&gt;&lt;img src="/static/post_content/maps-and-parking-tickets/iwillpay.png" alt="i will pay your parking ticket logo" title="i will pay your parking ticket logo" width="450" height="46" class="size-full wp-image-161" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second project is &lt;a href="http://www.iwillpayyourparkingticket.com"&gt;I Will Pay Your Parking Ticket&lt;/a&gt;. This is the brainchild of my friend &lt;a href="http://www.sebleedelisle.com"&gt;Seb Lee-Delisle&lt;/a&gt;, who &lt;a href="http://www.iwillpayyourparkingticket.com/help/"&gt;explains the idea much better himself&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;He asked me to help out with the server-side implementation, which we decided to do with &lt;a href="http://www.djangoproject.com"&gt;Django&lt;/a&gt;. It's fairly straightforward for the most part, with one or two interesting details, such as the method we use to select which tweets to show on the homepage (simple randomness turned out to be quite inadequate), and the Twitter search API integration. Fortunately, you can see how it all works for yourself, because we decided to make the whole project open source. You can &lt;a href="http://github.com/j4mie/parkingtickets"&gt;follow or fork it at Github&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This experience has completely sold me on the benefits of &lt;a href="http://www.djangoproject.com"&gt;Django&lt;/a&gt;. At one stage, we more-or-less completely tore the application apart and rebuilt it from scratch in a few hours. There's simply no way that would be possible with almost anything else. I've loved &lt;a href="http://python.org/"&gt;Python&lt;/a&gt; for years, so the ability to work on Web projects with it is fantastic.&lt;/p&gt;
&lt;p&gt;Because of Seb's rock-star status in the Flash world, and his thousand-plus followers on &lt;a href="https://twitter.com/sebleedelisle"&gt;Twitter&lt;/a&gt;, I Will Pay Your Parking Ticket has been pretty popular. We already have nearly six thousand votes in the database. Deciding whether or not random strangers deserve your sympathy is a strangely addictive experience, and a good way to waste your lunch hour.&lt;/p&gt;
&lt;p&gt;Again, Seb gave a talk about the idea at &lt;a href="http://www.fivepoundapp.com/"&gt;£5 App&lt;/a&gt;, which you can see below:&lt;/p&gt;
&lt;p&gt;&lt;object width="400" height="300"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=6070867&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=6070867&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;p&gt;&lt;a href="http://vimeo.com/6070867"&gt;£5 App #19 Seb and Jamie with I Will Pay Your Parking Ticket&lt;/a&gt; from &lt;a href="http://vimeo.com/user707645"&gt;IanProCastsCoUk&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;So, that's a quick update on what I've been doing over the past few weeks. I'm trying to keep myself busy, with regular attendance at &lt;a href="http://www.flashbrighton.org/"&gt;FlashBrighton&lt;/a&gt; and other events, as well as getting involved with the brand-new &lt;a href="http://www.buildbrighton.com"&gt;Brighton Hackerspace, BuildBrighton&lt;/a&gt;. I also managed to grab a ticket for &lt;a href="http://www.barcampbrighton.org/"&gt;BarCampBrighton 4&lt;/a&gt; at the beginning of September. Hmm, I should probably decide what I'm going to talk about...&lt;/p&gt;</description><guid>http://j4mie.org/blog/maps-and-parking-tickets/</guid></item><item><title>Project 365</title><link>http://j4mie.org/blog/project-365/</link><description>&lt;p&gt;&lt;img src="http://farm4.static.flickr.com/3583/3662999285_31d2911f5e_m.jpg" alt="three six fail" /&gt;&lt;/p&gt;

&lt;p&gt;I'm not generally one for New Year's Resolutions, but this year I decided to have a go at &lt;a href="http://www.flickr.com/groups/project_365/"&gt;Project 365&lt;/a&gt;. The idea, in short, is to take one photo per day for a year. The &lt;a href="http://photojojo.com/content/tutorials/project-365-take-a-photo-a-day/"&gt;claimed benefits&lt;/a&gt; of this vary, but boil down to improving one's photographic technique, creating a &amp;#8220;photo diary&amp;#8221; for yourself, and documenting your year for the purpose of sharing with others (usually on Flickr).&lt;/p&gt;&lt;p&gt;I was hoping for a mixture of these, but most importantly I intended to keep the creative juices flowing through the year by enforcing a tiny bit of creativity each day. I'm always looking for ways to train my brain to look at the world differently, and spending a bit of time each day framing life through a camera lens seems to be a good way to go about this. I actually bent the rules a little, and let a bit of &lt;a href="http://www.flickr.com/photos/j4mie/3294069545/"&gt;digital&lt;/a&gt; &lt;a href="http://www.flickr.com/photos/j4mie/3360609161/"&gt;art&lt;/a&gt; and even one short &lt;a href="http://www.flickr.com/photos/j4mie/3254309544/"&gt;video&lt;/a&gt; sneak in amongst the photos. After all, the creativity is the point, not the medium.&lt;/p&gt;

&lt;p&gt;Anyway, in case you hadn't guessed by now, I've decided to officially abandon the project. I started off well, posting a photo a day until well into April, with a maximum of two or three days backlog. Things started slipping a little in May, and then I caught up again, but I quickly got so far behind that there didn't seem to be much point carrying on. Today is the 177th day of the year, and my most recently uploaded photo was number 130.&lt;/p&gt;

&lt;p&gt;There's little point dissecting all the reasons, but suffice it to say that it didn't have the intended effect. Once I started to run out of immediate things to take photos of, and the few generative art ideas I had bubbling away in my brain were turned into pixels and committed to the interwebs, the thought of &lt;emph&gt;having&lt;/emph&gt; to do something creative every day got less and less attractive, and began to feel more like a chore. I decided to have a break to see if that would help, but it actually seemed to make things worse. My photos from my holiday in Cornwall in May let me catch up a bit, but I was still quite behind, and I've had no real motivation to take any photos since.&lt;/p&gt;

&lt;p&gt;Interestingly, I don't regret the experience at all. I enjoyed the creative bits while they lasted, and once I began to get fed up of the project, it made me want to get on with other non-visual projects (more on this soon). And I was actually pretty happy with quite a few of the photos that I took.&lt;/p&gt;

&lt;p&gt;You can have a look at the 130 photos in the &lt;a href="http://www.flickr.com/photos/j4mie/sets/72157612021205184/"&gt;final set&lt;/a&gt;, or see below for some of my favourites (click to embiggen).&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.flickr.com/photos/j4mie/3246509821/"&gt;&lt;img src="http://farm4.static.flickr.com/3298/3246509821_9fbdb5ece7_m.jpg" alt="033/365" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.flickr.com/photos/j4mie/3323802408/"&gt;&lt;img src="http://farm4.static.flickr.com/3605/3323802408_4ca1c0b62a_m.jpg" alt="061/365" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.flickr.com/photos/j4mie/3338878223/"&gt;&lt;img src="http://farm4.static.flickr.com/3587/3338878223_207bd7a37e_m.jpg" alt="065/365" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.flickr.com/photos/j4mie/3560406460/"&gt;&lt;img src="http://farm4.static.flickr.com/3553/3560406460_1d316d48a7_m.jpg" alt="126/365" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.flickr.com/photos/j4mie/3560425020/"&gt;&lt;img src="http://farm4.static.flickr.com/3303/3560425020_9cdbbbe0d8_m.jpg" alt="129/365" /&gt;&lt;/a&gt;&lt;/p&gt;</description><guid>http://j4mie.org/blog/project-365/</guid></item><item><title>BarCampLondon6</title><link>http://j4mie.org/blog/barcamplondon6/</link><description>&lt;img src="http://farm4.static.flickr.com/3607/3395764613_683ff530d3.jpg" alt="Space Invader" /&gt;

&lt;p&gt;I spent the weekend at &lt;a href="http://www.barcamplondon.org/"&gt;BarCampLondon6&lt;/a&gt; at the offices of &lt;a href="http://www.guardian.co.uk/"&gt;the Guardian&lt;/a&gt; near King's Cross Station. I think my brain is too full of interesting things I've picked up over the last couple of days (not to mention too deprived of sleep) to actually process any of it into a coherent blog post, but you'll get an idea of my thoughts by looking at &lt;a href="http://search.twitter.com/search?tag=barcamplondon6&amp;from=j4mie&amp;rpp=30"&gt;my posts on Twitter tagged #barcamplondon6&lt;/a&gt;, and &lt;a href="http://www.flickr.com/photos/j4mie/sets/72157616003993093/"&gt;my Flickr set from the event&lt;/a&gt;. Thanks to the organisers for their hard work, and to all the people who took part.&lt;/p&gt;
&lt;p&gt;My talk was about &lt;a href="http://www.processing.org"&gt;Processing&lt;/a&gt;. The photos below are by &lt;a href="http://www.flickr.com/photos/37996583811@N01/"&gt;Rain Rabbit&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Me:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.flickr.com/photos/37996583811@N01/3391746803/"&gt;&lt;img src="http://farm4.static.flickr.com/3456/3391746803_379464a2d1_m.jpg" alt="My talk at barcamplondon6" /&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The audience (yes, I probably should have picked a bigger room):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.flickr.com/photos/37996583811@N01/3392900990/"&gt;&lt;img src="http://farm4.static.flickr.com/3653/3392900990_11300c68e4_m.jpg" alt="My talk at barcamplondon6" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can view the &lt;a href="http://www.slideshare.net/j4mie/why-should-you-care-about-processing"&gt;slides on Slideshare&lt;/a&gt;:&lt;/p&gt;
&lt;div style="width:425px;text-align:left" id="__ss_1218422"&gt;&lt;a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/j4mie/why-should-you-care-about-processing?type=presentation" title="Why should you care about Processing?"&gt;Why should you care about Processing?&lt;/a&gt;&lt;object style="margin:0px" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=barcamplondon-090329165927-phpapp02&amp;stripped_title=why-should-you-care-about-processing" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=barcamplondon-090329165927-phpapp02&amp;stripped_title=why-should-you-care-about-processing" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;"&gt;View more &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/"&gt;presentations&lt;/a&gt; from &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/j4mie"&gt;Jamie Matthews&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Finally, here's one of me playing with &lt;a href="http://code.google.com/p/tinkerit/wiki/Auduino"&gt;Auduino&lt;/a&gt; an Arduino-based synthesiser created by Peter Knight from &lt;a href="http://tinker.it"&gt;tinker.it&lt;/a&gt;:&lt;/p&gt;
&lt;img src="http://farm4.static.flickr.com/3647/3394326615_103f894c6e.jpg" alt="Playing with Auduino" /&gt;</description><guid>http://j4mie.org/blog/barcamplondon6/</guid></item><item><title>JavaScript Syntax Checking from gedit</title><link>http://j4mie.org/blog/javascript-syntax-checking-from-gedit/</link><description>&lt;p&gt;&lt;a href="http://www.jslint.com"&gt;JSLint&lt;/a&gt; is a tool for finding problems in JavaScript programs. Unfortunately, to use it, you need to paste your source code into a textarea on a website - less than ideal. This post will explain how to check your JavaScript directly from &lt;a href="projects.gnome.org/gedit/"&gt;gedit&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It is based on &lt;a href="http://mikecantelon.com/story/javascript-syntax-checking-vim"&gt;these instructions for vim&lt;/a&gt;, combined with&lt;a href="http://whereisandy.com/code/jslint/"&gt; this method to allow piping text into JSLint from the standard input&lt;/a&gt;.&lt;/p&gt;
&lt;img src="http://www.jslint.com/jslint.gif" alt="JSLint" /&gt;&lt;p&gt;&lt;strong&gt;1. Install SpiderMonkey&lt;/strong&gt;
See the &lt;a href="http://developer.mozilla.org/en/SpiderMonkey_Build_Documentation"&gt;build instructions page&lt;/a&gt; for installing on many different architectures, or&lt;a href="http://mikecantelon.com/story/javascript-syntax-checking-vim"&gt; these instructions&lt;/a&gt; for quick installations on Ubuntu and CentOS 5.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Download JSLint SpiderMonkey Hack Edition&lt;/strong&gt;
Get &lt;a href="http://whereisandy.com/code/jslint/jslint"&gt;this version of JSLint&lt;/a&gt; which has been modified to allow piping code from the standard input. Save it somewhere in your home directory, say &lt;code&gt;/home/&lt;em&gt;username&lt;/em&gt;/bin/js/jslinthack.js&lt;/code&gt;. You'll also need to make it executable by typing &lt;code&gt;chmod +x /home/&lt;em&gt;username&lt;/em&gt;/bin/js/jslinthack.js&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Enable the External Tools plugin in gedit&lt;/strong&gt;
Open gedit and click the Edit menu, then choose Preferences. Click the Plugins tab and tick to enable the Extenal Tools plugin.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Set up the JSLint External Tool&lt;/strong&gt;
In gedit, open the Tools menu and click External Tools. Click the New button and give your new tool the name JSLint. Give it a descriptive name like "Check JavaScript source code". Give it an Accelerator if you wish (mine is Shift+Ctrl+j). Set the Command to the location at which you saved the hacked JSLint file, eg. &lt;code&gt;/home/&lt;em&gt;username&lt;/em&gt;/bin/js/jslinthack.js&lt;/code&gt;. Set Input to Current Document and set Output to Insert in Output Panel (you'll need to have the Bottom Panel enabled in gedit's View menu).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5. Profit!&lt;/strong&gt;
Open up a JavaScript source file, and either press your Accelarator keyboard shortcut, or go to Tools &amp;gt; JSLint. The results of the syntax check will be output in the bottom panel.&lt;/p&gt;</description><guid>http://j4mie.org/blog/javascript-syntax-checking-from-gedit/</guid></item><item><title>Cahors</title><link>http://j4mie.org/blog/cahors/</link><description>&lt;p&gt;&lt;a href="http://code.google.com/p/cahors/"&gt;&lt;img src="http://farm3.static.flickr.com/2140/2476034483_2ed50b8429_m.jpg" alt="Arduino MIDI shield" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A few months ago, I spent some time writing a MIDI sequencer for the Arduino. I finished the sequencer, wrote a couple of songs with it, and then got sucked into MSc thesis mode and had to abandon it. &lt;/p&gt;
&lt;p&gt;Well, I've finally got round to publishing it as an open source project on Google Code, so hopefully others will be able to have some fun with it. I've also written some documentation which will hopefully make it a little easier to get started creating music with it. I've named it ‘Cahors,’ which is a word I found in The Deeper Meaning of Liff. See the FAQ page on the Google Code side for a full explanation.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://code.google.com/p/cahors/"&gt;http://code.google.com/p/cahors/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can hear the first full piece I wrote with Cahors on last.fm &lt;a href="http://www.last.fm/music/hot+pink+brain"&gt;here&lt;/a&gt;, or you can download the MP3 from the Google Code project page. I've not had a chance to go back and write and more music for it recently, but hopefully I'll get back into that soon.&lt;/p&gt;</description><guid>http://j4mie.org/blog/cahors/</guid></item><item><title>How to create realistic smoke effects with astronomical photos</title><link>http://j4mie.org/blog/how-to-create-realistic-smoke-effects-with-astronomical-photos/</link><description>&lt;img src="/static/post_content/how-to-create-realistic-smoke-effects-with-astronomical-photos/smoke1.jpg" alt="" title="Smoke" width="250" class="alignright size-full wp-image-136" /&gt;

&lt;p&gt;I was lucky enough to attend the &lt;a href="http://www.flashonthebeach.com/"&gt;Flash On The Beach&lt;/a&gt; conference in Brighton this week, and one of the highlights was Robert Hodgin of &lt;a href="http://www.flight404.com"&gt;Flight404.com&lt;/a&gt; talking about his stunning work, including his famous &lt;a href="http://vimeo.com/658158"&gt;Solar&lt;/a&gt; and &lt;a href="http://vimeo.com/935317"&gt;Weird Fishes&lt;/a&gt; pieces. His Magnetosphere engine is now the default music visualiser in &lt;a href="http://www.apple.com/itunes/whatsnew/"&gt;iTunes 8&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In passing, he mentioned that his smoke effects were created using photographs of &lt;a href="http://en.wikipedia.org/wiki/Nebula"&gt;nebulae&lt;/a&gt;. He didn't give any details about exactly how this works, but I thought it was such a good idea that I decided to have a go for myself.&lt;/p&gt;&lt;p&gt;The concept I came up with is simple: use a particle system to generate smoke-like behaviour, but instead of drawing each particle as a simple "blob," draw an image of a nebula. The older the particle, the larger and more transparent the image. Fairly simple, but it creates remarkably realistic effects.&lt;/p&gt;
&lt;p&gt;The particle system I used is based on the &lt;a href="http://www.cs.princeton.edu/~traer/physics/"&gt;Traer physics library&lt;/a&gt; (in fact, I used some of their sample code to create the smoke behaviour) but you could use any system you like.&lt;/p&gt;
&lt;p&gt;The images I used are show below. I took pictures of nebulae I found via Google and cropped out the most interesting parts, then applied a circular gradient mask in Photoshop and saved the resulting image as a transparent PNG. The original PNG images are included in the ZIP file which is linked at the bottom of this post.&lt;/p&gt;
&lt;img src="/static/post_content/how-to-create-realistic-smoke-effects-with-astronomical-photos/all.jpg" alt="" title="Nebulae" width="450" height="450" class="aligncenter size-full wp-image-137" /&gt;

&lt;p&gt;Here are a couple of videos showing the results from this process:&lt;/p&gt;
&lt;p&gt;UPDATE: The videos have been moved to Vimeo, please see: &lt;a href="http://www.vimeo.com/3166671"&gt;Smoke 1&lt;/a&gt;, &lt;a href="http://www.vimeo.com/3166712"&gt;Smoke 2&lt;/a&gt;, &lt;a href="http://www.vimeo.com/3166744"&gt;Smoke 3&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The Processing source code for my simple example (along with the images used to create it) can be found in this ZIP file: &lt;a href="/static/post_content/how-to-create-realistic-smoke-effects-with-astronomical-photos/smoke.zip"&gt;smoke.zip&lt;/a&gt;.  If you run this code, you'll first see the particles drawn as red dots. If you press the 'i' key, the images will be drawn. Pressing 'p' hides the red dots. Finally, the 'm' key toggles mouse following mode. Don't forget, you'll need the &lt;a href="http://www.cs.princeton.edu/~traer/physics/"&gt;Traer physics library&lt;/a&gt; for this to work. I used the OpenGL drawing mode because it considerably speeds up image drawing, but it will work using the default Processing renderer.&lt;/p&gt;
&lt;p&gt;This is just a basic sketch of how the idea works, and as I said, I have no idea if this is exactly how Robert Hodgin does it. Either way, I think it looks pretty good.&lt;/p&gt;</description><guid>http://j4mie.org/blog/how-to-create-realistic-smoke-effects-with-astronomical-photos/</guid></item><item><title>House of Cards</title><link>http://j4mie.org/blog/house-of-cards/</link><description>&lt;img src="http://farm4.static.flickr.com/3013/2676056415_062efe4679.jpg" alt="Still from Radiohead video" width = "450" /&gt;

&lt;p&gt;UPDATE: Videos have been moved to &lt;a href="http://www.vimeo.com/j4mie"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I just noticed that I got &lt;a href="http://createdigitalmotion.com/2008/07/21/first-radiohead-house-of-cards-videos-appearing-ben-fry-on-the-code/"&gt;linked to from Create Digital Motion&lt;/a&gt;, a blog about digital video production and computer animation.  Cheers guys!  However, the post says that there is "more at [my] personal site" and.. well, there isn't.  Or wasn't, until now.&lt;/p&gt;
&lt;p&gt;The post is about Radiohead's "House of Cards" video which has been getting a lot of coverage on t'interwebs this week.  I'll spare the technical details as you're almost certainly familiar with them by now (if not, have a look at &lt;a href="http://createdigitalmotion.com/2008/07/14/radiohead-makes-house-of-cards-video-with-3d-plotting-processing-gives-you-the-data/"&gt;this post&lt;/a&gt;).  My two attempts (so far) are below, along with a little info about how they were made.  You can view both the videos in higher quality by clicking through to &lt;span style="text-decoration:line-through;"&gt;YouTube&lt;/span&gt; Vimeo.&lt;/p&gt;&lt;p&gt;&lt;object width="400" height="302"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=2973927&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=2973927&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="302"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;a href="http://vimeo.com/2973927"&gt;House of Cards, Experiment One&lt;/a&gt; from &lt;a href="http://vimeo.com/j4mie"&gt;Jamie M&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The first set of experiments is based on a really simple particle system.  The x, y and z co-ordinates of each point in the data cloud are turned into a particle, which is then "bounced" off a hard surface using very basic physics.  The position of each particle of each frame in the video is calculated the correct number of times to produce the animation effect.  By bouncing the particles at different angles relative to the "camera," appearance of the bouncing particle cloud can be changed, creating some unusual visuals.  The next section of the video is created by duplicating each point three times, to create three versions of Thom's head.  Finally, every particle is given a random velocity, creating an "explosion" effect which again is modelled as a large number of bouncing physical objects.&lt;/p&gt;
&lt;p&gt;&lt;object width="400" height="302"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=2977649&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=2977649&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="302"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;a href="http://vimeo.com/2977649"&gt;House of Cards, Experiment Two&lt;/a&gt; from &lt;a href="http://vimeo.com/j4mie"&gt;Jamie M&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The second video is simpler: no physical simulation, just a set of lines.  Every point is connected to another point with a line.  The number of points slowly increases over the video, so Thom's face slowly appears from randomness.&lt;/p&gt;
&lt;p&gt;I've put some higher-quality stills from the videos on &lt;a href="http://www.flickr.com/photos/j4mie/sets/72157606214314062/"&gt;my Flickr account&lt;/a&gt;.&lt;/p&gt;</description><guid>http://j4mie.org/blog/house-of-cards/</guid></item></channel></rss>