Categories
design music tech

Week 07

No I’m not going to start doing a weekly post (although I like the idea), and yes I’ve missed the first six weeks anyway but I felt like posting something random and can’t think of a better blog post title right now.

Yes, blog post. I don’t accept that a blog post can be referred to simply as ‘a blog’, especially given that a blog is a container for many blog posts. This is one hill I am prepared to die on if indeed blogs themselves don’t die first.

I’m currently listening to Microhumans by Ali Wade, for about the seventh time since I bought a copy on Bandcamp the other day. You can find it here and also embedded here:

I first came across Ali Wade when Tom and I saw a live show at Cafe OTO in Dalston (that’s in London).

Side note: Having just Googled that event to find the link, I’m now coming to terms with the fact that that was apparently back in twenty fifteen! My guess had been 2017. Where the hell does time go? Well, apparently we can only regard *imaginary* time as a direction like the other three dimensions, so maybe this explains it.

Anyway as you will have seen if you visited that link, Anthony Child (AKA Surgeon, whom I originally discovered via his track Magnese in Jeff Mills’ Live at the Liquid Room mix, back in 1996, and subsequently went to see DJ many times back when I lived near Birmingham, and generally is someone I hold in high regard) was doing, that night, a live improvised performance with a Buchla Easel, alongside Ali Wade who provided generative projections on a large screen. The whole thing was totally amazing, and the night was only dampened by the following two facts:

  1. That at the end of the show I felt compelled to get up and go and slightly-drunkenly shake Anthony’s hand, and tell him how great he was only to realise mid-sentence it wasn’t the end of a techno night in 1998, and what was I doing? And that he most likely just wanted to be left alone to pack up his kit and get home, so I started to apologise then ended it awkwardly.
  2. That I then had to get a £70-odd cab to Stansted in order to be at a meeting at 8am the following morning in an airport meeting room having slept for about 4 hours in a Travelodge. A meeting that culminated in an ultimately failed business venture that ate up much of the intervening time between now and then and, perhaps, provides a more plausible explanation than the imaginary time thing.

Anyway, following that night I have been following Ali on Twitter since and this is how I heard about his new album. Also Tony posted that Cafe OTO set to his SoundCloud here. If you don’t like that sort of thing then then there’s probably no convincing you otherwise. It is kind of niche.

Anyway. So, yes, Microhumans has got me thinking about my own endeavours to find a creative voice that I am happy with.

To provide some context, I’ve been dabbling (well no, that undersells it) but anyway I have been dabbling with making my own music for a few years now. Well… I actually started back in 1995 using a Roland keyboard hooked up to an Atari ST in the music dept at school but it has not been a sustained effort for all of those 25 years. It is something I have dipped back into over the years but I’m doing a lot more recently.

Why? Because I have this constant need to create something, and music is something I am still as obsessed with as when I was a teenager.

When the web came along the thing I was excited to create was web stuff, and it still is (that’s my career) but it has tended towards the technical side of things for me. In the early days of the web a web designer did everything: designed and built it. In all honesty there’s wasn’t much good design a lot of the time – things went straight into build. Java applet water ripple effect, marquee text, job done. Often ugly, if quaintly naïve.

But then I got inspired by people like (the late) Hillman Curtis and The Designers Republic™. I love the elegant simplicity of amazing design, and how it makes you feel. So design was what inspired me. I got a lot better. I learned about typography and book layout principles and the value of white space and grids and pace and consistency and so on. I got a job in London in a proper web design studio (that became a digital ad agency) and learned a shitload. I designed stuff for high profile names and brands. I got promoted and briefed junior designers, and critiqued their work. I became a Creative Lead at an award-winning agency.

But I was never in my mind as good as those (as I saw them) proper designers. The ones who didn’t come from a coding background, but instead had done graphic design courses or cool-sounding typography courses in Italy. The ones who used Macs long before OS X came out, when I was still playing Quake II on my self-built gaming PC.

Of course I was good at my job because they wanted ‘a me’, i.e. someone who could bridge the technical-creative gap well and make stuff that was slick to use, performed really well and looked great too. Yes, the Flash era.

