Photographs of Seats

2005-10_4444_lomo-lca_jessops-cs-100_04.jpg

Guildford Train Station, 2005

2006-04_0575_lomo-lca_kodak-elite-chrome_07.jpg

Connex/South Eastern, 2006

2007-05_1653_zorki-4k_kodak-bw400cn_32.jpg

Willesden Green, 2007

2007-08_4100_lomo-lca_ilford-xp2_32.jpg

Switzerland, 2007

2007-08_4224_lomo-lca_jessops-cs-100_07.jpg

Oban to Mull Ferry, 2007

2009-08_8136_voigtlander-bessa-r_fujifilm-superia-400_18.jpg

Isle of Gigha Ferry, 2009

2010-10_5541_olympus-af1_kodak-gold-200_16.jpg

Fortress Studios London, 2010

2010-11_6985_lomo-lca_fujifilm-superia-400_15.jpg

New York Subway, 2010

2016-09_0391_olympus-mju-ii_kodak-ektar-100_04.jpg

North Finchley, 2016


Trainspotting

Quite a few of the places I've lived in over the last decade have been right next to a train track.

In my second year at university, my bedroom was pretty much in contact with a railway bridge. I can remember trying to churn out words on an essay as the first train went past, reminding me that I’d worked through to 6am 😫

2006-05_1793_lomo-lca_fujifilm-super-g-400_33.jpg

Guildford, May 2006. It's not the clearest photo (as it has been exposed twice) but you can make out the corner of the house in the top right, and the wall of the bridge running along the length.

My flat in Willesden Green had the Jubilee Line running above ground at the end of the garden:

2006-08_5796_lomo-lca_jessops-cs-100_00.jpg

Willesden Green, Jubilee Line, August 2006.

The scene above, taken 10 years ago, is remarkably similar to the situation in my current flat:

R0000419.jpg

East Finchley, Northern Line, August 2016.

Anyway a few weeks back, just as I was heading to bed, a train pulled up at the end of the garden and stopped. I could just make out the voice of the driver over the tannoy. Perhaps I was the only one listening—the train seemed pretty empty.

R0000414.jpg R0000415.jpg R0000410.jpg

Conway’s Game of Life with Redux + Canvas

Animation of Conway’s Game of Life

In the past few weeks I’ve been doing a fair bit of work with Redux, a library which helps manage data and state in JavaScript applications. There’s an emphasis on functional programming and immutable data, which takes a little getting used to, but it does feel like a suitable approach—particularly for implementing Conway’s Game of Life…

each generation is a pure function of the preceding one

Conway’s Game of Life on Wikipedia

This fits nicely with Redux’s concept of “reducers”, which take in the current state and an “action”, and return a new state.

The app state is just the grid: an array of arrays containing cell values (1s and 0s). There is just a single action, a 'TICK', and when a 'TICK' is dispatched, the grid reducer generates a new grid based on the current grid:

function grid (state, action) {
  if (typeof state === 'undefined') return randomGrid()

  switch (action.type) {
    case 'TICK':
      return nextGrid(state)
    default:
      return state
  }
}

function nextGrid (grid) {
  return grid.reduce(function (nextGrid, currentRow, y) {
    var newRow = currentRow.map(function (value, x) {
      return nextValue(x, y, value, grid)
    })

    nextGrid.push(newRow)

    return nextGrid
  }, [])
}

The grid values for the next tick are computed based on the neighbouring values (as per the rules):

function nextValue (x, y, value, grid) {
  var neighbours = neighboursOf(x, y, grid)

  var livingNeighbours = neighbours.filter(function (value) {
    return !!value
  }).length

  return +willLive(value, livingNeighbours)
}

function willLive (value, livingNeighbours) {
  return value
    ? livingNeighbours === 2 || livingNeighbours === 3
    : livingNeighbours === 3
}

