jquery-mondrian : My Very First jQuery Plugin

I am a massive fan of jQuery. Earlier in my career, we made do with massive custom libraries full of nasty hacks to make everything work across all browsers (back to IE5.5, when I began, eurgh), and this left very little time to have fun with JavaScript. jQuery has corrected that for us – it takes care of nasty cross-browser stuff (especially ajax), makes traversing the DOM an absolute joy, and has a huge library of user-contributed code – in the form of plugins – to solve just about every common JS problem you can imagine, as well as quite a few not-so-common ones. This post is about one of those not-so-common ones, namely the one used here on this site to print those shit-looking attempts at Piet Mondrian canvases on the background. It all came about because a) I saw a Mondrian piece and figured ‘those look kinda automatable’ and b) I’d been looking for an excuse to piss about with canvas. You can download, fork, or just laugh at the code here on github, there’s nothing revolutionary in it – it randomly places lines and fills some of them with given colours. That’s it. Really. There are a couple of extras that I’d like to code into it further down the line, one of which is functionality similar to what can be seen on Composition With Javascript – an awesome site I discovered not long after starting to code this plugin, which executes a similar idea in a much better fashion. Another thing I’d like to possibly mess on with is the Piet programming language, how about feeding the output of such a plugin into a Piet interpreter? Or reading in piet-formatted programs? Obviously, there’s a long long way to go to get to any of that from what is essentially a toy, but they’re fun ideas – to me, at least. But all of that really comes down to time available, there are a couple of other avenues that I’d still like to explore with regards to canvas, and they might get played with first – but the bottom line is that I’m writing in this blog more often in order to push myself to do more fun stuff to have more bollocks to write about.

The Highland Fling 2011

A little over a week ago, my awesome employers graciously allowed (and paid for) me to trek up to Edinburgh to enjoy the recently-resurrected standards-based web conference, The Highland Fling. The theme was “back to basics”, which covered a whole lot of ground, and brought with it some very talented speakers. The whole event was compered expertly by Christian Heillmann, with each talk lasting 40 minutes and allowing 20 at the end for an entertaining Q&A chat between him and each speaker. It all started with Steve Marshall talking about “Why Simple Isn’t”. Steve spoke about a variety of phenomena, such as cognitive dissonance & confirmation bias – he even made explicit reference to one of my favourite blogs, (dare you to go there and escape pre-3am, it’s like wikipedia and tvtropes had a more-addictive child). Sometimes the links between these themes and the conference-matter felt somewhat tenuous, but I found it to be a very interesting talk nonetheless. The Q & A really brought it back on track though, with Christian & Steve actively linking the aforementioned phenomena with selling things such as best practice to colleagues and management. Rachel Andrew was up next, with a talk entitled, “Choosing the right Content Management System”. I was initially worried about a conflict of interest – what with her being involved in her own CMS, Perch. However, she proved very even handed, defending WordPress at times and only referencing her own system when it felt necessary. She talked through the many relevant heuristics that need thinking about when choosing a CMS – linking such a choice to users, the project spec & (possibly most-importantly) content strategy. What was particularly fascinating for me, was her idea of eschewing WYSIWYG and replacing it with structured content and markdown / textile / whatever for formatting. This is something that I intend to look a lot further into in the future, and going to take a lot of selling business-side at work! Then came Jack Osborne, who gave a very thorough technical primer on HTML 5 – he went through a lot of the new elements and features, and showed them in action within the context of the latest version of Opera. Jack also talked about how you can start implementing them day-to-day right now, while compromising on business decisions such as supporting IE without JS. I especially liked the idea of using <div class=”article”> wherever you would eventually use <article>, in order to get you in the right mindset for when the HTML5 change inevitably happens. One interesting question that Christian asked was about explaining the new form elements to designers and whether they would necessarily be embraced, Jack explained that a unified, consistent UI is good for everyone – a viewpoint that I’m also a fan of. Remy Sharp talked next about “Interaction Implementation”. In this, he spoke about his process of breaking down a visual comp into individual components and giving estimates of what it was going to cost. This talk was right up my alley, and probably the one which I took the most away from for day-to-day working. He broke an actual design he did many years ago down into individual elements – identifying possible troublespots. He talked about potential risks (such as 3rd parties) and actual costs (including how he assesses IE6 as an added feature). I have pages of notes from this talk, and can’t begin to summarise them all here without downright plagiarising his entire talk, needless to say, I’ll be pawing over them for a good while yet. Conversely, for Mike Rundle‘s talk, ‘From Websites To Apps: The “Apple Look”‘, I have very little in the way of notes. It’s not that it wasn’t a good talk, I was just flagging by this point (just before the last coffee break), and I’m not hugely enamoured by the “Apple Look” (and yes, I know that I’m possibly in the minority there). Some of the bits he did point out with regards to small interface details, were interesting, and no doubt I’ll fail at emulating them myself next time I shit out another design. But I don’t think I can talk about the talk too much here while doing it the justice it deserves. Finally, James Edwards talked about accessibility. He showed live, technical demos of WAI-ARIA features and how they’re all assembled. He talked about roaming tabbing, a feature I’d not heard of before, but makes so much sense in simply modifying tab-orders when changing contexts, I need to remind myself to have a play when I get a moment. He also talked about how these new technologies, such as ARIA, built to help interact with AJAX & the like, were being taken up by the screen reader vendors – ultimately, very slowly – but, similarly to HTML5, it’s good to learn these things in order to prepare for the future. The one thing about James that’s difficult to convey in text, is how obviously passionate he is about accessibility, regardless of the context of that word. He didn’t just talk with regards to screenreaders and disabled users, but also about how IE6 support is necessary in reaching people in developing countries and from poorer social situations. He was, however, quite pragmatic in talking about how IE6 support means achieving the same functionality as newer browsers, but not necessarily through the same means. A great session, and an absolutely fantastic way to end the day.
So all in all, The Highland Fling was a brilliant and informative day. That’s all without even mentioning the humongous lanyards (great for storing notepads and pens) and whiskey in the welcome pack (with it being a Scottish conference, I’d have been deeply disappointed had that not been the case). Massive credit has to go to Alan White, who put this great conference together and made the 3 hour trip each way to rainy Edinburgh more than worth it.

Another new look / reimplementation of the blog

I’ve only gone and redesigned the shit-heap I call ‘my blog’. Well, I say ‘redesigned’, it was more a case of porting it to WordPress and butchering the twentyeleven theme into a Piet Mondrian-inspired mess (more on that in a future post). The reasoning for this is pretty simple: the majority of my full-time job is spent working with WordPress. I love the WP-ecosystem, and would really like to contribute my own plugins / themes etc, but find that hard to do when I’m only 9-5ing it. I still use Python and Django in my spare time a lot – I plan to write up a bit more about my Google App Engine Project pretty soon, and am actively porting another from GAE back to Django (the new pricing model has scared me shitless, I expect it’ll be more of a prototyping platform from here on in). So no need to fret there. Not that you were fretting. Obviously.