Privately, while I was very happy with the work I was putting out (some really great sites), I never felt comfortable being the guy doing original concepts, designing the logo, coming up with the visual identity and so on. I could do it but my attempts usually felt too mathematical and safe. I’m happy drawing isometrically… using a ruler but never freehand.

I like logic and a grid, but sometimes you need to just be free. I suppose this restriction lends itself to certain types of design but not to all.

At the heart of it all I think that I think in a technical way. I’m good with tech. I don’t generally find computers difficult. It all just seems very logical. I have the patience and thoroughness to trace a complicated problem back to its source and solve it. Other people, I note, often have a hard time figuring out how to connect to the WiFi, or whatever, but they are probably better people in other more important ways.

So I play to my strengths and I have been in well-paid jobs building complicated things for high profile companies and organisations. And it pays the bills. And it’s satisfying. And I’m good at it. But behind all of this is still the desire to create. And ideally create something not so commercial and disposable, but instead for creativity’s sake. That’s not really changed since making my first homepage on my Freeserve webspace. The Freeserve account that came on a CD-ROM from Dixons.

Despite being outwardly technical (and being labelled, sometimes to my quiet dismay, as a tech guy) I do not find technology in and of itself very interesting. It’s a set of tools. If it’s not working I will try fix it because broken tools are at best annoying. But I really want technology to be this invisible backstage presence, not the focus of anything.

So I come back to this conundrum of what I can do in my life to create something expressive and of worth. I have concluded that while I’m adept enough at design to do decent web design work I’m never going to be a graphic artist. And that no longer excites me like it did (although I still love other people’s work).

Then for a while in the mid 2000’s it was photography that I was going to do. Until I met a professional photographer and was, ironically, put off doing it professionally. Rachael is of course brilliant and was always inspirational, but seeing the realities of what it involved day to day changed my mind about choosing that career path.

I need a thing. So it’s still music, then.

Over the past few years I’ve amassed a collection of hardware music gear that helps (to my ears) create a more organic sound than what I was getting using just a computer. I want noise and imperfection due to crackly guitar pedals and overdriven mixer channels, rather than by consciously adding them with some plugin (though I have nothing at all against anyone who does that stuff well with software).

What I’ve been doing since building this new setup is, with hindsight, learning how to use – and getting over the initial novelty of working with – the equipment. I’ve done some decent tunes some of which were picked up and released by Anode Records, which was amazingly encouraging. In an environment where it’s very hard to get any honest feedback from anyone, getting at least the nod that you’re in the right ballpark is priceless. I’m pretty proud of a lot of those tracks but they are not there yet.

Since then, and this year, I’m working on some new stuff. However this time I’m going to amass a collection of material and mull it over and (I hope) probably never release most of it except for only the very best stuff once I have had time to be more objective about it.

To this end I’m using a new and anonymous identity for more ‘ambient’ music and I’ll also do some more dance floor stuff under the firstperson name.

So, to get to my point, it was on listening to Microhumans (long pre-amble over) that I realised I still have some way to go with this. Like great design, Ali’s music has a simplicity and elegance to it that shines a harsh light on my own efforts. A lot the music I have done tends too much towards being too busy even though all along I’m aiming for simplicity and elegance. I suppose, as with good design, it appears effortless when it’s done well – but in fact a lot of hidden work has surely gone into it.

This is famously the case with the creative process in general, so it is something I must keep in mind on those days when I get disheartened having finished a track I’ve been working on for days only to realise it sounds uncomfortable or too fussy.

This all reminds me of that modern-art-hater’s comment ‘I could have done that’, when looking at a Rothko. Well, no, you didn’t and also you couldn’t. But you could possibly make a rubbish emulation of it.

I’m not trying to emulate anyone else’s music but of course I am inspired by it. Earlier I was musing on whether I should again play here to my strengths. Perhaps rather than fighting against my natural tendency towards logic and technical thinking there is a way of building some interesting music around how my mind naturally tends to work. For example this could be using Max/MSP, and turning my coding skills towards making sounds. I have some ideas about machine learning that could be interesting there.

However I like the physical process of jacking things into each other and turning knobs, and that noise that comes out of the Volca Keys or the Juno chorus. I already spend too long at the computer so the thought of more coding (which is a big part of my job) puts me off the software approach… although yes there are control interfaces, and, gosh, maybe modular synths are an option although that is becoming a cliché…

