<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <channel>
	    <title>Simian Studios Blog</title>	
	    <link>http://www.simianstudios.com</link>
	    <description>Writings by Kris Noble on all things web-related, including design, code, technology and more.</description>
	    <dc:language>en-gb</dc:language>
	    <dc:creator>Kris Noble</dc:creator>	
	    <dc:rights>Copyright 2025</dc:rights>
	
			<item>
			<title>Laravel Artisan migrations not working? Try this&amp;hellip;</title>
			<link>https://simianstudios.com/blog/post/laravel-artisan-migrations-not-working-try-this</link>
			<guid>https://simianstudios.com/blog/post/laravel-artisan-migrations-not-working-try-this</guid>
			<description><![CDATA[<img src="http://simianstudios.com//uploads/blog/large_laravel-artisan-migrations-not-working-try-this.jpg" id="masthead_image" class="blog_image_large" alt="" height="138" width="618" /> <p>Just a quick post here with a tip that may help you if, like me, you&rsquo;re struggling getting Laravel&rsquo;s <code>php artisan migrate</code> command to work.</p> <p>In my case I was receiving no output whatsoever - no error messages, no logs - and my app was able to write to the database so I knew the credentials were correct, which made the problem very hard to diagnose.</p> <p>On a hunch I decided to try setting the socket manually as other people using MAMP have had success with it, and thankfully that solved the problem, despite my not receiving the same error message.</p> <p>So, my <code>.env</code> now has an extra line:</p> <pre class="prettyprint">DB_UNIX_SOCKET=/Applications/MAMP/tmp/mysql/mysql.sock</pre> <p>and my <code>config/database.php</code> has an extra element added to the MySQL settings array:</p> <pre class="prettyprint">'unix_socket' =&gt; env('DB_UNIX_SOCKET', ''),</pre> <p>Those two additions tell Laravel to look in <code>.env</code> for a defined socket, or to leave the socket empty if one isn&rsquo;t defined, which triggers the default DSN generation behaviour in the <code>MySqlConnector</code> class.</p> <p>For me, this doesn&rsquo;t affect the functionality of my app but does make the migrations work. Running the socket setting through <code>.env</code> means it can easily be modified on a per-machine basis without having to worry about source control etc.</p> <p>Hope this helps someone avoid wasting a lot of time like I did!</p>]]></description>
			<pubDate>Fri, 29 Apr 2016 16:51:35 +0000</pubDate>
		</item>

		<item>
			<title>Mediabuffer &#45; Buffer HTML5 Audio/Video for Uninterrupted Playback</title>
			<link>https://simianstudios.com/blog/post/mediabuffer-buffer-html5-audiovideo-for-uninterrupted-playback</link>
			<guid>https://simianstudios.com/blog/post/mediabuffer-buffer-html5-audiovideo-for-uninterrupted-playback</guid>
			<description><![CDATA[<img src="http://simianstudios.com//uploads/blog/large_mediabuffer-buffer-html5-audiovideo-for-uninterrupted-playback.png" id="masthead_image" class="blog_image_large" alt="" height="138" width="618" /> <p>I&rsquo;m currently working on a side project (coming soon, hopefully!) that uses HTML5 audio. Working locally everything was fine but when I tested on the server I ran into a problem caused by the fact that the audio takes a few seconds to load properly and start playing. That made me realise I hadn&rsquo;t considered what would happen on a slow connection.</p> <p>Sure enough I fired up <a href="http://slowyapp.com/" target="_blank">Slowy.app</a> and my carefully-crafted user experience became more like listening to a collection of short audio clips punctuated by silence as the audio buffered. Clearly, something had to be done.</p> <p>The <a href="https://developer.mozilla.org/en-US/docs/Web/Events/canplaythrough" target="_blank">HTML5 spec includes an event, <code class="prettyprint">canplaythrough</code></a>, that the browser is supposed to fire when the media element is loaded and buffered enough that it can play through smoothly. Perfect, I thought, that should do exactly what I want.</p> <p>Unfortunately, <a href="https://code.google.com/p/chromium/issues/detail?id=73609" target="_blank">Chrome doesn&rsquo;t play nicely with <code class="prettyprint">canplaythrough</code></a>. It fires the <code class="prettyprint">canplaythrough</code> event straight after loading the element rather than buffering it first, leaving me back at square one and looking at fixing the problem with some JavaScript.</p> <p>So after a quick search I found some <a href="https://github.com/denisnazarov/canplaythrough" target="_blank">code by Denis Nazarov</a> that looked like a good start. I adapted Denis&rsquo; code to remove the dependency on jQuery and added some extra functionality such as working around <a href="https://code.google.com/p/chromium/issues/detail?id=111281" target="_blank">another Chrome issue</a> and handling mobile browsers with their lack of preloading.</p> <p>The result is the imaginatively-named <a href="https://github.com/krisnoble/Mediabuffer" target="_blank">Mediabuffer</a> which is fully documented on GitHub. It&rsquo;s MIT-licensed so anyone can use it and the lack of dependencies should mean it&rsquo;s widely compatible.</p> <p>Hopefully someone out there will find it useful!</p>]]></description>
			<pubDate>Thu, 26 Feb 2015 11:15:34 +0000</pubDate>
		</item>

		<item>
			<title>A Simple Helper for JavaScript Debugging via console.log</title>
			<link>https://simianstudios.com/blog/post/a-simple-helper-for-javascript-debugging-via-console.log</link>
			<guid>https://simianstudios.com/blog/post/a-simple-helper-for-javascript-debugging-via-console.log</guid>
			<description><![CDATA[<img src="http://simianstudios.com//uploads/blog/large_a-simple-helper-for-javascript-debugging-via-console.log.jpg" id="masthead_image" class="blog_image_large" alt="" height="138" width="618" /> <p>If you&rsquo;re working with JavaScript in the browser, sometimes the easiest way to know what&rsquo;s going on is to use <code>console.log</code> to output variable values or other status updates.</p> <p>But as the thing you&rsquo;re working on gets more complicated you can have a lot of logging going on. It&rsquo;s helpful to be able to visually differentiate the different messages and/or filter them by what type of information they are.</p> <p>So I wrote a little helper function to make things a bit easier:</p> <script src="https://gist.github.com/krisnoble/0cd71a603e79ae76e0f2.js"></script><noscript><a href="https://gist.github.com/krisnoble/0cd71a603e79ae76e0f2" target="_blank">Gist</a></noscript> <p>It&rsquo;s intended as a partial to be used with something like CodeKit but can just be dropped in the old-fashioned way too. It has no dependencies so should be widely compatible, though right now I've only tested it as part of a jQuery project.</p> <p>It&rsquo;s pretty much self-documenting so I won&rsquo;t repeat what the comment says. I&rsquo;ve MIT-licensed it so you&rsquo;re basically free to do as you wish with it, though contributing back any improvements is always appreciated!</p>]]></description>
			<pubDate>Tue, 10 Feb 2015 14:19:46 +0000</pubDate>
		</item>

		<item>
			<title>An Easy Way to Include a Comment at the Top of Your JavaScript in CodeKit</title>
			<link>https://simianstudios.com/blog/post/an-easy-way-to-include-a-comment-at-the-top-of-your-javascript-in-codekit</link>
			<guid>https://simianstudios.com/blog/post/an-easy-way-to-include-a-comment-at-the-top-of-your-javascript-in-codekit</guid>
			<description><![CDATA[<img src="http://simianstudios.com//uploads/blog/large_an-easy-way-to-include-a-comment-at-the-top-of-your-javascript-in-codekit.jpg" id="masthead_image" class="blog_image_large" alt="" height="138" width="618" /> <p>Don&rsquo;t judge me, but I&rsquo;ve only just started getting to grips with <a href="http://sass-lang.com/" target="_blank">SASS</a>. To help with the process I&rsquo;ve been using <a href="https://incident57.com/codekit/" target="_blank">CodeKit</a> and loving it. As well as compiling my SASS stylesheets I have it set to concatenate and minify my JavaScript too.</p> <p>So my main JavaScript file looked like this:</p> <pre class="prettyprint">/*! * * Example JavaScript * By Kris Noble * * @license Example license * * Original: /js/functions.js * * Includes: * - Library v2.1.1 | (c) 2014 Example Group | example.org/license * - Another Library v1.1 | github.com/dev/another-library | MIT license * */ // @codekit-prepend "library.js"; // @codekit-prepend "another-library.js"; $(window).load(function(){ // &hellip; });</pre> <p>Nothing special, just a normal doc comment, a couple of prepends for libraries and then my own code.</p> <p>Getting CodeKit to keep the comment is no problem, the <code>@license</code> takes care of that. However, <code>@codekit-prepend</code> works differently from SASS&rsquo; <code>@import</code> - it doesn&rsquo;t insert the file at the point of the comment, it takes the &quot;prepend&quot; part literally and sticks it right at the start of the file. </p> <p>So from my file above, I&rsquo;d get the prepends, then the comment, then my code - not exactly optimal. I thought about just adding the comment manually, but that feels kind of janky compared to the usual flow of CodeKit. </p> <p>Then, I came upon a simple solution - move the comment out to its own file and prepend it, like this: </p> <pre class="prettyprint">// @codekit-prepend "_doc.js"; // @codekit-prepend "library.js"; // @codekit-prepend "another-library.js"; $(window).load(function(){ // &hellip; });</pre> <p><code>_doc.js</code> contains the comment and nothing else, and gets prepended as you would expect. In my example above the <code>@license</code> part stops the comment getting stripped out, but you can also use <code>@preserve</code> to achieve the same thing. </p>]]></description>
			<pubDate>Thu, 06 Nov 2014 15:07:58 +0000</pubDate>
		</item>

		<item>
			<title>A Quick and Easy Way to a Cleaner, More Readable Wikipedia</title>
			<link>https://simianstudios.com/blog/post/a-quick-and-easy-way-to-a-cleaner-more-readable-wikipedia</link>
			<guid>https://simianstudios.com/blog/post/a-quick-and-easy-way-to-a-cleaner-more-readable-wikipedia</guid>
			<description><![CDATA[<img src="http://simianstudios.com//uploads/blog/large_a-quick-and-easy-way-to-a-cleaner-more-readable-wikipedia.png" id="masthead_image" class="blog_image_large" alt="" height="138" width="618" /> <p>Isn&rsquo;t <a href="http://wikipedia.org" target="_blank">Wikipedia</a> amazing? Yeah, it&rsquo;s the butt of jokes about people not researching stuff properly but if you stop and think about it, it&rsquo;s an incredible thing. A repository of huge swathes of human knowledge, available to (<a href="http://en.wikipedia.org/wiki/Censorship_of_Wikipedia" target="_blank">almost</a>) all, for free, any time of day or night, in a whole bunch of different languages and dialects. Truly awesome.</p> <p>One area where it could do better, though, is its own design. The current design is functional and presentable but there is certainly room for improvement. We&rsquo;ve all seen some beautiful <a href="http://www.wikipediaredefined.com/" target="_blank">unsolicited</a> <a href="http://mhauken.no/wikipedia.html" target="_blank">redesigns</a>, but wouldn&rsquo;t it be cool if you could just take the existing design and tweak it a bit to be more readable, or make the links a bit more obvious, or reduce some of the visual clutter?</p> <p>Well, drum roll please&hellip; you can! Even better, it&rsquo;s <em>really</em> easy.</p> <h2>Requirements</h2> <ol> <li>Either a Wikipedia account, or some way of adding user stylesheets in your browser. I&rsquo;m going to proceed as through you&rsquo;re going down the account route though, as <strong>a)</strong> it&rsquo;s how I&rsquo;ve done it, <strong>b)</strong> there are a bunch of other benefits to having an account, <strong>c)</strong> it&rsquo;ll follow you wherever you log in and <strong>d)</strong> if you&rsquo;re happy with user stylesheets, it should be trivial to get it working anyway.</li> <li><a href="http://www.fontsquirrel.com/fonts/open-sans" target="_blank">Open Sans</a>. It&rsquo;ll work without, but Open Sans is just so lovely to read in my opinion. Also the text styles are based around it so you might need to tweak things a bit if you don&rsquo;t use it.</li> </ol> <h2>Method</h2> <ol> <li>Sign into your Wikipedia account.</li> <li>Go to <a href="http://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-rendering" target="_blank">the Appearance tab on the Preferences page</a>.</li> <li>In the list of skins, find Vector at the bottom, then click on &ldquo;Custom CSS&rdquo;.</li> <li>Copy-paste the code below into the text entry box. If you already have a custom CSS file and you want to edit it, click the Edit tab at the top-right.</li> <li>Click &ldquo;Save Page&rdquo;.</li> <li>Enjoy your new, more readable Wikipedia!</li> </ol> <h2>The code</h2> <p>I&rsquo;ve set this code up as a <a href="https://gist.github.com/krisnoble/5974229" target="_blank">Gist</a> so that a) it&rsquo;s easy for you to fork it if you like and b) you&rsquo;ll always see the latest version of the code, which I&rsquo;ll tweak as I find other minor irritants.</p> <p class="js_only">Here it is:</p> <script src="https://gist.github.com/krisnoble/5974229.js"></script> <h2>Results</h2> <img src="http://simianstudios.com/uploads/blog/wikipedia_after.png" alt="“After” screenshot of a Wikipedia page" class="blog_image_large example" /> <p>As you can see, there are a bunch of tweaks mainly aimed at improving readability and reducing visual clutter. The Wikipedia we all know and love is still there in spirit, though.</p> <h2>Some notes</h2> <p>I&rsquo;ve deliberately written the CSS to be as unspecific as possible, the idea being that Wikipedia works pretty well as it is so I don&rsquo;t want to break stuff. Some of the rules are a bit weird, but that&rsquo;s mainly because I&rsquo;m trying to work around the defaults as much as possible.</p> <p>Note that although most text has plenty of contrast, a few small bits (for example reference markers) aren't very high contrast. This is to aid readability for most people but if you need to bump up the contrast, it's easy to tweak the CSS to suit your needs.</p> <p>Also I have formatted the CSS single-line to save a few bytes - I know it&rsquo;s a drop in the ocean but a few bytes here and there could save or cost the <a href="http://en.wikipedia.org/wiki/Wikimedia_Foundation" target="_blank">Foundation</a> some real money.</p> <h2>Wrapping up</h2> <p>I really hope you find this useful and that it helps to make your learning experience that little bit more pleasant.</p> <p>I&rsquo;d love to hear your thoughts on this, so please get in touch via <a href="http://twitter.com/simianstudios" target="_blank">Twitter</a>, <a href="http://simianstudios.com/contact" target="_blank">email</a> or a comment and let me know!</p>]]></description>
			<pubDate>Fri, 12 Jul 2013 10:34:03 +0000</pubDate>
		</item>

		<item>
			<title>xip.io + MAMP Pro = Super&#45;Easy Local Network Testing</title>
			<link>https://simianstudios.com/blog/post/xip.io-mamp-pro-super-easy-local-network-testing</link>
			<guid>https://simianstudios.com/blog/post/xip.io-mamp-pro-super-easy-local-network-testing</guid>
			<description><![CDATA[<img src="http://simianstudios.com//uploads/blog/large_xip.io-mamp-pro-super-easy-local-network-testing.jpg" id="masthead_image" class="blog_image_large" alt="" height="138" width="618" /> <p>I&rsquo;m sure I don&rsquo;t need to extol the virtues of working locally via <a href="http://www.mamp.info/en/mamp-pro/index.html" target="_blank">MAMP Pro</a>. One thing that has always annoyed me though is that to test on devices other than my main box, I&rsquo;d have to either upload the files to a server or fiddle with something like <a href="http://dyn.com/dns/" target="_blank">DynDNS</a>.</p> <p>Recently though, I discovered <a href="http://xip.io" target="_blank">xip.io</a>. It&rsquo;s a neat little service that takes 99% of the hassle out of viewing your local sites on any other device that&rsquo;s connected to your network.</p> <h2>How to use it</h2> <ol> <li>First things first, make sure your local server has a fixed IP on your local network. You can do this through the router config options. If you&rsquo;re not sure how, just search for &ldquo;[your router make/model] assign IP to computer&rdquo; or something similar. This isn&rsquo;t strictly necessary but it will save a lot of hassle down the line if you reboot your router and all the local IPs change.</li> <li>OK, so let&rsquo;s say your server has the local IP address <code>192.168.0.1</code>, and the local site you want to use with xip.io goes by the hostname <code>example.local</code>. In MAMP Pro, click on the example.local item under &ldquo;Hosts&rdquo;, then click the + button under the &ldquo;Aliases&rdquo; box.</li> <li>Enter the alias in the form <code>[hostname].[server IP].xip.io</code>. So in our example, we would enter <code>example.local.192.168.0.1.xip.io</code>. Leave the box ticked and don&rsquo;t worry about the drop-down on the right.</li> <li>Hit &ldquo;Apply&rdquo; and restart the servers to update the config.</li> <li>On the network-connected device you want to test, navigate to the alias you just entered, and weep with joy at how easy it was.</li> </ol> <p>That&rsquo;s it! Bear in mind that anything that relies on the hostname in your code (cookies, for example) will be using the alias rather than the usual local hostname so be prepared to tweak some configs if needed.</p> <p>Of course, you can still take advantage of the simpicity of xip.io if you dont use MAMP Pro, you&rsquo;ll just need to set up the alias by hand. Personally though, I think the time saved with Pro is well worth paying a few quid for - it can often be found on those cheap software bundle sites for a hefty discount.</p>]]></description>
			<pubDate>Fri, 15 Feb 2013 19:15:18 +0000</pubDate>
		</item>

		<item>
			<title>Using Bitbucket for Automated Deployment of Multiple Repositories</title>
			<link>https://simianstudios.com/blog/post/using-bitbucket-for-automated-deployment-of-multiple-repositories</link>
			<guid>https://simianstudios.com/blog/post/using-bitbucket-for-automated-deployment-of-multiple-repositories</guid>
			<description><![CDATA[<img src="http://simianstudios.com//uploads/blog/large_using-bitbucket-for-automated-deployment-of-multiple-repositories.jpg" id="masthead_image" class="blog_image_large" alt="" height="138" width="618" /> <p>I&rsquo;ve recently started using <a href="http://bitbucket.org/" target="_blank">Bitbucket</a> as a kind of off-site backup for my Git repos - it works beautifully with <a href="http://www.sourcetreeapp.com/" target="_blank">SourceTree</a> as you can have all commits pushed to the &ldquo;origin&rdquo; repo by default. Lovely.</p> <p>Usually I work locally with MAMP, pushing updates to a staging server if I need to show the client or something. Before now, I did that with good old FTP, but I wondered if there might be a way to have my commits pushed to the server via Git.</p> <p>Thanks to Bitbucket&rsquo;s &ldquo;<a href="https://confluence.atlassian.com/display/BITBUCKET/Managing+Bitbucket+Services" target="_blank">services</a>&rdquo;, there is. I discovered <a href="http://brandonsummers.name/blog/2012/02/10/using-bitbucket-for-automated-deployments/" target="_blank">Brandon Summers' awesome post</a> and managed to get it working with a <a href="http://brandonsummers.name/blog/2012/02/10/using-bitbucket-for-automated-deployments/#comment-675683565" target="_blank">minor change</a>. The only problem that remained was that Brandon's script only worked with one repo, so if you wanted to use it with multiple repos on the same server, you&rsquo;d have to have multiple instances of the script available at different URLs.</p> <p>So, I came up with <a href="https://gist.github.com/4692643" target="_blank">a solution, which I&rsquo;ve added to GitHub as a gist</a> so you can fork it etc. </p> <h2>Usage</h2> <p>The script is essentially the same as Brandon&rsquo;s so follow his instructions for the most part, then set up your root directory and repo list. </p> <p>As an example, if you have repos at <code>/home/projects/example/htdocs</code> and <code>/home/projects/another_site</code>, you&rsquo;d set it up like so:</p> <pre class="prettyprint">/** * The root directory where the repos live. * * @var string */ $root_dir = '/home/projects/'; /** * A list of repo slugs that the script is allowed to know about, and their * locations relative to $root_dir. * * @var array */ $repos = array( 'example-repo-1' =&gt; 'example/htdocs' 'another-repo' =&gt; 'another_site' );</pre> <p>If Bitbucket tries to push to a repo that isn&rsquo;t defined in <code>$repos</code>, the script will fail gracefully and do nothing, so you don&rsquo;t need to worry about accidentally updating the wrong repo. Just check your commits before you push them to Bitbucket!</p> <p>If you use this, please let me know how you get on with it! Any forks or suggestions for improvements etc are very welcome - I will be using this daily so if I come up with anything myself I&rsquo;ll add it to the gist.</p> <p class="note">Photo: <a href="http://www.sxc.hu/photo/1323383" target="_blank">Colorful buckets 2 by ivanmarn</a></p>]]></description>
			<pubDate>Sat, 02 Feb 2013 01:31:37 +0000</pubDate>
		</item>

		<item>
			<title>Blog Post Amnesty</title>
			<link>https://simianstudios.com/blog/post/blog-post-amnesty</link>
			<guid>https://simianstudios.com/blog/post/blog-post-amnesty</guid>
			<description><![CDATA[<img src="http://simianstudios.com//uploads/blog/large_blog-post-amnesty.jpg" id="masthead_image" class="blog_image_large" alt="" height="138" width="618" /> <p>Hello there. It&rsquo;s been a while.</p> <p>After a promising start to 2012, sadly my good intentions to post more fell by the wayside as other commitments piled up. After a while, I&rsquo;d lost the momentum that I&rsquo;d built up in the first quarter of the year, so even though I kept thinking to myself that I really should do a post, I also talked myself out of it by wanting to have something &ldquo;good&rdquo; to end the drought.</p> <p>Well, enough is enough. I&rsquo;m breaking the inertia of inactivity with this short and simple post, and I&rsquo;m going to make an effort to follow it up and get back into the habit of sharing stuff.</p> <p>I know that there are other people like me out there, who are full of ideas and want to share but are struggling to take the first step back. So this is a call-to-keyboards - find or make a clear half-hour for yourself and crank out a post. It could be a simple &ldquo;I&rsquo;m back&rdquo; post like this, or it could be as simple as going into your drafts and giving an old idea a quick polish.</p> <p>If you&rsquo;re reading this, and I haven&rsquo;t posted for a while, feel free to nag me! If you need a bit of help getting back into the swing of things yourself, let me know and I&rsquo;ll badger you - post by post we&rsquo;ll change the world, or at least our poor neglected blogs!</p>]]></description>
			<pubDate>Wed, 30 Jan 2013 16:31:49 +0000</pubDate>
		</item>

		<item>
			<title>Darker Inactive Tabs in Chrome for Mac</title>
			<link>https://simianstudios.com/blog/post/darker-inactive-tabs-in-chrome-for-mac</link>
			<guid>https://simianstudios.com/blog/post/darker-inactive-tabs-in-chrome-for-mac</guid>
			<description><![CDATA[<img src="http://simianstudios.com//uploads/blog/large_darker-inactive-tabs-in-chrome-for-mac.jpg" id="masthead_image" class="blog_image_large" alt="" height="138" width="618" /> <p>I've recently made the switch from Firefox to Chrome as my default browser and by and large I'm very happy with the decision.</p> <p>One thing that was niggling me though was that when you have a lot of tabs open, it can be tricky to tell which tab is active. I tried playing with some of the available themes but didn't really like any of them - all I really wanted was the default theme but with slightly darker inactive tabs. So eventually I decided to just do it myself.</p> <p>Confession time - I didn't do it from scratch all by myself, but instead used the excellent tool over at <a href="http://www.chrometheme.net/chrome-theme-creator-online.html" target="_blank">ChromeTheme.net</a>, although on looking at the files generated it seems really easy to make your own themes if you're familiar with JSON.</p> <h2>Installation instructions </h2> <ol> <li><a href="http://static.simianstudios.com/darker_inactive_tabs.crx" class="button">Download the theme</a></li> <li>At the bottom of the window, click on &quot;Continue&quot; <img src="http://simianstudios.com/uploads/blog/theme_permission.jpg" width="618" height="43" alt="Theme permission alert" class="blog_image_large example" /></li> <li>You're done! <img src="http://simianstudios.com/uploads/blog/theme_installed.jpg" width="618" height="33" alt="Theme permission alert" class="blog_image_large example" /> </li> </ol> <h2>More info</h2> <p>Ironically, seeing as this theme is meant to enhance usability, there is one slight usability issue - the &quot;close tab&quot; buttons are quite hard to see on inactive tabs. Sadly Chromium and thus Chrome don't let you skin them yet so there's nothing I can do for now. However I think it's a minor loss for a big win - the buttons are in the same place as always and are perfectly visible on active or hovered tabs.</p> <p>As the theme was made for personal use, I've only tested it on OS X Lion but as far as I can tell Chrome on other systems does a much better job of distinguishing inactive tabs anyway. </p> <p>That said, if you find any issues let me know and I'll see what I can do to fix it up!</p>]]></description>
			<pubDate>Thu, 08 Mar 2012 15:56:35 +0000</pubDate>
		</item>

		<item>
			<title>CodeIgniter Conference 2012</title>
			<link>https://simianstudios.com/blog/post/codeigniter-conference-2012</link>
			<guid>https://simianstudios.com/blog/post/codeigniter-conference-2012</guid>
			<description><![CDATA[<img src="http://simianstudios.com//uploads/blog/large_codeigniter-conference-2012.jpg" id="masthead_image" class="blog_image_large" alt="" height="138" width="618" /> <p>I love <a href="http://codeigniter.com/" target="_blank">CodeIgniter</a>. So when I found out there was a <a href="http://www.ciconf.com/" target="_blank">two-day conference</a> dedicated to it in my home town, it frankly would have been rude not to have turned up.</p> <p>Codeigniter Conference 2012 (or CICONF, from now on) featured talks from people like <a href="http://twitter.com/philsturgeon" target="_blank">Phil Sturgeon</a>, <a href="http://twitter.com/jamierumbelow" target="_blank">Jamie Rumbelow</a> and <a href="http://twitter.com/wanwizard" target="_blank">Harro 'WanWizard' Verton</a>, who should be familiar to anyone who's worked with CodeIgniter or visited the forums. </p> <p>The talks were all CI related of course, but the overriding theme of the day was &quot;how can we do cool stuff with CodeIgniter?&quot; - there were talks about why CI is great for building APIs, how to use MongoDB with CI and how to get PHPUnit and CI running together for proper unit testing, as well as more generalised talks extolling the virtues of CI and sharing some useful hints and tips.</p> <h2>Talk Highlights</h2> <p>The talks were all interesting and useful, but the few I've picked out below were really the stars of the show for me.</p> <h3>Nick Jackson - API-Driven Development</h3> <figure> <img src="http://simianstudios.com/uploads/blog/ciconf_dogfood.jpg" width="298" height="305" alt="Eating your own dog food" title="Eating your own dog food" class="blog_image" /> <figcaption><a href="http://www.sxc.hu/photo/846165" target="_blank">Hungry Puppy</a> by Carol Adams</figcaption> </figure> <p>If you haven't heard of API-driven development (aka "eating your own dog food") before, it's quite simple. Instead of building a cool web service and then tagging an API on later in response to user demands, the idea is that you build the API first, then build your application on top of it. That eliminates a lot of the gripes people have with APIs - unreliability, bugs, glacial development for example- because the API is automatically a first-priority concern.</p> <p>It's not worthwhile for smaller projects obviously, but if you think you might need an API at some stage, it's probably better to bake it in from the start than try to muddle one together as an afterthought.</p> <p>The reason CodeIgniter works well for API-driven development is that it has lots of useful libraries and helpers that take care of things like authentication, plus the MVC pattern already has you thinking the right way in terms of separating your domain logic, data handling and presentation.</p> <p><a href="http://twitter.com/jacksonj04" target="_blank">Nick</a> also shared a few useful tips, such as the fact that you can use CI's built-in form validation library to validate incoming API calls which saves a lot of development time over rolling your own validation.</p> <h3>John Crepezzi - Unit Testing with CodeIgniter</h3> <figure> <img src="http://simianstudios.com/uploads/blog/ciconf_test.jpg" width="298" height="220" alt="Test Button" class="blog_image" /> <figcaption><a href="http://www.sxc.hu/photo/684719" target="_blank">Test Me</a> by cancsajn</figcaption> </figure> <p><a href="http://en.wikipedia.org/wiki/Unit_testing" target="_blank">Unit testing</a> is like exercising regularly and having a healthy diet - we know we should do it and that the benefits are numerous, but breaking the inertia of inaction can be very difficult.</p> <p><a href="http://twitter.com/seejohnrun" target="_blank">John</a>'s talk was mainly a beginner's guide to unit testing with PHPUnit, peppered with CI-specific tips.</p> <p>The thing I really liked about John's talk was that it made it feel very easy to get started with unit testing in CI - even if you have no unit tests on a big code base, you could start by just adding a few tests to your models, or you could just write a few very general &quot;smoke tests&quot; - does it work, yes or no?</p> <p>Adding unit tests to my base (or &quot;skeleton&quot;) project has been on my to-do list for a while now but John's talk has inspired me so when I get some time to do it I'll give it a try. It would certainly be a nice feeling to embark on new projects knowing the basics are in place so that I can add unit tests for important stuff without having to do a whole bunch of setup each time.</p> <h3>Alex Bilbie - Introduction to MongoDB</h3> <img src="http://simianstudios.com/uploads/blog/ciconf_mongo.jpg" width="298" height="199" class="blog_image" /> <p>Before CICONF I'd heard of <a href="http://www.mongodb.org/" target="_blank">MongoDB</a> but if I'm honest, wasn't quite sure what it was for or how I would use it in a project.</p> <p>Luckily for me, <a href="http://twitter.com/alexbilbie" target="_blank">Alex</a> did a stirling job of explaining the concepts behind Mongo and its pros and cons for different systems.</p> <p>Essentially Mongo bridges the gap between traditional relation databases and key-value stores. Instead of rows you have documents, and instead of tables you have collections.</p> <p>One of the coolest things about Mongo (in my opinion anyway!) is that it is schemaless, which means you're not restricted to a certain set of fields. For example, if I run an online store selling books, DVDs and CDs, the data I might want to store that relates to a DVD won't map exactly to the data I want to store about a book or a CD. In MySQL I would either have to have separate tables and join them, or store them in a single table but with loads of fields, most of which would be empty. In Mongo, I store them in a single collection and each document would contain just the fields relevant for the item it represents.</p> <p>Another nice thing about documents is that you can store arrays inside the JSON-style objects that actually hold the data, so you don't need link tables like you would in a relational system - for example if I wanted to store different tags that applied to the items in my store.</p> <p>Mongo also makes it easy to replicate your database as a backup, or shard it if you need to load-balance. </p> <p>It's not all gravy though. Mongo doesn't have transactions or joins so that automatically precludes it from being used for stuff like billing. There are workarounds, and you can even use Mongo and a traditional SQL database alongside each other, but obviously different projects will have different requirements.</p> <p>Mongo looks like good fun to work with so I'm glad Alex's talk has helped me add it to my list of possible things to use.</p> <h3>Jamie Rumbelow - Who Needs Ruby?</h3> <figure> <img src="http://simianstudios.com/uploads/blog/ciconf_rails.jpg" width="298" height="298" class="blog_image" /> <figcaption><a href="http://www.sxc.hu/photo/1142069" target="_blank">Trail Tracks 1</a> by Travis Price</figcaption> </figure> <p><a href="http://twitter.com/jamierumbelow" target="_blank">Jamie</a> is someone who's had a big influence on the way I use CodeIgniter so quite a bit of his talk was stuff I already knew or practiced, but it was great to see how passionate he is about what he does and he was probably the best &quot;performer&quot; of the conference.</p> <p>One thing Jamie talked about that I hadn't thought about previously was the idea of having form validation rules in the model rather than the controller. It makes sense when you think about it, because the rules relate to the data, and putting them in the model keeps the data logic in the model. You have to use a slight hack to do it (manually map your data back to the <code>$_POST</code> server variable) but it's not a heinous crime.</p> <p>Another thing Jamie talked about that I've &quot;kinda&quot; been doing for a while without realising was <a href="http://jamieonsoftware.com/journal/2011/12/26/codeigniter-view-presenters.html" target="_blank">presenters</a>. The idea is that you add an extra layer between the model and the view, so your view gets its data from the presenter rather than the model itself. What this does is cleans a lot of the logic out of your views and makes it easier to maintain down the line. It also means you're sticking to the &quot;tell, don't ask&quot; principle of telling your presenter what you want from it and letting it decide what to return rather than asking a whole bunch of questions about what it can give you.</p> <h2>The Social</h2> <figure> <img src="http://simianstudios.com/uploads/blog/ciconf_beer.jpg" width="298" height="367" class="blog_image" /> <figcaption><a href="http://www.sxc.hu/photo/642599" target="_blank">Just Beer</a> by Jayesh Nair</figcaption> </figure> <p>As with any conference there was a healthy social scene as well as the &quot;work&quot; part. I missed the organised evening activities sadly but I managed to get a good bit of pub time in and hang out with people like <a href="http://twitter.com/adam_griffiths" target="_blank">Adam</a>, <a href="http://twitter.com/jamierumbelow" target="_blank">Jamie</a>, <a href="http://twitter.com/kestrelid" target="_blank">Ian</a> and <a href="http://twitter.com/flavrandy" target="_blank">Andy</a> which was great fun. </p> <p>One thing that was nice was that we were already in central London so we could see a few sights in between pubs and restaurants - on the Saturday lunchtime I even managed to have a quick wander around an <a href="http://www.wellcomecollection.org/" target="_blank">art exhibition</a>!</p> <p>Next time I'll have to make sure my calendar is clear and go the whole hog with the social, from the stories I heard the people who went out on the town had a whale of a time!</p> <h2>Overall</h2> <p>In my books CICONF 2012 was a very enjoyable experience - I managed to learn a lot and have a good time too. I would have preferred it to be in the week rather than on a weekend as I need to give my brain a bit of downtime but it wasn't as strenuous as a working day so it wasn't really a hardship.</p> <p>I'm looking forward to seeing what Phil and co. can come up with for CICONF 2013!</p>]]></description>
			<pubDate>Wed, 07 Mar 2012 19:19:22 +0000</pubDate>
		</item>

    </channel>
</rss>

