<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Stefan Hendriks&#039; Blog</title>
	<atom:link href="http://stefanhendriks.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://stefanhendriks.wordpress.com</link>
	<description>Sharing the passion of software development</description>
	<lastBuildDate>Tue, 14 May 2013 06:28:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='stefanhendriks.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Stefan Hendriks&#039; Blog</title>
		<link>http://stefanhendriks.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://stefanhendriks.wordpress.com/osd.xml" title="Stefan Hendriks&#039; Blog" />
	<atom:link rel='hub' href='http://stefanhendriks.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Worst Commit &#8211; Ever</title>
		<link>http://stefanhendriks.wordpress.com/2013/04/12/worst-commit-ever-2/</link>
		<comments>http://stefanhendriks.wordpress.com/2013/04/12/worst-commit-ever-2/#comments</comments>
		<pubDate>Fri, 12 Apr 2013 21:51:43 +0000</pubDate>
		<dc:creator>stefanhendriks</dc:creator>
				<category><![CDATA[links]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[wtf]]></category>

		<guid isPermaLink="false">http://stefanhendriks.wordpress.com/?p=1091</guid>
		<description><![CDATA[Got this via a friend and had to share this with you&#8230; Ever heard of Bumblebee? Well I thought it was about this guy: Apparently it wasn&#8217;t, in this case. In fact, I still don&#8217;t even know what piece of software it is, but I do know about one of its most famous commits on [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stefanhendriks.wordpress.com&#038;blog=6886101&#038;post=1091&#038;subd=stefanhendriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Got this via a friend and had to share this with you&#8230;</p>
<p>Ever heard of Bumblebee? Well I thought it was about <a href="http://en.wikipedia.org/wiki/Bumblebee_(Transformers)">this guy</a>:</p>
<p><img class="aligncenter" alt="" src="http://upload.wikimedia.org/wikipedia/en/3/37/BumblebeeHIRES.jpg" width="258" height="348" /></p>
<p>Apparently it wasn&#8217;t, in this case.</p>
<p>In fact, I still don&#8217;t even know what piece of software it is, but I <em>do know</em> about <a href="https://github.com/MrMEEE/bumblebee-Old-and-abbandoned/commit/a047be85247755cdbe0acce6f1dafc8beb84f2ac">one of its most famous commits on github now</a>.</p>
<p>This commit is very small, yet makes a very big difference for the user&#8230;</p>
<p>If you want to have a laugh see the commit yourself, and then all the comments, they are hilarous.</p>
<p>Ok, one teaser:</p>
<p><img class="aligncenter" alt="" src="https://a248.e.akamai.net/camo.github.com/c164d65e73a2ca0efb0618617b8382d13c68664f/687474703a2f2f6935352e74696e797069632e636f6d2f323073646c37392e6a7067" width="470" height="470" /></p>
<p><a href="https://github.com/MrMEEE/bumblebee-Old-and-abbandoned/commit/a047be85247755cdbe0acce6f1dafc8beb84f2ac">Still reading&#8230;?</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stefanhendriks.wordpress.com/1091/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stefanhendriks.wordpress.com/1091/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stefanhendriks.wordpress.com&#038;blog=6886101&#038;post=1091&#038;subd=stefanhendriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stefanhendriks.wordpress.com/2013/04/12/worst-commit-ever-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/49c2d074f82383efff562d16454a5570?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">stefanhendriks</media:title>
		</media:content>

		<media:content url="http://upload.wikimedia.org/wikipedia/en/3/37/BumblebeeHIRES.jpg" medium="image" />

		<media:content url="https://a248.e.akamai.net/camo.github.com/c164d65e73a2ca0efb0618617b8382d13c68664f/687474703a2f2f6935352e74696e797069632e636f6d2f323073646c37392e6a7067" medium="image" />
	</item>
		<item>
		<title>Terminal: Show git branch, changes, RVM ruby version, gemset.</title>
		<link>http://stefanhendriks.wordpress.com/2013/04/12/terminal-show-git-branch-changes-rvm-ruby-version-gemset/</link>
		<comments>http://stefanhendriks.wordpress.com/2013/04/12/terminal-show-git-branch-changes-rvm-ruby-version-gemset/#comments</comments>
		<pubDate>Fri, 12 Apr 2013 08:15:29 +0000</pubDate>
		<dc:creator>stefanhendriks</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[rvm]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://stefanhendriks.wordpress.com/?p=1075</guid>
		<description><![CDATA[I was looking for a way to easily print the current gemset I am in when working in the terminal. I found a stack overflow post, but it did not really satisfy me. With some googling I also found this post. I modified the script a tiny bit (color preferences + added __git_ps1 to detect [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stefanhendriks.wordpress.com&#038;blog=6886101&#038;post=1075&#038;subd=stefanhendriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I was looking for a way to easily print the current gemset I am in when working in the terminal. I found a stack overflow post, but it did not really satisfy me. With some googling I also found <a href="http://tammersaleh.com/posts/a-better-rvm-bash-prompt/">this post</a>.</p>
<p>I modified the script a tiny bit (color preferences + added __git_ps1 to detect branch) and would like to share you what I&#8217;ve got.</p>
<p>This is the complete script I use now, copy &amp; paste if you like.</p>
<p>The result looks like this:</p>
<p><a href="http://stefanhendriks.files.wordpress.com/2013/04/screen-shot-2013-04-12-at-10-10-18-am1.png"><img class="aligncenter size-large wp-image-1082" alt="terminal" src="http://stefanhendriks.files.wordpress.com/2013/04/screen-shot-2013-04-12-at-10-10-18-am1.png?w=614&#038;h=16" width="614" height="16" /></a></p>
<pre class="brush: plain; title: ; notranslate">
# This shows the git branch of the current directory
function __git_ps1 () {
git branch 2&gt; /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}

function __git_dirty {
git diff --quiet HEAD &amp;&gt;/dev/null
[ $? == 1 ] &amp;&amp; echo &quot; (changes!)&quot;
}

function __git_branch {
__git_ps1 &quot; %s&quot;
}

function __my_rvm_ruby_version {
local gemset=$(echo $GEM_HOME | awk -F'@' '{print $2}')
[ &quot;$gemset&quot; != &quot;&quot; ] &amp;&amp; gemset=&quot;@$gemset&quot;
local version=$(echo $MY_RUBY_HOME | awk -F'-' '{print $2}')
[ &quot;$version&quot; == &quot;1.8.7&quot; ] &amp;&amp; version=&quot;&quot;
local full=&quot;$version$gemset&quot;
[ &quot;$full&quot; != &quot;&quot; ] &amp;&amp; echo &quot;$full &quot;
}

bash_prompt() {
local NONE=&quot;\[&#092;&#048;33[0m\]&quot;    # unsets color to term's fg color

# regular colors
local K=&quot;\[&#092;&#048;33[0;30m\]&quot;    # black
local R=&quot;\[&#092;&#048;33[0;31m\]&quot;    # red
local G=&quot;\[&#092;&#048;33[0;32m\]&quot;    # green
local Y=&quot;\[&#092;&#048;33[0;33m\]&quot;    # yellow
local B=&quot;\[&#092;&#048;33[0;34m\]&quot;    # blue
local M=&quot;\[&#092;&#048;33[0;35m\]&quot;    # magenta
local C=&quot;\[&#092;&#048;33[0;36m\]&quot;    # cyan
local W=&quot;\[&#092;&#048;33[0;37m\]&quot;    # white

# emphasized (bolded) colors
local EMK=&quot;\[&#092;&#048;33[1;30m\]&quot;
local EMR=&quot;\[&#092;&#048;33[1;31m\]&quot;
local EMG=&quot;\[&#092;&#048;33[1;32m\]&quot;
local EMY=&quot;\[&#092;&#048;33[1;33m\]&quot;
local EMB=&quot;\[&#092;&#048;33[1;34m\]&quot;
local EMM=&quot;\[&#092;&#048;33[1;35m\]&quot;
local EMC=&quot;\[&#092;&#048;33[1;36m\]&quot;
local EMW=&quot;\[&#092;&#048;33[1;37m\]&quot;

# background colors
local BGK=&quot;\[&#092;&#048;33[40m\]&quot;
local BGR=&quot;\[&#092;&#048;33[41m\]&quot;
local BGG=&quot;\[&#092;&#048;33[42m\]&quot;
local BGY=&quot;\[&#092;&#048;33[43m\]&quot;
local BGB=&quot;\[&#092;&#048;33[44m\]&quot;
local BGM=&quot;\[&#092;&#048;33[45m\]&quot;
local BGC=&quot;\[&#092;&#048;33[46m\]&quot;
local BGW=&quot;\[&#092;&#048;33[47m\]&quot;

local UC=$W                 # user's color
[ $UID -eq &quot;0&quot; ] &amp;&amp; UC=$R   # root's color

PS1=&quot;$M\$(__my_rvm_ruby_version)$W\h$W:$EMG\w$EMC\$(__git_branch)$EMW\$(__git_dirty)${NONE} $ &quot;
}

bash_prompt
unset bash_prompt
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stefanhendriks.wordpress.com/1075/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stefanhendriks.wordpress.com/1075/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stefanhendriks.wordpress.com&#038;blog=6886101&#038;post=1075&#038;subd=stefanhendriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stefanhendriks.wordpress.com/2013/04/12/terminal-show-git-branch-changes-rvm-ruby-version-gemset/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/49c2d074f82383efff562d16454a5570?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">stefanhendriks</media:title>
		</media:content>

		<media:content url="http://stefanhendriks.files.wordpress.com/2013/04/screen-shot-2013-04-12-at-10-10-18-am1.png?w=614" medium="image">
			<media:title type="html">terminal</media:title>
		</media:content>
	</item>
		<item>
		<title>Compiling Stratagus on Mac OS X (10.8.2)</title>
		<link>http://stefanhendriks.wordpress.com/2013/02/10/compiling-stratagus-on-mac-os-x-10-8-2/</link>
		<comments>http://stefanhendriks.wordpress.com/2013/02/10/compiling-stratagus-on-mac-os-x-10-8-2/#comments</comments>
		<pubDate>Sun, 10 Feb 2013 12:17:40 +0000</pubDate>
		<dc:creator>stefanhendriks</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[stratagus]]></category>

		<guid isPermaLink="false">http://stefanhendriks.wordpress.com/?p=1040</guid>
		<description><![CDATA[I loved playing Warcraft 2. I played it on DOSBox recently, but the fact that 640&#215;480 is just plain ugly on my MPB these days made me look for alternatives. And so I found Stratagus and Wargus. With Stratagus as engine, Wargus as &#8220;MOD&#8221; and with the original Warcraft 2 CD you can re-live Warcraft [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stefanhendriks.wordpress.com&#038;blog=6886101&#038;post=1040&#038;subd=stefanhendriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I loved playing <a href="http://en.wikipedia.org/wiki/Warcraft_II:_Tides_of_Darkness">Warcraft 2</a>. I played it on DOSBox recently, but the fact that 640&#215;480 is just plain ugly on my MPB these days made me look for alternatives.</p>
<p>And so I found <a href="http://stratagus.com/">Stratagus</a> and <a href="http://wargus.sourceforge.net/index.shtml">Wargus</a>.</p>
<p>With Stratagus as engine, Wargus as &#8220;MOD&#8221; and with the original Warcraft 2 CD you can re-live Warcraft 2 again on your machine.</p>
<p>On Windows you should be able to install this without any problems, installers are provided and these work just fine. However, on a Mac you might be in some hassle to get this working. In fact, there is no official support as none of the authors run a Mac. Basically this means people with Macs had to figure out how to do this. After some time of googling I got Stratagus compiling and working with a Wargus game I already created on Windows.</p>
<p>Fortunately <a href="https://github.com/realhidden">someone</a> at github <a href="https://github.com/realhidden/stratagus">already made a version that should work on Mac OS X</a>. Combined with a tutorial <a href="http://codeprogrammers.net/index.php/projects/stratagus/25-stratagus-compilation-tutorial-for-osx">I found elsewhere</a> I got it to compile. I can play Wargus now on my Mac!</p>
<p>For completeness sake I have combined the steps I have taken (<a href="https://github.com/stefanhendriks/stratagus">and also forked Stratagus</a>) so you can use that version. Don&#8217;t credit me for making Stratagus compile on the Mac though, as I did not make the nescesary changes in the makefile or code.</p>
<p><span style="color:#ff0000;"><strong>Install Xcode (from App store) &amp; Install command line tools from Xcode</strong></span></p>
<pre>in Xcode, go to preferences, tab "Downloads" -&gt; " Components" -&gt; Command Line Tools</pre>
<ul>
<li>- The command line tools should have installed git and svn for you, try them out:</li>
</ul>
<pre>hit "svn --version", and "git --version" in your terminal.
If they are not installed, you could install them via homebrew (brew install git &amp;&amp; brew install svn) (after you installed Homebrew of course)</pre>
<p><strong><span style="color:#ff0000;">Install <a href="http://mxcl.github.com/homebrew/"><span style="color:#ff0000;">homebrew</span></a></span></strong></p>
<pre>ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go</pre>
<p><span style="color:#ff0000;"><strong>Installing required dependencies</strong></span></p>
<p>I have installed the following dependencies with homebrew like this:</p>
<pre>brew install cmake libogg libvorbis theora libpng zlib libmikmod sqlite3 doxygen</pre>
<p><span style="color:#ff0000;"><strong>Compile and build tolua</strong></span></p>
<p>Go to your projects dir</p>
<pre>git clone https://github.com/LuaDist/toluapp.git

cd toluaapp

mkdir build

cd build

cmake -G "Unix Makefiles"

make &amp;&amp; sudo make install</pre>
<p><strong style="color:#ff0000;">Git clone stratagus</strong></p>
<p>Determine where you want to checkout stratagus, ie in your ~/projects, then:</p>
<pre>git clone https://github.com/stefanhendriks/stratagus</pre>
<p><strong style="color:#ff0000;">Compile it</strong></p>
<pre>cd stratagus
mkdir build
cd build
cmake -G "Unix Makefiles" ..
make</pre>
<p>Now you should be able to run a stratagus game. Since I already created Wargus by using Windows, I copied this over to my mac (and put it in ~/projects/Wargus). Then I ran stratagus as:</p>
<pre>./stratagus -d ~/projects/wargus/</pre>
<p>A known issue I have is that on startup the screen looks as if it is drawing with a weird offset (ie too much out of screen at the upper left). By simply changing resolution this goes away. Don&#8217;t know why yet, but since we have the code now and we can compile, we might as well try to fix it some day! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Personally I&#8217;d like to see a better AI for wargus, especially since I like to play Skirmish games.</p>
<p>I hope this guide helped you get it to work on your mac. Please share your experiences in the comments section.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stefanhendriks.wordpress.com/1040/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stefanhendriks.wordpress.com/1040/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stefanhendriks.wordpress.com&#038;blog=6886101&#038;post=1040&#038;subd=stefanhendriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stefanhendriks.wordpress.com/2013/02/10/compiling-stratagus-on-mac-os-x-10-8-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/49c2d074f82383efff562d16454a5570?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">stefanhendriks</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting started with Allegro 5.1 on Mac OS X 10.8 (Xcode 4.5, and homebrew)</title>
		<link>http://stefanhendriks.wordpress.com/2013/01/11/getting-started-with-allegro-5-1-on-mac-os-x-10-8-xcode-4-5-and-homebrew/</link>
		<comments>http://stefanhendriks.wordpress.com/2013/01/11/getting-started-with-allegro-5-1-on-mac-os-x-10-8-xcode-4-5-and-homebrew/#comments</comments>
		<pubDate>Fri, 11 Jan 2013 22:41:31 +0000</pubDate>
		<dc:creator>stefanhendriks</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Game Development]]></category>
		<category><![CDATA[allegro]]></category>
		<category><![CDATA[homebrew]]></category>
		<category><![CDATA[mac os x]]></category>

		<guid isPermaLink="false">http://stefanhendriks.wordpress.com/?p=1003</guid>
		<description><![CDATA[In Dune 2 &#8211; The Maker, I have used Allegro quite a bit. Back then it was around version 4.2. Allegro is a library that allows you to make games. In essence it has functions for manipulating the screen (ie, drawing bitmaps, manipulating palettes, etc), use controls (mouse, joystick, keyboard, etc) and more. With plugins [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stefanhendriks.wordpress.com&#038;blog=6886101&#038;post=1003&#038;subd=stefanhendriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In <a href="http://dune2themaker.fundynamic.com/">Dune 2 &#8211; The Maker</a>, I have used <a href="http://alleg.sourceforge.net/">Allegro</a> quite a bit. Back then it was around version 4.2. Allegro is a library that allows you to make games. In essence it has functions for manipulating the screen (ie, drawing bitmaps, manipulating palettes, etc), use controls (mouse, joystick, keyboard, etc) and more. With plugins you could extend it further, to use fonts (TTF), networking, etc.</p>
<p>Currently, the most recent version is Allegro 5 which breaks with the Allegro 4 API and makes it impossible to convert from Allegro 4 to 5 (atleast for D2TM). From a nostalgic perspective I wanted to try Allegro 5 and on my new system which runs Mac OS X 10.8.</p>
<p>In this post I will describe how you can get Allegro 5 working on Mac OS X, under XCode 4.5. I had great help from the documentation provided, and hopefully this post is sufficient for you. If not, I would suggest to checkout <a href="http://wiki.allegro.cc/index.php?title=Install_Allegro5_From_Git">this documentation</a>, or <a href="http://wiki.allegro.cc/index.php?title=OSX,_Xcode_4,_Framework">this one</a>.</p>
<p><span style="color:#ff0000;"><strong>Rough steps</strong></span></p>
<p>To give you an idea what we&#8217;re going to do, here is the installation in very rough form:</p>
<ol>
<li>- Installing required software</li>
<li>- Installing dependencies to make Allegro more useful and to get it compiling (cmake, etc)</li>
<li>- Compiling Allegro for Xcode, installing it and making sure the Frameworks are installed in /Library/Frameworks</li>
<li>- Setting up an Xcode project to test if Allegro works</li>
</ol>
<p><span style="color:#ff0000;"><strong>Prerequisites (Installing required software)</strong></span></p>
<p>Requirements for getting started, if you already have this installed you can skip the prerequisites</p>
<ul>
<li>Mac OS X 10.8</li>
<li>Xcode 4.5 (with command line tools)</li>
<li>Git/SVN</li>
<li>Homebrew</li>
</ul>
<p>Before we can start, we need to have installed some prerequisites. Which are Xcode (you can get this from the App store), git and svn. I have used homebrew to install dependencies, you can also use Macports but I do not have any experience with this. (as far as I can tell it should behave quite the same). My advice would be to install these in the following order:</p>
<ul>
<li>- Xcode</li>
<li>- Install command line tools from Xcode</li>
</ul>
<pre>in Xcode, go to preferences, tab "Downloads" -&gt; " Components" -&gt; Command Line Tools</pre>
<ul>
<li>- Install <a href="http://mxcl.github.com/homebrew/">homebrew</a></li>
</ul>
<pre>ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go</pre>
<ul>
<li>- The command line tools should have installed git and svn for you, try them out:</li>
</ul>
<pre>hit "svn --version", and "git --version" in your terminal.
If they are not installed, you could install them via homebrew (brew install git &amp;&amp; brew install svn)</pre>
<p><span style="color:#ff0000;"><strong>Installing required dependencies</strong></span></p>
<p>As suggested by the <a href="http://wiki.allegro.cc/index.php?title=Install_Allegro5_From_Git">Allegro 5 wiki</a> we need to install dependencies. The wiki explains how to do it with <a href="http://www.macports.org/">Macports</a>, but since I am using <a href="http://mxcl.github.com/homebrew/">Homebrew</a>, you need to do it like this:</p>
<pre class="brush: plain; title: ; notranslate">
brew install cmake

brew install zlib
brew install freetype
brew install jpeg
brew install libogg
brew install physfs
brew install libpng
brew install flac
brew install ffmpeg
</pre>
<p>The first one is cmake, which we will need to build Allegro. Cmake is required to create the OS specific build steps to compile Allegro, without it we cannot proceed. The other dependencies are used to make Allegro more useful. When we prepare to build Allegro in the next section, cmake will check what dependencies are installed. The more it finds, the more features it will provide in Allegro 5.</p>
<p>Note, you might get  a warning about zlib. If thats the case, you can ignore it.</p>
<p><span style="color:#ff0000;"><strong>Compiling Allegro for Xcode, and making sure the Frameworks are in /Library/Frameworks</strong></span></p>
<p>Once we have everything set up, this step is relatively easy. Since we are going to compile it for Xcode, we basically are doing the same as the Allegro wiki is saying.</p>
<p>Open a terminal, and go (cd) to a directory where you want to get allegro&#8217;s sources. For example: ~/projects</p>
<pre>cd ~/projects</pre>
<p>We now need to fetch the sourcecode of Allegro, which we can do by using <strong>git clone</strong>. At this moment of writing, Allegro 5.1 is the current version. Our git clone command looks like this:</p>
<pre>git clone git://git.code.sf.net/p/alleg/allegro</pre>
<p>This takes a little while. Once git is done, you have Allegro&#8217;s sources in ~/projects/allegro.</p>
<p>Now: cd to allegro, and create a new directory called &#8220;build&#8221;, then go into that directory.</p>
<pre>cd allegro
mkdir build
cd build</pre>
<p>The first step is to let cmake (the first dependency we installed) prepare our build, then build it and then install it. This is done by the following:</p>
<pre>cmake -G Xcode -DWANT_FRAMEWORKS=1 - ..
xcodebuild
sudo xcodebuild install</pre>
<p>The last step requires you to enter your password.</p>
<p>I found that the last step did not work for me, in order to fix that I did:</p>
<pre>cd lib/RelWithDebInfo</pre>
<p>Within here all Frameworks are built. Now copy them over to your /Library/Frameworks directory with sudo. With this:</p>
<pre>sudo cp -r *.* /Library/Frameworks/</pre>
<p>If you don&#8217;t want to copy this over to your Library/Frameworks directory, then you need to remember the path to these frameworks as we are going to need them later.</p>
<p><span style="color:#ff0000;"><strong>Setting up an Xcode project and see it all working</strong></span></p>
<p>This section is a copy &amp; paste + improvement <a href="http://wiki.allegro.cc/index.php?title=OSX,_Xcode_4,_Framework">from this page</a>.</p>
<ul>
<li>Start XCode, create a new empty project (Other-&gt;Empty)<br />
<a href="http://stefanhendriks.files.wordpress.com/2013/01/screen-shot-2013-01-11-at-10-35-29-pm.png"><img class="aligncenter size-large wp-image-1019" alt="Xcode new empty project" src="http://stefanhendriks.files.wordpress.com/2013/01/screen-shot-2013-01-11-at-10-35-29-pm.png?w=614&#038;h=405" width="614" height="405" /></a></li>
<li>Add a Cocoa Application target to the project, let&#8217;s call it MyGame. (Click your project, then the + button at the bottom saying Add target, then Mac OSX-&gt;Application-&gt;Cocoa.)<br />
<a href="http://stefanhendriks.files.wordpress.com/2013/01/screen-shot-2013-01-11-at-10-41-21-pm.png"><img class="aligncenter size-large wp-image-1020" alt="New cocoa application MyGame" src="http://stefanhendriks.files.wordpress.com/2013/01/screen-shot-2013-01-11-at-10-41-21-pm.png?w=614&#038;h=384" width="614" height="384" /></a></li>
<li>Select the MyGame target, go to the Build Phases tab and add a new Copy Files Build Phase (+ button down right).
<ul>
<li>Select Frameworks from the dropdown</li>
<li>Leave Subpath blank</li>
<li>We leave this build phase empty for now, we will need it later.<br />
<a href="http://stefanhendriks.files.wordpress.com/2013/01/screen-shot-2013-01-11-at-10-54-12-pm.png"><img class="aligncenter size-large wp-image-1023" alt="Add new build phase" src="http://stefanhendriks.files.wordpress.com/2013/01/screen-shot-2013-01-11-at-10-54-12-pm.png?w=614&#038;h=520" width="614" height="520" /></a></li>
</ul>
</li>
<li>Select the Build Settings tab then:
<ul>
<li>Note: You can change display from Basic to All at the top and use the search box to locate the following settings</li>
<li>Change <b>Header Search Paths</b> to (just copy &amp; paste):
<pre class="brush: plain; title: ; notranslate">
/Library/Frameworks/Allegro-5.1.framework/Versions/Current/Headers /Library/Frameworks/AllegroMain-5.1.framework/Versions/Current/Headers /Library/Frameworks/AllegroAcodec-5.1.framework/Versions/Current/Headers /Library/Frameworks/AllegroAudio-5.1.framework/Versions/Current/Headers /Library/Frameworks/AllegroColor-5.1.framework/Versions/Current/Header /Library/Frameworks/AllegroDialog-5.1.framework/Versions/Current/Headers /Library/Frameworks/AllegroFont-5.1.framework/Versions/Current/Headers /Library/Frameworks/AllegroImage-5.1.framework/Versions/Current/Headers /Library/Frameworks/AllegroPhysfs-5.1.framework/Versions/Current/Headers /Library/Frameworks/AllegroMemfile-5.1.framework/Versions/Current/Headers /Library/Frameworks/AllegroPrimitives-5.1.framework/Versions/Current/Headers /Library/Frameworks/AllegroTTF-5.1.framework/Versions/Current/Headers
</pre>
<p>(yes, it is intended to be one line)<br />
<a href="http://stefanhendriks.files.wordpress.com/2013/01/add-framework-headers.png"><img class="aligncenter size-large wp-image-1024" alt="add framework headers" src="http://stefanhendriks.files.wordpress.com/2013/01/add-framework-headers.png?w=614&#038;h=458" width="614" height="458" /></a></li>
<li><i> </i></li>
<li>In the targets <code>Build Settings</code> specify the <code>Framework Search Paths</code> as<code>/Library/Frameworks</code>.<a href="http://stefanhendriks.files.wordpress.com/2013/01/add-framework-search-path.png"><img class="aligncenter size-large wp-image-1025" alt="add framework search path" src="http://stefanhendriks.files.wordpress.com/2013/01/add-framework-search-path.png?w=614&#038;h=244" width="614" height="244" /></a></li>
<li>
<ul>
<li>This is needed to have cross-platform code (#include &lt;allegro5/allegro.h&gt; working &#8211; otherwise paths like using #include &lt;Allegro-5.0/allegro5/allegro&gt; would work without changing the search path)</li>
<li>If you use another location, one way to save on typing is to double click the input field, then navigate to the Headers folder in each framework and drag it into the xcode input list</li>
</ul>
</li>
<li>Delete <b>Prefix Header</b> (Edit-&gt;Delete)
<ul>
<li>You can of course use your own prefix headers &#8211; but the default Cocoa one will only work with objective C projects that&#8217;s why we remove it, assuming MyGame is a cross-platform C/C++ project</li>
</ul>
</li>
</ul>
</li>
<li>Add all the Allegro frameworks as follows (this can be done in many ways, a group just keeps things tidy):
<ul>
<li>Select the Summary tab</li>
<li>Click the + button under Linked Frameworks and Libraries and add all the Allegro frameworks
<ul>
<li>In case they are not listed use the Add Other button and navigate to /Library/Frameworks to find them<a href="http://stefanhendriks.files.wordpress.com/2013/01/add-frameworks.png"><img class="aligncenter size-large wp-image-1026" alt="add frameworks" src="http://stefanhendriks.files.wordpress.com/2013/01/add-frameworks.png?w=614&#038;h=410" width="614" height="410" /></a><a href="http://stefanhendriks.files.wordpress.com/2013/01/select-frameworks.png"><img class="aligncenter size-large wp-image-1027" alt="select frameworks" src="http://stefanhendriks.files.wordpress.com/2013/01/select-frameworks.png?w=614&#038;h=297" width="614" height="297" /></a><a href="http://stefanhendriks.files.wordpress.com/2013/01/linked-frameworks-added.png"><img class="aligncenter size-large wp-image-1028" alt="linked frameworks added" src="http://stefanhendriks.files.wordpress.com/2013/01/linked-frameworks-added.png?w=614&#038;h=328" width="614" height="328" /></a></li>
</ul>
</li>
<li>Go to the Build Phases tab, then in the list to the left select all the Allegro frameworks and drag them to the Copy Files entry which we added before<br />
<a href="http://stefanhendriks.files.wordpress.com/2013/01/drag-frameworks-to-copy-build-phase.png"><img class="aligncenter size-large wp-image-1029" alt="drag frameworks to copy build phase" src="http://stefanhendriks.files.wordpress.com/2013/01/drag-frameworks-to-copy-build-phase.png?w=614&#038;h=434" width="614" height="434" /><br />
</a></li>
</ul>
<ul>
<li>Select all the frameworks again and this time drag them to the Frameworks group to the left (just to have things more tidy)</li>
</ul>
</li>
<li>Don&#8217;t forget to remove the created source files under MyGame and add your own source code instead (note the main.m in Supporting Files for example)
<ul>
<li>Create a new main.c<br />
<a href="http://stefanhendriks.files.wordpress.com/2013/01/create-new-main.png"><img class="aligncenter size-large wp-image-1030" alt="create new main" src="http://stefanhendriks.files.wordpress.com/2013/01/create-new-main.png?w=614&#038;h=321" width="614" height="321" /></a></li>
<li>Give it the following content:</li>
</ul>
</li>
</ul>
<pre class="brush: cpp; title: ; notranslate">
#include &lt;allegro5/allegro.h&gt;

int main(int argc, char **argv) {
   al_init();
   al_create_display(640, 480);
   al_clear_to_color(al_map_rgb_f(1, 1, 0));
   al_flip_display();
   al_rest(5.0);
   return 0;
}
</pre>
<p><span style="color:#ff0000;"><strong>Caveats</strong></span></p>
<ul>
<li><span style="color:#000000;"><span style="color:#000000;">Cannot find header files: Make sure you have set the header paths correctly. Try to copy the one line given above, into your header paths (remove old ones first). If that does not work. Try adding them one by one, to make it easier to copy/paste I have provided them for you separately as well:</span></span>
<pre class="brush: plain; title: ; notranslate">
/Library/Frameworks/Allegro-5.1.framework/Versions/Current/Headers
/Library/Frameworks/AllegroMain-5.1.framework/Versions/Current/Headers
/Library/Frameworks/AllegroAcodec-5.1.framework/Versions/Current/Headers
/Library/Frameworks/AllegroAudio-5.1.framework/Versions/Current/Headers
/Library/Frameworks/AllegroColor-5.1.framework/Versions/Current/Header
/Library/Frameworks/AllegroDialog-5.1.framework/Versions/Current/Headers
/Library/Frameworks/AllegroFont-5.1.framework/Versions/Current/Headers
/Library/Frameworks/AllegroImage-5.1.framework/Versions/Current/Headers
/Library/Frameworks/AllegroPhysfs-5.1.framework/Versions/Current/Headers
/Library/Frameworks/AllegroMemfile-5.1.framework/Versions/Current/Headers
/Library/Frameworks/AllegroPrimitives-5.1.framework/Versions/Current/Headers
/Library/Frameworks/AllegroTTF-5.1.framework/Versions/Current/Headers

</pre>
</li>
<li>Compiling works fine, linking does not work: Make sure you have specified the <code>Framework Search Paths</code> as<code>/Library/Frameworks</code>.</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stefanhendriks.wordpress.com/1003/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stefanhendriks.wordpress.com/1003/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stefanhendriks.wordpress.com&#038;blog=6886101&#038;post=1003&#038;subd=stefanhendriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stefanhendriks.wordpress.com/2013/01/11/getting-started-with-allegro-5-1-on-mac-os-x-10-8-xcode-4-5-and-homebrew/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/49c2d074f82383efff562d16454a5570?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">stefanhendriks</media:title>
		</media:content>

		<media:content url="http://stefanhendriks.files.wordpress.com/2013/01/screen-shot-2013-01-11-at-10-35-29-pm.png?w=614" medium="image">
			<media:title type="html">Xcode new empty project</media:title>
		</media:content>

		<media:content url="http://stefanhendriks.files.wordpress.com/2013/01/screen-shot-2013-01-11-at-10-41-21-pm.png?w=614" medium="image">
			<media:title type="html">New cocoa application MyGame</media:title>
		</media:content>

		<media:content url="http://stefanhendriks.files.wordpress.com/2013/01/screen-shot-2013-01-11-at-10-54-12-pm.png?w=614" medium="image">
			<media:title type="html">Add new build phase</media:title>
		</media:content>

		<media:content url="http://stefanhendriks.files.wordpress.com/2013/01/add-framework-headers.png?w=614" medium="image">
			<media:title type="html">add framework headers</media:title>
		</media:content>

		<media:content url="http://stefanhendriks.files.wordpress.com/2013/01/add-framework-search-path.png?w=614" medium="image">
			<media:title type="html">add framework search path</media:title>
		</media:content>

		<media:content url="http://stefanhendriks.files.wordpress.com/2013/01/add-frameworks.png?w=614" medium="image">
			<media:title type="html">add frameworks</media:title>
		</media:content>

		<media:content url="http://stefanhendriks.files.wordpress.com/2013/01/select-frameworks.png?w=614" medium="image">
			<media:title type="html">select frameworks</media:title>
		</media:content>

		<media:content url="http://stefanhendriks.files.wordpress.com/2013/01/linked-frameworks-added.png?w=614" medium="image">
			<media:title type="html">linked frameworks added</media:title>
		</media:content>

		<media:content url="http://stefanhendriks.files.wordpress.com/2013/01/drag-frameworks-to-copy-build-phase.png?w=614" medium="image">
			<media:title type="html">drag frameworks to copy build phase</media:title>
		</media:content>

		<media:content url="http://stefanhendriks.files.wordpress.com/2013/01/create-new-main.png?w=614" medium="image">
			<media:title type="html">create new main</media:title>
		</media:content>
	</item>
		<item>
		<title>OS X (10.8) Mountain Lion path settings not &#8216;picked up&#8217; in RubyMine</title>
		<link>http://stefanhendriks.wordpress.com/2012/12/27/os-x-10-8-mountain-lion-path-settings-not-picked-up-in-rubymine/</link>
		<comments>http://stefanhendriks.wordpress.com/2012/12/27/os-x-10-8-mountain-lion-path-settings-not-picked-up-in-rubymine/#comments</comments>
		<pubDate>Thu, 27 Dec 2012 10:40:29 +0000</pubDate>
		<dc:creator>stefanhendriks</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Gotchas]]></category>
		<category><![CDATA[gotcha]]></category>
		<category><![CDATA[rubymine]]></category>

		<guid isPermaLink="false">http://stefanhendriks.wordpress.com/?p=989</guid>
		<description><![CDATA[Recently I have switched jobs to Zilverline. And so far I love it there. One of the things I now work in is OS X (10.8.2). I am programming in Ruby using RubyMine. I think RubyMine is great (especially since I am coming from IntelliJ as a Java programmer). However, one of the things that [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stefanhendriks.wordpress.com&#038;blog=6886101&#038;post=989&#038;subd=stefanhendriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Recently I have switched jobs to <a href="http://www.zilverline.com">Zilverline</a>.</p>
<p>And so far I love it there.</p>
<p>One of the things I now work in is OS X (10.8.2). I am programming in Ruby using <a href="http://www.jetbrains.com/ruby/">RubyMine</a>. I think RubyMine is great (especially since I am coming from IntelliJ as a Java programmer).</p>
<p>However, one of the things that bugged me was path variables not picking up in RubyMine.</p>
<p>From terminal all my stuff works great. Ie, rake spec, rails, etc. No problem.</p>
<p>However it seems RubyMine does not launch <a href="http://devnet.jetbrains.net/docs/DOC-1160">with the same path variables set as you terminal does</a>. Also, the suggestions for <a href="http://stackoverflow.com/questions/135688/setting-environment-variables-in-os-x/135697#135697"> does </a><a href="http://apple.stackexchange.com/questions/57385/where-are-system-environment-variables-set-in-mountain-lion">not work in OS X 10.8</a>.</p>
<p>There where two ways for me to get around this problem. One is to simply launch RubyMine from terminal:</p>
<pre class="brush: plain; title: ; notranslate">
open -a /Applications/RubyMine.app/
</pre>
<p>Because you launch it from the terminal itself, RubyMine will get all the environment settings from there.</p>
<p>Another way was to edit the default settings in RubyMine for (in this case) rSpec:</p>
<p style="text-align:center;"><em id="__mceDel"> <a href="http://stefanhendriks.wordpress.com/2012/12/27/os-x-10-8-mountain-lion-path-settings-not-picked-up-in-rubymine/rubymine_rspec_defaults/" rel="attachment wp-att-990"><img class="size-medium wp-image-990 aligncenter" alt="rubymine_rspec_defaults" src="http://stefanhendriks.files.wordpress.com/2012/12/rubymine_rspec_defaults.png?w=300&#038;h=249" width="300" height="249" /></a></em></p>
<p>And set the environmental path with value:</p>
<pre class="brush: plain; title: ; notranslate">
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:$PATH
</pre>
<p style="text-align:center;"><a href="http://stefanhendriks.wordpress.com/2012/12/27/os-x-10-8-mountain-lion-path-settings-not-picked-up-in-rubymine/rubymine_set_path/" rel="attachment wp-att-991"><img class="size-medium wp-image-991 aligncenter" alt="rubymine_set_path" src="http://stefanhendriks.files.wordpress.com/2012/12/rubymine_set_path.png?w=298&#038;h=300" width="298" height="300" /></a></p>
<p>Now all rspec tests will use this environment path and run fine.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stefanhendriks.wordpress.com/989/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stefanhendriks.wordpress.com/989/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stefanhendriks.wordpress.com&#038;blog=6886101&#038;post=989&#038;subd=stefanhendriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stefanhendriks.wordpress.com/2012/12/27/os-x-10-8-mountain-lion-path-settings-not-picked-up-in-rubymine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/49c2d074f82383efff562d16454a5570?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">stefanhendriks</media:title>
		</media:content>

		<media:content url="http://stefanhendriks.files.wordpress.com/2012/12/rubymine_rspec_defaults.png?w=300" medium="image">
			<media:title type="html">rubymine_rspec_defaults</media:title>
		</media:content>

		<media:content url="http://stefanhendriks.files.wordpress.com/2012/12/rubymine_set_path.png?w=298" medium="image">
			<media:title type="html">rubymine_set_path</media:title>
		</media:content>
	</item>
		<item>
		<title>Coupling: The factory method</title>
		<link>http://stefanhendriks.wordpress.com/2012/10/14/coupling-the-factory-method/</link>
		<comments>http://stefanhendriks.wordpress.com/2012/10/14/coupling-the-factory-method/#comments</comments>
		<pubDate>Sun, 14 Oct 2012 20:57:30 +0000</pubDate>
		<dc:creator>stefanhendriks</dc:creator>
				<category><![CDATA[Refactoring]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[coupling]]></category>
		<category><![CDATA[factory]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[refactoring]]></category>

		<guid isPermaLink="false">http://stefanhendriks.wordpress.com/?p=973</guid>
		<description><![CDATA[One of the challenges we face with coding is dealing with coupling. Coupling is an important aspect of programming, it tells us how much our code is tangled. When coupling is too high, we can&#8217;t easily re-use code. When the coupling is too low it does little. You can measure coupling, there are several metrics [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stefanhendriks.wordpress.com&#038;blog=6886101&#038;post=973&#038;subd=stefanhendriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>One of the challenges we face with coding is dealing with coupling. Coupling is an important aspect of programming, it tells us how much our code is tangled. When coupling is too high, we can&#8217;t easily re-use code. When the coupling is too low it does little. You can measure <a href="http://en.wikipedia.org/wiki/Coupling_(computer_programming)">coupling</a>, there are several metrics for it even (for instance &#8220;Coupling between Objects, CBO&#8221;).</p>
<p>In this blog post I&#8217;d like to talk about a subtle introduction of coupling: when you introduce a <a href="http://en.wikipedia.org/wiki/Factory_method_pattern">factory method</a>.</p>
<p>Consider you have an interesting piece of code, and this piece of code has quite a lot of properties:</p>
<pre class="brush: java; title: ; notranslate">
class Person {
	private String firstName;
	private String lastName;
	// .. more properties here

	public void subcribeTo(Subscription subscription) {
		// do something interesting here
	}

}
</pre>
<p>The problem is, because of the amount of properties and other dependencies, we&#8217;d like to simplify its creation by introducing a Factory method. In this case we are building a web application, so we take the Request as input to read the parameters:</p>
<pre class="brush: java; title: ; notranslate">
class Person {
	private String firstName;
	private String lastName;
	// .. more properties here

	public static Person create(HttpServletRequest request, .. more arguments here .. ) {
		this.firstName = request.getParameter(&quot;firstName&quot;);
		// .. read more properties
		// .. set up dependencies, etc.
	}

	public void subcribeTo(Subscription subscription) {
		// do something interesting here
	}

}
</pre>
<p>In the code that uses Person, it becomes easier to construct the Person and we&#8217;re happy with that. However, we have introduced coupling on several levels:</p>
<ul>
<li>We construct the object with <strong>specific</strong> parameters in the create method. If we want to create from different parameters, we cannot use it. There is a coupling between the parameters and the properties. </li>
<li>The object is constructed using a Request object. We cannot now move the class to an application that does not use the web. A person has nothing to do with a request, it is just <strong>convenience</strong> that we put the factory method in the Person class. There is a coupling between the code of Person and the dependency delivering the Request object.</li>
</ul>
<p>There are several ways to deal with this. But lets start with the last reason of coupling. It is easy to fix this coupling by creating a Factory class within your web application. From there you can generate the Person object out of a request. The Person class has no create method anymore, and thus is not tightly coupled to a Request class. The newly created Factory however <em>is</em> coupled to the Request, which is fine as it is meant to convert Requests into Person objects. Hence we could even name it that way:</p>
<pre class="brush: java; title: ; notranslate">
class Person {
	private String firstName;
	private String lastName;
	// .. more properties here

	Person(String firstName, String lastName, ...) {
		this.firstName = firstName;
		this.lastName = lastName;
		// ...
	}


	public void subcribeTo(Subscription subscription) {
		// do something interesting here
	}

}

class PersonFromRequestFactory {

	// .. dependencies here 

	public Person create(HttpServletRequest request) {
		Person person = new Person(request.getParameter(&quot;firstName&quot;), )		
		// .. read more properties
		// .. set up dependencies in Person, etc.
	}

}
</pre>
<p>Once we have this Factory, you can take it a step further:<br />
If you have different kind of request parameters to create the same object you could create different methods in the new Factory:</p>
<pre class="brush: java; title: ; notranslate">
class PersonFromRequestFactory {

	// .. dependencies here 

	public Person createFromRegistrationForm(HttpServletRequest request) {
		Person person = new Person(request.getParameter(&quot;firstName&quot;), )		
		// .. read more properties
		// .. set up dependencies in Person, etc.
	}


	public Person createFromSubscriptionForm(HttpServletRequest request) {
		Person person = new Person(request.getParameter(&quot;givenName&quot;), )		
		// .. read more properties
		// .. set up dependencies in Person, etc.
	}


}
</pre>
<p>You could also create a <a href="http://www.refactoring.com/catalog/introduceParameterObject.html">Parameter object</a> and go from there. For instance, if your web application uses <a href="http://www.springsource.org/">Spring</a>, you could wire your request parameters to an object (called &#8220;<a href="http://viralpatel.net/blogs/spring-3-mvc-handling-forms/">Form binding</a>&#8220;) automagically and use that object as input in your Factory. This way it is type safe:</p>
<pre class="brush: java; title: ; notranslate">
class PersonFromRequestFactory {

	// .. dependencies here 

	public Person create(RegistrationForm form) {
		Person person = new Person(form.getFirstName(), ...)		
		// .. read more properties
		// .. set up dependencies in Person, etc.
	}


	public Person createFromSubscriptionForm(SubscriptionForm form) {
		Person person = new Person(form.getGivenName(), )		
		// .. read more properties
		// .. set up dependencies in Person, etc.
	}


}
</pre>
<p><b>But how do you test all this?</b><br />
Did you notice the Person has private fields, and no get/set methods? The only way to set the fields is using the Person constructor. How do you test the correct construction of this Person class from the request? Since we are not able to read the properties, we have to use other ways to test that code. I&#8217;ll cover that in the next blog post.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stefanhendriks.wordpress.com/973/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stefanhendriks.wordpress.com/973/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stefanhendriks.wordpress.com&#038;blog=6886101&#038;post=973&#038;subd=stefanhendriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stefanhendriks.wordpress.com/2012/10/14/coupling-the-factory-method/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/49c2d074f82383efff562d16454a5570?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">stefanhendriks</media:title>
		</media:content>
	</item>
		<item>
		<title>Slick 64 bit and Linux</title>
		<link>http://stefanhendriks.wordpress.com/2012/10/01/slick-64-bit-and-linux/</link>
		<comments>http://stefanhendriks.wordpress.com/2012/10/01/slick-64-bit-and-linux/#comments</comments>
		<pubDate>Mon, 01 Oct 2012 21:46:05 +0000</pubDate>
		<dc:creator>stefanhendriks</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[64 bit]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[max os x]]></category>
		<category><![CDATA[slick]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://stefanhendriks.wordpress.com/?p=965</guid>
		<description><![CDATA[Recently I wanted to run Slick on linux in a 64 bits environment. I got it working on Windows a while ago but I forgot to include natives for Linux and Mac OS X. To get it working on Linux I simply redid the steps I did back then. I&#8217;ve tested the results on Linux [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stefanhendriks.wordpress.com&#038;blog=6886101&#038;post=965&#038;subd=stefanhendriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Recently <a href="http://dune2themaker.fundynamic.com/?p=252">I wanted to run Slick on linux</a> in a 64 bits environment. I got it working on <a href="http://stefanhendriks.wordpress.com/2011/03/26/slick-java-library-and-64-bit/">Windows a while ago but I forgot to include natives for Linux and Mac OS X</a>. </p>
<p>To get it working on Linux I simply redid the steps I did back then. I&#8217;ve tested the results on Linux and also on Windows, with success!</p>
<p>If you are interested, then you can grab the natives <a href="https://github.com/stefanhendriks/dune2themaker4j/tree/master/engine/src/main/resources/natives">here</a>; and the JARs <a href="https://github.com/stefanhendriks/dune2themaker4j/tree/master/install">from here</a>.</p>
<p>(or just simply <a href="https://github.com/stefanhendriks/dune2themaker4j">clone dune2themaker4j</a> and get it all in one go)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stefanhendriks.wordpress.com/965/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stefanhendriks.wordpress.com/965/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stefanhendriks.wordpress.com&#038;blog=6886101&#038;post=965&#038;subd=stefanhendriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stefanhendriks.wordpress.com/2012/10/01/slick-64-bit-and-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/49c2d074f82383efff562d16454a5570?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">stefanhendriks</media:title>
		</media:content>
	</item>
		<item>
		<title>A Randori with Corey Haines</title>
		<link>http://stefanhendriks.wordpress.com/2012/09/20/a-randori-with-corey-haines/</link>
		<comments>http://stefanhendriks.wordpress.com/2012/09/20/a-randori-with-corey-haines/#comments</comments>
		<pubDate>Thu, 20 Sep 2012 21:04:25 +0000</pubDate>
		<dc:creator>stefanhendriks</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Craftmanship]]></category>
		<category><![CDATA[code kata]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Randori]]></category>

		<guid isPermaLink="false">http://stefanhendriks.wordpress.com/?p=935</guid>
		<description><![CDATA[Saturday 8th of September 2012. I came to Amsterdam Amstel train station, to pick up Corey Haines who I had asked if he wanted to meet the local community in Amsterdam and have some fun coding. After I first introduced myself to a complete stranger (I swear he really looked like Corey Haines )&#8230; I [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stefanhendriks.wordpress.com&#038;blog=6886101&#038;post=935&#038;subd=stefanhendriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Saturday 8th of September 2012.<a href="http://stefanhendriks.files.wordpress.com/2012/09/led_display_kata_monitor.jpg"><img src="http://stefanhendriks.files.wordpress.com/2012/09/led_display_kata_monitor.jpg?w=300&#038;h=256" alt="" title="LED_Display_Kata_Monitor" width="300" height="256" class="alignright size-medium wp-image-947" /></a></p>
<p>I came to <a href="https://maps.google.com/maps?q=H.J.E.+Wenckebachweg+108,+Nederland&amp;hl=nl&amp;ll=52.346689,4.918029&amp;spn=0.002835,0.008256&amp;sll=52.363677,4.908464&amp;sspn=0.011334,0.033023&amp;oq=Wen&amp;t=h&amp;hnear=H.J.E.+Wenckebachweg+108,+Watergraafsmeer,+Amsterdam,+Noord-Holland,+Nederland&amp;z=18">Amsterdam Amstel train station</a>, to pick up <a href="http://coreyhaines.com/">Corey Haines</a> who I had asked if he wanted to <a href="http://www.fundynamic.com/index.php?link=subscribe-event">meet the local community in Amsterdam and have some fun coding</a>. </p>
<p>After I first introduced myself to a complete stranger (I swear he really looked like Corey Haines <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )&#8230;<br />
I then walked to (the real and smiling) Corey Haines and got us to the car to get to our location.</p>
<p>It was a fun evening coding. Around 10 people came and we mainly focussed on <em>coding</em>. I want to share one of the highlighting moments (to me) of that evening. </p>
<p><strong>A Randori</strong>.</p>
<p>I never did a Randori before, but I really liked this form of group programming, so let me share this with you. Perhaps you might want to try it yourself with a group of developers you know.</p>
<p><strong>So what is a Randori?</strong><br />
If I had to put it in one sentence: A Randori is a pair-group-rotating-programming session.</p>
<p><strong>What we did</strong><br />
We did a Kata, but not all by ourselves&#8230; we did it all together.</p>
<p><a href="http://stefanhendriks.wordpress.com/2011/09/18/experiencing-a-code-kata-become-a-better-developer-while-having-fun/">Doing a Kata on your own is fun</a>.<br />
Doing a Kata with <em>multiple people</em> surely would be more fun right?</p>
<p>In this case we did the <a href="https://gist.github.com/3355480">LED Display Kata</a>. </p>
<p>But how did we do it as a group? Basically it works like this:<br />
You have one person controlling the computer (called the <strong>Driver</strong>). Another person, called the <strong>Navigator</strong>, has a say in what should be made (design-wise). The Driver and the Navigator form a pair. </p>
<p>The rest of the people (the <strong>Audience</strong>) has a role as well:<br />
When doing the Kata (in TDD of course), while you are in the red phase (test fails), the Audience must remain silent while the Driver and Navigator try to get the test to green (test passes). The Driver and Navigator may talk and work it out. Once the test is green, the refactor phase starts, the Audience is allowed to bring in suggestions. Want to shut up the audience? Write a failing test <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>After a few minutes (in our case 5 minutes) you switch roles:<br />
<strong>Navigator</strong> becomes <em>Driver</em><br />
<strong>Driver </strong>becomes <em>Audience </em>member<br />
someone from the <strong>Audience </strong> becomes <em>Driver</em></p>
<p>That&#8217;s a whole &#8216;session&#8217;. Reset the timer, and continue with the Kata where the previous pair left off. </p>
<p>Since you cannot write new code without a failing test, the Navigator is obliged to write (or let the Driver write to be more exact) a failing test first.</p>
<p>To avoid major rewrites of the code, there is a restriction to the Navigator. He may only refactor big changes after introducing an amount of new tests. Only when the tests pass, the Navigator may introduce major design changes. </p>
<p><strong>So why is this fun?</strong></p>
<p>It is fun for several reasons:<br />
- It resembles a real world problem, where you have to work with existing code (and you can&#8217;t change the whole design because you feel like it).<br />
- It&#8217;s fun to have short discussions about the code and its design<br />
- You learn a lot from others when discussing code and design<br />
- You learn how Java sucks <a href="https://twitter.com/coreyhaines/status/244508367832375297">by having no String.join()</a> <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  </p>
<p><strong>Picture or it did not happen!</strong><br />
Here you can see Corey Haines (at the left) in the session, looking at code that Arjen (at the right) is typing. And yes, I am taking this picture so you don&#8217;t see me on it of course! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://stefanhendriks.files.wordpress.com/2012/09/corey_haines_jpg.jpg"><img src="http://stefanhendriks.files.wordpress.com/2012/09/corey_haines_jpg.jpg?w=614&#038;h=319" alt="" title="corey_haines_jpg" width="614" height="319" class="aligncenter size-full wp-image-944" /></a></p>
<p><strong>Recap</strong><br />
Doing a Kata is a fun excersise alone. If you are with a group of people you could consider doing a Randori, and have fun coding together. The Kata itself is only the means to pair program, fix a problem, in existing code you did not write and trying to </p>
<p><strong>Practical: What do you need</strong><br />
- A group of people (around 10 people)<br />
- A computer with a dev environment installed (testing framework required)<br />
- A big screen / a beamer</p>
<p><strong>Thanks!</strong><br />
Special thanks to Corey Haines for coming over and let us have this experience!</p>
<p>Footnote: Later Arjen, Daniel and I had worked on the LED Kata again in a teamviewer session. We made a working solution (we wanted to crack the problem badly), <a href="https://github.com/stefanhendriks/LEDDisplayKataJava">which is also on Github</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stefanhendriks.wordpress.com/935/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stefanhendriks.wordpress.com/935/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stefanhendriks.wordpress.com&#038;blog=6886101&#038;post=935&#038;subd=stefanhendriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stefanhendriks.wordpress.com/2012/09/20/a-randori-with-corey-haines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/49c2d074f82383efff562d16454a5570?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">stefanhendriks</media:title>
		</media:content>

		<media:content url="http://stefanhendriks.files.wordpress.com/2012/09/led_display_kata_monitor.jpg?w=300" medium="image">
			<media:title type="html">LED_Display_Kata_Monitor</media:title>
		</media:content>

		<media:content url="http://stefanhendriks.files.wordpress.com/2012/09/corey_haines_jpg.jpg" medium="image">
			<media:title type="html">corey_haines_jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>Another reason to participate in a coderetreat</title>
		<link>http://stefanhendriks.wordpress.com/2012/07/20/another-reason-to-participate-in-a-coderetreat/</link>
		<comments>http://stefanhendriks.wordpress.com/2012/07/20/another-reason-to-participate-in-a-coderetreat/#comments</comments>
		<pubDate>Fri, 20 Jul 2012 07:09:57 +0000</pubDate>
		<dc:creator>stefanhendriks</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Craftmanship]]></category>
		<category><![CDATA[coderetreat]]></category>

		<guid isPermaLink="false">http://stefanhendriks.wordpress.com/?p=925</guid>
		<description><![CDATA[I&#8217;ve attended a coderetreat not so long ago in Rotterdam. I have talked about coderetreats before; how they help improve your skills. The most important reason to join coderetreats however is to just have fun. I had a good time! Why don&#8217;t you join a coderetreat event nearby and have a good time as well?<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stefanhendriks.wordpress.com&#038;blog=6886101&#038;post=925&#038;subd=stefanhendriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve attended a coderetreat not so long ago in Rotterdam. </p>
<p>I have talked about <a href="http://stefanhendriks.wordpress.com/tag/coderetreat/">coderetreats</a> before; <a href="http://stefanhendriks.wordpress.com/2012/01/12/first-coderetreat-of-2012-in-amsterdam-retrospective/">how they help improve your skills</a>.</p>
<p>The most important reason to join coderetreats however is to <b>just have fun</b>. </p>
<p>I had a good time!</p>
<p>Why don&#8217;t you join a <a href="http://coderetreat.org/events">coderetreat event nearby</a> and have a good time as well? <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.flickr.com/photos/devnology/7428395146/" title="DSC_4348 by Devnology, on Flickr"><img src="http://farm6.staticflickr.com/5457/7428395146_ca870f92b4.jpg" width="500" height="333" alt="DSC_4348"></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stefanhendriks.wordpress.com/925/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stefanhendriks.wordpress.com/925/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stefanhendriks.wordpress.com&#038;blog=6886101&#038;post=925&#038;subd=stefanhendriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stefanhendriks.wordpress.com/2012/07/20/another-reason-to-participate-in-a-coderetreat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/49c2d074f82383efff562d16454a5570?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">stefanhendriks</media:title>
		</media:content>

		<media:content url="http://farm6.staticflickr.com/5457/7428395146_ca870f92b4.jpg" medium="image">
			<media:title type="html">DSC_4348</media:title>
		</media:content>
	</item>
		<item>
		<title>My answer for &#8211; What is wrong with this code #02</title>
		<link>http://stefanhendriks.wordpress.com/2012/07/19/my-answer-for-what-is-wrong-with-this-code-02/</link>
		<comments>http://stefanhendriks.wordpress.com/2012/07/19/my-answer-for-what-is-wrong-with-this-code-02/#comments</comments>
		<pubDate>Thu, 19 Jul 2012 11:38:04 +0000</pubDate>
		<dc:creator>stefanhendriks</dc:creator>
				<category><![CDATA[Refactoring]]></category>
		<category><![CDATA[what is wrong with this code]]></category>
		<category><![CDATA[answer]]></category>
		<category><![CDATA[maintainability]]></category>
		<category><![CDATA[testability]]></category>

		<guid isPermaLink="false">http://stefanhendriks.wordpress.com/?p=903</guid>
		<description><![CDATA[A lot of things can be found in the snippet at &#8220;What is wrong with this code #02&#8243;. Here it is again: Already many things are pointed out in the comments of the initial post. One thing that immediately struck me is this line: Don&#8217;t do this. GenericObjectFactory implies with the getInstance to be a [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stefanhendriks.wordpress.com&#038;blog=6886101&#038;post=903&#038;subd=stefanhendriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>A lot of things can be found in the snippet at &#8220;What is wrong with this code #02&#8243;. Here it is again:</p>
<pre class="brush: java; title: ; notranslate">
public MyObject {

	private String myField;
	 
	... (imagine multiple fields) ...

	public GenericObject toGenericObject() {
		GenericObjectFactory genericObjectFactory = GenericObjectFactory.getInstance();
		GenericObject genericObject = genericObjectFactory.create(&quot;myObject&quot;);
		genericObject.setField(&quot;myField&quot;, myField);
		// imagine multiple lines using genericObject.setField(&quot;field&quot;, field)
		return genericObject;
	}

}
</pre>
<p>Already many things are pointed out in the comments of <a href="http://stefanhendriks.wordpress.com/2012/07/06/what-is-wrong-with-this-code-02/">the initial post</a>.</p>
<p>One thing that immediately struck me is this line:</p>
<pre class="brush: java; title: ; notranslate">
GenericObjectFactory genericObjectFactory = GenericObjectFactory.getInstance();
</pre>
<p><i>Don&#8217;t do this</i>. </p>
<p>GenericObjectFactory implies with the <i>getInstance</i> to be a <a href="http://en.wikipedia.org/wiki/Singleton_pattern">Singleton</a>. Even though it is a singleton, never retrieve and instance inside your method like that.</p>
<p>Even though there &#8220;should be only one instance&#8221; of the GenericObjectFactory, it still is a <i>dependency</i> for serializing MyObject. <b>Never hide your dependencies</b>. It makes your code hide its intent, it&#8217;s hard to decouple, test, refactor, in short <i>hard to maintain</i>. The code should clearly communicate its intent and usage(s). </p>
<p>In my opinion, there are three (well four sort-off) options to deal with this:</p>
<p>1. Deliver GenericObjectFactory as a parameter (invasive in method signature, but automated refactoring tools (i.e. <a href="http://www.jetbrains.com/idea/">IntelliJ</a>) handle this perfectly):</p>
<pre class="brush: java; title: ; notranslate">
public GenericObject toGenericObject(GenericObjectFactory genericObjectFactory ) {
	GenericObject genericObject = genericObjectFactory.create(&quot;myObject&quot;);
</pre>
<p>2. Inject GenericObjectFactory as a property of MyObject (invasive in constructor)</p>
<pre class="brush: java; title: ; notranslate">
public MyObject {

	private final GenericObjectFactory genericObjectFactory;

	public MyObject(final GenericObjectFactory genericObjectFactory) {
		this.genericObjectFactory = genericObjectFactory;
	}

	private String myField;

	... (imagine multiple fields) ...

	public GenericObject toGenericObject() {		
		GenericObject genericObject = genericObjectFactory.create(&quot;myObject&quot;);

</pre>
<p>2B. If you find option two too invasive, add the default constructor again but let it call the new constructor (makes point 2 less invasive, remove this default constructor after period of time).</p>
<pre class="brush: java; title: ; notranslate">
public MyObject {

	private final GenericObjectFactory genericObjectFactory;

	public MyObject(final GenericObjectFactory genericObjectFactory) {
		this.genericObjectFactory = genericObjectFactory;
	}

	// add this default constructor
	public MyObject() {
		this(GenericObjectFactory.getInstance());
	}

	private String myField;

	... (imagine multiple fields) ...

	public GenericObject toGenericObject() {		
		GenericObject genericObject = genericObjectFactory.create(&quot;myObject&quot;);

</pre>
<p>3. Introduce protected getInstance method in MyObject (least invasive, increases testability)</p>
<pre class="brush: java; title: ; notranslate">
public MyObject {

	... snip ...


	protected GenericObjectFactory getInstance() {
		return GenericObjectFactory.getInstance();
	}

	public GenericObject toGenericObject() {
		GenericObjectFactory genericObjectFactory = getInstance();
		GenericObject genericObject = genericObjectFactory.create(&quot;myObject&quot;);
		...
	}

</pre>
<p>This is sorted by my personal preference. Although option one and option two trade places from time to time. The third option is less favorable, as you still do not expose the need for dependencies, but it does make it more testable. It is also the least invasive way to refactor, which is sometimes beneficial in legacy projects with lots of untested code.</p>
<p>To conclude, <b>never hide your dependencies</b>, if you ever do see some class using <i>getInstance</i>, please, refactor it. It will make your, and your fellow-programmers, life <i>a lot</i> easier. </p>
<p>Thank you!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stefanhendriks.wordpress.com/903/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stefanhendriks.wordpress.com/903/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stefanhendriks.wordpress.com&#038;blog=6886101&#038;post=903&#038;subd=stefanhendriks&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stefanhendriks.wordpress.com/2012/07/19/my-answer-for-what-is-wrong-with-this-code-02/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/49c2d074f82383efff562d16454a5570?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">stefanhendriks</media:title>
		</media:content>
	</item>
	</channel>
</rss>
