<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description></description><title>Adam Carlile</title><generator>Tumblr (3.0; @adamcarlile)</generator><link>http://blog.adamcarlile.com/</link><item><title>Hello service_disruption gem</title><description>&lt;p&gt;Well over the past few weeks I&amp;#8217;ve been working on a little gem that makes it easy to get notifications when the &lt;a href="http://tfl.gov.uk"&gt;Tube&lt;/a&gt; status changes. As a byproduct it also gives easy access to the tube data as ruby objects too :)&lt;/p&gt;
&lt;p&gt;Previously you&amp;#8217;d have to actively check the TFL website, or sign up for the &lt;a href="http://alerts.tfl.gov.uk"&gt;TFL Alerts &lt;/a&gt;programme, which sends you text alerts.&lt;/p&gt;
&lt;p&gt;However service_disruption polls the TFL Data feed for changes, and if there are changes it will alert you using Growl.&lt;/p&gt;
&lt;p&gt;So in order to get this to work you&amp;#8217;ll need&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Ruby 1.8.7 / 1.9.3&lt;/li&gt;
&lt;li&gt;&lt;a href="http://growl.info/downloads"&gt;Growl&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Apple Mac&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;a href="https://github.com/Frozenproduce/service_disruption"&gt;Installation instructions&lt;/a&gt; are available at the projects &lt;a href="https://github.com/Frozenproduce/service_disruption"&gt;github repo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As always any feedback would be great, and suggestions for improvements.&lt;/p&gt;</description><link>http://blog.adamcarlile.com/post/22114448216</link><guid>http://blog.adamcarlile.com/post/22114448216</guid><pubDate>Mon, 30 Apr 2012 09:58:39 +0100</pubDate><category>Ruby</category><category>tfl</category><category>tube</category><category>london</category><category>gem</category><category>growl</category><category>osx</category></item><item><title>Hash extensions for dealing with CamelCase XML documents</title><description>&lt;p&gt;I&amp;#8217;m looking at you Microsoft web services!&lt;/p&gt;
&lt;p&gt;Anyway, a quick extension to the Hash class to add the rubyfy_keys! method and it&amp;#8217;s recursive partners.&lt;/p&gt;
&lt;script src="https://gist.github.com/2479795.js?file=hash.rb" type="text/javascript"&gt;&lt;/script&gt;</description><link>http://blog.adamcarlile.com/post/21713888980</link><guid>http://blog.adamcarlile.com/post/21713888980</guid><pubDate>Tue, 24 Apr 2012 14:52:57 +0100</pubDate></item><item><title>Heroku Airbrake post deploy hook</title><description>&lt;p&gt;After a lot of trawling around the internet I couldn&amp;#8217;t find any reference as to how to set up a post deploy hook for heroku. Even the airbrake:heroku:add_post_deploy_hook rake task didn&amp;#8217;t seem to work, so I have managed to piece together my own custom post deploy hook&lt;/p&gt;
&lt;script src="https://gist.github.com/1901482.js?file=gistfile1.sh"&gt;&lt;/script&gt;&lt;p&gt;I hope this can help someone!&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://devcenter.heroku.com/articles/deploy-hooks"&gt;Heroku post deploy hook docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://help.airbrake.io/kb/api-2/deploy-tracking"&gt;Airbrake post deploy hook docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><link>http://blog.adamcarlile.com/post/18189188455</link><guid>http://blog.adamcarlile.com/post/18189188455</guid><pubDate>Fri, 24 Feb 2012 15:07:22 +0000</pubDate><category>airbrake</category><category>rails</category><category>heroku</category><category>post deploy</category><category>hook</category></item><item><title>Queuing Sunspot indexing jobs with Resque</title><description>&lt;p&gt;I&amp;#8217;m currently working on a social networking &lt;a href="http://beta.wellbeinginthecity.me/"&gt;platform&lt;/a&gt;(very beta!) for London, and we use &lt;a href="https://github.com/defunkt/resque"&gt;Resque&lt;/a&gt; to handle all of our background jobs, sending outbound mail, image processing etc.&lt;/p&gt;
&lt;p&gt;We recently implemented &lt;a href="http://sunspot.github.com/"&gt;Sunspot&lt;/a&gt; and &lt;a href="http://lucene.apache.org/solr/"&gt;Solr&lt;/a&gt; for indexing our models to allow rapid full text searching. Now &lt;a href="http://sunspot.github.com/"&gt;Sunspot&lt;/a&gt; is awesome, has a great DSL and makes indexing and searching super easy, it also has great built in support for &lt;a href="https://github.com/tobi/delayed_job"&gt;DelayedJob&lt;/a&gt;, which is another awesome background processing framework.&lt;/p&gt;
&lt;p&gt;However since we&amp;#8217;ve already implemented &lt;a href="https://github.com/defunkt/resque"&gt;Resque&lt;/a&gt; it seemed the logical choice to integrate it with &lt;a href="http://sunspot.github.com/"&gt;Sunspot&lt;/a&gt;. But documentation seems to be patchy at best as to how to implement the queue with Resque.&lt;/p&gt;
&lt;h2&gt;Enter SunspotSessionProxy&lt;/h2&gt;
&lt;p&gt;SunspotSessionProxy is a class that sits between the &lt;a href="http://sunspot.github.com/"&gt;Sunspot&lt;/a&gt; interface and the &lt;a href="http://lucene.apache.org/solr/"&gt;Solr&lt;/a&gt; server, allowing you to change the behaviour of certain actions that Sunspot will perform, such as indexing, searching etc.&lt;/p&gt;
&lt;p&gt;So through this class we can modify the default behaviour of the index action to route it via a &lt;a href="https://github.com/defunkt/resque"&gt;Resque&lt;/a&gt; worker.&lt;/p&gt;
&lt;script src="https://gist.github.com/1626153.js?file=resque_session_proxy.rb"&gt;&lt;/script&gt;&lt;p&gt;This class delegates all of it&amp;#8217;s methods to the Session class, apart from the index method, which we have rewritten to include a call to &lt;a href="https://github.com/defunkt/resque"&gt;Resque&lt;/a&gt; to enqueue the job.&lt;/p&gt;
&lt;p&gt;We also keep hold of the original session so that we can call it from inside the Resque worker, so we can actually run the original indexing method, instead of our modified index method&lt;/p&gt;
&lt;h2&gt;Work, Work, Work&lt;/h2&gt;
&lt;p&gt;Here&amp;#8217;s the code for the &lt;a href="https://github.com/defunkt/resque"&gt;Resque&lt;/a&gt; worker.&lt;/p&gt;
&lt;script src="https://gist.github.com/1626153.js?file=index_job.rb"&gt;&lt;/script&gt;&lt;p&gt;Very simple, just takes the arguments passed by the ResqueSessionProxy#index, gets all the AR objects, and then runs the original sessions index method from inside the worker thread&lt;/p&gt;
&lt;h2&gt;The Final Piece&lt;/h2&gt;
&lt;p&gt;Finally we have to tell &lt;a href="https://github.com/defunkt/resque"&gt;Resque&lt;/a&gt; to use this new session proxy, so just a simple line an in initialiser will do it&lt;/p&gt;
&lt;script src="https://gist.github.com/1626153.js?file=sunspot.rb"&gt;&lt;/script&gt;&lt;p&gt;That&amp;#8217;s it! Hopefully that has helped some of you, as I&amp;#8217;ve not seen any documentation on this subject&lt;/p&gt;</description><link>http://blog.adamcarlile.com/post/16002734668</link><guid>http://blog.adamcarlile.com/post/16002734668</guid><pubDate>Tue, 17 Jan 2012 11:07:02 +0000</pubDate><category>ruby</category><category>ruby on rails</category><category>sunspot</category><category>solr</category><category>resque</category></item><item><title>If I could turn back TIME</title><description>&lt;p&gt;Time, we can all agree, is an incredibly useful concept, unfortunately the recent decision to drop &amp;lt;time&amp;gt; from the HTML5 spec is not useful.&lt;/p&gt;
&lt;p&gt;After all every website that I&amp;#8217;ve recently developed has made use of the &amp;lt;time&amp;gt; element, inside &amp;lt;article&amp;gt;, making publish dates something that hold semantic meaning in relation to the &amp;lt;article&amp;gt; in question.&lt;/p&gt;
&lt;p&gt;The decision to remove it has been wholeheartedly rejected by the developer community.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.zeldman.com/2011/10/31/goodbye-html5-element/"&gt;Zeldman&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.brucelawson.co.uk/2011/goodbye-html5-time-hello-data/"&gt;Bruce Lawson &lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Along with a new website, &lt;a href="http://whynotime.com/"&gt;&lt;a href="http://whynotime.com/"&gt;http://whynotime.com/&lt;/a&gt;&lt;/a&gt;, and a trending hashtag &lt;a href="https://twitter.com/#!/search/%23occupyhtml5"&gt;#occupyhtml5&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Github and Twitter both use the &amp;lt;time&amp;gt; tag extensively, it seems to me to be incredibly short sighted to remove such a useful element and replace it with something vague and totally meaningless, &amp;lt;data&amp;gt;. &amp;lt;data&amp;gt; can contain anything, and has no meaning to the &amp;lt;article&amp;gt; in question.&lt;/p&gt;
&lt;p&gt;It seams like a real step backwards to the days of endless &amp;lt;div&amp;gt; and &amp;lt;span&amp;gt; elements, except this time endless &amp;lt;data&amp;gt; elements with all sorts of meaningless data within, holding no semantic value whatsoever.&lt;/p&gt;
&lt;p&gt;I can only hope that the W3C reverse this decision for the good of the HTML5 spec.&lt;/p&gt;</description><link>http://blog.adamcarlile.com/post/12196505728</link><guid>http://blog.adamcarlile.com/post/12196505728</guid><pubDate>Tue, 01 Nov 2011 14:13:00 +0000</pubDate></item><item><title>Meta programming, serialization</title><description>&lt;p&gt;Oh wow, has it been that long already, I need to force myself to post something at least once a week, even if it&amp;#8217;s just posting pictures of cats!&lt;/p&gt;
&lt;p&gt;So I&amp;#8217;m currently working on a social media platform for London, with it&amp;#8217;s main purpose being to promote a wellbeing lifestyle in a hectic city. I wrote this handy little utility module for creating methods from serialized data.&lt;/p&gt;
&lt;p&gt;Say, for example you have an object, but it can have serialized data stored within a hash in the database, instead of getting the data through the hash notation, you can now access it directly as Object.first.hash_key_name instead of Object.first.hash[:hash_key_name]&lt;/p&gt;
&lt;script src="https://gist.github.com/1328997.js?file=extra_fields.rb"&gt;&lt;/script&gt;&lt;p&gt;This is handy in two ways, you can access serialized data directly as methods of the class instance. Plus you can use the serialized fields directly in a form, as the module automatically creates the setters for the hashes keys. Pretty handy, you just have to specify in an array of serialized field symbols as a private method in the parent class.&lt;/p&gt;
&lt;script src="https://gist.github.com/1328997.js?file=page.rb"&gt;&lt;/script&gt;</description><link>http://blog.adamcarlile.com/post/12172917856</link><guid>http://blog.adamcarlile.com/post/12172917856</guid><pubDate>Mon, 31 Oct 2011 21:30:42 +0000</pubDate><category>ruby</category><category>ruby on rails</category><category>web</category><category>programming</category><category>meta programming</category></item><item><title>Rupert Murdoch of the Galactic News Empire, just something I...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lol8i5E8zD1qfxyc6o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Rupert Murdoch of the Galactic News Empire, just something I knocked up watching Mr Murdoch talk garbage!&lt;/p&gt;</description><link>http://blog.adamcarlile.com/post/7805132809</link><guid>http://blog.adamcarlile.com/post/7805132809</guid><pubDate>Tue, 19 Jul 2011 17:01:17 +0100</pubDate></item><item><title>The Cliché-o-matic</title><description>&lt;a href="http://cliche.podisode.com"&gt;The Cliché-o-matic&lt;/a&gt;: &lt;p&gt;This is a little something I made up for my good friend &lt;a href="http://alexgoy.com"&gt;Alex Goy&lt;/a&gt; and the &lt;a href="http://twitter.com/podisode"&gt;@Podisode&lt;/a&gt; boys. If you’re ever stuck for clichés to use in your writing never fear, the cliché-o-matic is here.&lt;/p&gt;
&lt;p&gt;For those that are interested it’s a simple &lt;a href="http://www.sinatrarb.com/"&gt;Sinatra&lt;/a&gt; app, pulling quotes from a YAML file&lt;/p&gt;</description><link>http://blog.adamcarlile.com/post/6977501803</link><guid>http://blog.adamcarlile.com/post/6977501803</guid><pubDate>Mon, 27 Jun 2011 17:43:53 +0100</pubDate><category>Sinatra</category><category>Motoring</category><category>Cliché</category><category>Podisode</category><category>Ruby</category></item><item><title>Wow, It's been a while</title><description>&lt;p&gt;It&amp;#8217;s been a while since I posted last, I really need to post at least once a week. Not a lot has happened really. I&amp;#8217;m still unemployed, even though I think I&amp;#8217;m pretty good at what I do it&amp;#8217;s starting to grate on my confidence. I guess I&amp;#8217;ll just keep slogging on.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m keeping myself afloat with some freelance jobs, however chasing invoices is not something I enjoy doing. And why should I have to chase the money that is owed to me for work that I did in good faith anyway? It&amp;#8217;s not like this is a one off, I feel like I should name and shame but I can&amp;#8217;t quite bring myself to do it.&lt;/p&gt;
&lt;p&gt;In other news I managed to smash my MacBook Pro up. The machine was over four years old, and it was only a matter of time, so I think the logic board has burnt out, or something equally expensive. Problem being that I need a Mac in order to make money, so I had to bite the bullet and order another one from Apple. On the plus side I ensure I back up everything using Time Machine, so fortunately all of my work was backed up. If you don&amp;#8217;t back up, you need to start now! Data is so much more valuable then hardware!&lt;/p&gt;</description><link>http://blog.adamcarlile.com/post/6067762076</link><guid>http://blog.adamcarlile.com/post/6067762076</guid><pubDate>Wed, 01 Jun 2011 10:52:52 +0100</pubDate><category>Fail</category><category>Work</category><category>MacBook</category><category>Freelance</category><category>Unemployment</category></item><item><title>My contribution to the Royal Wedding hysteria!</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lk9ne8vp5Y1qfxyc6o1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;My contribution to the Royal Wedding hysteria!&lt;/p&gt;</description><link>http://blog.adamcarlile.com/post/4957767123</link><guid>http://blog.adamcarlile.com/post/4957767123</guid><pubDate>Tue, 26 Apr 2011 16:37:20 +0100</pubDate></item><item><title>Back to the UK</title><description>&lt;p&gt;So after four months in Canada I&amp;#8217;ve finally made it home and I&amp;#8217;m settling back in to work after having so much time off. I&amp;#8217;ve been all over the country in the past week attending interviews for various positions.&lt;/p&gt;
&lt;p&gt;I attended an interview in Manchester to work as a volunteer for the London 2012 Olympics, I probably talked far too much, but it was great fun to talk to a bunch of people who were really passionate about what the Olympics is going to bring to the UK. I&amp;#8217;ve heard nothing but negative reaction in the press regarding the 2012 games, but I think it&amp;#8217;s going to be a fantastic festival of sport for the UK. I for one cannot wait if I&amp;#8217;m involved or not, it&amp;#8217;s just going to be a fabulous summer!&lt;/p&gt;
&lt;p&gt;I also attended an interview for a Ruby on Rails developer position in Covent Garden, It was such a beautiful day, and confirmed everything I have thought about working in London, the buzz of the place and the cosmopolitan lifestyle is something that really appeals to me. I really hope I get the job!&lt;/p&gt;</description><link>http://blog.adamcarlile.com/post/4438469602</link><guid>http://blog.adamcarlile.com/post/4438469602</guid><pubDate>Fri, 08 Apr 2011 11:39:12 +0100</pubDate></item><item><title>So accurate it’s untrue!</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lj8ni5yZfR1qfxyc6o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;So accurate it’s untrue!&lt;/p&gt;</description><link>http://blog.adamcarlile.com/post/4392201337</link><guid>http://blog.adamcarlile.com/post/4392201337</guid><pubDate>Wed, 06 Apr 2011 17:08:28 +0100</pubDate></item><item><title>Developers, you MUST sanitise DB input</title><description>&lt;a href="http://www.bbc.co.uk/news/technology-12933053"&gt;Developers, you MUST sanitise DB input&lt;/a&gt;: &lt;p&gt;Thousands of sites have been hit over the weekend with a series of SQL injection attacks. This may well be a flaw in MSSQL but it’s still a poignant reminder to ensure that you sanitise all user input, as malicious users can still try to exploit your database&lt;/p&gt;</description><link>http://blog.adamcarlile.com/post/4292333478</link><guid>http://blog.adamcarlile.com/post/4292333478</guid><pubDate>Sat, 02 Apr 2011 22:02:52 +0100</pubDate><category>database</category><category>web</category><category>security</category><category>sql injection</category></item><item><title>Beautiful British Columbia</title><description>&lt;p&gt;I&amp;#8217;m writing this sat in the International Departures lounge at Vancouver International Airport (YVR). All I can hear is the sound of running water, and the occasional passenger announcement. Out of the window I can see the snow covered tops of the nearby Coastal Mountains glistening in the spring sunshine. The sky is clear and the winds calm, It really is a perfect day.&lt;/p&gt;
&lt;p&gt;Part of me is very excited to go back to the UK, but a part of me will always long to be in this beautiful area of the world. I&amp;#8217;ll be back Vancouver! But it&amp;#8217;s time for my next adventure. I&amp;#8217;m just not looking forward to the grimy 80&amp;#8217;s era international arrivals hall at Heathrow, that&amp;#8217;ll be a serious shock to the system!&lt;/p&gt;
&lt;p&gt;And to anyone thinking of making the five-thousand mile trip, do it! You won&amp;#8217;t be disappointed!&lt;/p&gt;</description><link>http://blog.adamcarlile.com/post/4244789690</link><guid>http://blog.adamcarlile.com/post/4244789690</guid><pubDate>Fri, 01 Apr 2011 00:39:32 +0100</pubDate><category>Vancouver</category><category>Canada</category><category>British Columbia</category><category>Beautifu</category><category>City</category></item><item><title>What goes up must come down</title><description>&lt;p&gt;As winter slowly turns into spring it&amp;#8217;s time to end my Canadian adventure. For those of you that don&amp;#8217;t know, I&amp;#8217;ve been living in Whistler, BC for the last four months. These have been some of the best four months of my life. I have met so many great people, and hung out with some of my best friends while I&amp;#8217;ve been here.&lt;/p&gt;
&lt;p&gt;Whistler is one of those places that everyone who lives here is on the same wavelength, it&amp;#8217;s unbelievable how easy it is to get on with anyone when you have so much in common. I guess that&amp;#8217;s why I enjoyed &lt;a href="http://leedsmetsnowsports.co.uk"&gt;university snowsports&lt;/a&gt; so much, as everyone had the same approach to life, doing anything to get the next fix of snow! I really hope I will see a lot of the people I have met over here again.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_liuxbeoQTx1qeg2ip.jpg"/&gt;&lt;/p&gt;
&lt;p&gt;In terms of resorts, Whistler is one of the most complete resorts I have ever been to, the village is great, plenty to do and see even if you don&amp;#8217;t ski or snowboard. Well thought out, everything is within walking distance, plus great transit links provided by BC Transit to the surrounding area. Topped off by some great bars and restaurants, in no particular order here are my top five.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;The Garibaldi Lift Company (The GLC)&lt;/li&gt;
&lt;li&gt;Crystal Lounge&lt;/li&gt;
&lt;li&gt;Dustys&lt;/li&gt;
&lt;li&gt;Merlins&lt;/li&gt;
&lt;li&gt;Earls&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;The mountains of Whistler and Blackcomb have some of the best terrain in North America, probably the world, steep chutes, great glades, drops, expansive alpine bowls. The only problem with the area, and the Coastal Mountains in general is its proximity to the Pacific, this gives Whistler quite a mild climate, it can rain in the village, and we only had a couple of bad days where it rained all the way to the high alpine. But when it snows, does it snow! The base as of the 30th of march is 3.5 meters, 3.5 meters is an incredible amount of snow, total accumulations this season have been in excess of 1,300&amp;#160;cm, so as you can imagine we&amp;#8217;ve had some epic powder days! In no order here are my top five areas of both mountains that you must visit if you come to Whistler.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Fraggle Rock (Skiers right off under Crystal Chair)&lt;/li&gt;
&lt;li&gt;Harmony Horseshoes/Boomer Bowl/Gun Barrels&lt;/li&gt;
&lt;li&gt;Flute Bowl (Far skiers right off Symphony + 25 minute hike)&lt;/li&gt;
&lt;li&gt;Gemstone Bowls (Off Spankies Ladder)&lt;/li&gt;
&lt;li&gt;Sun Bowl (Off Harmony ridge)&lt;/li&gt;
&lt;li&gt;Almost anything off 7th Heaven (Reservoir Trees, Xhiggies Meadow)&lt;/li&gt;
&lt;li&gt;Khybers/Million Dollar Ridge (Out of bounds, skiers left off upper peak to creek)&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;I could go on and on, but as you can see it&amp;#8217;s just endless, I have been here four months and haven&amp;#8217;t even done all of the marked in bounds runs!&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_liuxc0n8IT1qeg2ip.jpg"/&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m going to miss Whistler, but I&amp;#8217;m very excited to what the future will hold. I have an interview for a great position in London, and an interview for a position to volunteer for the London 2012 Olympics. But no doubt I&amp;#8217;ll be back to Whistler next winter to see all of my friends out here and to tick off the rest of the areas!&lt;/p&gt;</description><link>http://blog.adamcarlile.com/post/4203859087</link><guid>http://blog.adamcarlile.com/post/4203859087</guid><pubDate>Wed, 30 Mar 2011 07:15:45 +0100</pubDate><category>Whistler</category><category>Blackcomb</category><category>snowboarding</category><category>Skiing</category><category>Adventures</category><category>winter</category><category>alpine</category></item><item><title>A fantastic infographic posted by Randall Munro, of XKCD fame....</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lid420ZtLC1qfxyc6o1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;A fantastic infographic posted by Randall Munro, of XKCD fame. Demonstrating the various levels of exposure to ionising radiation&lt;/p&gt;</description><link>http://blog.adamcarlile.com/post/3982361473</link><guid>http://blog.adamcarlile.com/post/3982361473</guid><pubDate>Sun, 20 Mar 2011 15:22:47 +0000</pubDate></item><item><title>BBC Article Regarding Nuclear Power</title><description>&lt;a href="http://www.bbc.co.uk/news/world-asia-pacific-12785274"&gt;BBC Article Regarding Nuclear Power&lt;/a&gt;: &lt;p&gt;The BBC have published an article that echoes what I was discussing in my previous entry, its the lack of knowledge regarding nuclear power and radiation that’s leading people to believe that it is lethal, however the BBC have tried to explain that the empirical evidence would suggest that it isn’t as dangerous as people are lead to believe.&lt;/p&gt;
&lt;p&gt;It’s a shame that this article won’t make the mainstream broadcast news, because it isn’t sensationalist enough. Which is a shame as it could help put peoples fears to bed regarding Fukushima&lt;/p&gt;</description><link>http://blog.adamcarlile.com/post/3955989052</link><guid>http://blog.adamcarlile.com/post/3955989052</guid><pubDate>Sat, 19 Mar 2011 06:53:56 +0000</pubDate></item><item><title>Nuclear power is still the best option for a non carbon future</title><description>&lt;p&gt;I&amp;#8217;m as shocked as anyone else regarding the devastation in Japan, the scale of the human tragedy is inconceivable, however the main story that seems to be circling the news, especially in Canada, is that of this supposed &amp;#8220;Meltdown&amp;#8221;&lt;/p&gt;
&lt;p&gt;Now first of all, Meltdown conjures up images of Chernobyl and the abandoned town of Pripyat. To use the same term and toss it around so loosely regarding the incident at Fukushima is reckless. They are nowhere near the same type of incident, and to draw comparisons is tantamount to disinformation.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_li37fyobvI1qeg2ip.jpg"/&gt;&lt;em&gt;Chernobyl, not the same as Fukushima&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The main issue in my opinion is a general ignorance as to the workings of a nuclear reactor, and nuclear physics in general. People are terrified of things they don&amp;#8217;t fully understand, and nuclear power, unfortunately, is one of these things.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s not helped by the media supplying incredibly anti-nuclear commentary, referring to everything as a disaster, or &amp;#8220;meltdown&amp;#8221;. Nuclear power when managed correctly is incredibly safe and clean, producing no carbon emissions at all, the only waste is nuclear byproducts that can be stored underground to decay into more stable elements.&lt;/p&gt;
&lt;p&gt;For example, the media was reporting yesterday that that Fukushima I was venting radioactive steam, however what the media failed to mention is that the steam contains radionuclides with very short half-lives, so after they were vented they rapidly decayed into stable, non-radioactive elements.&lt;/p&gt;
&lt;p&gt;A half-life is not something the media concerns itself with it&amp;#8217;s content to allow people to believe that this steam is lethal, even though the amount of radiation measured during the venting was equivalent to that of a chest x-ray, not to mention that those elements will rapidly decay and be sent out to sea, never to be seen again!&lt;/p&gt;
&lt;p&gt;The real danger comes from cracked containment vessels, as was shown with the obsolete RBMK reactor types responsible for the Chernobyl disaster, however the BWR reactors at Fukushima have 3 levels of containment, the zircaloy fuel rod sheathes, the concrete core vessel, and then the outer containment vessel, even if the fuel rods melt down, they will not breach the containment, and it will not continue burning through the planet.&lt;/p&gt;
&lt;p&gt;The future of nuclear power is a difficult one, its about overcoming peoples innate fear of something they don&amp;#8217;t fully understand, coupled with the media fanning the flames. However if we all want to keep using the same amount of electricity, and we&amp;#8217;re committed to doing all we can to save the planet then we need to start the process to ditch our carbon economy.&lt;/p&gt;
&lt;p&gt;The first step comes with replacing our dirty fossil fuel burning power stations with clean nuclear power. Renewables are great, but they don&amp;#8217;t produce the amount of power required to run nations, nuclear fission power is our best bet for staving off the effects of climate change in the immediate short term, while we develop ways to bring nuclear fusion reactors up to industrial scale. To put a halt on all nuclear power developments would be incredibly short sighted. After all, we all need electricity, where else are we gonna&amp;#8217; get it from?&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_li37l8YMHj1qeg2ip.jpg"/&gt;&lt;em&gt;&lt;br/&gt;Not gonna be enough!&lt;/em&gt;&lt;/p&gt;</description><link>http://blog.adamcarlile.com/post/3875201023</link><guid>http://blog.adamcarlile.com/post/3875201023</guid><pubDate>Tue, 15 Mar 2011 11:00:08 +0000</pubDate><category>Nuclear power</category><category>Fukushima</category><category>Japan</category><category>Media</category><category>Non-Carbon</category></item><item><title>"Computers are like Old Testament gods: lots of rules and no mercy"</title><description>“Computers are like Old Testament gods: lots of rules and no mercy”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Joseph Campbell&lt;/em&gt;</description><link>http://blog.adamcarlile.com/post/3848930127</link><guid>http://blog.adamcarlile.com/post/3848930127</guid><pubDate>Mon, 14 Mar 2011 04:31:50 +0000</pubDate></item><item><title>Rendering sane markup with Rails helpers</title><description>&lt;p&gt;If you, like me, have tried to use helpers to generate complex chunks of HTML programmaticly, then you will have noticed that &lt;code&gt;content_tag&lt;/code&gt; doesn&amp;#8217;t really cut it for large chunks of HTML&lt;/p&gt;
&lt;p&gt;&lt;code&gt;content_tag&lt;/code&gt; will render the HTML inline unless you manually insert line breaks and tabs in order to make it readable, not to mention you end up with a horribly nested set of methods wrapping around the content you want to display&lt;/p&gt;
&lt;p&gt;Looking something a little like this&lt;/p&gt;
&lt;script src="https://gist.github.com/867013.js?file=render_user_status_bad.rb"&gt;&lt;/script&gt;&lt;p&gt;As you can see the code looks quite unreadable, and it&amp;#8217;s almost backwards in the way that it is generated, I&amp;#8217;m creating the inner HTML first, and then wrapping it inside a div depending on if the user is logged in or not, there must be a better way to achieve the same result, while making it look nicer&lt;/p&gt;
&lt;h2&gt;Enter Builder&lt;/h2&gt;
&lt;p&gt;The builder gem is something that I have used most often for defining XML documents, however you can also call the Builder::XmlMarkup.new method within any other methods and generate XML markup inline. Using the same example, this is the execution using Builder::XmlMarkup instead of content_tag&lt;/p&gt;
&lt;script src="https://gist.github.com/867013.js?file=render_user_status_better.rb"&gt;&lt;/script&gt;&lt;p&gt;As you can see it&amp;#8217;s much more readable than the previous example&lt;/p&gt;
&lt;p&gt;However each to their own, but I think personally the Builder gem is incredibly useful for creating XML style markup instead of using Rails&amp;#8217; built in helpers to generate HTML. Give it a go, you might be pleasantly surprised!&lt;/p&gt;</description><link>http://blog.adamcarlile.com/post/3799185174</link><guid>http://blog.adamcarlile.com/post/3799185174</guid><pubDate>Sat, 12 Mar 2011 04:07:00 +0000</pubDate><category>Ruby</category><category>Ruby on rails</category><category>HTML</category><category>Helpers</category><category>Markup</category><category>programming</category><category>Code</category><category>code</category></item></channel></rss>

