<?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>Noise and Heat</title>
	<atom:link href="http://www.noiseandheat.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.noiseandheat.com/blog</link>
	<description>This is my brain on truffles.</description>
	<lastBuildDate>Fri, 06 Aug 2010 22:38:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Aaaaaand, the hibernation ends</title>
		<link>http://www.noiseandheat.com/blog/2010/05/22/aaaaaand-the-hibernation-ends/</link>
		<comments>http://www.noiseandheat.com/blog/2010/05/22/aaaaaand-the-hibernation-ends/#comments</comments>
		<pubDate>Sat, 22 May 2010 21:34:24 +0000</pubDate>
		<dc:creator>mnem</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[procrastination]]></category>

		<guid isPermaLink="false">http://www.noiseandheat.com/blog/?p=70</guid>
		<description><![CDATA[Well, what a pleasant hiatus that was. Almost 3 months. However, no more! I shall get back to blogging random useless technical details about various things. I know you missed me really. So, what's happening next? Well, firstly, I'm temporarily turning to the Dark Side and getting a Nexus One. This shiny new toy should [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.noiseandheat.com%2Fblog%2F2010%2F05%2F22%2Faaaaaand-the-hibernation-ends%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.noiseandheat.com%2Fblog%2F2010%2F05%2F22%2Faaaaaand-the-hibernation-ends%2F&amp;style=normal&amp;service=bit.ly&amp;service_api=R_a533bbe2db9da401e33afc2aa4212e74" height="61" width="50" /><br />
			</a>
		</div>
<p>Well, what a pleasant hiatus that was. Almost 3 months. However, no more! I shall get back to blogging random useless technical details about various things. I know you missed me really.</p>
<p>So, what's happening next? Well, firstly, I'm temporarily turning to the Dark Side and getting a Nexus One. This shiny new toy should be in my sweaty paws within the week. I'm thoroughly looking forward to breaking it. I may even try some Flash programming on it, although I'm far more interested in the <a href="http://developer.android.com/sdk/ndk/index.html">Android NDK</a> at the moment. Since I have no creative bones, I want to see how well it lends itself to running <a href="http://www.box2d.org/">Box2D</a> (I know it's already been ported to NDK, but what's the point of Open Source if you can't rewrite the wheel every couple of weeks?).</p>
<p>After that, I may actually get around to finishing the shabby little accelerated computation engine thingy I was writing for <a href="http://www.adobe.com/devnet/pixelbender/">PixelBender</a> and <a href="http://www.adobe.com/devnet/flash/">Flash</a>.</p>
<p>Maybe by mentioning these things somewhere, I'll actually get around to finishing them...</p>
<p>Firstly, however, I'll have to tinker with Eclipse. I really don't like white backgrounds and black text in a code editor. Plus, I like procrastinating and putting off actual productive work.</p>
<p>While you are waiting for all those terribly exciting projects to appear, why not go an learn guitar? You'll have time. Try <a href="http://justinguitar.com/">http://justinguitar.com/</a>﻿ for nice course.</p>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.noiseandheat.com/blog/2010/05/22/aaaaaand-the-hibernation-ends/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How many bytes would a petabyte bite if a petabyte could bite bytes?</title>
		<link>http://www.noiseandheat.com/blog/2010/02/23/how-many-bytes-would-a-petabyte-bite-if-a-petabyte-could-bite-bytes/</link>
		<comments>http://www.noiseandheat.com/blog/2010/02/23/how-many-bytes-would-a-petabyte-bite-if-a-petabyte-could-bite-bytes/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 13:46:52 +0000</pubDate>
		<dc:creator>mnem</dc:creator>
				<category><![CDATA[Curiosities]]></category>
		<category><![CDATA[640kb is enough]]></category>
		<category><![CDATA[big numbers]]></category>
		<category><![CDATA[compactflash]]></category>
		<category><![CDATA[dr evil]]></category>
		<category><![CDATA[ginormous]]></category>

		<guid isPermaLink="false">http://www.noiseandheat.com/blog/?p=65</guid>
		<description><![CDATA[The CompactFlash association has just released a new specification for future CompactFlash cards. It involves big numbers. 144 petabytes big, to be specific. But how big is that really? 144 petabytes = 150,994,944 gigabytes. Production quality 1080p video: 3 gigabits per second which equals 0.375 gigabytes per second. So, using that: 150,994,944 / 0.375 = [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.noiseandheat.com%2Fblog%2F2010%2F02%2F23%2Fhow-many-bytes-would-a-petabyte-bite-if-a-petabyte-could-bite-bytes%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.noiseandheat.com%2Fblog%2F2010%2F02%2F23%2Fhow-many-bytes-would-a-petabyte-bite-if-a-petabyte-could-bite-bytes%2F&amp;style=normal&amp;service=bit.ly&amp;service_api=R_a533bbe2db9da401e33afc2aa4212e74" height="61" width="50" /><br />
			</a>
		</div>
<p>The CompactFlash association has just released a <a href="http://www.compactflash.org/pr/100222cf5prs.pdf">new specification</a> for future CompactFlash cards. It involves big numbers. 144 petabytes big, to be specific. But how big is that really?</p>
<blockquote><p>144 petabytes = 150,994,944 gigabytes.<br />
Production quality 1080p video: <a href="http://en.wikipedia.org/wiki/1080p#Production_standards">3 gigabits per second</a> which equals 0.375 gigabytes per second.</p>
<p>So, using that:</p>
<table border="0" cellspacing="0">
<tr>
<td>150,994,944 / 0.375</td>
<td>= 402,653,184 seconds of video</td>
</tr>
<tr>
<td></td>
<td>= 6,710,886.4 minutes of video</td>
</tr>
<tr>
<td></td>
<td>= 111,848.106. hours of video</td>
</tr>
<tr>
<td></td>
<td>= 4,660.337. days of video</td>
</tr>
<tr>
<td></td>
<td>= <strong>12.768 years of continuous video</strong></td>
</tr>
</table>
</blockquote>
<p>Got that? 12 years of <strong>continuous</strong> 1080p video. Slap around 9 of those in a camera and you can continuously video almost anyone for their <em>entire life</em>. May as well be generous and use 10 - that should let you stick some low quality sound recording of their entire life on it too.</p>
<p>I suspect the future will see an increased number of murders due to screenings of family holiday videos...</p>
]]></content:encoded>
			<wfw:commentRss>http://www.noiseandheat.com/blog/2010/02/23/how-many-bytes-would-a-petabyte-bite-if-a-petabyte-could-bite-bytes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The curious case of Eclipse, msysgit, and the obstinate dot files</title>
		<link>http://www.noiseandheat.com/blog/2010/02/17/the-case-of-eclipse-msysgit-and-the-obstinate-dot-files/</link>
		<comments>http://www.noiseandheat.com/blog/2010/02/17/the-case-of-eclipse-msysgit-and-the-obstinate-dot-files/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 21:05:50 +0000</pubDate>
		<dc:creator>mnem</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[fdt]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[msysgit]]></category>
		<category><![CDATA[powerflasher]]></category>
		<category><![CDATA[tortoisegit]]></category>

		<guid isPermaLink="false">http://www.noiseandheat.com/blog/?p=59</guid>
		<description><![CDATA[Just a quick tip if you are having problems with Eclipse, FDT or other Eclipse based tool and writing to dot files cloned from a git repository. If you are seeing messages about not have permission to write to ".project", ".as3_classpath" and so on, there's a reasonable chance that msysgit (or potentially TortoiseGit) automatically set [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.noiseandheat.com%2Fblog%2F2010%2F02%2F17%2Fthe-case-of-eclipse-msysgit-and-the-obstinate-dot-files%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.noiseandheat.com%2Fblog%2F2010%2F02%2F17%2Fthe-case-of-eclipse-msysgit-and-the-obstinate-dot-files%2F&amp;style=normal&amp;service=bit.ly&amp;service_api=R_a533bbe2db9da401e33afc2aa4212e74" height="61" width="50" /><br />
			</a>
		</div>
<p>Just a quick tip if you are having problems with Eclipse, FDT or other Eclipse based tool and writing to dot files cloned from a git repository. </p>
<p>If you are seeing messages about not have permission to write to "<code>.project</code>", "<code>.as3_classpath</code>" and so on, there's a reasonable chance that <a href="http://code.google.com/p/msysgit/">msysgit</a> (or potentially <a href="http://code.google.com/p/tortoisegit/">TortoiseGit</a>) automatically set the dot files to hidden to mimic what you see on a real^h^h^h^h 'nix based machine. While this is nice, for some reason Eclipse, or possibly the underlying Java file calls, can't write to hidden files on Windows so you get access denied messages.</p>
<p>Fortunately, the solution is very simple. Open up a git Bash prompt, and enter this:</p>
<blockquote><p><code>git config --global core.hidedotfiles false</code></p></blockquote>
<p>And that's it. With <code>core.hidedotfiles</code> set to false, <a href="http://code.google.com/p/msysgit/">msysgit</a> will no longer set the hidden property on dot files, and Eclipse should be ready to rock.</p>
<p>Of course, this only affects newly fetched files, so if you want to clear the hidden flag on existing files, jump into a cmd prompt (or this may work from the git bash prompt) and type:</p>
<blockquote><p><code>cd folder_containing_the_repository</code><br/><code>attrib /s /d -H *</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.noiseandheat.com/blog/2010/02/17/the-case-of-eclipse-msysgit-and-the-obstinate-dot-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compound operators, new and You.</title>
		<link>http://www.noiseandheat.com/blog/2010/02/03/compound-operators-new-and-you/</link>
		<comments>http://www.noiseandheat.com/blog/2010/02/03/compound-operators-new-and-you/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 22:31:15 +0000</pubDate>
		<dc:creator>mnem</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[ABC]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Bytecode]]></category>
		<category><![CDATA[oddities]]></category>
		<category><![CDATA[useless discoveries]]></category>

		<guid isPermaLink="false">http://increasingbiologicalentropy.wordpress.com/?p=30</guid>
		<description><![CDATA[Pop quiz time! What appears on stage with the following code: public function newChild() :void { addChild(new CircleSprite()).x += 50; } Wrong. This is what appears: Of course, all you clever observant folks will have noticed that that the circle's x coordinate is being set using a compound operator, +=. That's the culprit in this [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.noiseandheat.com%2Fblog%2F2010%2F02%2F03%2Fcompound-operators-new-and-you%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.noiseandheat.com%2Fblog%2F2010%2F02%2F03%2Fcompound-operators-new-and-you%2F&amp;style=normal&amp;service=bit.ly&amp;service_api=R_a533bbe2db9da401e33afc2aa4212e74" height="61" width="50" /><br />
			</a>
		</div>
<p>Pop quiz time!</p>
<p>What appears on stage with the following code:</p>
<pre class="brush: as3; wrap-lines: false;">
public function newChild() :void
{
	addChild(new CircleSprite()).x += 50;
}
</pre>
<p>Wrong. This is what appears:</p>
<div style="text-align: center;">
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="swfobj_0" width="256" height="256" align="center">
      <param name="movie" value="http://www.noiseandheat.com.php5-10.dfw1-1.websitetestlink.com/blog/wp-content/uploads/2010/01/CompoundOperatorsAndNew.swf" />
      <param name="align" value="center" />
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="http://www.noiseandheat.com.php5-10.dfw1-1.websitetestlink.com/blog/wp-content/uploads/2010/01/CompoundOperatorsAndNew.swf" width="256" height="256" align="center">
      <!--<![endif]-->
        <p>The Flash plugin is required to view this object.</p>
      <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>
</div>
<p>Of course, all you clever observant folks will have noticed that that the circle's x coordinate is being set using a compound operator, <code>+=</code>. That's the culprit in this unusual case.</p>
<p>Now, putting aside any crazy reasons for wanting to write code like that in the first place, what's actually going on here? Well, one way to find that out is by shrinking ourselves down and entering <strong>Inner (ABC) Space</strong>! <em>(SPACE... SPAce... space...)</em></p>
<p>Yep, it's time to get roll up our sleeves and get <em>oh</em>, so dirty rooting around in the ActionScript Bytecode (herein known as ABC to spare my keyboard). It's not going to be pretty, and I'll probably misinterpret some of it but, just like a good orbital nuking, it's the only way to be sure. Also, like an orbital nuking, it's a little bit over the top, but I wanted an excuse to start becoming a little more au fait with ABC because, well, because I'm a geek and I like knowing how things work.</p>
<p>So, here are those lines once more, but in a format closer to what the Flash player VM sees:</p>
<pre class="brush: plain; highlight: [7,8,11,12]; wrap-lines: false;">
function :CompoundOperatorsAndNew:::newChild()::void
maxStack:3 localCount:1 initScopeDepth:9 maxScopeDepth:10
    getlocal0
    pushscope
    findpropstrict	:addChild
    findpropstrict	:CircleSprite
    constructprop 	:CircleSprite (0)
    callproperty  	:addChild (1)
    findpropstrict	:addChild
    findpropstrict	:CircleSprite
    constructprop 	:CircleSprite (0)
    callproperty  	:addChild (1)
    getproperty   	:x
    pushbyte      	50
    add
    setproperty   	:x
    returnvoid
0 Extras
0 Traits Entries
</pre>
<p>Highlighted are the 2 groups of lines that cause the problem. 2 circle classes are being created with the lines "<code>constructprop :CircleSprite (0)</code>", and both are being added as children with "<code>callproperty :addChild (1)</code>".</p>
<p>Before we muse on why Flash compiled the ActionScript at the top of the article into this ABC, let's have a closer look at the bytecode and try and work out what it is doing.</p>
<p>In general bytecode, like assembler, is pretty straightforward. There's just an awful lot of it to trek through. So don't be intimidated.</p>
<p>One thing to be aware of however are the values on the stack. The stack is just a last in - first out list of items which operands (the word before the colon in the ABC listing) have access to. Different operands affect different numbers of items on the stack. The <a href="http://www.adobe.com/devnet/actionscript/articles/avm2overview.pdf">AVM 2 Overview</a> document Adobe provide will tell you exactly how many, and what it'll do to them.</p>
<p>Ok, let's take them a line at a time. I'll stick in comments to the right of the lines showing the contents of the stack before and after the line is executed, like this: <code>// [stack contents before line] =&gt; [stack contents after line]</code>.</p>
<pre class="brush: plain; gutter: false; toolbar: false; wrap-lines: false;">
function :CompoundOperatorsAndNew:::newChild()::void
maxStack:3 localCount:1 initScopeDepth:9 maxScopeDepth:10
</pre>
<p>Ok, we're going to ignore this bit. All it's doing is setting up the stack and a few other bits so the code in the function can start to execute in a sane fashion. The most important thing here is <code>localCount</code> which tells us how many arguments are in the registers having been passed to the function. You may notice there are no arguments, but localCount is 1. Well, that's because the instance of the object that the method was called on is always passed as the first argument. That's what the "<code>this</code>" keyword refers to. The compiler passes it for you automatically.</p>
<pre class="brush: plain; gutter: false; toolbar: false; wrap-lines: false;">
    getlocal0		// [empty] =&gt; this
</pre>
<p>Grabs the item in register 0 and puts it on the stack. As mentioned above, the "<code>this</code>" object is in register 0, so that is what is put on the stack.</p>
<pre class="brush: plain; gutter: false; toolbar: false; wrap-lines: false;">
    pushscope		// this =&gt; [empty]
</pre>
<p>Moves "<code>this</code>" onto the scope stack. The scope stack holds the objects to be searched when certain items and properties are requested. You can think of this little code flourish as what allows you to refer to a variable or method in the current instance of the class, more or less.</p>
<pre class="brush: plain; gutter: false; toolbar: false; wrap-lines: false;">
    findpropstrict	:addChild		// [empty] =&gt; this
</pre>
<p>This line searches the objects in the scope stack for a property called "<code>addChild</code>", and puts it on the stack. In this case, since the class we're in inherits from <code>DisplayObjectContainer</code>, it's instance is pushed onto the stack.</p>
<pre class="brush: plain; gutter: false; toolbar: false; wrap-lines: false;">
    findpropstrict	:CircleSprite	// this =&gt; this, class CircleSprite
</pre>
<p>Here the class definition for <code>CircleSprite</code> is being searched for.</p>
<pre class="brush: plain; gutter: false; toolbar: false; wrap-lines: false;">
    constructprop 	:CircleSprite (0)	// this, class CircleSprite =&gt; this, circle0
</pre>
<p>This grabs the class definition which was found for <code>CircleSprite</code> and constructs a new object from it and places it on the stack. I've numbered the instance, just so things are clearer later on. The number in brackets after the class name indicates how many arguments to pop off the stack and pass to the class constructor as arguments - in this case, there are none.</p>
<pre class="brush: plain; gutter: false; toolbar: false; wrap-lines: false;">
    callproperty  	:addChild (1)	// this, circle0 =&gt; circle0
</pre>
<p>Here, addChild is called on the object found by <code>"findpropstrict :addChild"</code> above. As you can see, the call has <code>(1)</code> argument - in this case the <code>circle0</code> instance. <code>circle0</code> appears on the stack afterwards because it is returned from <code>addChild</code>.</p>
<p>Just in case you are wondering, the number of arguments specified are popped off the stack and put into registers before the property, <code>addChild</code> is called. That's why addChild is called on "<code>this</code>" rather than <code>circle0</code>.</p>
<pre class="brush: plain; gutter: false; toolbar: false; wrap-lines: false;">
    findpropstrict	:addChild // circle0 =&gt; circle0, this
</pre>
<p>Behaves exactly as described earlier. Also, this is where the confusion starts.</p>
<pre class="brush: plain; gutter: false; toolbar: false; wrap-lines: false;">
    findpropstrict	:CircleSprite	// circle0, this =&gt; circle0, this, class CircleSprite
</pre>
<p>Again, the same as before.</p>
<pre class="brush: plain; gutter: false; toolbar: false; wrap-lines: false;">
    constructprop 	:CircleSprite (0)	// circle0, this, class CircleSprite =&gt; circle0, this, circle1
</pre>
<p>Ditto.</p>
<p>This is why we have 2 circles. Note, I've called this instance <code>circle1</code> in order to differentiate it from the previously constructed instance. Internally, CircleSprite counts it's instances, so <code>circle0</code> matches the circle marked 0 on the screen, and <code>circle1</code> matches the circle marked 1.</p>
<pre class="brush: plain; gutter: false; toolbar: false; wrap-lines: false;">
    callproperty  	:addChild (1)	// circle0, this, circle1 =&gt; circle0, circle1
</pre>
<p>Looking familiar? Good! That means you're paying attention...</p>
<p>Remember, <code>addChild</code> returns what was passed to it, so that's why circle1 is back on the stack.</p>
<pre class="brush: plain; gutter: false; toolbar: false; wrap-lines: false;">
    getproperty   	:x	// circle0, circle1 =&gt; circle0, 0
</pre>
<p>This line is reading the value of <code>x</code> from <code>circle1</code>, which will be 0. It's shoved on to the stack.</p>
<pre class="brush: plain; gutter: false; toolbar: false; wrap-lines: false;">
    pushbyte      	50	// circle0, 0 =&gt; circle0, 0, 50
</pre>
<p>Pushes are pretty straightforward - it's pushing the literal value onto the stack. It's interesting to note here that this code is pushing a byte, rather than an int or a number - the compiler seems to choose the "narrowest" possible type for a literal.</p>
<pre class="brush: plain; gutter: false; toolbar: false; wrap-lines: false;">
    add				// circle0, 0, 50 =&gt; circle0, 50
</pre>
<p>Does exactly what it says on the tin, which is to add things. In this case, the two most recent items on the stack are added, and the result is pushed back onto the stack.</p>
<pre class="brush: plain; gutter: false; toolbar: false; wrap-lines: false;">
    setproperty   	:x	// circle0, 50 =&gt; [empty]
</pre>
<p>Here, x is set to the value which is popped from the stack, and it's set on the object that's popped next. So, in this case, circle0.x is set to 50 - hence the movie having circle 0 to the right of circle 1.</p>
<pre class="brush: plain; gutter: false; toolbar: false; wrap-lines: false;">
    returnvoid		// [empty] =&gt; [empty]
</pre>
<p>It, er, returns void...</p>
<p>So there you have it. Your first dive into ABC. *prod*. Are you still awake? Honestly, this stuff is interesting. Really.</p>
<p>One nice thing about looking at ABC is that you can see which idioms compile to more terse ABC code. As a <strong>very</strong> general rule of thumb, the terser the code, the faster it will run. This is not a law though - you still have to profile things. Unfortunately, Adobe don't provide any normalised speed of execution for each operand, so it is hard to get a good grasp of what operand sequence is fastest, except by experience.</p>
<p>Hopefully, I'll be taking a bit more of a look at what ABC is output by the flex compiler over the next few months. I may even get around comparing the quality of the output to that of <a href="http://haxe.org/">Haxe</a>. If I'm feeling particularly daring, I may even write some bytecode. I know, the party never stops around me...</p>
<p><em><font size="-2" color="#cccccc">[Those of you who actually make it this far may have noticed that I haven't actually answered the "why" of my initial problem. I've left that as an exercise for the reader. Or, more honestly, I'm still thinking about it...]</font></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.noiseandheat.com/blog/2010/02/03/compound-operators-new-and-you/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>sh-zenburnish: SyntaxHighlighter Evolved, zenburn stylee</title>
		<link>http://www.noiseandheat.com/blog/2010/01/29/sh-zenburnish-syntaxhighlighter-evolved-zenburn-stylee/</link>
		<comments>http://www.noiseandheat.com/blog/2010/01/29/sh-zenburnish-syntaxhighlighter-evolved-zenburn-stylee/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 21:43:51 +0000</pubDate>
		<dc:creator>mnem</dc:creator>
				<category><![CDATA[Utilities]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[colour]]></category>
		<category><![CDATA[SyntaxHighlighter Evolved]]></category>
		<category><![CDATA[zenburn]]></category>
		<category><![CDATA[zenburnish]]></category>

		<guid isPermaLink="false">http://www.noiseandheat.com/blog/?p=41</guid>
		<description><![CDATA[Ok, more real coding avoidance*. I hacked together a little SyntaxHighlighter Evolved colour scheme so that my eyes aren't offended when I post code in this blog. Here's an example with lines 5-7 highlighted: package dt.particles { import flash.display.Bitmap; import flash.display.BitmapData; import flash.display.Sprite; import flash.geom.Point; import flash.geom.Rectangle; /** * Particle manager. * * @author David [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.noiseandheat.com%2Fblog%2F2010%2F01%2F29%2Fsh-zenburnish-syntaxhighlighter-evolved-zenburn-stylee%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.noiseandheat.com%2Fblog%2F2010%2F01%2F29%2Fsh-zenburnish-syntaxhighlighter-evolved-zenburn-stylee%2F&amp;style=normal&amp;service=bit.ly&amp;service_api=R_a533bbe2db9da401e33afc2aa4212e74" height="61" width="50" /><br />
			</a>
		</div>
<p>Ok, more real coding avoidance<a href="#footnote_20100129">*</a>. I hacked together a little SyntaxHighlighter Evolved colour scheme so that my eyes aren't offended when I post code in this blog. Here's an example with lines 5-7 highlighted:</p>
<pre class="brush: as3; highlight: [5,6,7]; toolbar: false; wrap-lines: false;">
package dt.particles
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Sprite;
	import flash.geom.Point;
	import flash.geom.Rectangle;

	/**
	 * Particle manager.
	 *
	 * @author David Wagner
	 *
	 */
	public class PMan extends Sprite
	{
		private var _emitters :Array;
		private var _bd :BitmapData;
		private var _b :Bitmap;
		private var _r :Rectangle;
		private var _zeroPoint :Point;

		/**
		 * Constructor.
		 *
		 * @param p_width Width of the particle area.
		 * @param p_height Height of the particle area.
		 *
		 */
		public function PMan( p_width :int, p_height :int )
		{
			super();

			_zeroPoint = new Point();

			_r = new Rectangle( 0, 0, p_width, p_height );
			_bd = new BitmapData(_r.width, _r.height, true, 0x000000);
			_b = new Bitmap(_bd, &quot;never&quot;, false);

			addChild(_b);

			_emitters = [];
		}

		/**
		 * Adds a new particle emitter.
		 *
		 * @param p_particleCount Number of particles
		 * @param p_x Emitter X
		 * @param p_y Emitter Y
		 * @param p_colours Array of colours the particles are randomly chosen from
		 * @param p_bouncy Indicates if the particles should bouncy at the edge of the area, or die.
		 * @param p_boundingArea Indicates a constraining box the particles must appear in. If null, the full size of the area is used.
		 *
		 */
		public function addEmitter( p_particleCount :Number, p_x :Number, p_y :Number, p_colours :Array, p_bouncy :Boolean, p_boundingArea :Rectangle = null ) :void
		{
			if( p_boundingArea == null )
			{
				p_boundingArea = _r;
			}
			_emitters.push( new PEmitter( p_particleCount, p_x, p_y, _bd, p_boundingArea, p_colours, p_bouncy ) );
		}

		/**
		 * Updates each emitter.
		 *
		 * @param p_emitter
		 * @param p_index
		 * @param p_array
		 *
		 */
		private function forEach_updateEmitter( p_emitter :PEmitter, p_index :int, p_array :Array ) :void
		{
			p_emitter.update();
		}

		/**
		 * Updates all the emitters.
		 *
		 */
		public function update() :void
		{
			_bd.lock();
			_bd.fillRect(_r, 0x00ffffff);
			_emitters.forEach( forEach_updateEmitter );
			_bd.unlock();
		}
	}
}
</pre>
<p>You can grab the theme from, along with installation instructions:</p>
<ul>
<li><a href="http://github.com/mnem/sh-zenburnish">http://github.com/mnem/sh-zenburnish</a></li>
</ul>
<p>Assuming I don't break anything when I move flat tomorrow, I may actually get around to finishing off the post on ActionScript bytecode that I've been fiddling with.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.noiseandheat.com/blog/2010/01/29/sh-zenburnish-syntaxhighlighter-evolved-zenburn-stylee/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>fb-zenburnish: A zenburn inspired colour scheme for FlashBuilder 4</title>
		<link>http://www.noiseandheat.com/blog/2010/01/25/fb-zenburnish-a-zenburn-inspired-colour-scheme-for-flashbuilder-4/</link>
		<comments>http://www.noiseandheat.com/blog/2010/01/25/fb-zenburnish-a-zenburn-inspired-colour-scheme-for-flashbuilder-4/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 01:39:26 +0000</pubDate>
		<dc:creator>mnem</dc:creator>
				<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[colour]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[fb-zenburnish]]></category>
		<category><![CDATA[schemes]]></category>
		<category><![CDATA[zenburn]]></category>

		<guid isPermaLink="false">http://increasingbiologicalentropy.wordpress.com/?p=23</guid>
		<description><![CDATA[Ok, in order to avoid any real coding at the weekend, I set about messing with the colours and settings within FlashBuilder 4 to turn it into something a little less searing on the eyeballs. These are the results: Certainly more soothing on my eyeballs anyway. You can grab the theme from: http://github.com/mnem/fb-zenburnish There are [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.noiseandheat.com%2Fblog%2F2010%2F01%2F25%2Ffb-zenburnish-a-zenburn-inspired-colour-scheme-for-flashbuilder-4%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.noiseandheat.com%2Fblog%2F2010%2F01%2F25%2Ffb-zenburnish-a-zenburn-inspired-colour-scheme-for-flashbuilder-4%2F&amp;style=normal&amp;service=bit.ly&amp;service_api=R_a533bbe2db9da401e33afc2aa4212e74" height="61" width="50" /><br />
			</a>
		</div>
<p>Ok, in order to avoid any real coding at the weekend, I set about messing with the colours and settings within FlashBuilder 4 to turn it into something a little less searing on the eyeballs. These are the results:</p>
<div><a title="View 'AS' on Flickr.com" href="http://www.flickr.com/photos/praxinoscope/4302359622/sizes/o/" target="_blank"><img src="http://farm5.static.flickr.com/4069/4302359622_c1020a3992_t.jpg" border="0" alt="AS" width="100" /> </a><a title="View 'CSS' on Flickr.com" href="http://www.flickr.com/photos/praxinoscope/4302359802/sizes/o/" target="_blank"><img src="http://farm5.static.flickr.com/4049/4302359802_a5cae87de9_t.jpg" border="0" alt="CSS" width="100" /></a> <a title="View 'MXML' on Flickr.com" href="http://www.flickr.com/photos/praxinoscope/4301611631/sizes/o/" target="_blank"><img src="http://farm5.static.flickr.com/4023/4301611631_e00165fc35_t.jpg" border="0" alt="MXML" width="100" /></a></div>
<p>Certainly more soothing on my eyeballs anyway. You can grab the theme from:</p>
<ul>
<li><a href="http://github.com/mnem/fb-zenburnish">http://github.com/mnem/fb-zenburnish</a></li>
</ul>
<p>There are instructions for installation in the README file, but for the sake of padding out an entry to make it seem like I wrote more, here they are in full:</p>
<ol>
<li>Launch FlashBuilder.</li>
<li>Choose File → Export → Other.</li>
<li>Open General and select Preferences.</li>
<li>Click next, select "Export all" and "Browse…" to save a backup of your current preferences somewhere.</li>
<li>Keep that backup safe in case this all goes titsup.</li>
<li>Choose File → Import → Other.</li>
<li>Open General and select Preferences.</li>
<li>Browse to where you've downloaded fb-zenburnish.epf and select it. Make sure "Import all" is selected, ignore any warnings and hit "Finish".</li>
<li>Panic, as your colours look crazy-ass.</li>
<li>Choose File → Restart to reload Eclipse.</li>
<li>Exhale gently and let the sublime colours wash, soothingly, through your eyeballs, caressing your optic nerves, and then engaging in a group hug with your brain.</li>
</ol>
<p>Well, I like it anyway. I don't hold with this modern nonsense of having a white background for everything. I'm a programmer, not a surface dweller.</p>
<p>In case you are interested, the original (and best, of course) zenburn for vim theme is here:</p>
<ul>
<li><a href="http://slinky.imukuppi.org/zenburnpage/">http://slinky.imukuppi.org/zenburnpage/</a></li>
</ul>
<p>P.S. I highly recommend downloading <a href="http://www.levien.com/type/myfonts/inconsolata.html">Inconsolata</a> to use a programming font. It's beautiful, and practical. I generally use <a href="http://www.ms-studio.com/FontSales/anonymouspro.html">Anonymous Pro</a> for texty programming stuff, but that doesn't seem to work very well in Eclipse. I may switch all my editors to <a href="http://www.levien.com/type/myfonts/inconsolata.html">Inconsolata</a> though, now I know it exists.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.noiseandheat.com/blog/2010/01/25/fb-zenburnish-a-zenburn-inspired-colour-scheme-for-flashbuilder-4/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Further ruminations on Adobe, Flash and mobile devices.</title>
		<link>http://www.noiseandheat.com/blog/2010/01/04/further-ruminations-on-adobe-flash-and-mobile-devices/</link>
		<comments>http://www.noiseandheat.com/blog/2010/01/04/further-ruminations-on-adobe-flash-and-mobile-devices/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 18:15:56 +0000</pubDate>
		<dc:creator>mnem</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flash lite]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://increasingbiologicalentropy.wordpress.com/?p=10</guid>
		<description><![CDATA[[This entry was originally going to be a comment on Christopher Caleb's post, "Adobe's Mobile Strategy Fundamentally Flawed?", but I have an annoying habit of writing rather more than I have to, so I granted this corpulent comment a promotion to First Real Post.] Flash on mobile devices. It's an interesting prospect. Of course, it's [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.noiseandheat.com%2Fblog%2F2010%2F01%2F04%2Ffurther-ruminations-on-adobe-flash-and-mobile-devices%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.noiseandheat.com%2Fblog%2F2010%2F01%2F04%2Ffurther-ruminations-on-adobe-flash-and-mobile-devices%2F&amp;style=normal&amp;service=bit.ly&amp;service_api=R_a533bbe2db9da401e33afc2aa4212e74" height="61" width="50" /><br />
			</a>
		</div>
<p><em><font size="-1" color="#929292">[This entry was originally going to be a comment on Christopher Caleb's post, "<a href="http://www.yeahbutisitflash.com/?p=332">Adobe's Mobile Strategy Fundamentally Flawed?</a>", but I have an annoying habit of writing rather more than I have to, so I granted this corpulent comment a promotion to First Real Post.]</font></em></p>
<p>Flash on mobile devices. It's an interesting prospect. Of course, it's more than a prospect, it already exists to some extent. Adobe's dream is to create an engine which allows Flash content to be run on all major platforms, and it has set it's sights upon mobile devices because they offer the tantalising prospect of being a bit of a cash cow, one way or another.</p>
<p><a href="http://www.yeahbutisitflash.com/?p=332">Christopher's post</a> is a partial response to <a href="http://aralbalkan.com/2895">Aral Balkan's post</a>, so you may want to have a quick skim over them. They're quite interesting. I'll wait here for you. Go on. Just don't forget to come back, y'hear?</p>
<p>Read them? Good. Let us begin...</p>
<p>Flash Lite. Failure? Yes. Success? Yes.</p>
<p>Flash Lite failed in it's grand vision of providing a large, consistent, mobile platform on which to view Flash style content. Currently only a handful of phone models support the latest (backwardly not very compatible) version of Flash Lite, and even amongst those, horrible incompatibility pixies strut around presenting their fail feathers.</p>
<p>It succeeded, however, as a necessary first failure in order to work out what was probably for a successful cross platform, uh, platform. I'm sure within Adobe it spurred many people along paths that needed to trodden in order to move toward a reasonable version of Flash on mobile devices. It also succeeded in inspiring a small but remarkably dedicated segment of developers and designers, giving them a tantalising hint as to what could have been, or should have been possible for mobile app creation.</p>
<p>It's time to let it rest in peace though. Flash Lite, as it stands, is dead, or perhaps the living dead. Not only is it quite expensive to develop content for, there is very little chance you will recoup all of that investment. Distribution for developed applications remains a nightmare because it is modelled on the old, pre-Apple distribution mechanisms: carrier deals, random user stumbling and dusty website warehouses holding applications of unknown quality.</p>
<p>The next big failure looming for Adobe is their Flash web plugin for mobile devices. Why will it be a failure? Partially because even on my dual core, 64 bit laptop with 4GB of RAM and a ridiculously huge amount of memory bandwidth, the (mis)use of Flash causes a significant proportion of web pages to run far slower than they need to. This isn't necessarily the fault of the <a href="http://en.wikipedia.org/wiki/Rich_Internet_application">RIA</a>/Flash game you came to look at, but when you add all the Flash adverts and other random elements into the mix, it is an unpleasant experience. Now try to imagine this on a mobile device which can't throw data around very fast, either in terms of memory bandwidth or network bandwidth. Then mix in a healthy dose of sucky and uncertain device input capabilities, developer assumptions over screen size and resolution and pour in some speed-of-development-over-engineering-worthiness-of-development and inhale the resulting heady scent of user disappointment. It's going to be a mess.</p>
<p>Traditionally, this is where advocates of mobile and desktop convergence drag out the old dying horse representing the Speed of Technological Advance. Alas, unless desktop technologies stand still (they won't), this argument is hobbling along on shaky hooves as it is. Coupled with cold hard physical facts to do with heat dispersion versus space, battery life versus cpu power and, finally, the harsh pointy stick of cost of manufacture, we can lead the old horse gently to the great big glue factory in the sky. Small handheld mobile devices will be playing catch up for the currently foreseeable future.</p>
<p>Adobe's last gasp for mobile success rests on other people doing Adobe's work for them, and providing nice hooks for a core Flash component on all mobile devices. This is likely to yield one or two high profile success stories, but will be followed by an awful lot of poorer stories.</p>
<p>Part of the reason is what commercial advantage do OEMs have for ensuring excellent compatibility for Adobe's Open Screen project?</p>
<p>Initially, there will be a significant marketing advantage for the first devices out to support Flash well. It will be a bullet point which will persuade many uncertain buyers to part with their cash. However, this will be a short lived advantage. If it is popular, a version will be quickly offered on other devices (apart from iPhone of course), summarily added to the marketing bullet point list, and then left to rot in good-enough feature hell. And lo, the mistakes of version fragmentation shall be repeated once more.</p>
<p>An alternative would be for Adobe to keep the versions for every platform in house and ensure the quality itself. However, it's very unlikely they have the resources to undertake such an enormous project, and they certainly won't have all the access they need to pre-market devices to ensure quality.</p>
<p>A brief diversion here over the responsibilities of OEMs. Many people blame OEMs for device fragmentation hurting 3rd party technologies. They are wrong. The pusher of the proclaimed cross platform product bears the majority of that burden. Said pusher (be it Adobe, be it Sun) is likely to benefit most from wide adoption, so they must accept most of the risk. OEMs have already invested a huge amount in the design, production and likely marketing of the device, so they have already brought enough to the table.</p>
<p>Where was I? Ah yes, version fragmentation. Version fragmentation is bad, however hardware fragmentation is worse. Version fragmentation can be reasonably dealt with, hardware fragmentation is almost impossible to deal with fully. Beyond some sort of certification program run by Adobe to ensure a minimum set of capabilities, there isn't a great deal Adobe can offer. This will result in the Flash Lite mistake of writing for the largest common feature set, which may not be the most enticing feature set.</p>
<p>The problems faced by Adobe here are not new. They were the same problems brought to light by Java Mobile (or whatever J2ME is called these days). Sun failed to solve them despite coming up with some cunning engineering solutions. Adobe so far seems to be hoping that user pressure from desire for Flash on mobile will solve some of these issues for them, rather than provide any solid technical solutions.</p>
<p>This is was a long, and somewhat Adobe negative entry. However, for the record, I like Flash. My job involves creating wonderful things with Flash. It is with vim and finesse Flash allows me to do this. Flash has changed the face of the Desktop Experience by allowing non computer science people into the geek ridden programming club, and it has changed it for the better, in my opinion.</p>
<p>However, I have to agree with Aral to a large extent. Adobe are drunk on success. This is very dangerous. The clear speed of development advantages offered by Flash are diminishing. JavaScript in browsers now provide enough scripting power to replace Flash in a great many RIA areas, and unlike Adobe's laughable claim that Flash is a de facto standard, JavaScript actually is a de facto standard. Flash still reigns supreme in the browser game arena, but even here it is under attack from the hugely impressive <a href="http://unity3d.com/">Unity3D</a> framework. AIR has no clear challenger, but it also has no broad adoption either, despite it's excellent selling points for desktop application development. In a future where <a href="http://en.wikipedia.org/wiki/Google_Chrome_OS">GoogleOS</a> controls your life and your choice of applications, AIR may become irrelevant.</p>
<p>It's a tough future, but I hope Adobe sip some strong coffee, awaken from their reverie, and stride confidently through it. It's not too late for them… Yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.noiseandheat.com/blog/2010/01/04/further-ruminations-on-adobe-flash-and-mobile-devices/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>So&#8230;</title>
		<link>http://www.noiseandheat.com/blog/2009/12/06/so/</link>
		<comments>http://www.noiseandheat.com/blog/2009/12/06/so/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 00:29:07 +0000</pubDate>
		<dc:creator>mnem</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://increasingbiologicalentropy.wordpress.com/?p=3</guid>
		<description><![CDATA[Almost a new year, so that must make it time for a new blog. I'll see how well this one fares*. [* Erm. Ok. I just notice that I had misspelled this word. That's a bit embarrassing.]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.noiseandheat.com%2Fblog%2F2009%2F12%2F06%2Fso%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.noiseandheat.com%2Fblog%2F2009%2F12%2F06%2Fso%2F&amp;style=normal&amp;service=bit.ly&amp;service_api=R_a533bbe2db9da401e33afc2aa4212e74" height="61" width="50" /><br />
			</a>
		</div>
<p>Almost a new year, so that must make it time for a new blog. I'll see how well this one fares<a href="#footnote">*</a>.</p>
<p>
<em><a name="footnote"><font size="-2" color="#cccccc">[* Erm. Ok. I just notice that I had misspelled this word. That's a bit embarrassing.]</font></a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.noiseandheat.com/blog/2009/12/06/so/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
