<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blink Design</title>
	<atom:link href="http://blink-design.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blink-design.net</link>
	<description>Portfolio &#38; blog of Simon Smith, front-end web developer</description>
	<lastBuildDate>Wed, 26 Oct 2011 09:00:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>My nifty MooTools Flickr class</title>
		<link>http://blink-design.net/my-nifty-mootools-flickr-class/</link>
		<comments>http://blink-design.net/my-nifty-mootools-flickr-class/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 09:00:23 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Class]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[MooTools]]></category>

		<guid isPermaLink="false">http://blink-design.net/?p=226</guid>
		<description><![CDATA[When I re-built this portfolio I decided I also wanted to get on the Flickr bandwagon. I like to think...]]></description>
			<content:encoded><![CDATA[<p>When I re-built this portfolio I decided I also wanted to get on the Flickr bandwagon. I like to think I have an interesting array of photos and also it gave me an excuse to <a href="http://www.flickr.com/services/api/">play with the Flickr API</a>. It&#8217;s probably worth noting that the world isn&#8217;t short of MooTools Flickr plugins (<a href="http://mootools.net/forge/p/request_flickr">Request.Flickr</a> &amp; <a href="https://github.com/ninjapenguin/MooFlick/">MooFlick</a> to name just two) so why bother writing my own? The simple answer being that I didn&#8217;t want to cop out and use someone else&#8217;s code on my own portfolio. It feels a bit cheap. So, you&#8217;re welcome to use this class if you need some Flickr action, and I will briefly detail using it.</p>
<h2>Say hello to Flicker</h2>
<p>Genius name no?</p>
<p>Before going any further it&#8217;s probably a good idea that I provide a link to the files <a href="https://github.com/FashodaDrummer/flicker">which can be found on GitHub</a>. Got em? Good.</p>
<p>Using the Flicker class is pretty easy, you just need an element to contain the photos <a href="http://idgettr.com/">and your user ID</a>:</p>
<pre class="prettyprint">new Flicker( $('container'), '41265688@N02', { /* options */ } ).getPhotos();</pre>
<p>Once you call <code>getPhotos</code> a request to the Flickr service will be made you will get a list of the latest photos from your photostream. This will also work with any other username, it doesn&#8217;t have to be yours.</p>
<h2>I like options</h2>
<p>I&#8217;ll simply list the default options object from the source as it has self-explanatory comments and it would be a bit pointless of me to re-write them:</p>
<pre class="prettyprint">options : {
    num : 6,

    // Type of element to contain each photo
    element : 'li', 

    // Attached to each containing element
    className : 'flickr-photo', 		

    /*
	Size of images to return:
	_s = 80x80
	_t = 100x75
	_m = 240x180
	'' (empty string) = 500x375
    */
    imgType : '_m',
    random : false,

    // Callback passed array of photo elements
    onImagesReady : function( elements ) {

	elements.fade('hide').inject( $(this) );
	    elements.fade('in');

	}
    }</pre>
<p>That&#8217;s pretty much it for the Flicker class, but what about loading images from a specific set?</p>
<h2>Flicker.Set</h2>
<p>You will need a few more details to be able to load photos from a specific set. As well as a user ID you will also need the set ID and <a href="http://www.flickr.com/services/api/misc.api_keys.html">request an API key from Flickr</a>.</p>
<p>Ensure you have both the Flicker and Flicker.Set classes on your page and just pass the extra arguments:</p>
<pre class="prettyprint">new Flicker.Set( $('container'), '41265688@N02',  '72157626037018637', 'xxxx API Key' ).getPhotos();</pre>
<p>As well as the options provided by Flicker, there are a few changes to handle a set:</p>
<pre class="prettyprint">        // Additional data to request from Flickr API
	// http://www.flickr.com/services/api/flickr.photosets.getPhotos.html
	extras : 'date_taken,url_sq,url_m',
	photosetLinkText : 'View this set on Flickr',
	photosetLinkPos : 'after'</pre>
<p>I&#8217;ve only listed the ones you&#8217;re likely to change.</p>
<p>With all that in place you should now be seeing a list of images from your chosen Flickr set. Easy!</p>
<h2>Taking it further</h2>
<p>If you check out the source of this blog&#8217;s home page you can see my usage of the Flicker class. You will also notice that I&#8217;m actually calling <a href="http://blink-design.net/wp-content/themes/blinkdesign/scripts/classes/PhotoSet.js">a class called Photoset</a>.</p>
<p>To add the additional functionality (shuffle, Highslide pop-ups) I extended Flicker.Set; creating a nice structure of MooTools classes.</p>
<p>I&#8217;ll leave you to play about with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blink-design.net/my-nifty-mootools-flickr-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tips on writing a front-end developer CV</title>
		<link>http://blink-design.net/tips-on-writing-a-front-end-developer-cv/</link>
		<comments>http://blink-design.net/tips-on-writing-a-front-end-developer-cv/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 21:14:03 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[CV]]></category>
		<category><![CDATA[Recruitment]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://blink-design.net/?p=187</guid>
		<description><![CDATA[For the last month or two we&#8217;ve been searching for a decent front-end developer to join the Radio Times ranks....]]></description>
			<content:encoded><![CDATA[<p>For the last month or two we&#8217;ve been searching for a decent front-end developer to join the Radio Times ranks. My involvement in the project has been coming to a close for a while (due to <a href="http://www.guardian.co.uk/media/2011/aug/16/bbc-completes-magazines-sell-off">Radio Times no longer belonging to BBC Worldwide</a> any more) so finding a dedicated resource has been high on the &#8220;shit that needs to get done&#8221; list.</p>
<p>Luckily, I was given the fantastic task of sifting through CVs from potential candidates.</p>
<p>Now, if your sarcasm detector has just gone haywire then don&#8217;t worry, it&#8217;s with good reason. You see initially I presumed I would be swamped with all manner of fantastic developers all clamouring for some Radio Times shaped pie. Unfortunately it turned into being a frustrating trek through a vat of Word document treacle, and the bulk of that frustration stemmed from the quality of CVs that fell into my inbox.</p>
<p>I saw some good, and saw some bad. So much so in fact, that I thought I could point out a few recurring themes and hopefully inspire some developers to represent themselves more favourably.</p>
<h2>Whatever happens show me some code!</h2>
<p>I don&#8217;t care if you&#8217;ve just burst into flames whilst writing your CV. The last thing your charred fingers should be doing is providing a way to get to your code.</p>
<p>I&#8217;m not sure I can convey <em>just how</em> important this point is (admittedly, the topic of spontaneous human combustion might just do the trick).</p>
<p>The amount of developers I&#8217;ve witnessed without <em>some</em> form of portfolio is quite baffling. At some point in the recruitment process a technical person (most likely a fellow developer) is going to want to see how good you are; and there is no better way than checking out your code.</p>
<p>Linking to the home page of a site you worked on is not good enough. You may have written the whole site, or you may have altered the heading text in a sidebar. It&#8217;s impossible for the developer perusing your CV to know this. Explaining what you did specifically is a possible alternative, but you need to be sure your code won&#8217;t be re-written. Especially if someone does it badly.</p>
<p>If you don&#8217;t have a portfolio then upload some snippets to <a href="https://github.com/">GitHub</a>, <a href="http://jsfiddle.net/">jsFiddle</a> or even <a href="http://pastebin.com/">Pastebin</a> (it has syntax highlighting!). Basically, get your code in front of your potential employer as fast as possible. They&#8217;ll already be thinking &#8220;I like this guy&#8221; for making their job that bit easier.</p>
<h2>Your <em>entire</em> employment history does not interest me</h2>
<p>The web is a fast moving place and a good front end developer has to adapt to new techniques quickly. This usually means we have to drop techniques or coding practices that worked before but are no longer the best way to go.</p>
<p>Think how fast the landscape has changed already. Mobile first development, HTML5 and responsive design are just some examples of technologies and design patterns that have absolutely taken off. Showing awareness of these techniques and embracing them often reveals the difference between a &#8220;9 to 5&#8243; developer and someone who lives and breathes their craft.</p>
<p>With this mind I found myself paying less attention to job details more than a couple of years old. Candidates tend to include a huge paragraph outlining everything they did at each stage of their employment history and frankly, knowing how awesome you were at IE6 bug fixing in 2008 is not really relevant now. That&#8217;s not to say an employment history isn&#8217;t useful (if you worked at Facebook in 2008, you should damn well make it clear!) but it&#8217;s unncessary to outline everything.</p>
<p>Include a short summary of your time at older positions, and pile on the detail about all the cool stuff you&#8217;ve built in the last year or two.</p>
<h2>Keep your skills succinct</h2>
<p>Ah, the skills list. A place to spit out every single acronym and buzz word that you can think of. It&#8217;ll make you look cool right? No, it won&#8217;t.</p>
<p>Limit it to the core skills that you actually use. And for god&#8217;s sake don&#8217;t list every application you&#8217;ve ever opened. I can safely assume you are competent with an IDE and Microsoft Word.</p>
<div id="attachment_207" class="wp-caption aligncenter" style="width: 630px"><img class="size-full wp-image-207" title="Skills" src="http://blink-design.net/wp-content/uploads/2011/10/Screen-shot-2011-10-20-at-23.55.22.png" alt="" width="620" height="360" /><p class="wp-caption-text">One of my favourite &#39;kitchen sink&#39; lists</p></div>
<p>&nbsp;</p>
<h2>Be prepared for agencies to interfere with your CV</h2>
<p>A few times I have seen recruitment agenices add their own front page to a candidates&#8217; CV or even go as far as editing their actual details. This can be a problem because they&#8217;ll usually just add keywords and more skills, which of course you have not authorised.</p>
<p>To combat this I recommend sending your CV as a PDF (using the <a href="http://www.doc2pdf.net/">many free services available</a> to convert from a Word document) and also making the file available for download from your portfolio.</p>
<h2>Spelling and grammar still count</h2>
<p>Don&#8217;t rely on your chosen word processor to cover your back when it comes to these two. Read your CV, re-read it and then read it again. Even better if you can get a colleague/friend to give it a vigorously strict review.</p>
<p>If basic mistakes like the difference between &#8216;there&#8217; and &#8216;their&#8217; or &#8216;you&#8217;re&#8217; and &#8216;your&#8217; are peppered all over you CV then you&#8217;re only going to create a negative impression. After all, if you don&#8217;t take care with your incredibly important CV, what are you like when it comes to code quality?</p>
<p>Oh, and definitely make sure you spell things like JavaScript and jQuery correctly (it&#8217;s not Jquery!), the little things count!</p>
<h2>Make a big deal out of personal projects</h2>
<p>Working outside of your scheduled &#8217;9 to 5&#8242; job says a lot about your attitude to front-end development. There is a lot to keep up on in the front-end world. All the new parts of HTML5/CSS3, new approaches to problems being discovered and shared on twitter and blogs, and finding the time to actually practice and learn this stuff. It&#8217;s a tricky field to remain competent in, but we do because we love it!</p>
<p>There isn&#8217;t a better way to demonstrate this than working on a project of your own choosing. It can be writing a useful JavaScript snippet, creating a new library, contributing to an open source project or even just making a website that uses a cool technology. Whatever you choose, it will give you a chance to write code that is free from the constraints of your place of work and gives you a real chance to demonstrate your prowess.</p>
<p>Personal projects speak loudly on a CV.</p>
<h2>Don&#8217;t lie</h2>
<p>This is a pretty obvious one but it needs a mention here. Your web of lies can easily be unwound by a few well placed technical questions or a test, and it just makes you look foolish.</p>
<p>A common example is candidates who boast a wealth of JavaScript experience but in reality have done little more than include a few jQuery plugins on a page and wire up some events. If you find yourself needing to bend the truth, then all you&#8217;ve done is discovered some gaps in your knowledge that you should aim to rectify with some good ol&#8217; fashioned learning!</p>
<h2>Conclusion</h2>
<p>The few tips here are from own experiences and are likely not to be hard and fast rules. I will admit that until I actually had to sit down and read through a bunch of CVs I was making a few of these mistakes myself. I simply identified what annoyed me as someone who had to read them all and transferred that experience to my own CV. Annoyingly simple in hindsight.</p>
<p>Oh yes, we found a great UI developer for the Radio Times project in the end. Success!</p>
]]></content:encoded>
			<wfw:commentRss>http://blink-design.net/tips-on-writing-a-front-end-developer-cv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10 things I learnt from building radiotimes.com</title>
		<link>http://blink-design.net/10-things-i-learnt-from-building-radiotimes/</link>
		<comments>http://blink-design.net/10-things-i-learnt-from-building-radiotimes/#comments</comments>
		<pubDate>Fri, 23 Sep 2011 10:00:00 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[MooTools]]></category>
		<category><![CDATA[Radio Times]]></category>

		<guid isPermaLink="false">http://blink-design.net/?p=152</guid>
		<description><![CDATA[Unless you&#8217;re incredibly uncool then you&#8217;ll no doubt be aware of the shiny new Radio Times website that was released...]]></description>
			<content:encoded><![CDATA[<p>Unless you&#8217;re incredibly uncool then you&#8217;ll no doubt be aware of <a href="http://www.radiotimes.com/">the shiny new Radio Times website</a> that was released a couple of weeks ago. I had quite a lot to do with the front-end side of things on that site so I thought I&#8217;d write a post about various things I learnt, and also things I already knew that were just re-enforced.</p>
<p><em>At this stage it&#8217;s probably worth doing one of those disclaimers that we see in blog posts all the time. There are a lot of stupid people about so I&#8217;ll say now that all of these points/views/opinions are mine and nowt to do with the BBC or any of it&#8217;s affiliates.</em></p>
<p>Idiot speech done, yay!</p>
<h2>MooTools is awesome</h2>
<p>Radio Times was the first large site that I&#8217;ve built using MooTools as the main JS framework and it&#8217;s sealed itself as my preferred library. I particularly favour the way it encourages the developer to organise their code using OO concepts, something which I always longed for when writing JS with jQuery. My favourite quote comes from a site that enticed me into converting from jQuery shenanigans, the aptly named <a href="http://jqueryvsmootools.com/">jqueryvsmootools.com</a>:</p>
<blockquote><p>If jQuery makes the DOM your playground, MooTools aims to make JavaScript your playground</p></blockquote>
<p>jQuery was the first library I got involved with (I was writing it before I even knew the correct syntax for a function, ugh) and it definitely helps novices get stuff done, but if you want to embrace JS as a language then MooTools helps you achieve that. Mind you, if I need to get stuff done fast on a small site I will always consider reaching for jQuery as it comes down to what tool is best for the job.</p>
<p>It&#8217;s on my list to properly explore <a href="http://dojotoolkit.org/">Dojo</a> as well, but that&#8217;s a task for another time.</p>
<h2>Should have used responsive design. Foolish error</h2>
<p>Ah, I kick myself for not pushing this more at the beginning of the project. I remember sitting down with the product owner near the start of the project (December/January last year I believe) and explaining the benefits of this technique and why we should embrace it but unfortunately the design agency had already held us up long enough just getting desktop versions completed, so there certainly wasn&#8217;t time to start exploring layouts for different sized devices. The decision was made to &#8220;do it at the end&#8221; but as we all know, when dealing with the concept of &#8220;mobile first&#8221; that is largely impossible.</p>
<p>Responsive design is an even bigger deal now than it was when I had that discussion and I would go as far to say that there isn&#8217;t two ways to build a site anymore. Just do it responsively, end of. Now Radio Times wants to make a move into the mobile space and after seeing what <a href="http://www.bostonglobe.com/">The Boston Globe</a> achieved I really regret not pursuing this more aggressively.</p>
<h2>Stop trying to replicate PSDs in all browsers</h2>
<p>One thing I am proud of is breaking the mould a bit at the BBC when it comes to defining what &#8216;cross browser compatibility&#8217; actually means. If you have an ounce of interest in front-end development you can&#8217;t avoid being exposed to <a href="http://hardboiledwebdesign.com/">the preachings of Andy Clarke</a>. Essentially he talks about the ridiculous notion of trying to achieve pixel perfect designs in all browsers. With so many devices (all with varying levels of standards support) it is next to impossible. Instead, embrace the modern browsers and their capabilities and degrade your design for the old, wheezing versions of IE that can&#8217;t keep up.</p>
<p>With that kind of awesome advice ringing in my ears I set out the rule early on that IE users would not get the same experience as Chrome, Firefox et al, but they should never think the site looked broken. Given that a lot of people involved with the site at BBC Worldwide were using IE8 it <em>could</em> be deemed a crazy idea and I was grateful that the product owner put trust in me to make this decision.</p>
<p>With some serious reliance on <a href="http://www.modernizr.com/">Modernizr</a>, that goal has been achieved and users of modern browsers are rewarded with some quite lovely CSS3 uses. Forward thinking, yes!</p>
<h2>When it comes to HTML5, 8 is the new 6</h2>
<p>I am of course referring to the line of browsers prefixed with IE. We tried to fully embrace the use of HTML5 elements on Radio Times but by jumping ahead to this exciting new world of semantic joy, IE8 is once again holding developers back. Two tools that help us fight this sorry state of affairs are <a href="http://www.modernizr.com/">Modernizr</a> and <a href="http://selectivizr.com/">Selectivizr</a>. Both are invaluable but one area that you can become unstuck in is needing to update the DOM with new elements. The <a href="http://www.radiotimes.com/tv/tv-listings">RT listings page</a> makes use of an article element for each channel and when the user selects a new time slot, the page is updated with Ajax. This is when things get a little ugly in IE.</p>
<p>We fought this beast by making use of <a href="http://jdbartlett.com/innershiv/">a handy script called innerShiv</a> and although it&#8217;s not ideal it&#8217;s certainly a viable way to get round IE and dynamic content issues, particularly if you don&#8217;t want to start wrapping all your clean markup in div elements.</p>
<p>If you&#8217;re gonna get all futuristic up in here with HTML5 and CSS3 then you need to accept that IE8 users and below are going to have an inferior experience. If you can deal with that (or rather your clients can!) then you&#8217;re all set.</p>
<h2>Don&#8217;t outsource your site design</h2>
<p>And if you do, ensure it&#8217;s an agency that understands the limitations and strengths of a browser. Also, some User Experience erm.. experience will help as well. Not all agencies are bad, they can&#8217;t be, but unfortunately at BBC Worldwide I&#8217;ve seen a couple of projects outsourced to a poor design agency, even when there are perfectly good designers sitting around in-house.</p>
<p>The design process is and should be something that continues to iterate. The front end developers and designers need to work closely to produce the best work, especially if they plan to implement a responsive design. You simply can&#8217;t just send a list of requirements off, wait for a bit, get a bunch of PSDs back and start building them. The amount of changes and queries we had with some of the Radio Times designs were crazy, equally so were some of the user experience choices. Double clicking areas of the page? Yeah that was thrown in at one point.</p>
<p>Back-end and front-end devs work together, but in my mind it&#8217;s even more important that designers work in that group. Crucial.</p>
<h2>Universal IE6 is great</h2>
<p>Fortunately the decision to drop IE6 support was made fairly early on due to the hideous amount of dev time soaked up in fixing things (IE7 &amp; 8 were enough trouble). However, instead of just leaving a stupidly broken page for our unfortunate IE6 users it took all of five minutes to implement <a href="http://forabeautifulweb.com/blog/about/universal_internet_explorer_6_css">Andy Clarke&#8217;s awesome Universal IE6 stylesheet</a>. It essentially strips away all layout styling and leaves a nice looking, linear page for IE6 users which is designed to allow them access to the content only.</p>
<p>So far I&#8217;ve not heard one complaint about this approach from our users.</p>
<h2>Remove obstacles from developers</h2>
<p>One problem I continually see with the projects I have been on is the need to introduce process where it absolutely shouldn&#8217;t be. And I&#8217;m referring to little things that just stop a developer from developing. On the Radio Times project for example, we would spend time in our stand up meeting putting smiley faces on sprint goals that showed how we were progressing. If anything, Project Managers should be looking to strip away as much process as possible. No one will complain that there aren&#8217;t enough wall charts and meetings. Ever.</p>
<p>The most productive times I&#8217;ve ever had are when I&#8217;m given a task to complete and then just left for a day or two to complete it. No meetings, no continual interruptions. PMs don&#8217;t need to justify their position with fluffy processes.</p>
<h2>Script loaders are ace, but not the only solution</h2>
<p>I made the mistake of thinking <a href="http://requirejs.org/">RequireJS</a> was so awesome that it could simply work in every single scenario. Obviously all libraries have their uses and I got a little blinded by all the asynchronous script loading and module based sexiness. I wrote all the MooTools classes to take advantage of the dependency based approach that RequireJS affords and ensured nearly all our scripts were loaded this way.</p>
<p>I actually ended up having <strong>a lot</strong> of issues with load order of the scripts, particularly in IE. I&#8217;m confident I was using the library correctly as most browsers played nice and the loading issues appeared to be intermittent. However, it was deemed too risky to release with those hidden problems so I had the fun task of editing <strong>all</strong> the Moo classes!</p>
<p>Working with one of the back-end devs, we created a similar system that would load scripts but concatenate them into one file, all in order and also minified when the page loaded. This proved to be just as useful and even faster on the load speed (we tried the RequireJS build tool first and didn&#8217;t have much luck).</p>
<p>This actually inspired the creation of <a href="http://boxjs.com">BoxJS</a> and <a href="http://boxcss.com">BoxCSS</a> which essentially do the same thing.</p>
<h2>Embrace retrospectives</h2>
<p>One thing I&#8217;m glad we did do on Radio Times was to really embrace fortnightly retrospectives. Now, this is not all to do with the beer and snacks that we would bring along, but if you&#8217;re gonna have a long meeting on a Friday afternoon I&#8217;ve noticed no one complains when a beer is on the table.</p>
<p>I think we tried about ten different ways of working the Agile board and cards on this project based on feedback from these meetings, but that is preferred over battling on with a system that doesn&#8217;t work. Being able to discuss negatives and positives openly in a dev team makes a big difference to the morale of the project, especially when measures are put in place to address the problems.</p>
<p>Never come out of a retrospective and start quietly moaning about problems on a project. Voice them!</p>
<h2>Using custom fonts? Test them without ClearType enabled</h2>
<p>Here&#8217;s an interesting one.</p>
<p>The designs for the new site utilised the <a href="http://new.myfonts.com/fonts/fontbureau/interstate/">Interstate font family</a> quite heavily and many of these fonts are quite thin. At BBC Worldwide if you&#8217;re not using a Mac then 90% of the time you&#8217;ll be on an XP machine, and helpfully the default setting for these boxes is to have ClearType disabled. Trying to read some of the Radio Times fonts like this was a taxing process, and it became more evident when the site first went into beta as many users complained about the legibility of the copy.</p>
<p>Being too far down the line to start altering fonts (and having paid a bucket load to license Interstate!) we had to find a fix, which came in the form of <a href="http://www.useragentman.com/blog/2009/11/29/how-to-detect-font-smoothing-using-javascript/">this excellent technique for detecting aliasing with canvas</a>.</p>
<p>&nbsp;</p>
<p>I&#8217;ll wait for one my colleagues to tell me ten things I <em>should</em> have learnt!</p>
]]></content:encoded>
			<wfw:commentRss>http://blink-design.net/10-things-i-learnt-from-building-radiotimes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Making &#8216;this&#8217; easier with .bindEvent</title>
		<link>http://blink-design.net/making-this-easier-with-bindevent/</link>
		<comments>http://blink-design.net/making-this-easier-with-bindevent/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 11:21:02 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Class]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[MooTools]]></category>

		<guid isPermaLink="false">http://blink-design.net/?p=138</guid>
		<description><![CDATA[Sometimes managing this within your MooTools Class can be a bit tricky. I find this is usually when I&#8217;m trying...]]></description>
			<content:encoded><![CDATA[<p>Sometimes managing <code>this</code> within your <a href="http://mootools.net/docs/core/Class/Class">MooTools Class</a> can be a bit tricky. I find this is usually when I&#8217;m trying to fight over what it refers to in an event handler. <a href="https://github.com/FashodaDrummer/Function.bindEvent">Function.bindEvent</a> is a tiny snippet that gives you access to the current Class instance and the element that <code>this</code> usually refers to.</p>
<h2>Separate methods for event handlers</h2>
<p>Personally I prefer this pattern</p>
<pre class="prettyprint">var Example = new Class({

    initialize : function( element ) {

        this.element = $( element );
	this.element.addEvent( 'click', this.fetchItems );

    },

    fetchItems : function( event ) {

    }

});</pre>
<p>instead of this one</p>
<pre class="prettyprint">var Example = new Class({

    initialize : function( element ) {

        this.element = $( element );
        this.element.addEvent( 'click', function( event ) {

        });

    }

});</pre>
<p>Keeping your event handlers separate looks cleaner, it&#8217;s easier to test and gets you girls. Paul Irish <a href="http://paulirish.com/2009/perf/">touches on it briefly</a> in his jQuery anti-patterns talk (slide 13).</p>
<h2>What&#8217;s da problem?</h2>
<p>So you&#8217;ve decided to separate your event handlers into their own methods, but things can get a little tricky when you wish to refer to a property of your instance, maybe an option for example:</p>
<pre class="prettyprint">fetchItems : function( event ) {

    console.log(this.options.amount) // Errar! this refers to the element you clicked on

}</pre>
<p>If you don&#8217;t need any reference to the element then feel free to dive in with the standard <a href="http://mootools.net/docs/core/Types/Function#Function:bind">Function.bind</a>:</p>
<pre class="prettyprint">this.element.addEvent( 'click', this.fetchItems.bind(this) );</pre>
<p>The <code>console.log</code> from earlier will work fine. Hooray.</p>
<h2>I want both!</h2>
<p>Ha! I thought so (otherwise why would you be reading this?). All you need to do is include the <code>Function.bindEvent</code> extension and then adjust the above code to use .bindEvent</p>
<pre class="prettyprint">this.element.addEvent( 'click', this.fetchItems.bindEvent(this) );</pre>
<p>Now your event handler gets an additional argument for you to play with:</p>
<pre class="prettyprint">fetchItems : function( event, _this ) {

    console.log(_this.options.amount) // works!
    this.addClass('pow') // this works too!

}</pre>
<p>The current context gets passed as an argument along with the event object. Also any additional arguments will also be passed to the event handler, just like normal <code>Function.bind</code>.</p>
<p>It&#8217;s not ground breaking but I probably use this snippet of code more than any other MooTools extension.</p>
<p>Grab it <a href="https://github.com/FashodaDrummer/Function.bindEvent">from GitHub</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://blink-design.net/making-this-easier-with-bindevent/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Minimalist Windows 7</title>
		<link>http://blink-design.net/minimalist-windows-7/</link>
		<comments>http://blink-design.net/minimalist-windows-7/#comments</comments>
		<pubDate>Tue, 17 May 2011 16:01:14 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://localhost:8888/blinkdeswp/?p=110</guid>
		<description><![CDATA[After a recent PC upgrade I decided that I was sick of staring at the Windows 7 Aero theme. To...]]></description>
			<content:encoded><![CDATA[<p>After a recent PC upgrade I decided that I was sick of staring at the Windows 7 Aero theme.</p>
<p>To my delight, all that is needed is a bit of patience and some spare time to make Windows 7 visually suck less.</p>
<h2>First, the goal</h2>
<p>Try and tell me you <em>don’t</em> want this in your life:</p>
<p style="text-align: center;"><a class="highslide" href="http://blink-design.net/wp-content/uploads/2011/08/wallpaper1.jpg"><img class="aligncenter size-large wp-image-112" title="wallpaper1" src="http://blink-design.net/wp-content/uploads/2011/08/wallpaper1-1024x576.jpg" alt="" width="550" height="309" /></a></p>
<h2>Ingredients</h2>
<p>You will need:</p>
<ul>
<li><a href="http://rocketdock.com/">RocketDock</a></li>
<li><a href="http://rocketdock.com/addon/skins/27333">Simple Dark</a> (theme for RocketDock)</li>
<li><a href="http://solmiler.deviantart.com/art/Glass-Onion-for-W7-202355689">Windows 7 Glass Onion Theme</a></li>
<li><a href="http://leechiahan.deviantart.com/art/Lucid-Icons-104175952">Lucid Icons</a></li>
<li><a href="http://arts-wallpapers.com/wordpress/2011/04/girls-wallpapers-black-and-white-red-lips-desktop/">Sexy lady</a></li>
</ul>
<h2>Setup</h2>
<p>Get the Glass onion theme installed first.</p>
<p>Fortunately the theme provides detailed documentation and literally every tool you need to install the various files. But you will be overriding a few crucial Windows files so ensure you backup!</p>
<p>Provided that has gone successfully, the most time consuming part will be creating application short cuts, dragging them on to RocketDock and then changing each icon.</p>
<p>One thing I noticed here is that the Simple Dark theme has a slight bug that seemed to stop me dragging icons on to it. Just select a different theme to get everything set-up and then switch back when you’re done.</p>
<h2>RocketDock settings</h2>
<p>Here are the settings I used for the RocketDock setup pictured:</p>
<p style="text-align: center;"><a class="highslide" href="http://blink-design.net/wp-content/uploads/2011/08/dock-settings1.jpg"><img class="aligncenter size-full wp-image-116" title="dock-settings1" src="http://blink-design.net/wp-content/uploads/2011/08/dock-settings1.jpg" alt="" width="550" height="404" /></a></p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-117" title="dock-settings2" src="http://blink-design.net/wp-content/uploads/2011/08/dock-settings2.jpg" alt="" width="510" height="575" /></p>
<p style="text-align: left;">Bask in the minimalism!</p>
]]></content:encoded>
			<wfw:commentRss>http://blink-design.net/minimalist-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

