<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TetrisRockstar &#187; programming</title>
	<atom:link href="http://tetrisrockstar.com/tag/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://tetrisrockstar.com</link>
	<description>stories from Fredrik</description>
	<lastBuildDate>Sat, 31 Jul 2010 01:35:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Banzai &#8211; the social manhunt!</title>
		<link>http://tetrisrockstar.com/banzai-the-social-manhunt</link>
		<comments>http://tetrisrockstar.com/banzai-the-social-manhunt#comments</comments>
		<pubDate>Tue, 01 Dec 2009 21:10:41 +0000</pubDate>
		<dc:creator>Fredrik Olsen</dc:creator>
				<category><![CDATA[Category]]></category>
		<category><![CDATA[dh]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://tetrisrockstar.com/?p=1084</guid>
		<description><![CDATA[Update: Ericsson Labs has now posted on their blog about the challenge. I&#8217;m back from DreamHack and things went down well. The last task was a bit too hard (well, impossible really – until we released clues) but otherwise we got a very good response. The best thing about the event was however that me [...]]]></description>
			<content:encoded><![CDATA[<p><em>Update: Ericsson Labs has now <a title="Ericsson Labs at DreamHack" href="https://labs.ericsson.com/blog/ericsson-labs-dreamhack" target="_blank">posted on their blog</a> about the challenge.</em></p>
<p>I&#8217;m back from DreamHack and things went down well. The last task was a bit too hard (well, impossible really – until we released clues) but otherwise we got a very good response.</p>
<p>The best thing about the event was however that me and <a title="Emanuels blog" href="http://eferm.com" target="_blank">Emanuel</a> participated in the <a title="Ericsson blogpost" href="https://labs.ericsson.com/news/dreamhack" target="_blank">Ericsson Labs developer challenge</a>. So this is a story of how I won a PS3 by proof of concept alone.</p>
<blockquote><p><span>The goal of the competition is to develop the most creative, useful or fun mobile or web application that uses at least one of the APIs available at Ericsson Labs.</span></p>
<p>Your application must be a runnable example and you must be able to show that your idea works. However a few flaws here and there won’t hurt.</p></blockquote>
<p><span>This was the competition. Use some of Ericssons tools that help developer do fun things to do something fun.</span></p>
<p><span>The whole process was extremely fun actually! It started out by me having an idea about doing some classical positioning-game, like tag but with GPS locations and covering a city or something like that. The idea has been tried and proved many times so I thought it would be quite trivial to implement a copy of that idea. But the idea had a few flaws, when talking it over with Emanuel we bounced the idea back and forth a few times and came up with the best concept we could.</span></p>
<p><span>On the day after, we started coding after the first half of our own competition was done, at like 20:00 or so. We stopped coding again at 05:00 with some sort of basic working model of the application. It was pretty intense and we ran into more technical issues like Java not being able to handle SQLite3 rather than coding issues. But at 05:00 we thought we had something good and went to bed, only to get up again at around 10:00 to start working out the finer details and some of the absolute worst bugs (essentially crippling the entire app =P).</span></p>
<p><span>After 5 hours or so of more coding on the morning, we demoed the app, got some basic approval and sent in the contribution. We really had no idea If we were going to win or not as the judges gave absolutely no impression of what they thought until the competition was over.</span></p>
<p><span>In the end though, we stood up on the stage as first prize winners taking home about 9000 SEK of awesome stuff.</span></p>
<p style="text-align: center;"><span><a href="http://tetrisrockstar.com/wp-content/uploads/2009/12/IMG_0241-768x1024.jpg" rel="shadowbox[post-1084];player=img;"><img class="alignnone size-medium wp-image-1085" title="HTC Hero" src="http://tetrisrockstar.com/wp-content/uploads/2009/12/IMG_0241-450x600.jpg" alt="HTC Hero" width="210" height="280" /> </a><a href="http://tetrisrockstar.com/wp-content/uploads/2009/12/IMG_0242-1024x768.jpg" rel="shadowbox[post-1084];player=img;"><img class="alignnone size-medium wp-image-1086" title="PS3 + Rockband" src="http://tetrisrockstar.com/wp-content/uploads/2009/12/IMG_0242-450x337.jpg" alt="PS3 + Rockband" width="374" height="279" /></a></span></p>
<p><span>We split it so Emanuel took the phone and I took the PS3 + Rockband, worth around the same amount.</span></p>
<p><span>It was extremely fun going from idea to just providing a proof of concept and get rewarded for that, instead of having to put in the additional 80% of work that takes a product from proof of concept to finished.</span></p>
<p><span>So what was our idea I hear you asking? It was actually pretty fun. The front-page of our temporary website we put up explains it pretty well.</span></p>
<blockquote><p><span style="font-size: 22px;">banzai</span> is all about the fun of the chase. It was originally designed   as an urban tag-game played out in real life. Because of the accuracy of the Ericsson Labs Web Location API   we switched our market to people with access to large areas to play around in while using some kind of   motor vehicle, the urban city-based game might be revised when the Web Location uses GPS to a larger extent.</p>
<p>The game is about finding &#8220;the chosen one&#8221;. The game is initiated at a given time and place, you     choose which games you want to participate in yourself. Once the game is started you will get the location     of everyone else. Completely at random, one player will be informed that he is the chosen one.      It is then the goal of the chosen one to stay away from everyone else.</p>
<h1>Points</h1>
<p>Points will be given at three times.</p>
<li style="margin-top: 20px;margin-left:20px;"> When the chosen one is caught, the round is over. At this point, everyone needs to get 500 meters       away from each other as fast as possible. The sooner you are 500 meters from everyone else, the more points you get.       When everyone is clear a new round will begin! The number of rounds is defined in the particular game you choose to join.</li>
<li style="margin-top: 20px;margin-left:20px;"> The chosen one will get points as long as he is not caught, the chosen one is deemed caught when       everyone else is within 200 meters of him.</li>
<li style="margin-top: 20px;margin-left:20px;"> The other players will get points when spending time close to the chosen one, the amount of points       they get will depend on how close they are to the chosen one. The proximity to the chosen one is displayed       for each player at all times with a bar diplaying 0 &#8211; 100% where 100% is within catching distance.</li>
</blockquote>
<p>So that was it. A screenshot might be in order.</p>
<p style="text-align: center;"><a href="http://tetrisrockstar.com/wp-content/uploads/2009/12/Picture-1.png" rel="shadowbox[post-1084];player=img;"><img class="size-medium wp-image-1087 aligncenter" title="The look of the site" src="http://tetrisrockstar.com/wp-content/uploads/2009/12/Picture-1-450x246.png" alt="The look of the site" width="450" height="246" /></a></p>
<p>As you can see, a list of players show up, some controls for the map to zoom and stuff like that (all of the map stuff here was one of the Ericsson API&#8217;s we used) and your score as well as the distance to the chosen one.</p>
<p>All the locations here for the players drawn on the map were polled every 30 seconds by Emanuels backend server, while I wrote the user interface, map stuff and calculating distances and scoring.</p>
<p>All in all it actually works surprisingly well, and I&#8217;m quite proud of having done it in 15 or so hours. The idea is pretty solid as well but obviously needs GPS and not triangulation like the Ericsson API was using.</p>
<p>What is the result of all this? We might get some small recognition withing Ericsson Labs, we own full rights to the idea and code that we&#8217;ve done if we want to continue building on it. But the only result I&#8217;m really seeing right now, is this.</p>
<p style="text-align: center;"><a href="http://tetrisrockstar.com/wp-content/uploads/2009/12/IMG_4512-1024x768.jpg" rel="shadowbox[post-1084];player=img;"><img class="size-medium wp-image-1088 aligncenter" title="My new setup" src="http://tetrisrockstar.com/wp-content/uploads/2009/12/IMG_4512-450x337.jpg" alt="My new setup" width="450" height="337" /></a></p>
<p>From the money I will make by selling the PS3 I bought an xbox 360 Elite so I can play Modern Warfare 2 with Emma (and I like the xbox controls more than the PS3 ones). I also bought a new 24&#8243; widescreen display that I&#8217;ve hooked up to both my computer and the xbox. So when I&#8217;m not playing I have an additional 24&#8243; screen and when I want to play, I just turn on the xbox and switch the screen over with the press of a button.</p>
<p style="text-align: center;"><a href="http://tetrisrockstar.com/wp-content/uploads/2009/12/IMG_4513-768x1024.jpg" rel="shadowbox[post-1084];player=img;"><img class="alignnone size-medium wp-image-1091" title="Xbox 360 Elite" src="http://tetrisrockstar.com/wp-content/uploads/2009/12/IMG_4513-450x600.jpg" alt="Xbox 360 Elite" width="304" height="405" /></a></p>
<p>Pretty awesome.</p>
<script type="text/javascript">
var flattr_wp_ver = '0.9.11';
var flattr_uid = '1180';
var flattr_url = 'http://tetrisrockstar.com';
var flattr_lng = 'en_GB';
var flattr_cat = 'text';
var flattr_tag = 'blog,wordpress,rss,feed';
var flattr_btn = 'large';
var flattr_tle = 'TetrisRockstar';
var flattr_dsc = 'stories from Fredrik';
</script>
<script src="http://api.flattr.com/button/load.js?v=0.2" type="text/javascript"></script> <p>Feel free to Flattr this post at <a href="http://flattr.com/" title="Flattr" target="_blank">flattr.com</a>, if you like it.</p> <p><a href="http://flattr.com/" title="Flattr" target="_blank"><img src="http://tetrisrockstar.com/wp-content/plugins/flattrss/button-compact-static-100x17.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://tetrisrockstar.com/banzai-the-social-manhunt/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Too much awesome</title>
		<link>http://tetrisrockstar.com/too-much-awesome</link>
		<comments>http://tetrisrockstar.com/too-much-awesome#comments</comments>
		<pubDate>Wed, 04 Nov 2009 00:09:53 +0000</pubDate>
		<dc:creator>Fredrik Olsen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://tetrisrockstar.com/?p=1049</guid>
		<description><![CDATA[I&#8217;ve been keeping quite busy the last couple of days. School takes up a lot but the little extra time I have I spend trying to make a little file upload demo in Cappuccino, which is really awesome. I love being able to code Objective-C and then just refresh my browser to see my application [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been keeping quite busy the last couple of days. School takes up a lot but the little extra time I have I spend trying to make a little file upload demo in Cappuccino, which is really awesome. I love being able to code Objective-C and then just refresh my browser to see my application running in there instead of on the desktop.</p>
<p>Another very awesome thing is that I have now been officially approved as an iPhone Developer, meaning I can develop apps on my own phone and if they get good enough I can start selling them in the App Store. The entire application process took <strong>only 6 work-days</strong> which I have to say is very impressive! I&#8217;ve heard of people having to wait months for their licenses so that was pretty awesome. The first app up for development is essentially a phone version of DHG, which I hope can get quite awesome.</p>
<p>There is in fact so much awesome, that I can&#8217;t stop thinking about all of this awesome, resulting in me not getting any sleep. The upside of this is that it will result in tomorrow being very much less awesome and hopefully I&#8217;ll be able to get some sleep then.</p>
<p>I can&#8217;t wait till Christmas break when I&#8217;ll actually have some free time!</p>
<script type="text/javascript">
var flattr_wp_ver = '0.9.11';
var flattr_uid = '1180';
var flattr_url = 'http://tetrisrockstar.com';
var flattr_lng = 'en_GB';
var flattr_cat = 'text';
var flattr_tag = 'blog,wordpress,rss,feed';
var flattr_btn = 'large';
var flattr_tle = 'TetrisRockstar';
var flattr_dsc = 'stories from Fredrik';
</script>
<script src="http://api.flattr.com/button/load.js?v=0.2" type="text/javascript"></script> <p>Feel free to Flattr this post at <a href="http://flattr.com/" title="Flattr" target="_blank">flattr.com</a>, if you like it.</p> <p><a href="http://flattr.com/" title="Flattr" target="_blank"><img src="http://tetrisrockstar.com/wp-content/plugins/flattrss/button-compact-static-100x17.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://tetrisrockstar.com/too-much-awesome/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>280 Atlas &#8211; The future</title>
		<link>http://tetrisrockstar.com/280-atlas-the-future</link>
		<comments>http://tetrisrockstar.com/280-atlas-the-future#comments</comments>
		<pubDate>Thu, 08 Oct 2009 17:30:40 +0000</pubDate>
		<dc:creator>Fredrik Olsen</dc:creator>
				<category><![CDATA[Category]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://tetrisrockstar.com/?p=1035</guid>
		<description><![CDATA[For the non-technically inclined people reading this you could read it just to gauge my emotions and get a glimpse of the future, but this post will probably not mean much. Watch this first and read later, you can skip a bit of the start since he really doesn&#8217;t demo the new tech until after [...]]]></description>
			<content:encoded><![CDATA[<p>For the non-technically inclined people reading this you could read it just to gauge my emotions and get a glimpse of the future, but this post will probably not mean much.</p>
<p>Watch this first and read later, you can skip a bit of the start since he really doesn&#8217;t demo the new tech until after about half the video. The first half is an explanation of why the tech is needed.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="220" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=6930037&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="400" height="220" src="http://vimeo.com/moogaloop.swf?clip_id=6930037&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>For the first time in a long time I am really excited. I am giddy with expectation and I can&#8217;t stop thinking about how much I want to switch over to coding Cappuccino for all  front-end purposes.</p>
<p>I don&#8217;t <em>like</em> coding HTML, CSS and Javascript. I don&#8217;t think a lot of people actually do like it, it&#8217;s just something we do because we love the web and that&#8217;s the only way to do stuff on the web (give or take).</p>
<p>Now I now what he talks about in the video has been done before, Google don&#8217;t spend ages coding HTML, CSS and JS, they use Google Web Toolkit. But I&#8217;ve attempted to try GWT but just can&#8217;t get it to work. It&#8217;s very un-mac like and I frankly can&#8217;t even be bothered to get into it.</p>
<p>These guys in the video on the other hand. This shit will rock. Not only does it provide a nice way to interface your app, it provides you with built-in code modularity. I can break up my different front-end functions into modules and have the UI builder automatically interact with the application code.</p>
<p>I have <em>a lot</em> of ideas. Most of them I don&#8217;t have time or knowledge to follow through on, but recently I&#8217;ve gotten two ideas I <em>do</em> really want to follow through on! I really think they could be good things and I really want to see if they will hold up to scrutiny.</p>
<p>280 Atlas makes me want to follow through on my ideas. I&#8217;m not a great front-end developer and not graphically inclined, but Atlas gives me a decent UI to work with from scratch and if the idea holds water I can hire a graphics guy to make it great.</p>
<p>Most my ideas are <em>applications</em> and I&#8217;ve always been fascinated by desktop application development, I&#8217;ve always thought of it as a much more scientific and &#8220;structurally sound&#8221; (if that makes sense to anyone else?) process than web development. The problem is you can&#8217;t get it out there. You need some sort of vendor to deliver the app through and all my ideas involves being completely computer and OS agnostic, I.E. you should be able to use the app from any computer with any operating system anywhere in the world &#8211; that&#8217;s how everything should work.</p>
<p>With Cappuccino and Atlas, <strong><em>it could work!</em></strong></p>
<script type="text/javascript">
var flattr_wp_ver = '0.9.11';
var flattr_uid = '1180';
var flattr_url = 'http://tetrisrockstar.com';
var flattr_lng = 'en_GB';
var flattr_cat = 'text';
var flattr_tag = 'blog,wordpress,rss,feed';
var flattr_btn = 'large';
var flattr_tle = 'TetrisRockstar';
var flattr_dsc = 'stories from Fredrik';
</script>
<script src="http://api.flattr.com/button/load.js?v=0.2" type="text/javascript"></script> <p>Feel free to Flattr this post at <a href="http://flattr.com/" title="Flattr" target="_blank">flattr.com</a>, if you like it.</p> <p><a href="http://flattr.com/" title="Flattr" target="_blank"><img src="http://tetrisrockstar.com/wp-content/plugins/flattrss/button-compact-static-100x17.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://tetrisrockstar.com/280-atlas-the-future/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>2.times { clap_hands if happy? }</title>
		<link>http://tetrisrockstar.com/2-times-clap_hands-if-happy%c2%a0</link>
		<comments>http://tetrisrockstar.com/2-times-clap_hands-if-happy%c2%a0#comments</comments>
		<pubDate>Sun, 04 Oct 2009 11:43:04 +0000</pubDate>
		<dc:creator>Fredrik Olsen</dc:creator>
				<category><![CDATA[Category]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[school]]></category>

		<guid isPermaLink="false">http://tetrisrockstar.com/?p=1030</guid>
		<description><![CDATA[Yesterday I participated in a programming contest. Unfortunately the required language was C/C++ or Java, since I have no idea what available data-structures there are in C/C++ we chose (like last year) to code in Java. But the thing is &#8211; I haven&#8217;t coded Java since sometime last year. Because it sucks. Neither had my [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I participated in a programming contest. Unfortunately the required language was C/C++ or Java, since I have no idea what available data-structures there are in C/C++ we chose (like last year) to code in Java. But the thing is &#8211; I haven&#8217;t coded Java since sometime last year. Because it sucks. Neither had my partner and we were out a third team-member.</p>
<p>This all resulted in us finishing in 37th place of 40 competing teams :P<br />
If the language had been Ruby on the other hand I do believe I would have kicked a bit more ass. We had somewhat finished solutions for 3 tasks but were just debugging for like 2 hours on two of them, so we only got one task finished.</p>
<p>The contest was followed by 8 hours of studying electrodynamics. So I spent a total of 15 hours in school&#8230; Gonna go get a shower now (after spending the morning reviewing the solutions we had for the other tasks yesterday) and then go back to school again.</p>
<p>Our team-name for the contest was &#8220;The Owl Exterminators&#8221; it&#8217;s a name I use pretty often when I can&#8217;t think of anything awesome, it&#8217;s a reference to Futurama. Though on my way home yesterday I thought of a perfect team name, it&#8217;s witty, it&#8217;s Ruby and it shows how beautiful Ruby can be, it is the title of this post.</p>
<script type="text/javascript">
var flattr_wp_ver = '0.9.11';
var flattr_uid = '1180';
var flattr_url = 'http://tetrisrockstar.com';
var flattr_lng = 'en_GB';
var flattr_cat = 'text';
var flattr_tag = 'blog,wordpress,rss,feed';
var flattr_btn = 'large';
var flattr_tle = 'TetrisRockstar';
var flattr_dsc = 'stories from Fredrik';
</script>
<script src="http://api.flattr.com/button/load.js?v=0.2" type="text/javascript"></script> <p>Feel free to Flattr this post at <a href="http://flattr.com/" title="Flattr" target="_blank">flattr.com</a>, if you like it.</p> <p><a href="http://flattr.com/" title="Flattr" target="_blank"><img src="http://tetrisrockstar.com/wp-content/plugins/flattrss/button-compact-static-100x17.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://tetrisrockstar.com/2-times-clap_hands-if-happy%c2%a0/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running thinking-sphinx with wrong version</title>
		<link>http://tetrisrockstar.com/thinking-sphinx</link>
		<comments>http://tetrisrockstar.com/thinking-sphinx#comments</comments>
		<pubDate>Wed, 02 Sep 2009 09:30:18 +0000</pubDate>
		<dc:creator>Fredrik Olsen</dc:creator>
				<category><![CDATA[Category]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://tetrisrockstar.com/?p=974</guid>
		<description><![CDATA[I recently tried setting up sphinx on a rails app with thinking-sphinx and ran into a bit of an issue. ERROR: malformed or unknown option near &#8216;&#8211;pidfile&#8217;. That was the error message I got and this appeared when trying to start the sphinx server with rake ts:start or rake ts:rebuild. I installed sphinx via MacPorts [...]]]></description>
			<content:encoded><![CDATA[<p>I recently tried setting up sphinx on a rails app with thinking-sphinx and ran into a bit of an issue.</p>
<blockquote style="padding-bottom: 0px"><p>ERROR: malformed or unknown option near &#8216;&#8211;pidfile&#8217;.</p></blockquote>
<p>That was the error message I got and this appeared when trying to start the sphinx server with rake ts:start or rake ts:rebuild.</p>
<p>I installed sphinx via MacPorts and it turns out this (still) installs the 0.9.7 version and not the 0.9.8 version, and apparently the &#8211;pidfile option did not arrive until 0.9.8.</p>
<p>What I did to solve the problem was follow the guide here: <a title="Installing Sphinx" href="http://www.viget.com/extend/installing-sphinx-on-os-x-leopard" target="_blank">http://www.viget.com/extend/installing-sphinx-on-os-x-leopard</a></p>
<p>Even though i had installed it via MacPorts I still needed to install iconv and expat to get sphinx to properly compile.</p>
<p>If anyone else out there on the internets has had this problem and finds this &#8212; i hope it was useful.</p>
<script type="text/javascript">
var flattr_wp_ver = '0.9.11';
var flattr_uid = '1180';
var flattr_url = 'http://tetrisrockstar.com';
var flattr_lng = 'en_GB';
var flattr_cat = 'text';
var flattr_tag = 'blog,wordpress,rss,feed';
var flattr_btn = 'large';
var flattr_tle = 'TetrisRockstar';
var flattr_dsc = 'stories from Fredrik';
</script>
<script src="http://api.flattr.com/button/load.js?v=0.2" type="text/javascript"></script> <p>Feel free to Flattr this post at <a href="http://flattr.com/" title="Flattr" target="_blank">flattr.com</a>, if you like it.</p> <p><a href="http://flattr.com/" title="Flattr" target="_blank"><img src="http://tetrisrockstar.com/wp-content/plugins/flattrss/button-compact-static-100x17.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://tetrisrockstar.com/thinking-sphinx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing MySQL correctly on OS X</title>
		<link>http://tetrisrockstar.com/installing-mysql-correctly-on-os-x</link>
		<comments>http://tetrisrockstar.com/installing-mysql-correctly-on-os-x#comments</comments>
		<pubDate>Sun, 17 May 2009 19:42:09 +0000</pubDate>
		<dc:creator>Fredrik Olsen</dc:creator>
				<category><![CDATA[Category]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://tetrisrockstar.com/?p=732</guid>
		<description><![CDATA[If you don&#8217;t want to install MySQL via MacPorts for whatever reason and want a clean installation to work with Ruby on Rails and the mysql gem, you need to do this: Go to http://dev.mysql.com/downloads/ to get the latest version of MySQL (by clicking on Download for Community Server). Download the Mac OS X package [...]]]></description>
			<content:encoded><![CDATA[<p>If you don&#8217;t want to install MySQL via <a title="macports" href="http://www.macports.org/" target="_blank">MacPorts</a> for whatever reason and want a clean installation to work with Ruby on Rails and the mysql gem, you need to do this:</p>
<p>Go to <a title="MySQL Download" href="http://dev.mysql.com/downloads/" target="_blank">http://dev.mysql.com/downloads/</a> to get the latest version of MySQL (by clicking on Download for Community Server). Download the Mac OS X package format and choose Mac OS X 10.5 (x86). Important here is to <strong>choose x86, <em>not</em> x86_64</strong>. The pre-installed version of Ruby on the Mac is not 64 bit so installing the 64 bit compiled MySQL will cause them to not play nice together. Install it and the StartupItem so it starts with the computer.</p>
<p>Then when you need to install the mysql gem (because the mysql gem won&#8217;t install correctly from scratch and throws some nasty errors), you have to give it some information on where MySQL is installed. So run this:</p>
<blockquote><p>sudo env ARCHFLAGS=&#8221;-arch i386&#8243; gem install mysql &#8212; \<br />
&#8211;with-mysql-dir=/usr/local/mysql &#8211;with-mysql-lib=/usr/local/mysql/lib \<br />
&#8211;with-mysql-include=/usr/local/mysql/include</p></blockquote>
<p>Many thanks to <a title="wonko" href="http://wonko.com/post/how-to-install-the-mysqlruby-gem-on-mac-os-x-leopard" target="_blank">wonko.com</a> who helped me solving this problem. I am posting it here in hopes that it might show up on google for someone else that need the problem fixed.</p>
<script type="text/javascript">
var flattr_wp_ver = '0.9.11';
var flattr_uid = '1180';
var flattr_url = 'http://tetrisrockstar.com';
var flattr_lng = 'en_GB';
var flattr_cat = 'text';
var flattr_tag = 'blog,wordpress,rss,feed';
var flattr_btn = 'large';
var flattr_tle = 'TetrisRockstar';
var flattr_dsc = 'stories from Fredrik';
</script>
<script src="http://api.flattr.com/button/load.js?v=0.2" type="text/javascript"></script> <p>Feel free to Flattr this post at <a href="http://flattr.com/" title="Flattr" target="_blank">flattr.com</a>, if you like it.</p> <p><a href="http://flattr.com/" title="Flattr" target="_blank"><img src="http://tetrisrockstar.com/wp-content/plugins/flattrss/button-compact-static-100x17.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://tetrisrockstar.com/installing-mysql-correctly-on-os-x/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Objective-C</title>
		<link>http://tetrisrockstar.com/objective-c</link>
		<comments>http://tetrisrockstar.com/objective-c#comments</comments>
		<pubDate>Mon, 04 May 2009 20:18:32 +0000</pubDate>
		<dc:creator>Fredrik Olsen</dc:creator>
				<category><![CDATA[Category]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://tetrisrockstar.com/?p=708</guid>
		<description><![CDATA[Jag har börjat &#8220;gå&#8221; en kurs på distans, från Stanford. De spelar in alla föreläsningar och lägger ut som videos som är gratis att ladda ner via iTunes. http://www.stanford.edu/class/cs193p/cgi-bin/index.php Det där är kurshemsidan och där kan man få tag i föreläsnings-slides och inlämningsuppgifter. Jag har gått igenom de 3 första föreläsningarna och gjort inlämningsuppgift 1A, [...]]]></description>
			<content:encoded><![CDATA[<p>Jag har börjat &#8220;gå&#8221; en kurs på distans, från Stanford. De spelar in alla föreläsningar och lägger ut som videos som är gratis att ladda ner via iTunes.</p>
<p><a title="Stanford CS193P" href="http://www.stanford.edu/class/cs193p/cgi-bin/index.php" target="_blank">http://www.stanford.edu/class/cs193p/cgi-bin/index.php</a></p>
<p>Det där är kurshemsidan och där kan man få tag i föreläsnings-slides och inlämningsuppgifter. Jag har gått igenom de 3 första föreläsningarna och gjort inlämningsuppgift 1A, 1B samt 2A.</p>
<p>Kursen handlar om iPhone programmering och språket som man gör det i: Objective-C.</p>
<p>Jag har gått en kurs på LTH i C-programmering och har kodat väldigt mycket dynamiska språk privat (läs: Ruby). Men det här äktenskapet av C och dynamiken i Obj-C är, väldigt obskyr &#8212; men otroligt skön!</p>
<p>Man har full kontroll över all minneshantering och man har fantastiskt granularitet i kontrollen, samtidigt som det är kraftigt, lätthanterligt och snabbt att skriva. Vad jag inte stött på är någon form av funktionsprogrammering, motsvarande Proc och lambda i Ruby, men det borde väl finnas eller?</p>
<p>Hur som helst är det väldigt kul språk, men det känns <span style="text-decoration: underline;">väldigt</span> konstigt att sitta och koda C på ett dynamiskt vis och med riktiga klasser.</p>
<p>Jag ska försöka slutföra hela kursen, slutprojektet är en <a title="twitter" href="http://twitter.com" target="_blank">twitter</a>applikation för iPhonen.</p>
<p>Ett pluspoäng med allting är ju att Objective-C är programspråket som används för nästan all Mac-programmering, så att kunna det är nog ett ganska stort förkunskapskrav för att bli anställd på Apple. Det är ju dessutom kul ifall man vill göra ett litet roligt mac-program någon gång.</p>
<script type="text/javascript">
var flattr_wp_ver = '0.9.11';
var flattr_uid = '1180';
var flattr_url = 'http://tetrisrockstar.com';
var flattr_lng = 'en_GB';
var flattr_cat = 'text';
var flattr_tag = 'blog,wordpress,rss,feed';
var flattr_btn = 'large';
var flattr_tle = 'TetrisRockstar';
var flattr_dsc = 'stories from Fredrik';
</script>
<script src="http://api.flattr.com/button/load.js?v=0.2" type="text/javascript"></script> <p>Feel free to Flattr this post at <a href="http://flattr.com/" title="Flattr" target="_blank">flattr.com</a>, if you like it.</p> <p><a href="http://flattr.com/" title="Flattr" target="_blank"><img src="http://tetrisrockstar.com/wp-content/plugins/flattrss/button-compact-static-100x17.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://tetrisrockstar.com/objective-c/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Skitskum iPhone bugg</title>
		<link>http://tetrisrockstar.com/skitskum-iphone-bugg</link>
		<comments>http://tetrisrockstar.com/skitskum-iphone-bugg#comments</comments>
		<pubDate>Thu, 29 Jan 2009 23:08:26 +0000</pubDate>
		<dc:creator>Fredrik Olsen</dc:creator>
				<category><![CDATA[Category]]></category>
		<category><![CDATA[emma]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://tetrisrockstar.com/?p=616</guid>
		<description><![CDATA[Jag har upptäckt min första bugg med iPhonen. Det vill säga riktiga bugg och inte bara feature brist eller något. Jag upptäckte det först för några veckor sen. Jag skulle skriva &#8220;Läget&#8221; till Emma i ett sms, men skrev fel, skrev &#8220;Lager&#8221;. Sudda ut allting och skrev det igen, återigen blev det &#8220;Lager&#8221;. Tänkte wtf? [...]]]></description>
			<content:encoded><![CDATA[<p>Jag har upptäckt min första bugg med iPhonen. Det vill säga riktiga bugg och inte bara feature brist eller något. Jag upptäckte det först för några veckor sen. Jag skulle skriva &#8220;Läget&#8221; till Emma i ett sms, men skrev fel, skrev &#8220;Lager&#8221;. Sudda ut allting och skrev det igen, återigen blev det &#8220;Lager&#8221;. Tänkte wtf? Rättar den &#8220;Laget&#8221; till &#8220;Lager&#8221; eller vad?<br />
Skrev en gång till långsamt denna gången, och till min förvåning gick det inte att trycka på T!<br />
Jag kunde skriva T när som helst hur som helst, det går att skriva &#8220;laget&#8221; var som helst annars i ett sms. Men när det är ordet &#8220;Laget&#8221; först i sms:et så går det inte att skriva T!</p>
<p>Jag fick bekräftat att det var en bugg och inte bara något fel med min telefon genom att Emma hade exakt samma problem. Helt fantastiskt konstigt!</p>
<script type="text/javascript">
var flattr_wp_ver = '0.9.11';
var flattr_uid = '1180';
var flattr_url = 'http://tetrisrockstar.com';
var flattr_lng = 'en_GB';
var flattr_cat = 'text';
var flattr_tag = 'blog,wordpress,rss,feed';
var flattr_btn = 'large';
var flattr_tle = 'TetrisRockstar';
var flattr_dsc = 'stories from Fredrik';
</script>
<script src="http://api.flattr.com/button/load.js?v=0.2" type="text/javascript"></script> <p>Feel free to Flattr this post at <a href="http://flattr.com/" title="Flattr" target="_blank">flattr.com</a>, if you like it.</p> <p><a href="http://flattr.com/" title="Flattr" target="_blank"><img src="http://tetrisrockstar.com/wp-content/plugins/flattrss/button-compact-static-100x17.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://tetrisrockstar.com/skitskum-iphone-bugg/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Could You Explain Programming Please</title>
		<link>http://tetrisrockstar.com/could-you-explain-programming-please</link>
		<comments>http://tetrisrockstar.com/could-you-explain-programming-please#comments</comments>
		<pubDate>Tue, 13 Jan 2009 00:54:52 +0000</pubDate>
		<dc:creator>Fredrik Olsen</dc:creator>
				<category><![CDATA[Category]]></category>
		<category><![CDATA[comedy]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://tetrisrockstar.com/?p=534</guid>
		<description><![CDATA[Him: Hey, you&#8217;re good with computers right? Me: Yes. Him: And you know how to program computers? Me: Yes, that&#8217;s my job actually. Him: Could you explain programming please? Me: I&#8217;m sorry, what do you mean? Him: I want to make a game like Halo, but I don&#8217;t know how to start. Could you explain [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Him: Hey, you&#8217;re good with computers right?</p>
<p>Me: Yes.</p>
<p>Him: And you know how to program computers?</p>
<p>Me: Yes, that&#8217;s my job actually.</p>
<p>Him: Could you explain programming please?</p>
<p>Me: I&#8217;m sorry, what do you mean?</p>
<p>Him: I want to make a game like Halo, but I don&#8217;t know how to start. Could you explain what I need to do?</p>
<p>Me: You should probably go to the library and get a book.</p>
<p>Him: Can you just tell me what I need to do?</p>
<p>Me: Wait a minute. Are you asking me to explain how to program computers?</p>
<p>Him: Yeah.</p>
<p>Me: Over the phone?</p>
<p>Him: Yeah.</p></blockquote>
<p>via <a href="http://thedailywtf.com/Articles/Could-You-Explain-Programming-Please.aspx">Could You Explain Programming Please &#8211; The Daily WTF</a>.</p>
<script type="text/javascript">
var flattr_wp_ver = '0.9.11';
var flattr_uid = '1180';
var flattr_url = 'http://tetrisrockstar.com';
var flattr_lng = 'en_GB';
var flattr_cat = 'text';
var flattr_tag = 'blog,wordpress,rss,feed';
var flattr_btn = 'large';
var flattr_tle = 'TetrisRockstar';
var flattr_dsc = 'stories from Fredrik';
</script>
<script src="http://api.flattr.com/button/load.js?v=0.2" type="text/javascript"></script> <p>Feel free to Flattr this post at <a href="http://flattr.com/" title="Flattr" target="_blank">flattr.com</a>, if you like it.</p> <p><a href="http://flattr.com/" title="Flattr" target="_blank"><img src="http://tetrisrockstar.com/wp-content/plugins/flattrss/button-compact-static-100x17.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://tetrisrockstar.com/could-you-explain-programming-please/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The DreamHack Game</title>
		<link>http://tetrisrockstar.com/the-dreamhack-game-2</link>
		<comments>http://tetrisrockstar.com/the-dreamhack-game-2#comments</comments>
		<pubDate>Fri, 26 Dec 2008 21:49:30 +0000</pubDate>
		<dc:creator>Fredrik Olsen</dc:creator>
				<category><![CDATA[Category]]></category>
		<category><![CDATA[dhg]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://tetrisrockstar.com/?p=506</guid>
		<description><![CDATA[Nu har jag äntligen fått tummen ur när det gäller DreamHack Game applikationen. Den sidan som serverar hela vårt spel under eventet DreamHack. När det kodades från början var det väl nog inte direkt tänkt som ett långvarigt och hållbart system som vi skulle använda för alltid. Det kodades ihop väldigt snabbt. Men i ärlighetens [...]]]></description>
			<content:encoded><![CDATA[<p>Nu har jag äntligen fått tummen ur när det gäller DreamHack Game applikationen. Den sidan som serverar hela vårt spel under eventet DreamHack.</p>
<p>När det kodades från början var det väl nog inte direkt tänkt som ett långvarigt och hållbart system som vi skulle använda för alltid. Det kodades ihop väldigt snabbt. Men i ärlighetens namn har det fungerat väl, det har bara saknat en hel del funktioner och småsaker här och där som har gjort det minst sagt suboptimalt att använda. Till exempel fanns det inget stöd för filuppladdning, man var tvungen att lägga till filen i filsystemet, commita till git repo&#8217;t, pusha och deploya för att få upp en bild.</p>
<p>Men nu har allt det förändrats!<br />
För det första flyttade jag ut det 10-20 tal funktioner ur admin controllern som inte borde vara där. Jag bytte också ut hela auth systemet mot <a title="restful_authentication" href="https://github.com/technoweenie/restful-authentication/tree" target="_blank">restful_authentication</a>, vilket är tidernas  bästa plugin IMO. Jag har gjort alla controllers RESTful i den utsträckning jag har kunnat, och de som inte följer direkta Rails REST-regler har ändå ett ganska hyffsat vettigt gränssnitt. All kod ligger där den bör ligga kan man säga helt enkelt.</p>
<p>För att råda bot på uppladdningsproblemen skapade jag en ny modell vars enda syfte var att hålla attachments från <a title="paperclip" href="https://github.com/thoughtbot/paperclip/tree" target="_blank">paperclip</a>, ytterligare ett fantastiskt härligt plugin som har gjort mitt liv lättare att leva. Sedan har en task flera sånna här attachments, vilket gör att man kan ladda upp alla typer av filer direkt från webbgränsnittet, och med en smart symlink så behålls filerna genom deploys och alla lever lyckligt.</p>
<p>Dessutom har jag tillåtit att man skriver in HTML i uppgiftsbeskrivningen vilket gör det onödigt att ladda upp en partial sålänge man inte vill köra ruby kod eller lite tyngre javascript. Precis så som jag tycker det ska vara.</p>
<p>Men en fantastiskt härlig sak som jag upptäckte, och ytterligare ett härligt plugin, är <a title="clickatell" href="http://github.com/lukeredpath/clickatell/tree/master" target="_blank">Clickatell</a>, clickatell är ett företag som erbjuder SMS-gateways, det vill säga man kan skicka SMS från datorn. Man var tvungen att köpa 400 credits och ett sms kostar 0.8 credits. Det kostade ungefär 200kr, vilket ger mig mer än nog med SMS. Men hur som helst, jag använder det för att skicka ett SMS till ett antal mottagare varje gång någon klarar en uppgift första gången. På det sättet hålls vi admins konstant uppdaterade på all progress som görs hos spelarna.</p>
<p>Det står en del saker kvar på önskelistan, men för första gången känner jag att systemet faktiskt ser snyggt ut och att det faktiskt <em>går</em> att bygga vidare på. Det går faktiskt att göra någonting med det! Det är inte bara en enda stor röra av snabbt skriven kod som det var innan. Det finns struktur!</p>
<p>Allt som allt har jag väl lagt ungefär 16 timmar på det över 2 dagar nu. Men det har det varit värt, jag har lärt mig en del, det har varit kul att göra och nu kommer alla DH Game framöver vara enormt mycket softare!</p>
<script type="text/javascript">
var flattr_wp_ver = '0.9.11';
var flattr_uid = '1180';
var flattr_url = 'http://tetrisrockstar.com';
var flattr_lng = 'en_GB';
var flattr_cat = 'text';
var flattr_tag = 'blog,wordpress,rss,feed';
var flattr_btn = 'large';
var flattr_tle = 'TetrisRockstar';
var flattr_dsc = 'stories from Fredrik';
</script>
<script src="http://api.flattr.com/button/load.js?v=0.2" type="text/javascript"></script> <p>Feel free to Flattr this post at <a href="http://flattr.com/" title="Flattr" target="_blank">flattr.com</a>, if you like it.</p> <p><a href="http://flattr.com/" title="Flattr" target="_blank"><img src="http://tetrisrockstar.com/wp-content/plugins/flattrss/button-compact-static-100x17.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://tetrisrockstar.com/the-dreamhack-game-2/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