function neighboursOf (x, y, grid) {
  return [
    [-1, -1], [0, -1], [1, -1],
    [-1,  0], /*x,y*/  [1,  0],
    [-1,  1], [0,  1], [1,  1]
  ].map(function (coords) {
    return valueAt(x + coords[0], y + coords[1], grid)
  })
}

function valueAt (x, y, grid) { return grid[y] && grid[y][x] }

The render function redraws the state on a <canvas> whenever it changes, and a 'TICK' is dispatched every 100ms to generate the next state:

var store = Redux.createStore(grid)
store.subscribe(render)

render()

setInterval(function () {
  store.dispatch({ type: 'TICK' })
}, 100)

I’m sure this could be improved, but it feels like a pretty nice solution.

See it in action: Conway’s Game of Life with Redux and Canvas, and view the full source.

Hat tip to Alan R. Soares. I had a peak at his implementation with React and refined my willLive function a based on it.


February 2016 Playlist

Advice to Young Girls by Inga Copeland (w/Actress)

Discovered this via CTM’s Recommended Listening feature.

Perth by Beirut

I got a DAB radio for my birthday, so I’ve been listening to the radio a lot more. This catchy tune caught my ear. Their latest album is pretty good too.

Amerika by Liima

New from the Efterklang + Finnish percussionist Tatu Rönkkö.

Zap by Vinny Villbass

Heard this at the Ja Ja Ja London Club Night. The 90s house-y synth section in the middle is madness!

Because by Smerz

Smerz headlined at the Ja Ja Ja club night and were really great live. Can’t wait to hear more stuff from them.


Converse

R0000244.jpg

East Finchley, London. January 2016.


Bløsh—Give It Away


Letterpress

I had an amazing time at Harrington & Squires, learning about the art of letterpress printing. Chrissie and Vicky were such great hosts, and if you get a chance, I’d highly recommend their workshops, or visiting their shop in Tufnell Park.

Above all else show the data

A finished print—Tufte’s “show the data” quotation.

Fluorescent Ink Roller

Unfortunately the photo doesn’t do justice to the fluorescence of that orange!

First Pass Chase in the press Second Pass Printing Presses

Adana 8 x 5 printing presses. Want.

"Furniture" and cases of type

“Furniture” and numerous cases of type.


Efterklang’s Mirador vs. ustwo’s Monument Valley

Some remarkable similarities between these two M.C. Escher-alikes.

Efterklang—Mirador (2008)

Monument Valley (2014)


Technology for Saving Time

My new thing is to listen to Danish radio in the morning in the hope that it will improve my Danish language listening skills. At the moment I can only pick up the odd word in each sentence, but there was an interview (in English) with Prem Rawat that caught my ear, which included this:

I think we are really out of touch with ourselves. We’re in touch with everything else: this account, and that account, and our phones. Things that were supposed to save us us time may or may not save time, but they definitely occupy that free time we were promised.

Prem Rawat DRP1’s Sproglaboratoriet

This reminded me of something Mark Steel said when he was on The Infinite Monkey Cage show. He reckoned that the problems lie with the “social mechanisms” that employ the science, rather than the science itself:

In the early 1970s, there were two things that we were promised … One was that space travel would go on and on, and by now we’d certainly be on Mars. But the other thing was that new technology would mean that we would have this crisis of having so much leisure, because everything would done by machinery … what on earth do we do with all the time? As we know, the average working week now in Britain is longer than it was back then.

Mark Steel BBC Radio 4’s The Infinite Monkey Cage Series 2 Ep. 4

The Essence of Programming

What I mean is that if you really want to understand something, the best way is to try and explain it to someone else. That forces you to sort it out in your own mind. And the more slow and dim-witted your pupil, the more you have to break things down into more and more simple ideas. And that’s really the essence of programming. By the time you’ve sorted out a complicated idea into little steps that even a stupid machine can deal with, you’ve certainly learned something about it yourself. The teacher usually learns more than the pupil. Isn’t that true?

Dirk Gently’s Holistic Detective Agency Douglas Adams

View more posts in the archive