<?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>Eamonn Faherty</title>
	<atom:link href="http://www.eamonnfaherty.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.eamonnfaherty.co.uk</link>
	<description>technology enthusiast and public speaker</description>
	<lastBuildDate>Tue, 21 May 2013 19:06:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>elasticsearch + sentry = happy days</title>
		<link>http://www.eamonnfaherty.co.uk/2013/05/21/elasticsearch-sentry-happy-days/</link>
		<comments>http://www.eamonnfaherty.co.uk/2013/05/21/elasticsearch-sentry-happy-days/#comments</comments>
		<pubDate>Tue, 21 May 2013 19:06:48 +0000</pubDate>
		<dc:creator>eamonn</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[elasticsearch]]></category>
		<category><![CDATA[sentry]]></category>

		<guid isPermaLink="false">http://www.eamonnfaherty.co.uk/?p=805</guid>
		<description><![CDATA[I have been using the amazing Sentry for quite some time and I love it. For anybody running a live site it really is a must! I have also recently switched from xapian to elasticsearch as my search engine of choice. BTW, I am on Ubuntu 12.04, installed elasticsearch via a deb file downloaded from [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://www.eamonnfaherty.co.uk/2013/01/26/ios-app-signing/' rel='bookmark' title='iOS App Signing'>iOS App Signing</a> <small>I have restarted my iOS development and thought how better...</small></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>I have been using the amazing <a href="https://getsentry.com/" title="sentry" target="_blank">Sentry</a> for quite some time and I love it.  For anybody running a live site it really is a must!</p>
<p>I have also recently switched from <a href="http://xapian.org/" title="xapian" target="_blank">xapian</a> to <a href="http://www.elasticsearch.org/" title="elasticsearch" target="_blank">elasticsearch</a> as my search engine of choice.</p>
<p>BTW, I am on Ubuntu 12.04, installed elasticsearch via a deb file downloaded from their site and installed sentry via pip.</p>
<p>Once I was all setup I wanted to enabling logging of elasticsearch to my centralised sentry instance.  This was a real pain and would have taken me a lot longer to complete (if at all) if it wasn&#8217;t for <a href="https://github.com/ColinHebert" title="Colin Hebert" target="_blank">ColinHebert</a> &#8211; <a href="https://github.com/kencochrane/raven-java/issues/58" title="details" target="_blank">details</a>. Thanks again!</p>
<p>Here is what I had to do to get it working:<br />
Elasticsearch uses log4j for logging but has a yaml file to configure it instead of a properties file.  I had to append this to my /etc/elasticsearch/logging.yml file:<br />
<code>sentry:<br />
type: net.kencochrane.raven.log4j.SentryAppender<br />
dsn: "http://XXXX:YYY@myserver.com/N"</code></p>
<p>I also change the first line to read:<br />
<code>rootLogger: DEBUG, console, file, sentry</code></p>
<p>All I did was append sentry to the list of rootLoggers.</p>
<p>Once the config was sorted I had to download the dependencies:<br />
raven-3.0-20130516.191912-9.jar<br />
raven-log4j-3.0-20130516.191940-9.jar<br />
commons-codec-1.8.jar<br />
jackson-core-2.2.2-20130512.040915-3.jar<br />
slf4j-api-1.7.5.jar</p>
<p>and add them to /usr/share/elasticsearch/lib on the machine hosting elasticsearch.</p>
<p>Once that was all done restarting elasticsearch was all that remained and I was logging to sentry!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.eamonnfaherty.co.uk/2013/01/26/ios-app-signing/' rel='bookmark' title='iOS App Signing'>iOS App Signing</a> <small>I have restarted my iOS development and thought how better...</small></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.eamonnfaherty.co.uk/2013/05/21/elasticsearch-sentry-happy-days/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiling twitter bootstrap on the mac</title>
		<link>http://www.eamonnfaherty.co.uk/2013/04/28/compiling-twitter-bootstrap-on-the-mac/</link>
		<comments>http://www.eamonnfaherty.co.uk/2013/04/28/compiling-twitter-bootstrap-on-the-mac/#comments</comments>
		<pubDate>Sun, 28 Apr 2013 13:29:43 +0000</pubDate>
		<dc:creator>eamonn</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[bootstrap]]></category>

		<guid isPermaLink="false">http://www.eamonnfaherty.co.uk/?p=791</guid>
		<description><![CDATA[Anybody who knows me in the real world has probably heard me rave about twitter bootstrap. I am not going to get into why it is a good framework or why frameworks are good in this post. If you would like hear stuff like that please contact me and I will see what I can [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://www.eamonnfaherty.co.uk/2013/01/26/ios-app-signing/' rel='bookmark' title='iOS App Signing'>iOS App Signing</a> <small>I have restarted my iOS development and thought how better...</small></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Anybody who knows me in the real world has probably heard me rave about twitter bootstrap.  I am not going to get into why it is a good framework or why frameworks are good in this post.  If you would like hear stuff like that please <a href="http://www.eamonnfaherty.co.uk/contact/" title="Contact">contact me</a> and I will see what I can do.</p>
<p>This post is about how to compile your very own copy of <a href="http://twitter.github.io/bootstrap/" title="bootstrap site" target="_blank">bootstrap</a>! Why would you want to do that when the nice guys maintaining the package allow you to choose <a href="http://twitter.github.io/bootstrap/customize.html" title="customize bootstrap" target="_blank">your own colour scheme</a>?  I am very grateful for the customise options but I wanted to be able to able to build the package myself for three reasons: 1) I am a geek and it is a geeky thing to do, 2) I wanted to be able to customise my theme and revisit it improving it as a I continue on my project (the customise page does not have a save/resume feature) and 3) I wanted to create a colour scheme that did not match the default &#8211; I didn&#8217;t just want to choose the colours and watch them cascade through the package.  I wanted to change how the colours cascade through the package.</p>
<p>Without further delay this is what I did:<br />
<code>brew install node.js</code><br />
You must have the excellent <a href="http://mxcl.github.io/homebrew/" title="homebrew site" target="_blank">HomeBrew</a> installed to run that command.</p>
<p>Once I had node.js installed it was a simple case of<br />
<code>cd twitter-bootstrap-src<br />
npm install<br />
make clean<br />
make bootstrap</code></p>
<p>This uses the excellent npm package manager to install the dependencies for bootstrap and then uses make to clean and build bootstrap.  Once it completed you will have a working bootstrap installation in twitter-bootstrap-src/bootsrap.</p>
<p>I hope this helps and if you have any questions post a comment and I will try to help!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.eamonnfaherty.co.uk/2013/01/26/ios-app-signing/' rel='bookmark' title='iOS App Signing'>iOS App Signing</a> <small>I have restarted my iOS development and thought how better...</small></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.eamonnfaherty.co.uk/2013/04/28/compiling-twitter-bootstrap-on-the-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iOS App Signing</title>
		<link>http://www.eamonnfaherty.co.uk/2013/01/26/ios-app-signing/</link>
		<comments>http://www.eamonnfaherty.co.uk/2013/01/26/ios-app-signing/#comments</comments>
		<pubDate>Sat, 26 Jan 2013 14:33:40 +0000</pubDate>
		<dc:creator>eamonn</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[iOS]]></category>

		<guid isPermaLink="false">http://www.eamonnfaherty.co.uk/?p=762</guid>
		<description><![CDATA[I have restarted my iOS development and thought how better to celebrate than writing a blog post. iOS is the software that runs on the iPhone, iPod touch, iPad and AppleTV devices.  It enables apps to be installed, removed, run etc.  It also has some utility features such as battery monitoring and display etc. In [...]<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></description>
				<content:encoded><![CDATA[<p>I have restarted my iOS development and thought how better to celebrate than writing a blog post.</p>
<p>iOS is the software that runs on the iPhone, iPod touch, iPad and AppleTV devices.  It enables apps to be installed, removed, run etc.  It also has some utility features such as battery monitoring and display etc.</p>
<p>In order for a developer to have an app they have written run on iOS it must be signed using a developer certificate issued by Apple.  This signing means two things &#8211; all apps are developed by people have approved and every time you build an app is built the author of the app is verified using the certificate &#8211; so nobody can claim to be author of your app or author an app in your name.</p>
<p>The developer certificate is not the only thing used in the signing process.  There is a provisioning profile file used.  During development and testing apps are signed using a development provisioning profile.  This profile lists the devices the app can be installed on.  To add items to the list you must use Apples provisioning center.  When you are ready to upload your app into the App Store you have to sign your app using your distribution profile.</p>
<p>Once you have a signed app you can install the app on your device using iTunes.</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.eamonnfaherty.co.uk/2013/01/26/ios-app-signing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project Dirt v2 &#8211; Business Analyst / Technical Architect / Social Networking Consultant / Social software engineering</title>
		<link>http://www.eamonnfaherty.co.uk/2013/01/25/project-dirt-v2-business-analyst-technical-architect-social-networking-consultant-developer/</link>
		<comments>http://www.eamonnfaherty.co.uk/2013/01/25/project-dirt-v2-business-analyst-technical-architect-social-networking-consultant-developer/#comments</comments>
		<pubDate>Fri, 25 Jan 2013 19:55:07 +0000</pubDate>
		<dc:creator>eamonn</dc:creator>
				<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://www.eamonnfaherty.co.uk/?p=758</guid>
		<description><![CDATA[I was an agile, business value focused technical architect capturing requirements, creating solutions and helping improve business processes along the way. I was responsible for all of the data modelling and the migration of two sites with over 5k users from an off the shelf (undocumented) Ning platform onto a bespoke Django build. I established [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://www.eamonnfaherty.co.uk/2012/11/25/dti-game-design-and-build-project/' rel='bookmark' title='DTI &#8211; Game design and build project'>DTI &#8211; Game design and build project</a> <small>I worked with the campaign manager, consulting on their game...</small></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>I was an agile, business value focused technical architect capturing requirements, creating solutions and helping improve business processes along the way.</p>
<p>I was responsible for all of the data modelling and the migration of two sites with over 5k users from an off the shelf (undocumented) Ning platform onto a bespoke Django build.</p>
<p>I established standards for documentation (using UML) and introduced a language the business owners used to describe their product to others &#8211; this was the business owners first development project. I introduced the concept of a backlog and held daily standups to ensure the business owners could track progress when desired.</p>
<p>I introduced game mechanics and social engagement circles to help increase user engagement and provided a solid platform for the business owners to continue on with. I created the &#8216;cluster&#8217; feature they are using to earn revenue and I have provided suggestions of other features (at scrum story level) with revenue making suggestions.</p>
<p>I provisioned the whole stack &#8211; nginx, gunicorn, celery, mysql, redis, varnish-cache. I defined and implemented the caching policy &#8211; all not logged in users see the same rendered page so there are no db or django calls after the first page load until the page is edited. I wrote every line of python code the site used to go live using libraries like django-allauth, django-model-utils, django-dajax, easy-thumbnails, pybbm and django-celery.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.eamonnfaherty.co.uk/2012/11/25/dti-game-design-and-build-project/' rel='bookmark' title='DTI &#8211; Game design and build project'>DTI &#8211; Game design and build project</a> <small>I worked with the campaign manager, consulting on their game...</small></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.eamonnfaherty.co.uk/2013/01/25/project-dirt-v2-business-analyst-technical-architect-social-networking-consultant-developer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DTI &#8211; Game design and build project</title>
		<link>http://www.eamonnfaherty.co.uk/2012/11/25/dti-game-design-and-build-project/</link>
		<comments>http://www.eamonnfaherty.co.uk/2012/11/25/dti-game-design-and-build-project/#comments</comments>
		<pubDate>Sun, 25 Nov 2012 19:55:45 +0000</pubDate>
		<dc:creator>eamonn</dc:creator>
				<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://www.eamonnfaherty.co.uk/?p=760</guid>
		<description><![CDATA[I worked with the campaign manager, consulting on their game design; helping with player motivations, player rewards and scoring mechanics. I then went on to build the front end game and back end leader board.<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></description>
				<content:encoded><![CDATA[<p>I worked with the campaign manager, consulting on their game design; helping with player motivations, player rewards and scoring mechanics.</p>
<p>I then went on to build the front end game and back end leader board.</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.eamonnfaherty.co.uk/2012/11/25/dti-game-design-and-build-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My caching tales &#8211; part 1</title>
		<link>http://www.eamonnfaherty.co.uk/2012/03/25/my-caching-tales-part-1/</link>
		<comments>http://www.eamonnfaherty.co.uk/2012/03/25/my-caching-tales-part-1/#comments</comments>
		<pubDate>Sun, 25 Mar 2012 21:47:57 +0000</pubDate>
		<dc:creator>eamonn</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[cdn]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[geo:lat=51.54171669999999]]></category>
		<category><![CDATA[geo:lon=-0.08008210000002691]]></category>
		<category><![CDATA[geotagged]]></category>
		<category><![CDATA[London]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://www.eamonnfaherty.co.uk/?p=652</guid>
		<description><![CDATA[I am building a bespoke social network using Django. I am approaching the first release and I thought it would be a good time to look at the static asset performance. I installed yslow and tested my site. I got an F! Arghhh! Luckily, YSlow gives you a lot of guidance on how to improve [...]<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></description>
				<content:encoded><![CDATA[<p>I am building a bespoke social network using Django. I am approaching the first release and I thought it would be a good time to look at the static asset performance. I installed <a title="yslow site" href="http://developer.yahoo.com/yslow/">yslow</a> and tested my site. I got an F! Arghhh! Luckily, YSlow gives you a lot of guidance on how to improve your performance. I decided to write up what I did after @gmsharky asked me to explain a little more about what I was doing. BTW, after these steps I got to a grade C!<br />
<!-- more --></p>
<h2>CDN usage</h2>
<p>I moved all my static assets and media to dedicated subdomains so that the session and csrf cookies would not be transmitted whilst the assets were being requested. This was an easy win thanks to Djangos STATIC and MEDIA setup.</p>
<h2>GZIP compression</h2>
<p>I turned on gzip compression within nginx:<br />
<code><br />
http {<br />
...<br />
gzip on;<br />
gzip_http_version 1.1;<br />
gzip_vary on;<br />
gzip_comp_level 6;<br />
gzip_proxied any;<br />
gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript text/x-js;<br />
gzip_buffers 16 8k;<br />
gzip_disable "MSIE [1-6]\.(?!.*SV1)";<br />
...<br />
}<br />
</code></p>
<h2>Expires and cookie turn off</h2>
<p>I set far future expiration dates on my static content and disabled cookies for the urls:<br />
<code><br />
server {<br />
listen 80;<br />
...<br />
location ~* \.(?:ico|gif|css|js|jpe?g|png)$ {<br />
access_log off;<br />
expires max;<br />
add_header Pragma public;<br />
add_header Cache-Control "public"; break;<br />
}<br />
...<br />
}<br />
</code></p>
<h2>JS and CSS minify</h2>
<p>I used <a title="jezdez github page" href="https://github.com/jezdez">jezdez</a>&#8216;s great <a title="django-compressor" href="https://github.com/jezdez/django_compressor">django_compressor</a> library to minify my js and css. This basically read my JS and CSS declarations and imported them into a single file for each. I had to tweak this due to possible name conflicts but it worked well in the end.</p>
<h2>Next steps</h2>
<p>The next thing for me to do is to use more sprite sheets instead of seperate images but there are not too many images anyway so I am going to stop for now.</p>
<h2>Next post</h2>
<p>In order to improve performance more I introduced <a title="varnish site" href="https://www.varnish-cache.org/">varnish-cache</a> to my stack. I had to do a lot of reading to come up with a working setup and will post that in another blog post coming soon &#8211; I need to finish my testing first!</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.eamonnfaherty.co.uk/2012/03/25/my-caching-tales-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django development demystified &#8211; Part 1</title>
		<link>http://www.eamonnfaherty.co.uk/2012/02/10/django-development-demystified-pt1/</link>
		<comments>http://www.eamonnfaherty.co.uk/2012/02/10/django-development-demystified-pt1/#comments</comments>
		<pubDate>Fri, 10 Feb 2012 15:45:10 +0000</pubDate>
		<dc:creator>eamonn</dc:creator>
				<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://www.eamonnfaherty.co.uk/?p=474</guid>
		<description><![CDATA[Django is an amazing development framework for those who want to separate concerns (write good, clean code) and want to get the job done &#8211; quickly! It is written in Python and requires you to write Python code to use it.  Python differs from PHP.  PHP comes with most of the libraries you need out [...]<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></description>
				<content:encoded><![CDATA[<p><a title="Django site" href="http://djangoproject.com" target="_blank">Django</a> is an amazing development framework for those who want to separate concerns (write good, clean code) and want to get the job done &#8211; quickly!</p>
<p>It is written in <a title="Python site" href="http://python.org/" target="_blank">Python</a> and requires you to write Python code to use it.  Python differs from PHP.  PHP comes with most of the libraries you need out of the box and then has PEAR and PHAR to supply the rest.  Python is a little more fragmented.  With Python, you have to install the library and then install the python bindings, which is the python code that allows you to communicate with the libraries.  For example, if you want to use <a title="MySQL site" href="http://www.mysql.com/" target="_blank">mysql</a> you must install mysql and then the mysql python bindings.  This can be confusing and you can end up in a world of dependency nightmare!</p>
<p>With libraries like <a title="Pip site" href="http://pypi.python.org/pypi/pip" target="_blank">pip</a>, <a title="Vagrant site" href="http://vagrantup.com/" target="_blank">vagrant</a> and <a title="VirtualEnv site" href="http://pypi.python.org/pypi/virtualenv" target="_blank">virtualenv</a> and PaaS like <a title="dotCloud" href="https://www.dotcloud.com/" target="_blank">dotCloud</a> and <a title="Heroku site" href="http://www.heroku.com/" target="_blank">Heroku</a> I do not think it is such a pain anymore.  These problems can now be solved once and shared across projects.  For my own development (and sanity) I have put together a bootstrap vagrant file which allows me to build a virtual server.  It using vagrant, which in turn uses <a title="VirtualBox site" href="https://www.virtualbox.org/" target="_blank">VirtualBox</a>, to build a virtual server and then uses <a title="Chef site" href="http://wiki.opscode.com/display/chef/Home" target="_blank">Chef</a> to install the recipes (which are individual dependencies).  These recipeies include nginx, postgres etc.  At the end of a couple of commands you end up with a working virtual server because somebody else has saved a working set for you.  Great eh!?!</p>
<p><a title="geodjango-env" href="https://github.com/ineedarobot/geodjango-env" target="_blank">Here</a> is my git repo.  To use this all you need to do it install git and VirtualBox and then run the following commands in a terminal window:</p>
<p>[code  lang="bash" ]</p>
<p>git clone https://github.com/ineedarobot/geodjango-env</p>
<p>cd geodjango-env</p>
<p>vagrant up</p>
<p>[/code]</p>
<p>Once it is up you can login using vagrant ssh and your server is ready! Any questions please post a comment and I will try to help.  If you spot any issues with my setup feel free to post an issue on the github repo.</p>
<p>BTW, this is actually a working setup for geodjango, meaning it installs Postgres, postgis and the gis libraries needed.</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.eamonnfaherty.co.uk/2012/02/10/django-development-demystified-pt1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Mac OS X MySQL problems</title>
		<link>http://www.eamonnfaherty.co.uk/2011/06/21/python-mac-os-x-mysql-problems/</link>
		<comments>http://www.eamonnfaherty.co.uk/2011/06/21/python-mac-os-x-mysql-problems/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 10:14:19 +0000</pubDate>
		<dc:creator>eamonn</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.eamonnfaherty.co.uk/?p=467</guid>
		<description><![CDATA[I recently had a three hour head banging off of wall session getting Python to play nicely with MySQL. I was getting the following error: File &#8220;/Library/Python/2.6/site-packages/Django-1.3-py2.6.egg/django/db/backends/mysql/base.py&#8221;, line 14, in raise ImproperlyConfigured(&#8220;Error loading MySQLdb module: %s&#8221; % e) django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Users/eamonnfaherty/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so, 2): no suitable image found. Did find: /Users/eamonnfaherty/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so: mach-o, but wrong [...]<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></description>
				<content:encoded><![CDATA[<p>I recently had a three hour head banging off of wall session getting Python to play nicely with MySQL.</p>
<p>I was getting the following error: </p>
<blockquote><p>  File &#8220;/Library/Python/2.6/site-packages/Django-1.3-py2.6.egg/django/db/backends/mysql/base.py&#8221;, line 14, in <module><br />
    raise ImproperlyConfigured(&#8220;Error loading MySQLdb module: %s&#8221; % e)<br />
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Users/eamonnfaherty/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so, 2): no suitable image found.  Did find:<br />
	/Users/eamonnfaherty/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so: mach-o, but wrong architecture
</p></blockquote>
<p>This was a complete mix up between 32bit and 64bit Python libraries working together with MySQL.</p>
<p>To fix it I put the following in my .profile file</p>
<blockquote><p>export PATH=$PATH:/usr/local/mysql/bin</p>
<p>export CC=&#8221;gcc-4.0&#8243;<br />
export CXX=&#8221;g++-4.0&#8243;</p>
<p>export PYTHONPATH=”/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/”<br />
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/<br />
export ARCHFLAGS=&#8217;-arch i386&#8242;<br />
export VERSIONER_PYTHON_PREFER_32_BIT=yes
</p></blockquote>
<p>After adding this I ran a clean, build and install on the mysql-python library and everything worked! Phew!</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.eamonnfaherty.co.uk/2011/06/21/python-mac-os-x-mysql-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Signals</title>
		<link>http://www.eamonnfaherty.co.uk/2011/06/13/signals/</link>
		<comments>http://www.eamonnfaherty.co.uk/2011/06/13/signals/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 19:53:12 +0000</pubDate>
		<dc:creator>eamonn</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[actionscript3]]></category>
		<category><![CDATA[signals]]></category>

		<guid isPermaLink="false">http://www.eamonnfaherty.co.uk/?p=463</guid>
		<description><![CDATA[Anyone that knows me offline has probably heard me singing the praises of signals. I really like the stricter typing of signals compared to events.  For me, strict typing means that my code is checked by the compiler (instantly, at compile time) as apposed to being checked by the AVM (eventually, at runtime).  I have [...]<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></description>
				<content:encoded><![CDATA[<p>Anyone that knows me offline has probably heard me singing the praises of signals.</p>
<p>I really like the stricter typing of signals compared to events.  For me, strict typing means that my code is checked by the compiler (instantly, at compile time) as apposed to being checked by the AVM (eventually, at runtime).  I have had countless times where I have seen code fail due to the event types declared in the handler method being wrong, even when the string values are stored as variables instead of using literals. The checking that event handlers are added correctly is not checkable by the compiler.  This means we need to either blindly hope it all works out or rely on testing.</p>
<p>Signals (out of the box) fixes this issue but there is still another issue for me, the contract between an event (also a signal) and its handler.  With events there are two contracts, the event type (the Event.type String) and the event data.  Signals (out of the box) handles the event type issue by moving the name of the type into an interface as a signal, which is a great idea!  The data problem is harder to solve.</p>
<p>There are two checks that should be performed on the data.</p>
<p>The first is validation. At the moment this is limited to type checking.  When you set up a signal, you specify that the signal should be an int, String etc.  I think this is a great start but I think there should be more (optional) validation checks available; range checks for ints and regex checks for Strings.  When these validations fail then the signal should have a built in mechanism to throw an InvalidSignalError.  This would tighten up the robustness of projects using signals and would definitely reduce the amount of code I write.</p>
<p>The second check is verification. This is a lot harder to check but is a much more valuable check to perform. I think this is up to developers to check when developing. I am currently using signals to send messages between objects. I like to keep the implementation of my objects hidden from others so when writing a class I am always mindful of what values are available to other objects. So, when writing a signal I often find myself doing the following:</p>
<p>[code  lang="as3" ]<br />
public class ShowScreenSignal extends Signal<br />
{<br />
private static const MENU:int = 0;<br />
private static const PLAY:int = 1;<br />
...</p>
<p>public function ShowScreenSignal()<br />
{<br />
super(int);<br />
}</p>
<p>public function dispatchMenu():void<br />
{<br />
dispatch(MENU);<br />
}</p>
<p>public function dispatchPlay():void<br />
{<br />
dispatch(PLAY);<br />
}</p>
<p>...</p>
<p>public function isMenu(message:int):Boolean<br />
{<br />
return message = MENU;<br />
}</p>
<p>public function isPlay(message:int):Boolean<br />
{<br />
return message = PLAY;<br />
}</p>
<p>...<br />
}<br />
[/code]</p>
<p>This means in my controller/mediator I call signal.dispatchPlay() and in my listener/command I check signal.isPlay(message) to check the message. This means nothing knows about the message values other than the signal. I can change the message to be a String without changing any of my controllers/mediators/command. This is better encapsulation. This works really well when using RobotLegs + Signals as you can subtype your command classes and have a condition in your execute method if (message.isPlay(message)).</p>
<p>This is solving one problem. I want to have one signal with many handlers based on the message. eg:</p>
<p>[code  lang="as3" ]<br />
public class ShowPlayCommand extends SignalCommand<br />
{<br />
[Inject]<br />
public var message:int;</p>
<p>[Inject]<br />
public var signal:ShowScreenSignal;</p>
<p>override public function execute():void {</p>
<p>if (!signal.isPlay(message)) {<br />
return;<br />
}</p>
<p>//do something<br />
}<br />
}<br />
[/code]</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.eamonnfaherty.co.uk/2011/06/13/signals/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Facebook Graph API oauth change</title>
		<link>http://www.eamonnfaherty.co.uk/2011/06/08/facebook-graph-api-oauth-change/</link>
		<comments>http://www.eamonnfaherty.co.uk/2011/06/08/facebook-graph-api-oauth-change/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 21:37:48 +0000</pubDate>
		<dc:creator>eamonn</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.eamonnfaherty.co.uk/?p=458</guid>
		<description><![CDATA[Facebook have changed their Graph API policy so that when you view a profile feed you need to have a valid oauth access token. See here. Here is the PHP I used to get the feed of mypage. [code lang="php" ] &#60;?php //config $appId = "999"; $appSecret = "I_LOVE_ROBOTS"; $feedURL = "https://graph.facebook.com/mypage/feed"; $limit = 10; [...]<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></description>
				<content:encoded><![CDATA[<p>Facebook have changed their Graph API policy so that when you view a profile feed you need to have a valid oauth access token. See <a href="http://developers.facebook.com/blog/post/510/" target="_blank">here</a>.</p>
<p>Here is the PHP I used to get the feed of mypage.</p>
<p>[code lang="php" ]<br />
&lt;?php</p>
<p>//config<br />
$appId = "999";<br />
$appSecret = "I_LOVE_ROBOTS";<br />
$feedURL = "https://graph.facebook.com/mypage/feed";<br />
$limit = 10;</p>
<p>//script<br />
$accessTokenUrl = "https://graph.facebook.com/oauth/access_token";<br />
$parameters = "client_id=$appId&amp;client_secret=$appSecret&amp;grant_type=client_credentials";<br />
$accessToken = file_get_contents($accessTokenUrl .  "?" . $parameters);</p>
<p>$parameters = "$accessToken&amp;limit=$limit";<br />
$result = file_get_contents($feedURL . "?" . $parameters);<br />
?&gt;<br />
[/code]</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.eamonnfaherty.co.uk/2011/06/08/facebook-graph-api-oauth-change/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