Anyway, onward.

Categories
geek mathematics tech

Noughts and Crosses

TLDR: play it here

Between Christmas and New Year this year, as every year, the Royal Institute Christmas Lectures took place. This year they were presented by Hannah Fry and the title was ‘Secrets and lies: The hidden power of maths’ (here on BBC iPlayer).

Our boy is now seven so we were keen to sit him down to watch the lectures. I remember being at school and struggling a bit with the “why” of maths. Understanding how maths is applied in the real world can really bring it to life. This year’s lectures did exactly that and he loved them!

In one of the lectures Matt Parker demonstrated a machine called MENACE created by Matt Scroggs (a copy of Donald Michie’s 1961 MENACE). MENACE is built out of matchboxes and can effectively play noughts and crosses:

Matt also made this this JavaScript version of MENACE.

I found this totally fascinating and decided to make my own version, basically as a learning exercise. It had never previously occurred to me that building reinforcement-based machine learning code might be something within the reach of my capabilities.

My version

Play it here – Hint: when you first load it you are playing a complete beginner. Click the green button to load a pre-trained computer player.

It is built in AngularJS which is a framework I know well, so I could quickly put together the basic game mechanic. AngularJS provides a code-light way of binding data to an interface.

The first (and easiest) part was to make a noughts and crosses game engine. This is fairly straightforward because it’s such a simple game. Initially the game was just for two human players.

The second (and more interesting) part of the task was to make the computer player itself. The computer player is separate from the game program, and is notified by a window event when it is its turn to go. The game controller has a public method so the computer can ask it for the board configuration, and another method for the computer to make its turn (also used by the human player).

The computer player is in not programmed to play noughts and crosses, it has to learn how to play it from scratch. The only thing it gets told is where it can go, so it doesn’t try to go in places that are already taken.

The computer player deals quite abstractly with a flat array of positions that it calls the ‘stateArray’. For basic play it doesn’t even need to “know” that these are arranged in a square. The process is:

  • Get the state array from the game controller
  • Find which places are free
  • If it’s the first time it’s seen this configuration: Generate an object representing an equal chance of going in each free position. Otherwise: Fetch from memory the existing object representing this configuration.
  • Pick a position at random from a pool of choices where the number of each choice in the pool is determined by the weightings (so for the first time it sees any given configuration there are an equal number of choices for each position).
  • Make its move
  • Remember where it moved and what the board configuration was at the time
  • At the end of the game, for each move made, create or update a permanent record of the configuration at that time updating the weighting according to whether it won, lost or drew the game. In other words if it won it will be much more likely to make that move again. If it lost it will be less likely to make that move again (and eventually the chance will be zero) and if it drew it will be just slightly more likely to repeat the move.

Rotations

All of the above can be done without the computer player needing any sense of it being a square board. However an extra level of complexity was required for it to work like MENACE – namely rotations (technically rotations and flips). So in addition to the above I added a rotations handling service. This needs to know the board width and height. Essentially it turns that flat state array into a two dimensional array (rows and columns). These 2D boards can then be rotated or flipped. For any given board configuration the rotations service works out all the equivalent rotations that are unique on the fly. So for some configurations there would be no equivalents (e.g. a blank board, or only one item in the middle). It mirrors and flips the board so there are up to eight equivalents for any board layout (see this Google sheet).

The mirrors service itself took me about a day to grapple with, it’s complicated because we need to:

  • Get all rotations of the current board
  • Search our history for the ‘keys’ of those rotations (to see if we have seen any of those rotations before)
  • On finding a match get the move weighting of that match.
  • ‘Unrotate’ the matched move weighting object (reverse the process) so it aligns to the ‘real’ board
  • Pick a move using the unrotated weighting and make our move
  • Finally re-rotate our actual move position so we can update the chance of going there again in the context of the rotated version in the history

This mirrors service itself ran to 250 lines of code. There are probably ways to do this more simply, perhaps by people more adept at maths! I got there eventually but this was by far the most complicated party of the work and took a day to write (this file and the integration with it back inside the computer player module).

I made the rotations module separate from the computer player to keep things flexible. It does not have the board dimensions hard-coded, so it could be used for other games too.

