<?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>Create your own games&#187; Game Creation Blog by Koonsolo</title>
	<atom:link href="http://dev.koonsolo.com/category/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://dev.koonsolo.com</link>
	<description>A blog on how to create your own computer games (by Koen Witters)</description>
	<lastBuildDate>Fri, 20 Aug 2010 19:09:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>This blog has moved! Please update your RSS Readers.</title>
		<link>http://www.koonsolo.com/news/</link>
		<comments>http://www.koonsolo.com/news/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 19:09:20 +0000</pubDate>
		<dc:creator>Koen Witters</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://dev.koonsolo.com/?p=262</guid>
		<description><![CDATA[I moved this blog to http://www.koonsolo.com/news. Please point your RSS readers to the new blog! All posts on this blog have also been moved to the new one  .
 ]]></description>
			<content:encoded><![CDATA[<p>I moved this blog to <a href="http://www.koonsolo.com/news/">http://www.koonsolo.com/news</a>. Please point your RSS readers to the new blog! All posts on this blog have also been moved to the new one <img src='http://dev.koonsolo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
 <img src="http://dev.koonsolo.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=262" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.koonsolo.com/news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turn your workplace into an RPG</title>
		<link>http://www.koonsolo.com/news/turn-your-workplace-into-an-rpg/</link>
		<comments>http://www.koonsolo.com/news/turn-your-workplace-into-an-rpg/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 19:19:57 +0000</pubDate>
		<dc:creator>Koen Witters</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://dev.koonsolo.com/?p=222</guid>
		<description><![CDATA[Have you heard of EpicWin? It&#8217;s an application for the iPhone that turns your todo list into a real life RPG. For every task you complete, you gain XP. This is a brilliant concept! It turns your boring todo list into something fun. Just watch the video below to get the idea.


I was just thinking: [...]]]></description>
			<content:encoded><![CDATA[<p>Have you heard of <a href="http://www.epicwinapp.com/">EpicWin</a>? It&#8217;s an application for the iPhone that turns your todo list into a real life RPG. For every task you complete, you gain XP. This is a brilliant concept! It turns your boring todo list into something fun. Just watch the video below to get the idea.</p>
<p><span id="more-222"></span></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" 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://www.youtube.com/v/AmKwF_Si734&amp;hl=en_US&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube.com/v/AmKwF_Si734&amp;hl=en_US&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>I was just thinking: If you can do this for your todo list, why not do it for your bug tracking system? And the more I thought about it, the more it made sense. Every decent developer team uses a bugtracker (such as Bugzilla or Trac): a tester opens a new bug, a developer fixes it, the tester checks if it&#8217;s fixed and closes the bug&#8230; BORING!</p>
<p>What if a tester (aka Bug Summoner) searches for bugs, and when he finds one, summons a new Bug into the RPG bugtracker system. The developer (aka Bug Slayer) checks if it&#8217;s a valid bug. And if it is, he sends back XP to the Bug Summoner (because he found a valid bug). The Bug Slayer then kills that nasty bug. The Bug Summoner checks if it&#8217;s really dead, and if it is, the Bug Slayer receives XP. If it&#8217;s not dead, the Bug Summoner revives the bug and someone has to slay it properly.</p>
<p>You can even take this further and let your whole workplace run on an RPG system! Lots of employees procrastinate by playing games on Facebook during work hours. So why not let them play the Workplace RPG? Productivity is aligned with RPG goals. Gaining an XP level can give you a better company car, an extra vacation day, a raise, etc. Instead of hating Monday&#8217;s, you can now look forward to receiving those last eXperience Points to increase your skills or level up, or becoming the company&#8217;s &#8220;Slayer of the month&#8221;.</p>
<p>For managers or company owners this also makes sense. Having clear metrics on how well each individual is performing is priceless. Of course you will have to align the RPG rules with the company business goals.</p>
<p>After a quick search on Google I noticed <a href="http://news.bbc.co.uk/2/hi/technology/7030234.stm">this other article</a> with the same general idea. So am I just dreaming or could this actually work in an IT workplace? And would you want to work in such an environment?</p>
<p><em>Koen Witters</em></p>
<p><a href="http://twitter.com/koonsolo"><em>Follow me on twitter</em></a></p>
 <img src="http://dev.koonsolo.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=222" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.koonsolo.com/news/turn-your-workplace-into-an-rpg/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Object Oriented Programming doesn&#8217;t need Encapsulation</title>
		<link>http://www.koonsolo.com/news/object-oriented-programming-doesnt-need-encapsulation/</link>
		<comments>http://www.koonsolo.com/news/object-oriented-programming-doesnt-need-encapsulation/#comments</comments>
		<pubDate>Sat, 10 Apr 2010 13:20:40 +0000</pubDate>
		<dc:creator>Koen Witters</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://dev.koonsolo.com/?p=213</guid>
		<description><![CDATA[Note: I use the term &#8216;Encapsulation&#8217; as a language mechanism for restricting access to some of the object&#8217;s components. Others might call this &#8216;information hiding&#8217;. 
Traditional Object Oriented Programming
In every object orientend programming course or book that I know, you get introduced to a concept called encapsulation. Encapsulation is a technique that allows you to [...]]]></description>
			<content:encoded><![CDATA[<p><em>Note: I use the term &#8216;Encapsulation&#8217; as a language mechanism for restricting access to some of the object&#8217;s components. Others might call this &#8216;information hiding&#8217;. </em></p>
<h3>Traditional Object Oriented Programming</h3>
<p>In every object orientend programming course or book that I know, you get introduced to a concept called encapsulation. Encapsulation is a technique that allows you to protect implementation details while exposing only the interface. The advantage is that the rest of the code can only use the interface, and therefore is not dependent on the hidden implementation.</p>
<p>The thought behind the whole idea of encapsulation is that when implementing a class, you protect it against misuse. You make sure that the user can&#8217;t break it. You have total control over your class, and the user can only use that what you allow him to use. Another advantage is that providing a stable interface will protect implementation details that are likely to change, and therefore limiting interdependencies between software components. That is, it forces the users to do so.</p>
<p>Most Object Oriented programmers totally agree with all of the above, and I used to too. But that was until I met python.<span id="more-213"></span></p>
<h3>OOP without Encapsulation?</h3>
<p>Python supports Object Oriented Programming, but it doesn&#8217;t support encapsulation. Now how is that possible? Various OO programmers asked the same question in the python user group, and the end conclusion is pretty simple: you don&#8217;t need encapsulation for OO. In python everything is public, you just put and underscore before members or methods that are not part of the interface. If the user is going to use them, it&#8217;s at their own risk. Python programmers refer to it as &#8220;encapsulation by convention rather than enforcement&#8221;. But essentially it&#8217;s not encapsulation or data hiding at all. If you ask yourself why this would be an improvement, you probably don&#8217;t know that in some rare cases, it is necessary to access the implementation. Let me explain below.</p>
<h3>Using the &#8216;computer&#8217; metaphor</h3>
<p>I have this computer on my desk, and it&#8217;s a nice piece of engineering. It has a public interface which is clean and simple; On the front it has 2 buttons &#8220;Power&#8221; and &#8220;Reset&#8221;, and a few leds to show if it&#8217;s on or if the hard disk is accessed. On the back it has connectors where I can plug in the power, network, keyboard, mouse, screen, etc. .</p>
<p>When it&#8217;s broken or I want to upgrade, I can just buy a new one and it will provide me with the same interface.</p>
<p>What my computer doesn&#8217;t use, is proper encapsulation. Remember that encapsulation is restricting access to some of the underlying components. But with my computer, I can pop open the hood and do anything I want. The hardware manufacturer didn&#8217;t restrict my access to the underlying components, and I&#8217;m glad he didn&#8217;t. The thing is, when I open the computer case, I know 2 things:</p>
<ol>
<li>I might break stuff</li>
<li>Components inside the computer will probably change when I buy a new one.</li>
</ol>
<p>This is exactly what encapsulation is trying to prevent. But you know what, I want to have a choice. I want to be able to put a new hard drive or silent fan in there, and yes, I know the risks, and know a new computer probably won&#8217;t support them anymore. But as a user, it&#8217;s my responsibility to make the correct decisions for solving my problems.</p>
<p>So what would happen when the hardware manufacturer did use encapsulation. Well, then he would make it extremely difficult for you to open the case, and anytime you want something changed you need to go back to the shop.</p>
<p>Encapsulation restricts access to implementation details. While I&#8217;m not saying you should access implementation details, sometimes it might be handy to do so. With hardware I&#8217;m glad they don&#8217;t restrict me opening up the hood, so why would I like it in software?</p>
<h3>Abstraction instead of Encapsulation</h3>
<p>One definition of abstraction states: &#8216;the act of considering something as a general quality or characteristic, apart from concrete realities, specific objects, or actual instances.&#8217;. In programming terms this means that you provide an interface on top of an implementation, but the user only needs to know the interface (abstraction), and not care about the implementation details.<br />
The difference with encapsulation is that when the user wants to, he can still access the underlying details.</p>
<p>Most hardware uses abstraction instead of encapsulation. They provide an interface that&#8217;s not likely to change, but still allow &#8220;power users&#8221; to pop open the hood and access the implementation.</p>
<p>When using abstraction instead of encapsulation, the user can clearly see the interface, and use it in the same manner as with encapsulation. Users are encouraged to use the public interface, but are not restricted to it. When only using the interface, abstraction has the same benefits of encapsulation. But when needed he can also access the implementation behind it. And because of the clear distinction between interface and implementation, he is aware of the risks involved (ie breaking things and future incompatibility).</p>
<h3>A real world programming example</h3>
<p>Let me show you how this might work in the real world of programming. Suppose I&#8217;m writing an application that uses a multiplatform GUI library. Multiplatform libraries are great because they make porting really easy. Their public interface is the same across platforms, and so the method calls don&#8217;t need to be adapted when switching platforms.</p>
<p>Now suppose the Windows users of our application are requesting a certain feature. That features is not supported by the GUI library, but it is available in the underlying Windows implementation of that library (because MFC supports it for example).</p>
<p>At that point you must take a decision: If you respect encapsulation, you are limited to the following things:</p>
<ol>
<li>Implement it yourself on top of the GUI library, but this could mean rewriting a whole GUI control yourself (duplicating both the code of the GUI control, and the code of the MFC feature you want).</li>
<li>Contact the GUI library vendor to make it available in their public interface, but this also means they have to implement it themselves on all non-Windows platforms. In other words, you won&#8217;t have it available soon.</li>
<li>Switch your windows code over to a Windows specific GUI library. This will cost you some serious time, money and headaces.</li>
</ol>
<p>What if you would drop encapsulation and use abstraction? Well, in that case you still have the options above, but also an extra one. You&#8217;re able to access implemenation details, but then you will have to consider the risks:</p>
<ul>
<li>Accessing it is risky for breaking other parts of the GUI Library</li>
<li>Updates of that library might change the way they use MFC, so you will have to double check it every time you upgrade</li>
<li>Probably no official support for that from the Library Vendor</li>
</ul>
<p>The thing is, by using abstraction instead of encapsulation, you do have a choice whether the benefits outweigh the risks. And in this case, that&#8217;s probably correct. But remember, I&#8217;m not encouraging anyone to use implementation details, but in specific cases, it might be the best solution.</p>
<h3>How I do it</h3>
<p>Because Python doesn&#8217;t support encapsulation, I don&#8217;t have to do anything specific to use abstraction instead of encapsulation. I follow the conventions of putting underscores in front of methods and members, to make the distinction clear between interface and implementation. My users should only use my public interfaces, but if they really need to, they can &#8216;pop open the hood&#8217; pretty easily.</p>
<p>In more traditional object oriented languages, I use &#8216;public&#8217; for my public interface, and &#8216;protected&#8217; for my implementation details. You probably know the following expression from the &#8216;Gang of Four&#8217;: &#8220;Because inheritance exposes a subclass to details of its parent&#8217;s implementation, it&#8217;s often said that &#8216;inheritance breaks encapsulation&#8217;&#8221;. That last part is exaclty what I need for my abstraction <img src='http://dev.koonsolo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . My users use the public interface, but if they really want to, they can access all implementation details by deriving their own version from it.<br />
This also speeds up my development, because I don&#8217;t have to break my head over whether I should use private, package-private, protected or public. I use public for my interface, and protected for implementation details. I love to <em>Keep It Stupid Simple</em>.</p>
<h3>Encapsulation is not Security</h3>
<p>Sometimes it <em>is</em> necessary to protect or hide some data from the user. But in this case we are talking about security, and the worst way to implement security is through Object Oriented encapsulation.</p>
<h3>Conclusion</h3>
<p>Depending on implementation details is a bad idea. Therefore you should only use the public interface of a class. But for specific or unforeseen needs, it might be useful to be able to access implementation details. It&#8217;s the responsibility of the class to be as useful as possible, and the responsibility of the user to use it in a professional manner. Don&#8217;t treat your users like idiots, but treat them like professionals who make use of your class the best way possible, to solve their specific problems. If they to need access the implementation details, they probably have a good reason to do so, because else they wouldn&#8217;t. So don&#8217;t treat them like idiots by using encapsulation.</p>
<p>Koen Witters</p>
<p><a href="http://twitter.com/koonsolo"><em>Follow me on twitter</em></a></p>
 <img src="http://dev.koonsolo.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=213" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.koonsolo.com/news/object-oriented-programming-doesnt-need-encapsulation/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Get motivated: Ralph Bakshi</title>
		<link>http://www.koonsolo.com/news/get-motivated-ralph-bakshi/</link>
		<comments>http://www.koonsolo.com/news/get-motivated-ralph-bakshi/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 05:27:41 +0000</pubDate>
		<dc:creator>Koen Witters</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://dev.koonsolo.com/?p=86</guid>
		<description><![CDATA[As a kid I saw the animation movie Fire &#38; Ice, and absolutely loved it. Back then I didn&#8217;t know the creator was successfully competing with a big corporation like Disney. You should definitely check out this video with the creator of that animation movie, Ralph Bakshi, on how to compete as a small studio.

 [...]]]></description>
			<content:encoded><![CDATA[<p>As a kid I saw the animation movie Fire &amp; Ice, and absolutely loved it. Back then I didn&#8217;t know the creator was successfully competing with a big corporation like Disney. You should definitely check out this video with the creator of that animation movie, Ralph Bakshi, on how to compete as a small studio.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" 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://www.youtube.com/v/WApcUBcVMos&amp;hl=en&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/WApcUBcVMos&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
 <img src="http://dev.koonsolo.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=86" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.koonsolo.com/news/get-motivated-ralph-bakshi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get motivated: Gary Vaynerchuk</title>
		<link>http://www.koonsolo.com/news/get-motivated-gary-vaynerchuk/</link>
		<comments>http://www.koonsolo.com/news/get-motivated-gary-vaynerchuk/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 08:09:31 +0000</pubDate>
		<dc:creator>Koen Witters</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://dev.koonsolo.com/?p=83</guid>
		<description><![CDATA[Feeling down? Then watch this great motivational speech of Gary Vaynerchuk. He&#8217;s funny, angry and energetic, and can surely get the message across.

 ]]></description>
			<content:encoded><![CDATA[<p>Feeling down? Then watch this great motivational speech of Gary Vaynerchuk. He&#8217;s funny, angry and energetic, and can surely get the message across.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" 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://www.youtube.com/v/EhqZ0RU95d4&amp;hl=en&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/EhqZ0RU95d4&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
 <img src="http://dev.koonsolo.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=83" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.koonsolo.com/news/get-motivated-gary-vaynerchuk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Overcoming procrastination: Just do it!</title>
		<link>http://www.koonsolo.com/news/overcoming-procrastination-just-do-it/</link>
		<comments>http://www.koonsolo.com/news/overcoming-procrastination-just-do-it/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 07:19:44 +0000</pubDate>
		<dc:creator>Koen Witters</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://dev.koonsolo.com/?p=66</guid>
		<description><![CDATA[Sometimes you want to work on your game, but you just don&#8217;t feel like it. You want to browse some forums, watch some TV, do a nap, read some articles on overcoming procrastination, &#8230; anything but to work on your game. I too have procrastinated by reading lots of articles about procrastination. That was until [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you want to work on your game, but you just don&#8217;t feel like it. You want to browse some forums, watch some TV, do a nap, read some articles on overcoming procrastination, &#8230; anything but to work on your game. I too have procrastinated by reading lots of articles about procrastination. That was until I came across this simple solution: &#8216;Just do it!&#8217;. And indeed it&#8217;s that simple, no excuses, &#8216;just do it&#8217;.</p>
<p>The only possible problem is when &#8216;it&#8217; is too big. When that happens your mind blocks. But the solution is simple: break it down until you have a small step that you can actually do, and do it. Once you&#8217;ve started, the rest will follow automatically.</p>
<p>So stop reading this article right now, think of your next step, and do it! I don&#8217;t want to hear your lazy excuses. For all I care your next step might be &#8220;move mouse to upper right corner, click on X&#8221;</p>
 <img src="http://dev.koonsolo.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=66" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.koonsolo.com/news/overcoming-procrastination-just-do-it/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Welcome</title>
		<link>http://www.koonsolo.com/news/welcome/</link>
		<comments>http://www.koonsolo.com/news/welcome/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 16:43:36 +0000</pubDate>
		<dc:creator>Koen Witters</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://dev.koonsolo.com/?p=15</guid>
		<description><![CDATA[Welcome to my brand new blog about how to create and sell your own games.
I&#8217;ll provide you all the technical, business and marketing info you need for creating your very own game development company. My plan is to publish a step-by-step, ready to use guide on how to do this.
First I&#8217;m going to publish the [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to my brand new blog about how to create and sell your own games.<br />
I&#8217;ll provide you all the technical, business and marketing info you need for creating your very own game development company. My plan is to publish a step-by-step, ready to use guide on how to do this.</p>
<p>First I&#8217;m going to publish the more popular articles from my <a href="http://dewitters.koonsolo.com">http://dewitters.koonsolo.com</a> site. Then I&#8217;ll start posting new articles for those who are just starting out, and work my way up from there.</p>
<p style="text-align: right;">Koen Witters</p>
<p style="text-align: left;">If you have suggestions for topcis you want to see covered, please leave a comment below. Thanks!</p>
 <img src="http://dev.koonsolo.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=15" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.koonsolo.com/news/welcome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
