<?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>Andrew Bennett&#039;s Blog</title>
	<atom:link href="http://therealbnut.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://therealbnut.wordpress.com</link>
	<description>Just another WordPress.com site</description>
	<lastBuildDate>Sun, 01 Jan 2012 05:08:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='therealbnut.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Andrew Bennett&#039;s Blog</title>
		<link>http://therealbnut.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://therealbnut.wordpress.com/osd.xml" title="Andrew Bennett&#039;s Blog" />
	<atom:link rel='hub' href='http://therealbnut.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Setting XCode 4.0 Environment Variables from a Script</title>
		<link>http://therealbnut.wordpress.com/2012/01/01/setting-xcode-4-0-environment-variables-from-a-script/</link>
		<comments>http://therealbnut.wordpress.com/2012/01/01/setting-xcode-4-0-environment-variables-from-a-script/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 05:08:33 +0000</pubDate>
		<dc:creator>therealbnut</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://therealbnut.wordpress.com/?p=76</guid>
		<description><![CDATA[I have struggled for quite a while with XCode 4, it is excellent for Cocoa development, but if you&#8217;re trying to do anything lower level I often find myself pining after XCode 3.x or wanting to use a Makefile or something instead. However there are many advantages to an IDE, like code completion and integrated [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therealbnut.wordpress.com&amp;blog=15420316&amp;post=76&amp;subd=therealbnut&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have struggled for quite a while with XCode 4, it is excellent for Cocoa development, but if you&#8217;re trying to do anything lower level I often find myself pining after XCode 3.x or wanting to use a Makefile or something instead. However there are many advantages to an IDE, like code completion and integrated debugging tools, so it&#8217;s always nice to use things how they are designed. However there are some things XCode 4 does not do nicely, this article describes one such thing and the solution I&#8217;ve come up with. I don&#8217;t think XCode 3.x did this particular thing well either, so perhaps my solution might actually be useful to someone else.</p>
<h3>The Problem</h3>
<p>Often I want a bit more control over how I compile and link things than XCode allows. Tools like llvm-config allow you to get the compiler settings for your local build of llvm api, which is very useful. If I run something like:</p>
<pre>llvm-config --ldflags</pre>
<p>Then the command will output something like:</p>
<pre>-L/usr/local/lib -lpthread -lm</pre>
<p>To use this with XCode what you might consider doing is setting the OTHER_LD_FLAGS environment variable (&#8220;Other Linker Flags&#8221; in the Build Settings) to something like this:</p>
<pre>`llvm-config --ldflags`</pre>
<p>However if you look in the build transcript (Expanding the link section in the Navigator Log, <em>command+7</em>), you will find that it puts double quotation marks around the space separated parts of the command and ld is forced to interpret it as a file. I have tried for hours to fix this, on many different occasions, but I could not find a satisfactory portable solution. That is until now.</p>
<h3>The Solution</h3>
<p>The solution in short is to create an Xcode Configuration file from a script build phase and then set that as the base configuration for all of your targets dependent on the build settings. You can do this in &#8220;5 Simple Steps&#8221;!</p>
<h4>Step 1</h4>
<p>This script will create the xcode configuration file in your project directory, place it in a script build phase in your project. Make sure that you do this before the &#8220;Compile Sources&#8221; phase so it is made before the settings are needed.</p>
<div id="attachment_79" class="wp-caption aligncenter" style="width: 710px"><a href="http://therealbnut.files.wordpress.com/2012/01/screen-shot-2012-01-01-at-3-27-31-pm1.png"><img class="size-full wp-image-79" title="Automatically Generating the XCode Configuration File" src="http://therealbnut.files.wordpress.com/2012/01/screen-shot-2012-01-01-at-3-27-31-pm1.png?w=700&#038;h=391" alt="Automatically Generating the XCode Configuration File" width="700" height="391" /></a><p class="wp-caption-text">Automatically Generating the XCode Configuration File</p></div>
<p>Of course this script only applies to llvm, but I will put it here in case anyone wants it:</p>
<pre>LLVM_XCCONFIG="llvm.xcconfig"
LLVM_CFLAGS=`/usr/local/bin/llvm-config --cflags`
LLVM_LDFLAGS=`/usr/local/bin/llvm-config --ldflags`" "`/usr/local/bin/llvm-config --libs cbackend jit x86 linker`
echo "// Configuration file for LLVM settings, generated as a build phase." &gt; $LLVM_XCCONFIG
echo "LLVM_CFLAGS = $LLVM_CFLAGS" &gt;&gt; $LLVM_XCCONFIG
echo "LLVM_LDFLAGS = $LLVM_LDFLAGS" &gt;&gt; $LLVM_XCCONFIG</pre>
<h4></h4>
<h4>Step 2</h4>
<p>Build the project and the XCode Configuration file should be created, add this file to the project. If you&#8217;re not sure how to do this you can find it in Finder and then drag it into the project&#8217;s file navigator (Or by pressing command+option+a, and selecting the file).</p>
<div id="attachment_80" class="wp-caption aligncenter" style="width: 710px"><a href="http://therealbnut.files.wordpress.com/2012/01/screen-shot-2012-01-01-at-3-34-40-pm.png"><img class="size-full wp-image-80" title="Add the XCode Configuration file to the project" src="http://therealbnut.files.wordpress.com/2012/01/screen-shot-2012-01-01-at-3-34-40-pm.png?w=700&#038;h=391" alt="Add the XCode Configuration file to the project" width="700" height="391" /></a><p class="wp-caption-text">Add the XCode Configuration file to the project</p></div>
<h4></h4>
<h4>Step 3</h4>
<p>Now you have to set this configuration file as the base configuration of each target that uses it, to do this select the project in the file  navigator. Selecting the project if the target is selected and then go to the Info tab. Within the info tab set the configuration file to the file you just added for each relevant target.</p>
<div id="attachment_81" class="wp-caption aligncenter" style="width: 710px"><a href="http://therealbnut.files.wordpress.com/2012/01/screen-shot-2012-01-01-at-3-41-04-pm.png"><img class="size-full wp-image-81" title="Setting the Target's base Configuration File" src="http://therealbnut.files.wordpress.com/2012/01/screen-shot-2012-01-01-at-3-41-04-pm.png?w=700&#038;h=356" alt="Setting the Target's base Configuration File" width="700" height="356" /></a><p class="wp-caption-text">Setting the Target&#039;s base Configuration File</p></div>
<h4></h4>
<h4>Step 4</h4>
<p>Now all you need to do is use the new environment variables in your project settings, of course you could have called them OTHER_LDFLAGS or similar to avoid this step, but I thought it was cleaner to do it this way.</p>
<div id="attachment_82" class="wp-caption aligncenter" style="width: 710px"><a href="http://therealbnut.files.wordpress.com/2012/01/screen-shot-2012-01-01-at-3-49-15-pm.png"><img class="size-full wp-image-82" title="Using the new Environment Variables in the the Build Settings" src="http://therealbnut.files.wordpress.com/2012/01/screen-shot-2012-01-01-at-3-49-15-pm.png?w=700&#038;h=371" alt="Using the new Environment Variables in the the Build Settings" width="700" height="371" /></a><p class="wp-caption-text">Using the new Environment Variables in the the Build Settings</p></div>
<h4></h4>
<h4>Step 5</h4>
<p>Build your project and hopefully everything is working as you wanted it to.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/therealbnut.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/therealbnut.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/therealbnut.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/therealbnut.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/therealbnut.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/therealbnut.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/therealbnut.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/therealbnut.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/therealbnut.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/therealbnut.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/therealbnut.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/therealbnut.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/therealbnut.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/therealbnut.wordpress.com/76/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therealbnut.wordpress.com&amp;blog=15420316&amp;post=76&amp;subd=therealbnut&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://therealbnut.wordpress.com/2012/01/01/setting-xcode-4-0-environment-variables-from-a-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/21f960591d595a9fa72e42d500a598ff?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">therealbnut</media:title>
		</media:content>

		<media:content url="http://therealbnut.files.wordpress.com/2012/01/screen-shot-2012-01-01-at-3-27-31-pm1.png" medium="image">
			<media:title type="html">Automatically Generating the XCode Configuration File</media:title>
		</media:content>

		<media:content url="http://therealbnut.files.wordpress.com/2012/01/screen-shot-2012-01-01-at-3-34-40-pm.png" medium="image">
			<media:title type="html">Add the XCode Configuration file to the project</media:title>
		</media:content>

		<media:content url="http://therealbnut.files.wordpress.com/2012/01/screen-shot-2012-01-01-at-3-41-04-pm.png" medium="image">
			<media:title type="html">Setting the Target&#039;s base Configuration File</media:title>
		</media:content>

		<media:content url="http://therealbnut.files.wordpress.com/2012/01/screen-shot-2012-01-01-at-3-49-15-pm.png" medium="image">
			<media:title type="html">Using the new Environment Variables in the the Build Settings</media:title>
		</media:content>
	</item>
		<item>
		<title>Community Driven Development</title>
		<link>http://therealbnut.wordpress.com/2010/11/26/community-driven-development/</link>
		<comments>http://therealbnut.wordpress.com/2010/11/26/community-driven-development/#comments</comments>
		<pubDate>Fri, 26 Nov 2010 03:11:16 +0000</pubDate>
		<dc:creator>therealbnut</dc:creator>
				<category><![CDATA[Free or Open Source]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[arithmetic coder]]></category>
		<category><![CDATA[Blender]]></category>
		<category><![CDATA[BrainDiagram]]></category>
		<category><![CDATA[diagram]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Extensibility]]></category>
		<category><![CDATA[features]]></category>
		<category><![CDATA[freewriting]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Minecraft]]></category>
		<category><![CDATA[modular]]></category>
		<category><![CDATA[OpenCL]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[wikipedia]]></category>

		<guid isPermaLink="false">http://therealbnut.wordpress.com/?p=44</guid>
		<description><![CDATA[My apologies, I&#8217;ve been struggling to find a way to concisely summarise what I&#8217;ve been thinking about recently, but this post may have turned into a rant. I&#8217;ve been trying to think of a good development workflow that would support open source and community driven projects. Here’s a rant-free diagrammatic summary, feel free to read [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therealbnut.wordpress.com&amp;blog=15420316&amp;post=44&amp;subd=therealbnut&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My apologies, I&#8217;ve been struggling to find a way to concisely summarise what I&#8217;ve been thinking about recently, but this post may have turned into a rant. I&#8217;ve been trying to think of a good development workflow that would support open source and community driven projects. Here’s a rant-free diagrammatic summary, feel free to read further if you&#8217;re interested:</p>
<h1>Summary</h1>
<p><a href="http://therealbnut.files.wordpress.com/2010/11/braindiagram.jpg"><img class="aligncenter size-full wp-image-46" title="BrainDiagram" src="http://therealbnut.files.wordpress.com/2010/11/braindiagram.jpg?w=700&#038;h=525" alt="Is this actually simpler?" width="700" height="525" /></a></p>
<h1>Rant</h1>
<p>The problem with community driven not-for-profit projects in my opinion is that they often don’t have the funding or the focus they need to make a cohesive polished product.  Projects are often <a title="forked" href="http://en.wikipedia.org/wiki/Fork_(software_development)">forked</a> in so many ways by having different people working on them with different goals, levels of commitment, design methodologies and <a title="technological biases" href="http://linuxreviews.org/software/desktops/">technological biases</a>. I’m not saying diversity is a bad thing, but when someone wants something new they often seem to either start from scratch or completely fork a project.</p>
<h2>Documentation</h2>
<p>Documentation seems to be one of the big problems here. You need someone with the skills to document something for people completely unfamiliar with a technology, you need them to be accepted inside that community, and then you need them to have incentives to help. There needs to be introductory high level documentation, that allows new users to easily gauge what they can do and then there needs to be lower level documentation to show them how to do it. There needs to be a clear separation between user and contributor documentation, as it is so important that people know how to contribute but not to scare away or confuse users.</p>
<p style="text-align:center;"><img class="aligncenter size-full wp-image-70" title="So Sorry!" src="http://therealbnut.files.wordpress.com/2010/11/sosorry.jpg?w=700" alt="So what does main do?"   /></p>
<h2>Extensibility</h2>
<p>From a programming point of view I really like <a title="OpenGL and OpenCL" href="http://www.khronos.org/">OpenGL and OpenCL</a>, they have clear low level and fairly extendable programming interfaces.  For me one of the most important things in community driven projects is well designed APIs.  In my opinion beyond normal design practices a good API needs two things:</p>
<p><span style="font-size:15px;font-weight:bold;">It must be extremely modular</span></p>
<p style="padding-left:30px;">For example, if I want to look at your <a title="arithmetic coder" href="http://en.wikipedia.org/wiki/Arithmetic_coding">arithmetic coder</a> I won’t come back an hour after getting it to fetch dependencies to find it has downloaded half of <a title="KDE" href="http://www.kde.org/">KDE</a>. Yes, this happened.  Ideally dependencies should be minimised, modules should be compact and be able to be run with fewer features if dependent modules are missing.</p>
<p><span style="font-size:15px;font-weight:bold;">It must be easily extensible</span></p>
<p style="padding-left:30px;"><a title="Blender" href="http://www.blender.org/">Blender</a> is something I use a lot, as an artist, but as a programmer I’ve never been able to make much progress.  Recently however they’ve made drastic improvements to the API and UI allowing plugins to seamlessly integrate themselves into the Application without a recompile.  Ideally the creation of these plugins is well documented and then they can be easily integrated into the base system.</p>
<h2>Community Funding</h2>
<p><a href="http://therealbnut.files.wordpress.com/2010/11/money1.jpg"><img class="alignright size-medium wp-image-63" title="Minecraft Money Shot" src="http://therealbnut.files.wordpress.com/2010/11/money1.jpg?w=265&#038;h=300" alt="Minecraft Money Shot" width="265" height="300" /></a>You would not believe how many posts there are on the <a title="Minecraft forums" href="http://www.minecraftforum.net/">Minecraft forums</a>.  Notch made the initial release of <a title="Minecraft " href="http://www.minecraft.net/">Minecraft</a> in a week and the community has now driven it to the point where he is a multimillionaire from the pre-purchases of a game that was still in beta.  This next bit is a brainspasm, let&#8217;s call this <a title="free writing" href="http://en.wikipedia.org/wiki/Free_writing">freewriting</a>. Often software companies gather usage statistics on their users, I think it’d be really interesting to optionally tell users statistics of what went into what they use. For example, 1000 users use spend one hour on 10 of the features of your program, and it took 5 programmers $500 worth of time and resources to implement those features. Your program could then credit those programmers and say they each donated $100 of their time to providing those features, $0 has been payed for so far and you are responsible for 0.1% of the total usage of those features. Perhaps you’d like to donate 50c or more?</p>
<h2>User driven features</h2>
<p>Often implementers are awful at design and aesthetics, as well as predicting what users want from their product and even <a title="how they will use it" href="http://thereifixedit.failblog.org/2010/11/24/white-trash-repairs-did-you-chain-up-the-lock/">how they will use it</a>.  I love the idea of <a title="user devised features" href="http://feedback.unity3d.com/">user devised features</a>, as it gives implementers well discussed, often clearly defined, and above all, popular goals.  I’d really like to see a polished open source community driven feature request system, tied into something like the <a title="SPP" href="http://en.wikipedia.org/wiki/Threshold_pledge_system">SPP</a>, where implementers could set a minimum cost of producing a feature and when donations reach the required amount to make it happen the feature can be implemented.</p>
<h2><a href="http://thereifixedit.failblog.org/2010/11/24/white-trash-repairs-did-you-chain-up-the-lock/"><img class="aligncenter size-full wp-image-48" title="Just another use case" src="http://therealbnut.files.wordpress.com/2010/11/c138f82d-75cd-4c71-a790-40b6eac71f03.jpg?w=700" alt="Just another use case"   /></a></h2>
<h2>&lt;/Rant&gt;</h2>
<p>This whole rant started when I read an appeal from Wikipedia founder <a title="Jimmy Wales" href="http://wikimediafoundation.org/wiki/WMFJA1/AU">Jimmy Wales</a>, asking for donations to keep wikipedia going.  I use wikipedia all the time as a first stop summary of things I’m unfamiliar with and would probably be curled up in a corner in the foetal position if it went under. Just FYI, that banner is <a title="HUGE" href="http://upload.wikimedia.org/centralnotice/images/Jimmy-window-light.jpg">HUGE</a>!</p>
<p style="text-align:center;"><a href="http://wikimediafoundation.org/wiki/WMFJA1/AU"><img class="size-full wp-image-47 aligncenter" title="HUGE" src="http://therealbnut.files.wordpress.com/2010/11/jimmy-window-light-small.jpg?w=700" alt="HUGE!"   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/therealbnut.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/therealbnut.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/therealbnut.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/therealbnut.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/therealbnut.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/therealbnut.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/therealbnut.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/therealbnut.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/therealbnut.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/therealbnut.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/therealbnut.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/therealbnut.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/therealbnut.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/therealbnut.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therealbnut.wordpress.com&amp;blog=15420316&amp;post=44&amp;subd=therealbnut&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://therealbnut.wordpress.com/2010/11/26/community-driven-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/21f960591d595a9fa72e42d500a598ff?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">therealbnut</media:title>
		</media:content>

		<media:content url="http://therealbnut.files.wordpress.com/2010/11/braindiagram.jpg" medium="image">
			<media:title type="html">BrainDiagram</media:title>
		</media:content>

		<media:content url="http://therealbnut.files.wordpress.com/2010/11/sosorry.jpg" medium="image">
			<media:title type="html">So Sorry!</media:title>
		</media:content>

		<media:content url="http://therealbnut.files.wordpress.com/2010/11/money1.jpg?w=265" medium="image">
			<media:title type="html">Minecraft Money Shot</media:title>
		</media:content>

		<media:content url="http://therealbnut.files.wordpress.com/2010/11/c138f82d-75cd-4c71-a790-40b6eac71f03.jpg" medium="image">
			<media:title type="html">Just another use case</media:title>
		</media:content>

		<media:content url="http://therealbnut.files.wordpress.com/2010/11/jimmy-window-light-small.jpg" medium="image">
			<media:title type="html">HUGE</media:title>
		</media:content>
	</item>
		<item>
		<title>Memory Games</title>
		<link>http://therealbnut.wordpress.com/2010/11/16/21/</link>
		<comments>http://therealbnut.wordpress.com/2010/11/16/21/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 02:04:51 +0000</pubDate>
		<dc:creator>therealbnut</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[functor]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[member]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[quiz]]></category>
		<category><![CDATA[states]]></category>
		<category><![CDATA[United Nations]]></category>
		<category><![CDATA[yield]]></category>

		<guid isPermaLink="false">http://therealbnut.wordpress.com/?p=21</guid>
		<description><![CDATA[Some friends have been using this website http://andys.org.uk/countryquiz/ to (perhaps) improve their memory by seeing how many of the 192 UN Member States they can name in 10 minutes.  I tried it and only managed to get 16 in the two minutes I had before I realised I was meant to be elsewhere. After coming [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therealbnut.wordpress.com&amp;blog=15420316&amp;post=21&amp;subd=therealbnut&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Some friends have been using this website <a href="http://andys.org.uk/countryquiz/">http://andys.org.uk/countryquiz/</a> to (perhaps) improve their memory by seeing how many of the 192 <a title="UN Member States" href="http://en.wikipedia.org/wiki/United_Nations_member_states">UN Member States</a> they can name in 10 minutes.  I tried it and only managed to get 16 in the two minutes I had before I realised I was meant to be elsewhere.</p>
<p>After coming back from elsewhere I decided to analyse the problem.  I wasn’t sure if without time restriction I could name anywhere near that many states.  I wasn’t sure if I could type that many states within the time restriction and if I could do the above two, I certainly wouldn’t be able to spell them all flawlessly.</p>
<p><a href="http://bol-sid.wdfiles.com/local--files/be-sane/grumpycookie.jpg"><img class="aligncenter size-full wp-image-34" title="Here, have a cookie." src="http://therealbnut.files.wordpress.com/2010/11/grumpycookie.jpg?w=700" alt="Here, have a cookie."   /></a></p>
<p>So I cheated.  I copied all the countries from the website&#8217;s list and then pasted them back one by one, this meant I was typing 5 fixed keyboard commands for each state in contrast to approximately 8.56 varied characters to type each individually.  To do this successfully you&#8217;d have to average 33 <a title="words per minute" href="http://en.wikipedia.org/wiki/Words_per_minute">words per minute</a>, where the average is 19 words per minute for composition, and exactly 33 as well for just typing.  So even cheating I was about 12 states short when time ran out, so I needed to <a title="cheat more" href="http://en.wikipedia.org/wiki/Hacker_(programmer_subculture)">cheat more</a>.</p>
<p>To do this I wrote a <a title="Bookmarklet" href="http://en.wikipedia.org/wiki/Bookmarklet">Bookmarklet</a>, a small piece of code which you enter in place of a <a title="URL" href="http://en.wikipedia.org/wiki/Location_bar">URL</a> in your browser, it can do just about anything to the <a title="Client-Side" href="http://en.wikipedia.org/wiki/Client_side">client-side</a> representation of a website.  Essentially this script finds the input text field, enters a state into it, tells the website you’ve typed one in, then begins on the next state.</p>
<p><code>javascript: (function() {for(var s in states) {document.getElementsByTagName("input")[1].value = states[s];  checkStates(document.getElementsByTagName("input")[1]);}})();</code></p>
<p>My Bookmarklet worked!  I received the coveted <strong>Alert Box of Success</strong>, having written my code and executed it within the allotted 10 minutes. However there was a bitterness to my victory, certainly not that I cheated, but that my script had to be run several times sequentially to get all the states validated.  I suspect this was because my script was running faster than the <a title="User Interface" href="http://en.wikipedia.org/wiki/User_Interface">User Interface</a> could <a title="handle" href="http://en.wikipedia.org/wiki/Event-driven_programming">handle</a>, but I’m not entirely sure.</p>
<p style="text-align:center;"><img class="size-full wp-image-22 aligncenter" style="border:0;" title="The coveted Alert Box of Success!" src="http://therealbnut.files.wordpress.com/2010/11/screen-shot-2010-11-16-at-11-36-39-am.png?w=700" alt="The coveted Alert Box of Success!"   /></p>
<p>So I decided to make a version that more closely resembled what a real person would do, or more simply, I made it wait a bit after entering each state.  This initially seems trivial, except that JavaScript does not seem to have a function to <a title="pause" href="http://www.kernel.org/doc/man-pages/online/pages/man3/pthread_yield.3.html">pause</a> your code for a short duration, and it all has to be written in one line of code.</p>
<p><code>javascript: (check = new function() {this.foo = states.slice(0);this.go = function() {document.getElementsByTagName("input")[1].value = this.foo.pop();checkStates(document.getElementsByTagName("input")[1]);if (this.foo.length != 0) setTimeout("check.go()", 2);};this.go();})();</code></p>
<p>I did this by creating a global <a title="Functor" href="http://en.wikipedia.org/wiki/Function_object">Functor</a> which periodically updates then yields until it is complete.  This new code worked and got all of the states in 3 seconds with only one run of the Bookmarklet. Success!  Some of you might be thinking, why not just hack the program and tell it you’ve won, bypassing the User Interface, well that’d be cheating.  Furthermore, what I did here is much more likely to teach me something, and will work in an <a title="AJAX" href="http://en.wikipedia.org/wiki/AJAX">AJAX</a>/Server driven version.</p>
<pre>javascript: window.alert("You did it!");</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/therealbnut.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/therealbnut.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/therealbnut.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/therealbnut.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/therealbnut.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/therealbnut.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/therealbnut.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/therealbnut.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/therealbnut.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/therealbnut.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/therealbnut.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/therealbnut.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/therealbnut.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/therealbnut.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therealbnut.wordpress.com&amp;blog=15420316&amp;post=21&amp;subd=therealbnut&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://therealbnut.wordpress.com/2010/11/16/21/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/21f960591d595a9fa72e42d500a598ff?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">therealbnut</media:title>
		</media:content>

		<media:content url="http://therealbnut.files.wordpress.com/2010/11/grumpycookie.jpg" medium="image">
			<media:title type="html">Here, have a cookie.</media:title>
		</media:content>

		<media:content url="http://therealbnut.files.wordpress.com/2010/11/screen-shot-2010-11-16-at-11-36-39-am.png" medium="image">
			<media:title type="html">The coveted Alert Box of Success!</media:title>
		</media:content>
	</item>
		<item>
		<title>Computer Game Revenue Model 2.0</title>
		<link>http://therealbnut.wordpress.com/2010/08/26/computer-game-revenue-model-2-0/</link>
		<comments>http://therealbnut.wordpress.com/2010/08/26/computer-game-revenue-model-2-0/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 06:00:54 +0000</pubDate>
		<dc:creator>therealbnut</dc:creator>
				<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Publishing]]></category>
		<category><![CDATA[App Store]]></category>
		<category><![CDATA[Computer Game]]></category>
		<category><![CDATA[Distributing]]></category>
		<category><![CDATA[DRM]]></category>
		<category><![CDATA[Revenue Model]]></category>
		<category><![CDATA[Steam]]></category>
		<category><![CDATA[Unity]]></category>

		<guid isPermaLink="false">http://therealbnut.wordpress.com/?p=10</guid>
		<description><![CDATA[What I would like to see in future is a content delivery system like Steam, where all games are free, but to use them you would have to pay a monthly subscription fee.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therealbnut.wordpress.com&amp;blog=15420316&amp;post=10&amp;subd=therealbnut&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was discussing this with Jess on the bus home and thought I should blog it, and I needed a blog to do this, so welcome!</p>
<p><strong>Motivation</strong></p>
<p>Recently I have been discussing game revenue models with my friends, we are basically all in agreement that current revenue models are broken, but have been unable to find a better alternative.  The problem seems to be that computer game companies are often forced to charge a lot, and put <a title="DRM" href="http://en.wikipedia.org/wiki/Digital_rights_management" target="_blank">digital rights management</a> (DRM) in their games.  This is all to make a profit in the first few months of sales, before &#8220;everyone&#8221; pirates them. This discourages patching games, fostering a community and leads to a rift between distributers and players.</p>
<p><img class="aligncenter" title="Steam Mac 1984 Homage" src="http://upload.wikimedia.org/wikipedia/en/3/37/Steam_mac_1984_homage.jpg" alt="Thanks Wikipedia!" width="586" height="121" /></p>
<p>DRM put into games is often crippling enough to put off potential customers, or to ruin the user experience or playability for those that do pay for it.  Personally I have used cracked versions of games I own for the convenience of installation and usage. When it comes down to it, gamers should have the right to play games they pay for, and DRM often removes that right.</p>
<p><a title="Steam" href="http://en.wikipedia.org/wiki/Steam_(content_delivery)" target="_blank">Steam</a> is <a href="http://en.wikipedia.org/wiki/Valve_Corporation">Valve Corporation’s</a> content delivery and digital rights management software which allows users to buy, download, and play games all from its interface.  In many ways it is very convenient as all you need is an internet connection to download and play your games.  Often you will need this internet connection anyway as many of the popular titles on Steam are multiplayer online games.  The point being that the convenience Steam offers outweighs the advantages of piracy for many people I know, despite its DRM.</p>
<p><strong>Revenue Model 2.0</strong></p>
<p>What I would like to see in future is a content delivery system like Steam, where all games are free, but to use them you would have to pay a monthly subscription fee. This subscription fee would be charged in week long blocks, for each week you use the service. This means that people that game infrequently would not be charged excessively, and hardcore gamers would not be charged more than they would with existing models.</p>
<p><strong>For Gamers</strong></p>
<p><a title="Hardcore Gamer" href="http://en.wikipedia.org/wiki/Gamer#Hardcore_gamer">Hardcore gamers</a> would have access to the latest and greatest games for free. This is definitely a win for gamers, as they would have access to every game for free, and only have to pay as they play.</p>
<p><strong>For Publisher</strong></p>
<p>From a publisher’s point of view, they can monitor and manage usage of their games to target customer’s, make new suggestions and foster a community around their games.  A fairly open and easy to join platform would make distribution easy and developers flock to the label.</p>
<p><strong>For Developers</strong></p>
<p><a href="http://therealbnut.files.wordpress.com/2010/08/20110419014159mac_app_store_icon.png"><img class="alignright size-thumbnail wp-image-73" title="Mac App Store Icon" src="http://therealbnut.files.wordpress.com/2010/08/20110419014159mac_app_store_icon.png?w=150&#038;h=150" alt="Mac App Store Icon" width="150" height="150" /></a></p>
<p>Finally, from a developer’s point of view, I would propose something similar to <a title="Apple" href="http://en.wikipedia.org/wiki/Apple_Inc.">Apple’s</a> <a title="App Store" href="http://en.wikipedia.org/wiki/App_Store#Milestones">App Store model</a>.  Anyone would be able to develop for this distributer, they would just have to meet the minimum quality requirements to be associated with the label.</p>
<p>After shipping their game a rather large, say 70% of the monthly subscriptions would be distributed to developers based on the percentage of sales. This percentage would be calculated by summing the hours (or part thereof) that players are using a game, then dividing this by the total number of hours across all games.  Once a title reaches a certain level of revenue per user, or it drops off the radar then the developer would be encouraged to release their game for free to foster the</p>
<p>community and to allow removal of any DRM or online restrictions the game imposes.</p>
<p><strong>Implementation</strong><br />
<a href="http://therealbnut.files.wordpress.com/2010/08/unitylogo.png"><img class="alignleft size-thumbnail wp-image-74" title="Unity Logo" src="http://therealbnut.files.wordpress.com/2010/08/unitylogo.png?w=150&#038;h=150" alt="Unity Logo" width="150" height="150" /></a>A great way to do this would be on top of a platform like <a title="Unity 3D" href="http://en.wikipedia.org/wiki/Unity3D">The Unity Game Engine</a> which has a huge following of developers.  The distributer would add social tools for community interactions and a unified multiplayer framework.  This would mean that a developer can simply import a package then use it to aid their development. When they are finished developing their game, it will be ready to upload and distribute. Likewise by targeting a Unity supported platform like the Wii, or even creating a platform like Apple’s iMac it would be easy to know the system requirements of the users machine.  A console like platform also has the advantage that the console itself could be rented as part of the subscription model to ensure that hardware is always up to date.</p>
<p>Comments are welcome, I think this would be a great model, obviously it doesn&#8217;t address all the problems with current systems, but it would be an excellent stepping stone to a more open revenue model where everybody happy!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/therealbnut.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/therealbnut.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/therealbnut.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/therealbnut.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/therealbnut.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/therealbnut.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/therealbnut.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/therealbnut.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/therealbnut.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/therealbnut.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/therealbnut.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/therealbnut.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/therealbnut.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/therealbnut.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therealbnut.wordpress.com&amp;blog=15420316&amp;post=10&amp;subd=therealbnut&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://therealbnut.wordpress.com/2010/08/26/computer-game-revenue-model-2-0/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/21f960591d595a9fa72e42d500a598ff?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">therealbnut</media:title>
		</media:content>

		<media:content url="http://upload.wikimedia.org/wikipedia/en/3/37/Steam_mac_1984_homage.jpg" medium="image">
			<media:title type="html">Steam Mac 1984 Homage</media:title>
		</media:content>

		<media:content url="http://therealbnut.files.wordpress.com/2010/08/20110419014159mac_app_store_icon.png?w=150" medium="image">
			<media:title type="html">Mac App Store Icon</media:title>
		</media:content>

		<media:content url="http://therealbnut.files.wordpress.com/2010/08/unitylogo.png?w=150" medium="image">
			<media:title type="html">Unity Logo</media:title>
		</media:content>
	</item>
	</channel>
</rss>