Summary

Take a look at the source code here on Github

This was great fun to build. Noughts and Crosses is of course a very trivial game with only a few hundred possible board configurations (and even fewer due to the rotations) but even so building a computer player that learns how to play it was surprisingly complicated.

I am now wondering if I can repurpose the computer player to learn how to play a simplified version of Pontoon (i.e. should it stick or twist for any given hand?). And I am also thinking about a way of building a player for Connect 4.

Connect 4 has many more places and possible configurations so it might require a different approach but I will see where I get to. The key differences are:

  • In Connect 4 you can only pick a column to move in, not a row (pieces always fall to the bottom and do not float)
  • In Connect 4 we can’t rotate the board as it is bound in one orientation by gravity. However we could most definitely half the configurations (and must do to speed up learning) by flipping horizontally.
  • The number of possibly configurations is vastly greater than in noughts and crosses so we might not be able to store every possible state, in part due to memory limitations and in part due to this being inefficient. Given that we only need to worry about rows, columns or diagonals of length 4 it might be sufficient to only consider configurations within 4×4 squares regardless of where they are on the board. This should reduce the amount of unique patterns to store. I will report back once I get going with it.

Anyway let me know what you think. Or if you have any ideas on how to simplify or improve the code let get in touch and / or make a pull request.

Categories
ade design mobile tech

cappchur, data capture app

cappchur - customer data capture app

cappchur is a simple data capture app for tablet and mobile, aimed primarily at the exhibition, trade show and retail markets. The project is a collaboration with Paul Pike.

The app launched this week and is available for iPad, iPhone or iPod Touch for FREE in the App Store, and for Android tablets and phones here on Google Play.

cappchur has been designed to be simple and intuitive without any complicated set up process. Once you’ve installed the app you can start using it straight away, with no need to register up-front. You can also use it completely offline.

If you or someone you know is running a stall or exhibiting at an event please give our app a try and let us know what you think: cappchur.com.

Categories
Art geek tech

deepdream roundup

If you missed deepdream in the news then go and read this article and the original research blog post, and / or look at the original gallery full screen.

Good. Now, given that Google made the software open source, there’s lots more to look at. Check out the #deepdream hashtag on Twitter.

And this Twitch channel let’s you “live shout objects to dream about”.

And finally, these two videos are worth a watch:

Journey through the layers of the mind from Memo Akten on Vimeo.

Noisedive from Johan Nordberg on Vimeo

[Edit]

Also, someone ran it on a clip from Fear and Loathing…

Categories
geek photography tech web

Google Photos – great but no faces?

  
Google’s new Photos app seems pretty great, with a consistent experience between the web and its native Android and iOS versions. The way your photos are organised is better than in Apple’s app, but the clincher is that they give you unlimited online storage if you’re willing to have them compress the originals. Given that (for me) this is just for family snaps, that is fine.
My iCloud storage has been full for weeks, and a combination of not being bothered enough to get round to it and not being sure I want to pay for the service (5GB feels tight, given I recently spent £ hundreds on a new iPhone) has led me to leave it like that. So goodbye iCloud Photo Library.

And as a it happens you can still post photos to iCloud shared libraries (which are, confusingly, separate from the iCloud Photo Library) direct from the Google Photos app. 

Anyway two days into using it a couple of things are eluding me:

  1. A lot of people are tweeting about how impressive the facial recognition is, and the feature was demonstrated in the Google IO Keynote, but my Google Photos app (and also on the web) has no mention of faces anywhere and no apparent means of manually tagging faces – despite my library being full of photos of my family. Perhaps they’re rolling it out incrementally.
  2. Google has rather cleverly tagged and grouped a load of objects and things such as cats, cars, trains and food. However these collections contain some notable mistakes. A photo of one of my cats sleeping has appeared in the ‘food’ set, for example. Oddly there seems to be no way of untagging these things. Surely if you could then this could theoretically help its learning algorithm.

I’m guessing these things will be sorted out in due course, but there’s a chance I’m just missing something obvious. I’ve searched Google and Twitter but can’t find anyone else with the same problem (I mostly care about the face recognition).

Anyone else?

Categories
geek tech web

