<?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>VigorousCoding</title>
	<atom:link href="http://www.vigorouscoding.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vigorouscoding.com</link>
	<description>(iOS) Development and other Stuff – I make things work!</description>
	<lastBuildDate>Fri, 17 Feb 2012 23:14:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>The Design of Everyday Things &#8211; Donald A. Norman [Book review]</title>
		<link>http://www.vigorouscoding.com/2012/02/the-design-of-everyday-things-donald-a-norman-book-review/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-design-of-everyday-things-donald-a-norman-book-review</link>
		<comments>http://www.vigorouscoding.com/2012/02/the-design-of-everyday-things-donald-a-norman-book-review/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 21:09:11 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Broadening my horizon]]></category>

		<guid isPermaLink="false">http://www.vigorouscoding.com/?p=650</guid>
		<description><![CDATA[This review is long overdue. I read the book a while ago and gave it some time to let the information sink in &#8211; and it was a lot of information. It seemed like an odd choice for me to &#8230; <a href="http://www.vigorouscoding.com/2012/02/the-design-of-everyday-things-donald-a-norman-book-review/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This review is long overdue. I read the book a while ago and gave it some time to let the information sink in &#8211; and it was a lot of information.</p>
<p>It seemed like an odd choice for me to read because I am not a designer. I am a programmer and I wouldn&#8217;t be able to produce something beautiful if my life depended on it. Before reading this book, thats what I thought design is all about, beauty. Now I know that there are more aspects to design and the book also helped me to think more abstractly and (try to) derive interaction patterns from hardware devices and translate them to well designed user interfaces.</p>
<p>If you are interested in design &#8211; be it industrial, software or any other kind of design &#8211; you probably already read it. If not, you should probably read it.</p>
<div></div>
<p><a title="Donald A. Norman - The Design of Everyday Things" href="http://www.amazon.de/Design-Everyday-Things-Don-Norman/dp/0465067107"><img class="aligncenter size-full wp-image-369" title="Donald E. Norman - The Design of Everyday Things" src="http://www.vigorouscoding.com/wp-content/uploads/2011/12/doet.jpg" alt="" width="104" height="160" /></a> <span id="more-650"></span></p>
<p>In his book Norman takes a close look at how user interfaces are designed and tries to scientifically explain why some designs are superior to others or why one solution is prone to mistakes by the user. The examples he chose to illustrate his ideas are mostly hardware examples. I should probably mention that the book was first published in 1988, so the kind of user interfaces we are used to did not yet exist.</p>
<p>Doors are one of his pet peeves. The book is full of examples of poorly designed doors or just plain crazy doors. But he also mentions a few good examples. Especially automobile manufacturers have quite a good track record designing doors. Admittedly, they do have the advantage that doors on cars always open to the outside. Norman sums it up quite nicely:</p>
<blockquote><p>&#8220;Somehow, when a device as simple as a door has to come with an instruction manual – even a one-word manual – then it is a failure, poorly designed&#8221; (p. 87)</p></blockquote>
<p>Obviously Norman goes into much more detail than I am. His book is a lot more scientific than what I am writing here – and doors are not the only examples Norman has to offer. Just a few that stuck in my head are telephones, light switches, motorcycle turn signals, faucets, even the NES instruction manual is featured in his book.</p>
<h2>Gulf of execution vs. Gulf of Evaluation</h2>
<p>Norman describes the world and the way we interact with it in seven stages of action. We observe the world, evaluate the current state it is in and form a picture of the state we would like it to be in – a goal. From this goal we infer a sequence of actions which we think will manipulate the world in a way that it changes its current state to the desired state. After executing these sequence of actions we observes the world again and evaluate whether the current state it is in, is the state we want it to be.</p>
<p>How translates this to design? Good design is supposed to provide actions that correspond to the users intentions. Norman calls the difference between the allowable actions and the users intentions the <em>gulf of execution</em>.</p>
<p>Good design is also supposed to provide directly perceivable physical representation which can be translated into a users intententions. This is what Norman calls the <em>gulf of evaluation</em>.</p>
<p>So how does a designer go about bridging these two gulfs? There is no perfect solution for this, but Norman provides a couple of pretty good pointers, or better questions you should ask yourself about your design. I will only share two of those questions, because I don&#8217;t want to kill his book sales completely <img src='http://www.vigorouscoding.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><em>Visibility</em> – Does the design provide a visual clue in which state the device is currently in and what actions are available to the users?<br />
<em>Feedback</em> – Does the user receive continuous feedback about the results of his actions?</p>
<h2>Natural mappings</h2>
<p>Natural mappings take advantage of physical analogies and cultural standards for immediate understanding.</p>
<blockquote><p>&#8220;If a design depends upon labels, it may be faulty. Labels are important and often necessary, but the appropriate use of natural mappings can minimize the need for them. Whenever labels seem necessary, consider another design.&#8221; (p. 78)</p></blockquote>
<p>Norman illustrates natural mappings with different layouts of stoves and their controls. Since I don&#8217;t want to rip off his book I took a look around and found a simple example.</p>
<p>My desk drawers seem like an example of good design. They are lockable and the orientation of the keyhole takes advantage of natural mappings to form a mental model in the users head.</p>
<p>Unlocked, the keyhole is parallel to the drawers, which signals &#8220;I am unlocked &#8211; Open me&#8221;. When it is locked, it is orthogonal to the drawers which signals &#8220;I am locked &#8211; Better luck next time&#8221;. Even without trying to open the drawers it is obvious that they are (un)locked.</p>
<div style="text-align: center;"><a href="http://www.vigorouscoding.com/wp-content/uploads/2012/02/unlocked.jpg" rel="lightbox-drawer"><img class="size-thumbnail wp-image-659" style="display: inline;" title="Unlocked" src="http://www.vigorouscoding.com/wp-content/uploads/2012/02/unlocked-150x150.jpg" alt="" width="150" height="150" /></a><a href="http://www.vigorouscoding.com/wp-content/uploads/2012/02/locked.jpg" rel="lightbox-drawer"><img class="size-thumbnail wp-image-658" style="display: inline;" title="Locked" src="http://www.vigorouscoding.com/wp-content/uploads/2012/02/locked-150x150.jpg" alt="" width="150" height="150" /></a></div>
<p>Admittedly, this is a pretty basic example, but think about what would have happened if the orientation of the keyhole were the other way around? What kind of mental model would support instantly knowing what state the lock is in? I can&#8217;t think of one and that&#8217;s why I think it is good design.</p>
<h2>Norman and the future</h2>
<p>Interestingly enough Norman is predicting the future quite accurately on multiple occasions. At one point in his book he as writing about something that sounds a lot like the iPad to me. But make up your own mind&#8230;</p>
<blockquote><p>The computer of the future is perhaps best illustrated by my imaginary perfect calendar. [...] This imaginary calendar looks like a calendar. It&#8217;s about the size of a standard pad of paper, it opens up to display dates. But it really is a computer, so it can do things that today&#8217;s appointment calendar cannot. [...] Most important, it can also connect itself to my other systems. Thus, whatever I enter into the calendar gets transmitted to my office and home systems so that they are always in synchrony. (p. 185&amp;186)</p></blockquote>
<p>Other times he is a bit off in a funny way (when you look at it from todays modern point of view). Discussing to problems of self-threading projectors his final remark is: &#8220;Well in a while it won&#8217;t matter. There won&#8217;t be any film, just videotape&#8221;. Not quite&#8230; <img src='http://www.vigorouscoding.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Ridiculing Norman is not my intention. It just stood out to me. Norman doesn&#8217;t try to predict the future. He is merely looking at the mistakes of the past and describing how design can be better in the future &#8211; or rather how future designers can be better.</p>
<h2>Final thoughts</h2>
<p>To sum it all up, the book was a revelation for me. I will never be able to see something as simple as a door for what it is, a plain door. I will always see the designers intentions (and possibly his mistakes). Somehow a lot of things make more sense to me now that I look at things differently.</p>
<p>If this book had not taught me anything else but to take a closer look at things, it would still have been a pretty good investment in my personal and professional development. After reading it I started noticing things I never noticed before &#8211; small things that is. But luckily for me the book gave me more than this. A whole new perspective and things to think about. A truly good read.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vigorouscoding.com/2012/02/the-design-of-everyday-things-donald-a-norman-book-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UIButtons with pseudorealistic perspective</title>
		<link>http://www.vigorouscoding.com/2012/01/uibuttons-with-pseudorealistic-perspective/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=uibuttons-with-pseudorealistic-perspective</link>
		<comments>http://www.vigorouscoding.com/2012/01/uibuttons-with-pseudorealistic-perspective/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 17:19:13 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://www.vigorouscoding.com/?p=598</guid>
		<description><![CDATA[For a little side-project I wanted buttons to look like they&#8217;re being pushed &#8216;inside&#8217; the interface when active. To match the overall look of the project the first step was to create two embossed images in Photoshop. One with emboss &#8230; <a href="http://www.vigorouscoding.com/2012/01/uibuttons-with-pseudorealistic-perspective/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For a little side-project I wanted buttons to look like they&#8217;re being pushed &#8216;inside&#8217; the interface when active. To match the overall look of the project the first step was to create two embossed images in Photoshop. One with emboss direction &#8216;up&#8217; and one with emboss direction &#8216;down&#8217;. Then assign these images to the relevant control states of the button. Simple enough &#8211; and already looking the way I want it to. (Hover over the image to see what I mean.)</p>
<p><img class="aligncenter size-full wp-image-616" title="button" onmouseover="javascript:this.src='http://www.vigorouscoding.com/wp-content/uploads/2012/01/buttonHighlighted.png'" onmouseout="javascript:this.src='http://www.vigorouscoding.com/wp-content/uploads/2012/01/buttonNormal'" src="http://www.vigorouscoding.com/wp-content/uploads/2012/01/buttonNormal.png" alt="Embossed Button" width="320" height="80" /> <span id="more-598"></span></p>
<p>This is what the button looks like in code. Nothing special so far. Okay, I did not simply create and assign the background images&#8230; I made them resizable by using the UIImage method stretchableImageWithLeftCapWidth:topCapHeight: (from iOS5 on you would use the resizableImageWithCapInsets:).</p><pre class="crayon-plain-tag"><code>UIButton *playButton = [UIButton buttonWithType:UIButtonTypeCustom];
playButton.frame = CGRectMake(0, 0, 160, 40);
[playButton setTitle:@&quot;Play&quot; forState:UIControlStateNormal];

// Set the state images
[playButton setBackgroundImage:[[UIImage imageNamed:@&quot;resizableButtonNormal.png&quot;] stretchableImageWithLeftCapWidth:10 topCapHeight:0] forState:UIControlStateNormal];
[playButton setBackgroundImage:[[UIImage imageNamed:@&quot;resizableButtonHighlighted.png&quot;] stretchableImageWithLeftCapWidth:10 topCapHeight:0] forState:UIControlStateHighlighted];

[yourView addSubview:playButton];</code></pre><p><img class="aligncenter size-full wp-image-616" title="button" onmouseover="javascript:this.src='http://www.vigorouscoding.com/wp-content/uploads/2012/01/button_1_Highlighted.png'" onmouseout="javascript:this.src='http://www.vigorouscoding.com/wp-content/uploads/2012/01/finalButtonNormal.png'" src="http://www.vigorouscoding.com/wp-content/uploads/2012/01/finalButtonNormal.png" alt="Embossed Button" width="320" height="80" /></p>
<p>One thing did not look right&#8230; I didn&#8217;t like the fact that the Textlabel stayed in the same place for both states. That kind of killed the illusion of a &#8216;real&#8217; pushbutton for me. So I dug in the documentation but couldn&#8217;t really find any useful information. OK, that&#8217;s a lie – The Apple Documentation is really helpful and always up to date! &#8230;but I digress. I did not find any information on setting the frame of the titleLabel depending on the state of the button.</p>
<p>I did not want to subclass UIButton just to move the frame of the textLabel around it the highlighted state, so I experimented a little and here is the solution I came up with (I can only assume that trick has been around for quite some time, but I never read about it anywhere else):</p><pre class="crayon-plain-tag"><code>playButton.titleLabel.shadowOffset = CGSizeMake(-1, -1);

[playButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[playButton setTitleShadowColor:[UIColor clearColor] forState:UIControlStateNormal];

[playButton setTitleColor:[UIColor clearColor] forState:UIControlStateHighlighted];
[playButton setTitleShadowColor:[UIColor whiteColor] forState:UIControlStateHighlighted];</code></pre><p><p>
Notice how I alternate between shadowColor and textColor? That is basically the whole trick. In the normal state you can only see the text itself and the shadow is transparent. In the highlighted state the shadowColor is white and the textColor is transparent. I like it the best with shadowOffset = CGSizeMake(-1,-1), but it also looks good with shadowOffset = CGSizeMake(0, -1).</p>
<p>So, this is what you get in the end.</p>
<p><img class="aligncenter size-full wp-image-616" title="button" onmouseover="javascript:this.src='http://www.vigorouscoding.com/wp-content/uploads/2012/01/finalButtonHighlighted.png'" onmouseout="javascript:this.src='http://www.vigorouscoding.com/wp-content/uploads/2012/01/finalButtonNormal.png'" src="http://www.vigorouscoding.com/wp-content/uploads/2012/01/finalButtonNormal.png" alt="Embossed Button" width="320" height="80" /></p>
<h2>Downside</h2>
<ul>
<li>Well as you might have already thought while reading this, if you use this technique to give your UIButtons depth, your text can&#8217;t have a shadow (because it already has/is a shadow). For me this is not really a problem because the shadow would be used to give the text depth &#8211; to make it look like it is not <strong><em>on</em></strong> the button, but <strong><em>above</em></strong> it which would not fit with the whole idea of this button.</li>
<li>One could call the buttons ugly&#8230; I like &#8216;retro&#8217; a bit better <img src='http://www.vigorouscoding.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.vigorouscoding.com/2012/01/uibuttons-with-pseudorealistic-perspective/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The WINGStand</title>
		<link>http://www.vigorouscoding.com/2012/01/the-wingstand/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-wingstand</link>
		<comments>http://www.vigorouscoding.com/2012/01/the-wingstand/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 20:51:31 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.vigorouscoding.com/?p=582</guid>
		<description><![CDATA[A while age I saw a ridiculously cool project on Kickstarter (the world&#8217;s largest funding platform for creative projects) but totally forgot about it until recently. Yesterday it was delivered – the WINGStand. It&#8217;s basically a docking-station for you iPad so you can type &#8230; <a href="http://www.vigorouscoding.com/2012/01/the-wingstand/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A while age I saw a ridiculously cool project on <a title="The world's largest funding platform for creative projects" href="http://www.kickstarter.com/" target="_blank">Kickstarter</a> (the world&#8217;s largest funding platform for creative projects) but totally forgot about it until recently. Yesterday it was delivered – the <a href="http://wingstand.com/" target="_blank">WINGStand</a>. It&#8217;s basically a docking-station for you iPad so you can type effortlessly on your Apple Wireless Keyboard.</p>
<p>It consists of just two plastic elements which slide onto the Keyboard. On top of those two elements you can rest your iPad or iPhone and type away. Their website advertises that it also fits with the Samsung GalaxyTab, Blackberry Playbook, HP Touchpad, Acer Iconia, HTC Flyer and Droids. But honestly&#8230; who cares?.</p>
<p style="text-align: center;"><a href="http://www.vigorouscoding.com/wp-content/uploads/2012/01/wingstand_landscape.png" rel="lightbox-wingstand"><img class="aligncenter size-medium wp-image-586" title="WINGStand in Landscape Mode" src="http://www.vigorouscoding.com/wp-content/uploads/2012/01/wingstand_landscape-288x300.png" alt="" width="288" height="300" /><span id="more-582"></span></a></p>
<p>Before I owned the WINGStand, writing anything longer than tweets on the iPad was a real pain. I used the Snugg iPad2 Cover with a Flip Stand, but that always seemed a bit shaky and uncomfortable. That is why the iPad is no more than a device for testing my apps, gaming and reading but rarely for working.</p>
<p>That solution was superior in one way: flexibility. The keyboard and iPad were not connected, so I was able to move them apart. That is a nice feature but not really necessary. I&#8217;m perfectly fine with my pseudo-laptop – I am even typing this post on it <img src='http://www.vigorouscoding.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: center;"><a href="http://www.vigorouscoding.com/wp-content/uploads/2012/01/wingstand_portrait.png" rel="lightbox-wingstand"><img class="aligncenter size-medium wp-image-587" title="WINGStand in Portait Mode" src="http://www.vigorouscoding.com/wp-content/uploads/2012/01/wingstand_portrait-247x300.png" alt="" width="247" height="300" /></a></p>
<p>I am hoping that I will make use of my iPad more often than I did before, now that the typing issue is resolved. Being a developer the WINGStand would be especially cool to use with Codea, which lets you create games and simulations right on your iPad. If you dont know it, go check it out at <a href="http://twolivesleft.com/Codea/" target="_blank">http://twolivesleft.com/Codea/</a>.</p>
<p>The only thing missing is a case for for all the components so my iPad does not get scratched&#8230; If I find something I will definitely write something here – or if you know anything good, let me know in the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vigorouscoding.com/2012/01/the-wingstand/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Downloading whole websites</title>
		<link>http://www.vigorouscoding.com/2012/01/downloading-whole-websites/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=downloading-whole-websites</link>
		<comments>http://www.vigorouscoding.com/2012/01/downloading-whole-websites/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 21:00:07 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://www.vigorouscoding.com/?p=568</guid>
		<description><![CDATA[Ever needed to download an entire website for offline viewing? I didn&#8217;t really need to download it for myself. A client needed an offline version of his website. wget to the rescue, I thought! Showstopper wget is not included on OS &#8230; <a href="http://www.vigorouscoding.com/2012/01/downloading-whole-websites/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ever needed to download an entire website for offline viewing? I didn&#8217;t really need to download it for myself. A client needed an offline version of his website. <a href="http://www.gnu.org/s/wget/">wget</a> to the rescue, I thought!</p>
<h2>Showstopper</h2>
<p>wget is not included on OS X&#8230; bummer! You can, however, install it from source (or from Mac Ports). Just download the newest package from <a href="http://ftp.gnu.org/gnu/wget/">http://ftp.gnu.org/gnu/wget/</a> (at the time of writing this post wget-1.13.tar.gz).<span id="more-568"></span></p><pre class="crayon-plain-tag"><code>tar xzf wget-1.13.tar.gz
cd wget-1.13
./configure &nbsp;&ndash;with-ssl=openssl
sudo make install</code></pre><p>Now let&#8217;s try again!</p>
<h2>wget to the rescue!</h2>
<p>The following command downloads the entire website and converts any internal links and paths to local ones.</p><pre class="crayon-plain-tag"><code>wget --recursive \
     --no-clobber \
     --page-requisites \
     --convert-links \
     --domains yourdomain.com \
     www.yourdomain.com</code></pre><p>What the switches do:</p>
<ul>
<li><strong>&#8211;recursive</strong> - The switch responsible for downloading more than just the one URL you specify</li>
<li><strong>&#8211;domains</strong> yourdomain.com &#8211; tells wget to not follow links outside the specified domain</li>
<li><strong>&#8211;page-requisites</strong> - instructs wget to download all the elements that make up the page (images, CSS, scripts, etc).</li>
<li><strong>&#8211;convert-links -</strong> convert links and paths so that it can be browsed locally</li>
<li><strong>&#8211;no-clobber</strong> - don&#8217;t overwrite existing files</li>
</ul>
<p>If you need to download only a particular subdirectory you can limit wget to that directory by using the switch <strong>&#8211;no-parent</strong>. If you work on a windows machine (why?) you may need the <strong>&#8211;restrict-file-names=windows </strong>switch. With that switch wget modifies filenames to make the website work in Windows as well.</p>
<h2>One last thing</h2>
<p>There may be some resources that wget does not fetch because it obeys the rules specified in robots.txt. You can disables that behaviour with the switch <strong>-e robots=off</strong>.</p>
<p style="padding-left: 30px;"><em>Note: It is considered evil to circumvent that behavior, so please be careful and only use the following switch on your own site (emphasis on <strong>your own</strong>)!!!</em></p>
<p>That should do it. Now you are all set to create local backups of websites. But beware – with great wget-fu comes great responsibility!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vigorouscoding.com/2012/01/downloading-whole-websites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mega Man X for iOS</title>
		<link>http://www.vigorouscoding.com/2012/01/mega-man-x-for-ios/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mega-man-x-for-ios</link>
		<comments>http://www.vigorouscoding.com/2012/01/mega-man-x-for-ios/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 20:00:29 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[iOS]]></category>

		<guid isPermaLink="false">http://www.vigorouscoding.com/?p=556</guid>
		<description><![CDATA[A week ago I learned that there is a Mega Man X port for iOS and being a Mega Man veteran it was simply a must-buy. Another reason was that I have recently watched @Egorator&#8217;s excellent &#8220;Sequelitis &#8211; Mega Man Classic &#8230; <a href="http://www.vigorouscoding.com/2012/01/mega-man-x-for-ios/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A week ago I learned that there is a <a title="iTunes - Mega Man X" href="http://click.linksynergy.com/fs-bin/click?id=mWaVMceIfpI&amp;subid=&amp;offerid=146261.1&amp;type=10&amp;tmpid=3909&amp;RD_PARM1=http%3A%2F%2Fitunes.apple.com%2Fus%2Fapp%2Fmega-man-x%2Fid469343097%3Fmt%3D8" target="_blank">Mega Man X port for iOS</a> and being a Mega Man veteran it was simply a must-buy. Another reason was that I have recently watched @Egorator&#8217;s excellent &#8220;<a title="Sequelitis on Youtube" href="http://www.youtube.com/watch?v=8FpigqfcvlM" target="_blank">Sequelitis &#8211; Mega Man Classic vs. Mega Man X</a>&#8220;. You should definitely watch it! It&#8217;s really good. In that video he explains why Mega Man X is a prime example for good game design. Another perfect excuse for me to spend a few bucks.</p>
<p><span id="more-556"></span>Since I bought it I have been playing quite a bit and have just finished the game. I would say that it has taken me around 5 hours to complete the game – a lot less, it seems, than it has taken me back in the day. I believe it has taken me weeks to finish the game when I was little. It seems Capcom has lowered the difficulty quite noticeably. I don&#8217;t know why, but I guess it made sense to someone at Capcom. I certainly would have like more of a challenge&#8230; from the game itself, not the controls.</p>
<h2>Controls</h2>
<p>I wouldn&#8217;t call the controls sluggish as I have read in some reviews, but I had/have two problems with them. The Jump and Shoot buttons are simply unusable with just one finger – at least for me. Maybe that is due to the fact that I always run around with a fully charged blaster&#8230; but I was certainly able to do that with my SNES controller without having any problems. After switching to a two-finger technique that issue went away.</p>
<p>The other problem is kind of related. Hitting two buttons on the D-Pad at once was always a challenge. This was particularly annoying when there was a ladder and an abyss&#8230; I did die quite often because I just wasn&#8217;t able to press the Up-Button while jumping to the left/right. Exactly the same problem occurred when I wanted to dash-jump to one side. More often than not I dashed in the wrong direction. Sadly, I did not find a cure for that issue. I just have to be careful in these kind of situations.</p>
<h2>Achievements</h2>
<p>This part of the review is rather short&#8230; I am not a compulsory achievement hunter, so the challenge system is not really that interesting to me. For hunters it may be a cool addition to make the game last longer.</p>
<h2>In-App Purchases</h2>
<p>Buying the upgrades seems wrong to me. Why buy the stuff that actually makes the game a little more challenging and, more importantly, fun to play? I am not generally against In-App Purchases but I dislike being able to buy power. To me IAP makes more sense for Themes, Special Content and Bonus Stuff. I can understand that people who don&#8217;t have much time to play may want to advance faster to be able to finish a game, but this is just not my thing.</p>
<p>The only IAP in this game that makes sense to me is the Arranged BGM. I did not buy it though, simply because I usually mute my iPhone. I have also heard that the &#8220;Arranged BGM&#8221; is included in the original Mega Man X and just taken out to monetize it (correct me if I&#8217;m wrong). That seems wrong from the customer point of view. From a business point of view it makes a lot of sense though.</p>
<h2>Subtle Differences</h2>
<p>While I was playing I noticed a few differences to my experience with the original Mega Man X on SNES. I actually had to do a little research to find out if memory served me correctly, but it seems it was.</p>
<p>In the original Mega Man X for SNES you had to find the X-Buster Upgrade Capsule for X to be able to charge his blaster. In the iOS-version X can charge his weapon right from the start of the game. The Hadouken Upgrade Capsule is also not where it&#8217;s supposed to be. Instead you can do a Hadouken right from the start of the game. Other than that all Upgrades, Hearts and Subtanks are in their default locations as far as I can tell.</p>
<h2>The verdict</h2>
<p>I was afraid that playing the game might destroy some nice memories, but that did not happen at all. Yes, it was way easier, but I remembered half of the special items and the rest came to me after a while. So I don&#8217;t feel robbed of childhood memories. It is more like I have confirmation that those hours I spent when I was young, were well spent.</p>
<p>All things considered, I really like the game even though the experience was not as impacting as it was when I was 12. That&#8217;s why I can&#8217;t give it the full five stars and my final verdict is 4 stars.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vigorouscoding.com/2012/01/mega-man-x-for-ios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Welcome to 2012</title>
		<link>http://www.vigorouscoding.com/2012/01/welcome-to-2012/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=welcome-to-2012</link>
		<comments>http://www.vigorouscoding.com/2012/01/welcome-to-2012/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 19:39:26 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.vigorouscoding.com/?p=549</guid>
		<description><![CDATA[Happy new year everyone – Let&#8217;s make 2012 the best year of our lives! I will try to outline how I will try to accomplish that goal (at least for myself). New Year&#8217;s Resolutions I really dislike New Year&#8217;s Resolutions. &#8230; <a href="http://www.vigorouscoding.com/2012/01/welcome-to-2012/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Happy new year everyone – Let&#8217;s make 2012 the best year of our lives! I will try to outline how I will try to accomplish that goal (at least for myself).</p>
<h2>New Year&#8217;s Resolutions</h2>
<p>I really dislike New Year&#8217;s Resolutions. Let me try to explain&#8230; Why would you pin something that is clearly of some importance to you on an arbitrary date such as the beginning of a new year? If it were really important to you&#8230; well, then you could have started working on it as soon as you realized its importance.<span id="more-549"></span></p>
<p>I have no scientific proof, but I believe that people who quit smoking as a New Year&#8217;s Resolution are less likely to succeed than people who quit the second they decide they don&#8217;t want to smoke any more. In other words: If it is not important enough to stop the moment you realize it&#8217;s bad for you then you will probably fail.</p>
<p>That is why I <em>never</em> have New Year&#8217;s Resolutions. If I want something done, I start right when I notice it needs to be done (if it is important enough to me).</p>
<h2>Goals for 2012</h2>
<p>It is also common practice to set goals for the new year. That is a lot more up my alley. The main difference compared to resolutions is that you can start working on these goals before the new year has come. It&#8217;s all about what you achieve in one year. It feels more like a &#8220;scientific method&#8221; for measuring success than like a goal. It&#8217;s a way to keep track of what I want to accomplish, have accomplished and still need to accomplish. Kind of a long-term ToDo list.</p>
<p>These are my goals for 2012 and I have already started to work on them. I have to admit, that the first goal looks a lot like a resolution&#8230; even to me, but since I dislike them so much, let us just call it a goal, OK?</p>
<ul>
<li>Release at the very least 2 new iPhone games/apps into the App Store and possibly one Mac App. I&#8217;m not sure yet about Mac Apps, but it sounds like fun, so why shouldn&#8217;t I? The 2 iPhone apps shouldn&#8217;t be too hard because I am in the polishing phase for one app that I originally planned to release in 2011 and I have ideas for a lot more apps and games to keep me busy in 2012.</li>
<li>Read at least 6 books. I&#8217;m not talking about recreational books. I&#8217;m talking about books which will expand my knowledge and help me in my professional life. I have already bought more than 6 books I still have not read.</li>
<li>Pick up a hobby. Sounds simple enough, but I don&#8217;t want to start a new hobby for the hobby&#8217;s sake. The main reason is as follows: Whenever I pick up a book, at some point I start zoning out and think about problems in my apps and other stuff that is present in my head. While I think about other things, my eyes still keep moving and after a page or so I realize that I haven&#8217;t been actually reading anything. That is why I need a hobby that does not occupy my mind too much, so it can process other problems, but it shouldn&#8217;t be too dull so that I don&#8217;t get bored by it. This goal seems to be the hardest one on my list.</li>
</ul>
<h2>Why?</h2>
<p>The obvious reason is that I want to become better at my job. I want to be more successful. I want to work less while still earning more (or at least good) money. All my goals (except the first one) point in one direction. Quit my day-job and become a full-time indie developer. I am well aware that the goals &#8220;indie&#8221; and &#8220;more money&#8221; rarely ever go hand in hand&#8230; but you can&#8217;t blame me for trying. I do also realize that my writing this could cause problems with my current employer because he knows about my blog/website&#8230; but what do I care? If he does not want me to work for him anymore that will just kickstart my plans.</p>
<p>Here&#8217;s to us all achieving our goals! And even though I don&#8217;t like them: Here&#8217;s to sticking to our resolutions!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vigorouscoding.com/2012/01/welcome-to-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Better get it right the first time</title>
		<link>http://www.vigorouscoding.com/2011/12/better-get-it-right-the-first-time/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=better-get-it-right-the-first-time</link>
		<comments>http://www.vigorouscoding.com/2011/12/better-get-it-right-the-first-time/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 23:04:36 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.vigorouscoding.com/?p=514</guid>
		<description><![CDATA[I am doing a complete revamp of my second app – SweetTooth – a Match-three game. I know lots of people hate Bejeweled clones but it was fun to develop and a good learning experience. There are even some people &#8230; <a href="http://www.vigorouscoding.com/2011/12/better-get-it-right-the-first-time/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I am doing a complete revamp of my second app – <a title="SweetTooth" href="http://www.vigorouscoding.com/games/sweettooth/">SweetTooth</a> – a Match-three game. I know lots of people hate Bejeweled clones but it was fun to develop and a good learning experience. There are even some people who like it!</p>
<p>As I said, this was my second app. In other words, it was my second-worst app. I did not follow the MVC pattern to the letter. In part because I thought I could take shortcuts without any ramifications and in part I guess because I did not understand the concept fully. I did follow it where necessary, but I did stray from the right path more than I should have. I knew that I could have done better, but I was lazy and cocky. I also knew that it could come back to bite me in the ass if I ever had to update it or create another version of it.<span id="more-514"></span></p>
<p>The time for updates came and against all odds it went a lot smoother than thought. I just had to fix a few bugs that were unrelated to the poor design and easy to fix as well. But now that I am working on another version with new features and a different setting, it just doesn&#8217;t feel right any more and it also doesn&#8217;t reflect my programming skills the way I would like it to. If I wouldn&#8217;t have posted it here, probably no-one would have ever known, but since I want to deliver quality rather than crap, I did make a lot of changes and thus posted it here.</p>
<p>This brings me to the point of code cleanup. It comes in a variety of shapes and sizes. For this post I will restrain myself to some aspects of it.</p>
<h2>The Slim-Fast Approach</h2>
<p>Take a good look around and think about what is really needed. If you have analytics code embedded in your apps then that should be quite easy, but since I personally don&#8217;t like Flurry and the like – or rather the <a title="Secret iOS business; what you don’t know about your apps" href="http://www.troyhunt.com/2011/10/secret-ios-business-what-you-dont-know.html" target="_blank">intrusive methods</a> they employ – I do not use any analytics. Luckily my game does not have that many non-essential features. The only three being Game-Center, Facebook and Twitter integration and those are quite easy to monitor without analytics software.</p>
<p>Most of my players use Game Center so I can&#8217;t just remove it and it is way more fun to compare ones scores in an online tableau rather than holding your iPhones next to each other and compare them like in the olden days.</p>
<p>Twitter and Facebook Integration were so rarely used that they became negligible and I did not want to allow something like that to clutter up my code base, so I decided to remove them from my new app. Maybe now, with iOS 5, I will re-add Twitter because almost no work is required, but right now it just feels good to remove unused code and dependencies.</p>
<h2>Inter-Class Dependencies</h2>
<p>Another course I have taken is to aim for loose coupling and high cohesion in my class design. Recently a <a title="objc_dep" href="https://github.com/nst/objc_dep" target="_blank">tool</a> came to my attention which graphs the dependencies in my XCode projects. The tool itself is a small python script which uses a regular expression to find #import statements in all the .h and .m files of a project. Simply supply the python script with the path to your project and write the output into a file.</p><pre class="crayon-plain-tag"><code>$ python objc_dep.py /path/to/your/project &gt; project.dot</code></pre><p>The produced .dot-files can be easily viewed in <a title="Mac App Store - OmniGraffle" href="http://itunes.apple.com/de/app/omnigraffle/id404458553?mt=12" target="_blank">OmniGraffle</a> or the free alternative <a title="GraphViz Download" href="http://www.graphviz.org/Download.php" target="_blank">GraphViz</a>. Look for blue arrows in your graphs. Those are bi-directional imports and they are especially ugly and error-prone. My first output looked disastrous. That is what you get when you don&#8217;t make use of design patterns.</p>
<p style="text-align: center;"><strong><a href="http://www.vigorouscoding.com/wp-content/uploads/2011/12/graph1.jpg" rel="lightbox-graph"><img class="alignnone size-medium wp-image-519 aligncenter" title="Graph 1 - After removing unneeded components" src="http://www.vigorouscoding.com/wp-content/uploads/2011/12/graph1-300x123.jpg" alt="" width="300" height="123" /></a></strong></p>
<p>I should note that I changed the regular expression a bit so that it took my setup into account. In some classes i commented out some imports. Using the original regular expression those imports would still show up in the graph. My change is quite simple: Just look for the &#8220;#import&#8221; statement at the beginning of lines. This works for me because I use // style comments. It would not work if one would use the /**/ comment-style.</p><pre class="crayon-plain-tag"><code>// Before
regex_import = re.compile(&quot;#import \&quot;(?P\S*)\.h&quot;)

// After
regex_import = re.compile(&quot;^#import \&quot;(?P\S*)\.h&quot;)</code></pre><p><p>
After multiple iterations of dependency removal and moving *lots* of code from the UIView Subclasses to their respective UIViewController Classes, I finally arrived at the following graph.</p>
<p style="text-align: center;"><a href="http://www.vigorouscoding.com/wp-content/uploads/2011/12/graph2.jpg" rel="lightbox-graph"><img class="aligncenter size-medium wp-image-520" title="Graph 2 - After moving lots of code around" src="http://www.vigorouscoding.com/wp-content/uploads/2011/12/graph2-300x127.jpg" alt="" width="300" height="127" /></a></p>
<p>As you can see, there are still a lot of dependencies on the App Delegate. This is because my Core Data code resides in there. But some of those dependencies could be removed by simply storing the settings in the NSUserDefaults rather than Core Data. This step is the next on my way to a clean(er) class structure. There are also some of those pesky blue bi-directional dependencies left which I vow to hunt down and eradicate after this post is published.</p>
<p><strong>EDIT</strong>: Just removed one more bi-directional dependency by simply moving the Settings for my app from Core Data to NSUserDefaults. I wonder why I ever wanted to store Settings in Core Data because it is way more complicated than NSUserDefaults.</p>
<p style="text-align: center;"><a href="http://www.vigorouscoding.com/wp-content/uploads/2011/12/graph3.jpg" rel="lightbox-graph"><img class="size-medium wp-image-545 aligncenter" title="Graph 3 - After moving Settings to NSUserDefaults" src="http://www.vigorouscoding.com/wp-content/uploads/2011/12/graph3-300x118.jpg" alt="" width="300" height="118" /></a></p>
<h2>Lesson learned</h2>
<p>Well, the main lesson I have learned is that best practices and design patterns exist for a reason. I <em><strong>knew</strong></em> that before, but I never <em><strong>experienced</strong></em> it in my own projects. So what I take away from this is: Get it right the first time around – or at least aim for that. It will take considerately more time but it will definitely be worth it when the time for updates, bug-fixes and next versions comes. Any shortcuts taken in any stage of the project <em><strong>will</strong></em> come back and haunt you/cost you money later on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vigorouscoding.com/2011/12/better-get-it-right-the-first-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun with words and Hyphenation</title>
		<link>http://www.vigorouscoding.com/2011/12/fun-with-words-and-hyphenation/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fun-with-words-and-hyphenation</link>
		<comments>http://www.vigorouscoding.com/2011/12/fun-with-words-and-hyphenation/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 08:21:58 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://www.vigorouscoding.com/?p=385</guid>
		<description><![CDATA[tl;dr – I wrote a Hyphenation-based word generator. In contrast to the title of this post, the idea to write it was born while I was not having a lot of fun with words. I am certainly not the most &#8230; <a href="http://www.vigorouscoding.com/2011/12/fun-with-words-and-hyphenation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="padding-left: 30px;"><a title="tl;dr" href="http://en.wiktionary.org/wiki/TLDR" target="_blank">tl;dr</a> – I wrote a <a title="The Generator" href="http://www.vigorouscoding.com/tools/hyphenation/">Hyphenation-based word generator</a>.</p>
<p>In contrast to the title of this post, the idea to write it was born while I was not having a lot of fun with words. I am certainly not the most creative person when it comes to words, so I struggled for several days when I had to come up with a name for my business and domain.</p>
<h2>Isn&#8217;t there an app for that?</h2>
<p>It would have been really cool to find a word generator which takes a set of words as input, juggles them around a bit and outputs words or word combinations. I thought to myself: &#8220;There must be an app for that!&#8221; but after a brief unsuccessful search I gave up and came up with &#8220;<em>Vigorous Coding</em>&#8221; the old-fashioned way: Pen and Paper (and Sweat).</p>
<p>But the idea for a Hyphenation-based word generator stuck with me for a while so I started to work on a solution.</p>
<h2><span id="more-385"></span>Make use of existing tools</h2>
<p>Why would I want to write a Hyphenation algorithm? Or better: Why should I <em>need</em> to write something that already exists and works (and took a lot of time and effort do develop)? The most famous Hyphenation algorithm is described in Franklin Mark Liang&#8217;s dissertation &#8220;<a title="Word Hy-phen-a-tion by Com-put-er" href="http://www.tug.org/docs/liang/liang-thesis.pdf" target="_blank">Word Hy-phen-a-tion by Com-put-er</a>&#8220;. It makes use of extensive word lists to derive patterns to hyphenate any word with an approximate success rate of 90% depending on the size of the word list.</p>
<p>Luckily, a very impressive JavaScript implementation based on said algorithm <a title="Hyphenator.js" href="http://code.google.com/p/hyphenator/" target="_blank">exists</a> and it even supports a truckload of languages! It was originally developed to soft-hyphenate websites to make them resize more gracefully. Just import the Hyphenation script and insert a few lines of JavaScript and you are all set. Read the documentation if you need more info. It&#8217;s pretty straight-forward.</p><pre class="crayon-plain-tag"><code>&lt;script src=&quot;Hyphenator.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
	Hyphenator.run();
&lt;/script&gt;</code></pre><p>
That should only leave some jQuery magic and a little String manipulation for me to worry about.</p>
<h2>You didn&#8217;t think it would be that easy, did you?</h2>
<p>Well, there is always a catch. In this case it was Hyphenator.js being developed to hyphenate complete web-sites. It was never intended to hyphenate single words for further processing. So I had to do a little hacking. Instead of using the soft-hyphen (&amp;shy;) to hyphenate the words, I am using a dash so the user can see what is going on. I obviously had to make some other changes to dynamically load the language pattern files and hyphenate user input instead the whole page.</p>
<p>My <a title="Featurism" href="http://en.wikipedia.org/wiki/Feature_creep" target="_blank">featurism</a> (for a moment I thought I came up with that word) turned out to be the bigger problem. As always when I begin to work on a side-project, it gets a little out of hand. My initial plan was <em>&#8220;Hyphenate words –&gt; put the parts back together –&gt; Profit!&#8221; </em>and quickly turned into <em>&#8220;Hyphenate words <em>–&gt; sort words</em> –&gt; put <em>the parts</em> back together –&gt; Profit!&#8221;.</em></p>
<p>As time went by, I came up with more and more features to include (Grouping, &#8220;Inactive Words&#8221;-Group, Cookie Storage, Trashcan). So my final plan turned out to be <em>&#8220;Dynamically load languages –&gt; Hyphenate words -&gt; store in cookie –&gt; group words -&gt; sort words -&gt; put the parts back together –&gt; Profit!&#8221;.</em></p>
<p>But there are still some ideas floating around in my head to customize the generator. Like limiting the number of words (per group) that are used, or being able to sort the groups and some other options. <a title="MOAR" href="http://www.vigorouscoding.com/wp-content/uploads/2011/12/moar5.jpg" rel="lightbox-moar">Because</a> <a title="MOAR" href="http://www.vigorouscoding.com/wp-content/uploads/2011/12/moar4.jpg" rel="lightbox-moar">I</a> <a title="MOAR" href="http://www.vigorouscoding.com/wp-content/uploads/2011/12/moar3.jpg" rel="lightbox-moar">always</a> <a title="MOAR" href="http://www.vigorouscoding.com/wp-content/uploads/2011/12/moar2.jpg" rel="lightbox-moar">want</a> <a title="MOAR" href="http://www.vigorouscoding.com/wp-content/uploads/2011/12/moar1.jpg" rel="lightbox-moar">MOAR</a>!</p>
<h2>Keep it simple, stupid!</h2>
<p>This is a darn good piece of advice! Remove or rather don&#8217;t implement features nobody asked for and probably nobody wants. Following this principle the best I could, I managed to pull myself together and just stuck with language selection, basic drag-n-drop sorting and cookie storage. This way I was able to come up with something presentable in a reasonable amount of time.</p>
<p style="padding-left: 30px;"><strong>EDIT</strong>: Well, featurism got the better of me. While writing this post, I felt like I could not publish it without the user being able to delete words. So I added a trashcan to the generator&#8230; Just keeping unwanted words in the &#8220;Inactive Words&#8221; group seemed so dirty.</p>
<h2>What it does</h2>
<p>The generator lets you input words, hyphenates them and sticks them in the first group. You can simply sort words by dragging them and dropping them on other groups or the trashcan.</p>
<p>The generator has 2 modes of work. Mode 1 is active if only one group contains words. The generator takes random parts from <em>all</em> of those words and puts them back together to form a new word. This happens in the order the words are in this group. The result can be influenced by sorting the words.</p>
<p>Mode 2 kicks in if there are words in at least two groups. From each group one word is chosen at random which is used to generate the new word. This happens in the order the groups are in. The result can be influenced by moving the words into different groups.</p>
<p>As a general rule the first word is never cut off at the beginning and the last word is never cut off at the end. This makes sense to me&#8230; I hope it also does for you.</p>
<h2>You&#8217;re almost there</h2>
<p>I hope the generator is of use to someone out there. At least I had fun creating it and I can&#8217;t say I am ashamed of the result, but I&#8217;ll let you be the judge of that. The thing I could be ashamed about is that this post took almost as long to write as the generator itself. At least it felt like that. I am way better at incrementally refining my code than at refining my words.</p>
<p>What are you still waiting for? <a title="The Generator" href="http://www.vigorouscoding.com/tools/hyphenation/">Go play with it!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vigorouscoding.com/2011/12/fun-with-words-and-hyphenation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wall and Piece</title>
		<link>http://www.vigorouscoding.com/2011/12/wall-and-piece/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wall-and-piece</link>
		<comments>http://www.vigorouscoding.com/2011/12/wall-and-piece/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 19:25:57 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Broadening my horizon]]></category>

		<guid isPermaLink="false">http://www.kaisit.de/?p=322</guid>
		<description><![CDATA[After being a Banksy fan for quite some time and recently hanging up a few prints of his on our living-room walls, I just bought the Banksy book &#8220;Wall and Piece&#8220;. If you don&#8217;t know him or his work, just google &#8230; <a href="http://www.vigorouscoding.com/2011/12/wall-and-piece/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After being a Banksy fan for quite some time and recently hanging up a few prints of his on our living-room walls, I just bought the Banksy book &#8220;<a title="Amazon: Wall and Piece" href="http://www.amazon.com/Wall-Piece-Banksy/dp/1844137872/ref=sr_1_1?ie=UTF8&amp;qid=1323971935&amp;sr=8-1" target="_blank">Wall and Piece</a>&#8220;. If you don&#8217;t know him or his work, just <a href="http://www.google.com/#q=Banksy&amp;fp=1" target="_blank">google</a> around a bit or take a look at the images in this post. [I should note that some of his works may disturb or offend you, but if you like (street) art you may come to love his art.]</p>
<p style="text-align: center;"><a href="http://www.vigorouscoding.com/wp-content/uploads/2011/12/banksy_cave_painting.png" rel="lightbox-banksy"><img class="size-medium wp-image-331 aligncenter" title="Cave Painting Removal" src="http://www.vigorouscoding.com/wp-content/uploads/2011/12/banksy_cave_painting-300x189.png" alt="" width="300" height="189" /></a></p>
<p><span id="more-322"></span>The book itself is very clean and reduced to impressive images. There is barely any text at all – out of 278 pages there are about 5 to 7 pages worth of text – but every bit of it is witty and/or funny. The flashbacks into his personal history – for example how he came up with the idea of stencil art – are also very interesting and well written.</p>
<p>The following quote stood out to me. Even though I like modern art, I also like how he criticizes it (one could also call it mockery), yet still takes the risk of hanging up an image of a Discount Soup Can in the Museum of Modern Art in New York. By the way, that picture lasted for a full six days on the wall of the museum.</p>
<blockquote><p>After sticking up the picture I took five minutes to watch what happened next. A sea of people walked up, stared and moved on looking confused and slightly cheated. I felt like a true modern artist.</p></blockquote>
<p>In summary, I really enjoyed the book and for 15 bucks it&#8217;s a steal. If you are into Banksy or Street Art at all you should check it out and probably also go see &#8220;<a title="Amazon: Exit through the Gift Shop" href="http://www.amazon.com/gp/product/B00470MG06" target="_blank">Exit through the Gift Shop</a>&#8221; – a Documentary about Street Art directed by Banksy.</p>
<p style="text-align: center;"><a href="http://www.vigorouscoding.com/wp-content/uploads/2011/12/banksy-graf-capitalism.jpg" rel="lightbox-banksy"><img class="aligncenter" title="Destroy Capitalism" src="http://www.vigorouscoding.com/wp-content/uploads/2011/12/banksy-graf-capitalism-300x225.jpg" alt="" width="300" height="225" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vigorouscoding.com/2011/12/wall-and-piece/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Brainf*ck Interpreter</title>
		<link>http://www.vigorouscoding.com/2011/12/brainfck-interpreter-in-javascript/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=brainfck-interpreter-in-javascript</link>
		<comments>http://www.vigorouscoding.com/2011/12/brainfck-interpreter-in-javascript/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 12:06:22 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.kaisit.de/?p=238</guid>
		<description><![CDATA[Today I found this nifty little JavaScript Brainf*ck interpreter and started playing with it. That site is actually quite a nice place for anyone interested in JavaScript Tips&#38;Tricks. Up until now I never really got around to taking a look &#8230; <a href="http://www.vigorouscoding.com/2011/12/brainfck-interpreter-in-javascript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today I found this nifty little <a style="font-size: 16px; line-height: 24px;" title="Brainf*ck interpreter" href="http://code.google.com/p/jslibs/wiki/JavascriptTips#Brainfuck_interpreter" target="_blank">JavaScript Brainf*ck interpreter</a> and started playing with it. That site is actually quite a nice place for anyone interested in JavaScript Tips&amp;Tricks.</p>
<p>Up until now I never really got around to taking a look at Brainf*ck so today was the day to do that. Brainf*ck was invented with the intention to write a really small compiler. I could write some more, but I would just be copying stuff off of Wikipedia, so here is the link to the article: <a title="Brainf*ck" href="http://de.wikipedia.org/wiki/Brainfuck" target="_blank">Brainf*ck on Wikipedia</a> <img src='http://www.vigorouscoding.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
<p><span id="more-238"></span>Without further ado, you can take a look at the JavaScript code below.</p><pre class="crayon-plain-tag"><code>javascript:function interpret_bf () {
	var code = prompt(&quot;Input Brainf*ck code here!&quot;);
	var inp = '23\n';
	var out = '';
	var codeSize = code.length;
	var i = 0, ip = 0, cp = 0, dp = 0, m = {};
	var loopIn = {}, loopOut = {};
	var tmp = [];
	for ( var cp = 0; cp &lt; codeSize ; cp++ ) {
		if ( code[cp] == '[' ) {
		    	tmp.push(cp);
		} else if ( code[cp] == ']' ) {
			loopOut[loopIn[cp] = tmp.pop()] = cp;
		}
	}

	for (var cp = 0; cp &lt; codeSize &amp;&amp; i &lt; 100000; cp++, i++) {
	    switch(code[cp]) {
		case '&gt;': dp++; break;
		case '&lt;': dp--; break;
		case '+': m[dp] = ((m[dp]||0)+1)&amp;255; break;
		case '-': m[dp] = ((m[dp]||0)-1)&amp;255; break;
		case '.': out += String.fromCharCode(m[dp]); break;
		case ',': m[dp] = inp.charCodeAt(ip++)||0; break;
		case '[': m[dp]||(cp=loopOut[cp]); break;
		case ']': cp = loopIn[cp]-1; break;
	    }
	}
	alert(out);
};
interpret_bf();</code></pre><p>I fiddled around with it a little bit and converted the interpreter into a <a title="Bookmarklet" href="http://de.wikipedia.org/wiki/Bookmarklet" target="_blank">bookmarklet</a> for easier access (and for fun). You can click here to test-drive the <a title="Brainf*ck interpreter bookmarklet" href="javascript:function%20interpret_bf%20()%20%7B%20%09var%20code%20=%20prompt(%22Input%20Brainf*ck%20code%20here!%22);%20%09var%20inp%20=%20'23%5Cn';%20%09var%20out%20=%20'';%20%20%09var%20codeSize%20=%20code.length;%20%09var%20i%20=%200,%20ip%20=%200,%20cp%20=%200,%20dp%20=%200,%20m%20=%20%7B%7D;%20%20%09var%20loopIn%20=%20%7B%7D,%20loopOut%20=%20%7B%7D;%20%09var%20tmp%20=%20%5B%5D;%20%09for%20(%20var%20cp%20=%200;%20cp%20%3C%20codeSize%20;%20cp++%20)%20%7B%20%09%09if%20(%20code%5Bcp%5D%20==%20'%5B'%20)%20%7B%20%09%09%20%20%20%20%09tmp.push(cp);%20%09%09%7D%20else%20if%20(%20code%5Bcp%5D%20==%20'%5D'%20)%20%7B%20%09%09%09loopOut%5BloopIn%5Bcp%5D%20=%20tmp.pop()%5D%20=%20cp;%20%09%09%7D%20%09%7D%20%09%20%09for%20(var%20cp%20=%200;%20cp%20%3C%20codeSize%20&amp;&amp;%20i%20%3C%20100000;%20cp++,%20i++)%20%7B%20%09%20%20%20%20switch(code%5Bcp%5D)%20%7B%20%09%09case%20'%3E':%20dp++;%20break;%20%09%09case%20'%3C':%20dp--;%20break;%20%09%09case%20'+':%20m%5Bdp%5D%20=%20((m%5Bdp%5D%7C%7C0)+1)&amp;255;%20break;%20%09%09case%20'-':%20m%5Bdp%5D%20=%20((m%5Bdp%5D%7C%7C0)-1)&amp;255;%20break;%20%09%09case%20'.':%20out%20+=%20String.fromCharCode(m%5Bdp%5D);%20break;%20%09%09case%20',':%20m%5Bdp%5D%20=%20inp.charCodeAt(ip++)%7C%7C0;%20break;%20%09%09case%20'%5B':%20m%5Bdp%5D%7C%7C(cp=loopOut%5Bcp%5D);%20break;%20%09%09case%20'%5D':%20cp%20=%20loopIn%5Bcp%5D-1;%20break;%20%09%20%20%20%20%7D%20%09%7D%20%09alert(out);%20%7D;%20interpret_bf();">Brainf*ck Interpreter</a> or drag it to your bookmarks toolbar for offline usage.</p>
<p>You can start by using the following string as an example. I took it from the original site and I guess if you are the least bit into programming you already know what it outputs.</p><pre class="crayon-plain-tag"><code>++++++++++[&gt;+++++++&gt;++++++++++&gt;+++&gt;+&lt;&lt;&lt;&lt;-]&gt;++.&gt;+.+++++++..+++.&gt;++.&lt;&lt;+++++++++++++++.&gt;.+++.------.--------.&gt;+.&gt;.</code></pre><p>Have fun playing with it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vigorouscoding.com/2011/12/brainfck-interpreter-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

