<?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>noCreativity.com &#187; fun coding</title>
	<atom:link href="http://nocreativity.com/blog/tag/fun-coding/feed" rel="self" type="application/rss+xml" />
	<link>http://nocreativity.com</link>
	<description>The life and discoveries of a new media artist</description>
	<lastBuildDate>Sat, 07 Jan 2012 17:03:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Actionscript is cool for developers. Not for me.</title>
		<link>http://nocreativity.com/blog/actionscript-is-cool-for-developers-not-for-me</link>
		<comments>http://nocreativity.com/blog/actionscript-is-cool-for-developers-not-for-me#comments</comments>
		<pubDate>Fri, 05 Feb 2010 13:25:10 +0000</pubDate>
		<dc:creator>Ronny</dc:creator>
				<category><![CDATA[Everything else]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[experimental experience]]></category>
		<category><![CDATA[for fucks sake!]]></category>
		<category><![CDATA[frustration]]></category>
		<category><![CDATA[fun coding]]></category>

		<guid isPermaLink="false">http://nocreativity.com/blog/?p=881</guid>
		<description><![CDATA[I love the creative process, I love experimenting, I love discovering new things and doing all kinds of stuff with it. I like to create toys that tell me something about myself. Having said that: I am a passionate Interactive Experience Designer. It&#8217;s a title I like because it tells you everything about me in [...]]]></description>
			<content:encoded><![CDATA[<p>I love the creative process, I love experimenting, I love discovering new things and doing all kinds of stuff with it. I like to create <em>toys</em> that tell me something about myself. Having said that: I am a passionate <em>Interactive Experience Designer</em>. It&#8217;s a title I like because it tells you everything about me in 3 words.</p>
<ul>
<li>Interactive: I want the user to be able to control what is happening. The user should always be part of the application. The user should actively be engaging with the application. Whatever happens should happen either because of the user or for the user to get an even better experience.</li>
<li>Experience: I don&#8217;t want them to just click a few buttons. I want my users to like the application. I want them to like it so much, that they start missing it once they&#8217;ve closed the browser window.</li>
<li>Designer: Although most of you know me as a developer, I want to make a point here: I don&#8217;t develop. I create.<br />
I write code in order to create a visual masterpiece, either in interaction or experience; not in code; not in application architecture; none of those non-Ronny words.</li>
</ul>
<p>That last point is really the reason of why I&#8217;m writing this. Having said the above, it should be clear Actionscript has enabled me to create cool stuff. Actionscript has enabled me to create whatever I could think off. But now at this point, I&#8217;m eager to go beyond my current limits, and I want to go there fast!<span id="more-881"></span></p>
<p>Only a few minutes ago, I was thinking about how I&#8217;d start creating this new (experimental) application. And before I even got to actually start building the whole thing, I lost motivation. It is <strong>SO MUCH WORK</strong> to only setup the application without  the actual features I wanted to build in the first place. How am I supposed to have fun?!</p>
<p>I came to realize how much I miss the AS2 coding style where you just created. You would just have pointed at a movieclip, and run a <em>loadMovie()</em>. It doesn&#8217;t get any quicker than that.<br />
Even worse: I missed the loosely typed, old fashioned JavaScript style of getting straight down to business. My guess is: You don&#8217;t understand what I&#8217;m trying to say here. Let&#8217;s show you a simple example: <em>Load an image and add it to a sprite on the stage</em>.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">IOErrorEvent</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Loader</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Bitmap</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">URLRequest</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">URLRequest</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLRequest</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;myPicture.jpg&quot;</span><span style="color: #000000;">&#41;</span>
<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Loader</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Loader</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
addListeners<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">load</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">url</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> addListeners<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">contentLoaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">COMPLETE</span><span style="color: #000066; font-weight: bold;">,</span> completeEvent<span style="color: #000000;">&#41;</span>
	<span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">contentLoaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">IOErrorEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">IO_ERROR</span><span style="color: #000066; font-weight: bold;">,</span> ioErrorHandler<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> removeListeners<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">contentLoaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">COMPLETE</span><span style="color: #000066; font-weight: bold;">,</span> completeEvent<span style="color: #000000;">&#41;</span>
	<span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">contentLoaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">IOErrorEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">IO_ERROR</span><span style="color: #000066; font-weight: bold;">,</span> ioErrorHandler<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> completeEvent<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	removeListeners<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> bm<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Bitmap</span> = <span style="color: #004993;">Bitmap</span><span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">target</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">content</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	someSprite<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>bm<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> ioErrorHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">IOErrorEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	removeListeners<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Ay, yo' pic is gone, mate!&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>This looks pretty straight forward, right? Create a loader, add the eventlisteners for completion and error, handle them, and remove the listeners. This is as straight forward as it gets.<br />
Well even though this is as basic as it get&#8217;s: It&#8217;s too much! This should be easier! Shorter! Hell: it should be more fun!</p>
<p>If loading this image is your application, then this is not that much of a problem. If loading 3 images is only a small (and almost not important) part of your test-application, then all of this code is way too much effort to focus on what you actually wanted to do: Test something completely different!</p>
<p>You might think I&#8217;m exaggerating here, but I&#8217;m not. When I think of a cool little experiment, I don&#8217;t want to spend all day starting to create it, only to end with 10 minutes of <em>writing the actual test code</em>. I don&#8217;t want to write 300 lines of code in order to just test something that consists of 10 lines.</p>
<p>I&#8217;m not asking Adobe to make AS4 shorter-handed, I&#8217;m not calling anybody out to create a framework that enables me to have fun, I&#8217;m not asking anybody something. I&#8217;m just getting tired of having to write bullshit JAVA-assed best practice code in tiny-experimental-proof-of-concept-test-applications.</p>
<p>I don&#8217;t feel like I&#8217;m using ActionScript anymore&#8230; I feel like I&#8217;m subjecting myself to it. I&#8217;m not in control. Actionscript is. If I don&#8217;t agree with that close minded language, it&#8217;s not going to cooperate in any way&#8230; I have to talk to it very genly, and choose my words wisely&#8230; What the f###? It&#8217;s a computer! Now bend over and do as your told!</p>
<p>When writing test-applications (which is basically what I do 90% of the time), I want to get the job done. I don&#8217;t want the code to look good. In fact, when creating this test builds that are a kick in the teeth for every best practice rule in the universe, I couldn&#8217;t be bothered in a lifetime about coding conventions&#8230; I just want my freaking app to start working!</p>
]]></content:encoded>
			<wfw:commentRss>http://nocreativity.com/blog/actionscript-is-cool-for-developers-not-for-me/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