The Web vs native apps

Back in 2010 Sir Tim Berners Lee warned about the threat posed to the web by Facebook et al.

Yesterday Jeremy Keith made this timely post (thanks to @fjordaan for tweeting it) about how poorly-performing websites are fuelling the shift towards native apps. In case you missed it, Facebook – which has already created a closed content silo – recently launched Instant Articles, which is basically their proprietary presentation mechanism for external content that is (presumably) be pre-cached to enhance the speed of the experience.

Rather than taking you to the external site they’re keeping you on Facebook, which is obviously good for Facebook, but you can’t argue with the fact that sometimes the user experience of external news sites is pretty terrible, so users will understandably like Instant Articles.

I’ll not repeat Jeremy’s points so read his post.

As an aside (from me), Jeremy makes a valid point about the rise of JavaScript frameworks being a contributing factor to the problem. I’ve long argued about the appropriateness or otherwise of single-page-application sites. The truth is that there is a time and a place for them, but they are not necessary for delivering content quickly on the web. People often lose sight of this.

In a previous guise I remember arguing against going full-single-page-app in favour of ‘proper’ indexable content URLs on a project. And for keeping the number of requests on those pages down to a minimum (and, yes, making those requests super speedy via, minification, caching et cetera).

This is all well understood good practice, and yet a BuzzFeed article I just tested triggered 335 individual server requests. And one of the reasons I don’t like WordPress particularly is that out of the box (and with most of the popular themes) it leads to bloated request-heavy pages. There’s no culture of optimisation around it, yet WordPress seems more popular than ever (Yes, this site is WordPress; it’s good at doing blogs).

This all said, I have spent most of the last 18 months years building complicated AngularJS-based single page application Milk. However, the reasons why a JavaScript framework is appropriate for Milk are:

  1. It is only for use by logged-in users.
  2. It serves individual user-specific content such as their personal messages. It’s much faster to load the raw JSON data of a message than to reload an entirely new document with all its assets.
  3. It provides live status updates on some items.
  4. Our caching and local storage strategy ensures that users only load the application framework once, even though they may visit hundreds of pages within the app over the course of a week.
  5. And even then, our uncached page load is only 242KB (on a mobile device) and 18 requests, many of which are asynchronous.

It’s an application not a website, it just happens to use web technology. This is a very different use-case to a public page of content such as a news article.

The web is natively great at delivering pages of text very quickly. I consider documents and applications quite separately. And I don’t think it’s contradictory to be a cheerleader for both. The trick is, I believe, not to try to make documents more application-like.

Mind you, that ALL said… Although JavaScript frameworks are a problem in some instances, I think the real culprit in the case of the Buzzfeeds of this world, is the amount of advertising and sponsored content adding bloat to their pages. If publishers had spent more time testing their sites on edge and 3G mobile connections maybe we’d not be in this situation where Facebook Instant Articles look set to be a hit.

[Edit]
This article on A List Apart also makes some good points

Categories
engineering tech

On encryption

I should apologise that this blog is not (currently) served over https. It’s on my to-do list, but that list is pretty stupidly long. (As an aside I don’t look forward to the day when I have nothing to do. The idea of just putting my feet up is horrible. It feels like I’ve had at least 50% more things to do than I have time to do since about 2007; but the upshot is that I genuinely don’t think I’ve been bored once in the last 7 years.)

Anyway, recent comments by Phil Zimmermann – the creator of email encryption software PGP – struck me as particularly (if unsurprisingly) smart. The upshot is yet another timely argument against David Cameron’s frankly embarrassing stance on end-to-end encryption: Hackers are always going to be able to get around whatever security you put up, but if your data is properly encrypted it doesn’t matter if they get access to your servers. So those Sony emails and movie scripts, for example, would never have been leaked if they’d been stored encrypted.

This article is worth a read, as is Phil’s original blog post.

In related news, BWM recently patched their ConnectedDrive software after a flaw was identified by a third party. The shocking part of the story is that prior to this patch the software was using unencrypted plain text HTTP to send and receive data! Given that the software operates door locks (among other functions) it is mind-boggling to me that its developers didn’t choose HTTPS in the first place.

A culture of ‘encrypt by default’ needs to be instilled.