<?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>Craftymind</title>
	<atom:link href="http://www.craftymind.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.craftymind.com</link>
	<description>Hacking away at UI development</description>
	<lastBuildDate>Thu, 02 Sep 2010 16:22:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PNG compression on iPhone/iPad</title>
		<link>http://www.craftymind.com/2010/09/01/png-compression-on-iphoneipad/</link>
		<comments>http://www.craftymind.com/2010/09/01/png-compression-on-iphoneipad/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 23:59:17 +0000</pubDate>
		<dc:creator>Sean Christmann</dc:creator>
				<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://www.craftymind.com/?p=195</guid>
		<description><![CDATA[I was having a discussion with a coworker about png compression for the iphone and wanted to resolve the issue of whether we should bundle Fireworks source assets in xcode for quick editing and recompiling, or if we should export compressed versions to use for the bundling phase. I know the iPhone does it&#8217;s own [...]]]></description>
			<content:encoded><![CDATA[<p>I was having a discussion with a coworker about png compression for the iphone and wanted to resolve the issue of whether we should bundle Fireworks source assets in xcode for quick editing and recompiling, or if we should export compressed versions to use for the bundling phase. I know the<a href="http://discussions.apple.com/thread.jspa?threadID=1751896&amp;tstart=1"> iPhone does it&#8217;s own compression and byte reordering on pngs</a>, but I wasn&#8217;t sure how much compression was done, so here&#8217;s the answer.</p>
<p>I made a relatively complex png file for testing, the source file is a 230 kb Fireworks file, which is pretty close to some of the assets we have in our projects. A quick 24bit png export from fireworks produces a 6 kb png file with no visual fidelity loss. When the project is compiled to the device, the source image is compressed by xcode down to 19 kb, while the exported version actually increases in size to 7 kb. So far this supports the theory that manual compression can be up to 3 times better then letting xcode handle it for you.</p>
<p style="text-align: center;">Original Files in Xcode Project</p>
<p style="text-align: center;"><a href="http://www.craftymind.com/wp-content/uploads/2010/09/Screen-shot-2010-09-01-at-5.49.02-PM.png"><img class="aligncenter size-medium wp-image-196" title="Screen shot 2010-09-01 at 5.49.02 PM" src="http://www.craftymind.com/wp-content/uploads/2010/09/Screen-shot-2010-09-01-at-5.49.02-PM-288x300.png" alt="" width="288" height="300" /></a></p>
<p style="text-align: center;">Files compressed for iOS device build.</p>
<p style="text-align: center;"><a href="http://www.craftymind.com/wp-content/uploads/2010/09/Screen-shot-2010-09-01-at-5.50.03-PM.png"><img class="aligncenter size-medium wp-image-197" title="Screen shot 2010-09-01 at 5.50.03 PM" src="http://www.craftymind.com/wp-content/uploads/2010/09/Screen-shot-2010-09-01-at-5.50.03-PM-300x189.png" alt="" width="300" height="189" /></a></p>
<p>Additionally it seems that I suffered no visual loss by letting xcode recompress these png files, and decompression times for both pngs on the device took roughly 20 milliseconds each.</p>
<p>Honestly I think you could read these results either way, lazy developers may choose to just use source files in xcode and suffer a 3x penalty on images compression, for those that like to control the compression exactly on their files, you&#8217;ll be better off.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.craftymind.com/2010/09/01/png-compression-on-iphoneipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GUIMark 2 has been released! Compare HTML5 and Flash performance</title>
		<link>http://www.craftymind.com/2010/05/05/guimark-2-has-been-released-compare-html5-and-flash-performance/</link>
		<comments>http://www.craftymind.com/2010/05/05/guimark-2-has-been-released-compare-html5-and-flash-performance/#comments</comments>
		<pubDate>Wed, 05 May 2010 15:43:27 +0000</pubDate>
		<dc:creator>Sean Christmann</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Html]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.craftymind.com/?p=154</guid>
		<description><![CDATA[I am very happy to finally announce the release of GUIMark 2. After a couple weeks of building and testing, I feel I&#8217;ve finally created the best visual benchmarks I could come up with for comparing both Flash and HTML5. The results reveal a lot of interesting technical differences between the two environments. You can [...]]]></description>
			<content:encoded><![CDATA[<p>I am very happy to finally announce the release of GUIMark 2. After a couple weeks of building and testing, I feel I&#8217;ve finally created the best visual benchmarks I could come up with for comparing both Flash and HTML5. The results reveal a lot of interesting technical differences between the two environments. You can read the full details and results on the <a href="http://www.craftymind.com/guimark2/">GUIMark 2</a> project page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.craftymind.com/2010/05/05/guimark-2-has-been-released-compare-html5-and-flash-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blowing up HTML5 video and mapping it into 3D space</title>
		<link>http://www.craftymind.com/2010/04/20/blowing-up-html5-video-and-mapping-it-into-3d-space/</link>
		<comments>http://www.craftymind.com/2010/04/20/blowing-up-html5-video-and-mapping-it-into-3d-space/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 15:53:34 +0000</pubDate>
		<dc:creator>Sean Christmann</dc:creator>
				<category><![CDATA[Html]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.craftymind.com/?p=64</guid>
		<description><![CDATA[I&#8217;ve been doing a bit of experimenting with the Canvas and Video tags in HTML5 lately, and found some cool features hiding in plain sight. One of those is the Canvas.drawImage() api call. Here is the description on the draft site.
3.10 Images
To draw images onto the canvas, the drawImage method can be used.
This method can [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing a bit of experimenting with the Canvas and Video tags in HTML5 lately, and found some cool features hiding in plain sight. One of those is the Canvas.drawImage() api call. Here is the description on the draft site.</p>
<p><a href="http://dev.w3.org/html5/canvas-api/canvas-2d-api.html#images">3.10 Images</a></p>
<pre>To draw images onto the canvas, the <dfn id="dom-context-2d-drawimage" title="dom-context-2d-drawImage"><code>drawImage</code></dfn> method can be used.
This method can be invoked with three different sets of arguments:
<ul>
<li> <code>drawImage(<var>image</var>, <var>dx</var>, <var>dy</var>)</code></li>
<li> <code>drawImage(<var>image</var>, <var>dx</var>, <var>dy</var>, <var>dw</var>, <var>dh</var>)</code></li>
<li> <code>drawImage(<var>image</var>, <var>sx</var>, <var>sy</var>, <var>sw</var>, <var>sh</var>, <var>dx</var>, <var>dy</var>, <var>dw</var>, <var>dh</var>)</code></li>
</ul>

Each of those three can take either an <code><a href="http://www.w3.org/TR/html5/text-level-semantics.html#htmlimageelement">HTMLImageElement</a></code>, an <code><a href="http://www.w3.org/TR/html5/the-canvas-element.html#htmlcanvaselement">HTMLCanvasElement</a></code>, or an <code><a href="http://dev.w3.org/html5/spec/video.html#htmlvideoelement">HTMLVideoElement</a></code> for the <var>image</var> argument.</pre>
<p>The api lets you take the contents of specific HTML elements and draw them into a canvas, and the 3rd element in that list is just begging to be abused. Copying video into a canvas element means opening up the ability to manipulate or process video frames at runtime. Two concepts instantly came to mind that seemed like fun to try and figure out, here they are below.</p>
<h2 style="text-align: center;">Blowing apart fragments of video</h2>
<p style="text-align: center;"><a title="Exploding Video" href="http://craftymind.com/factory/html5video/CanvasVideo.html"><img class="aligncenter size-full wp-image-66" title="html5boom" src="http://www.craftymind.com/wp-content/uploads/2010/04/html5boom.jpg" alt="" width="600" height="363" /></a></p>
<p style="text-align: left;">Click around the video frame to blow up that part of the video, the exploded pieces will continue to play the video inside them. After a while they retract back to their original place. One feature I didn&#8217;t have time to figure out was adding depth to the explosion, so pieces that are closest to ground zero fly up into the air as they sail outward. With full shadow effects this could look really cool.</p>
<p style="text-align: center;">
<h2 style="text-align: center;">3D Video</h2>
<p style="text-align: center;"><a href="http://www.craftymind.com/factory/html5video/CanvasVideo3D.html"><img class="aligncenter size-full wp-image-68" title="html53d" src="http://www.craftymind.com/wp-content/uploads/2010/04/html53d.jpg" alt="" width="600" height="384" /></a></p>
<p style="text-align: left;">
<p style="text-align: left;">This demo in particular runs really well inside webkit based browsers, but not so much in Firefox. Firefox doesn&#8217;t appear to have any hardware acceleration for Ogg decoding so I had to drop the video size in half in order to run at acceptable framerates. Even still, Firefox chokes pretty badly on my Macbook Pro.</p>
<p style="text-align: left;">*Update* &#8211; I&#8217;ve changed the ogg video to be 640 x 360, prepare to see firefox weep</p>
<h2 style="text-align: left;">Lessons learned</h2>
<p>There&#8217;s a couple hints I found out along the way that are good to know if you want to play around with drawing video. First, you need a bit of hackish code to get this to work effeciently and it flows like this.</p>
<p style="text-align: center;">[Video playing] -&gt; [Draw Video onto Canvas 1] -&gt; [Draw fragments of Canvas 1 onto Canvas 2]</p>
<p style="text-align: left;">Don&#8217;t ask me why, but copying pixel data out of a video tag is expensive, so expensive that drawing it into a temporary canvas, and then drawing pieces of that temp canvas onto a final canvas is faster then just referencing the video tag repeatedly within the same loop. That&#8217;s why you&#8217;ll see 2 Canvases in the source code for the demos. I&#8217;m sure there&#8217;s a technical reason for this duplication process, but it&#8217;s a lazy reason.</p>
<p style="text-align: left;">Secondly, don&#8217;t try copying individual pixels around. You can still see the remnants of my first code attempt inside the explosion demo with getPixel() and setPixel(). This turned out to be horribly slow and completely unnecessary. Canvas.drawImage() + matrix transforms on the canvas space is far more efficient then handcrafted pixel pushing. On the other hand, pixel manipulation allows you to do things like <a href="https://developer.mozilla.org/samples/video/chroma-key/index.xhtml">runtime chroma keying</a>, get ready for a new wave of &#8220;clippy&#8221; style videos with full transparency popping over websites to help you out.</p>
<p style="text-align: left;">Lastly, I&#8217;m learning very quickly that not all browsers are created equal when it comes to performance, it&#8217;s a crapshoot when it comes to heavy video+image manipulation. Safari and Chrome work well with h.264, Firefox slogs along with Ogg Theora, and Opera is somewhere in the middle.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.craftymind.com/2010/04/20/blowing-up-html5-video-and-mapping-it-into-3d-space/feed/</wfw:commentRss>
		<slash:comments>106</slash:comments>
		</item>
		<item>
		<title>Come see my talk about memory management at Max 2009</title>
		<link>http://www.craftymind.com/2009/08/25/come-see-my-talk-about-memory-management-at-max-2009/</link>
		<comments>http://www.craftymind.com/2009/08/25/come-see-my-talk-about-memory-management-at-max-2009/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 14:22:50 +0000</pubDate>
		<dc:creator>Sean Christmann</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.craftymind.com/2009/08/25/come-see-my-talk-about-memory-management-at-max-2009/</guid>
		<description><![CDATA[It seems my obsession with the Flash and AIR internals keeps earning me a spot as a Max speaker. Following up on last years talk on general VM performance, I&#8217;ll be back this year to talk specifically about memory management and optimizations. While I covered memory a bit in last years talk, this year I&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p>It seems my <a href="http://www.craftymind.com/2008/04/18/updated-elastic-racetrack-for-flash-9-and-avm2/">obsession with the Flash and AIR internals</a> keeps earning me a spot as a Max speaker. Following up on last years <a href="http://www.craftymind.com/2008/11/20/max-2008-session-material/">talk on general VM performance</a>, I&#8217;ll be back this year to talk specifically about memory management and optimizations. While I covered memory a bit in last years talk, this year I&#8217;ll be going more indepth on memory techniques as well as how to profile your apps. As with all my sessions, you can be sure there&#8217;ll be plenty of code handed out by the end.</p>
<p>My session will be running on Tuesday at 1:30 PM and again on Wednesday at 5:00 PM, hope to see you all there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.craftymind.com/2009/08/25/come-see-my-talk-about-memory-management-at-max-2009/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>360iDev session materials on Quartz 2D</title>
		<link>http://www.craftymind.com/2009/03/04/360idev-session-materials-on-quartz-2d/</link>
		<comments>http://www.craftymind.com/2009/03/04/360idev-session-materials-on-quartz-2d/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 16:51:45 +0000</pubDate>
		<dc:creator>Sean Christmann</dc:creator>
				<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://www.craftymind.com/2009/03/04/360idev-session-materials-on-quartz-2d/</guid>
		<description><![CDATA[360iDev San Jose has been awesome so far and it&#8217;s not over yet, still a whole day of sessions to go. I&#8217;m putting my session materials up now during the keynote so I don&#8217;t forget after I&#8217;ve presented. Get the zip file here.
Update: I forgot to mention during my presentation, but the samples within the [...]]]></description>
			<content:encoded><![CDATA[<p>360iDev San Jose has been awesome so far and it&#8217;s not over yet, still a whole day of sessions to go. I&#8217;m putting my session materials up now during the keynote so I don&#8217;t forget after I&#8217;ve presented. Get the zip file <a href="http://www.craftymind.com/wp-content/uploads/2009/360iDev%20session%20materials.zip" title="360 iDev session materials">here</a>.</p>
<p>Update: I forgot to mention during my presentation, but the samples within the zip archive may contain memory leaks for the sake of code brevity. If you copy and paste the code samples into your own projects, you might need to make sure you add cleanup code to the end of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.craftymind.com/2009/03/04/360idev-session-materials-on-quartz-2d/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Creating the &#8216;loupe&#8217; or magnifying glass effect on the iphone.</title>
		<link>http://www.craftymind.com/2009/02/10/creating-the-loupe-or-magnifying-glass-effect-on-the-iphone/</link>
		<comments>http://www.craftymind.com/2009/02/10/creating-the-loupe-or-magnifying-glass-effect-on-the-iphone/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 18:06:57 +0000</pubDate>
		<dc:creator>Sean Christmann</dc:creator>
				<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://www.craftymind.com/2009/02/10/creating-the-loupe-or-magnifying-glass-effect-on-the-iphone/</guid>
		<description><![CDATA[One of my recent projects tasked me with figuring out how to recreate the magnifying glass effect that Apple uses inside textfields on the iPhone, but in a more generic way so anything on the screen could be magnified. Getting this effect is pretty simple in any visual framework once you figure out how masking [...]]]></description>
			<content:encoded><![CDATA[<p>One of my recent projects tasked me with figuring out how to recreate the magnifying glass effect that Apple uses inside textfields on the iPhone, but in a more generic way so anything on the screen could be magnified. Getting this effect is pretty simple in any visual framework once you figure out how masking works and which api will let you draw a bitmap of a given graphics layer. While the logic was simple enough, finding the right combination of apis was the painful part but I finally figured it out and wanted to share the code with everyone else trying to accomplish this task.</p>
<p>First up an example of what we&#8217;re able to accomplish with this effect.</p>
<p style="text-align: center"><img src="http://www.craftymind.com/wp-content/uploads/2009/02/loupeexample.png" alt="Magnifying effect on iPhone" /></p>
<p>You can magnify any UIView as well as the children of that view, images, text and 2d vectors are captured and magnified appropriately. There are couple critical pieces of this code to pay attention to.</p>
<p>First up, when a touch has been recorded long enough to kick off the magnifier effect, we create a new magnifier view that is the exact size of the view we want to magnify. This is important due to the way we&#8217;re going to be copying a bitmap of the original view. Once we know the view exists we call setNeedsDisplay on it which triggers drawRect inside of it.</p>
<pre>if(loop == nil){
	loop = [[MagnifierView alloc] initWithFrame:self.bounds];
	loop.viewref = self;
	[self addSubview:loop];
}
UITouch *touch = [touches anyObject];
loop.touchPoint = [touch locationInView:self];
[loop setNeedsDisplay];</pre>
<p>Next, when drawRect gets called inside the magnifier view we want to make a copy of the original view first. The reason the magnifier view is teh same size as the original view is because we are rendering the full context of the original view into our new context before grabbing a bitmap of it. If the magnifying view were smaller, the rendered bitmap would also be smaller. We want to cache the final bitmap so we&#8217;re not redrawing the original view every time the user moves their finger around the view. We&#8217;ll destroy that cached view and the magnifying glass when the user lets up off the screen.</p>
<pre>- (void)drawRect:(CGRect)rect {
	if(cachedImage == nil){
		UIGraphicsBeginImageContext(self.bounds.size);
		[self.viewref.layer renderInContext:UIGraphicsGetCurrentContext()];
		cachedImage = [UIGraphicsGetImageFromCurrentImageContext() retain];
		UIGraphicsEndImageContext();
	}</pre>
<p>Following that we need to generate a masked view for the magnified view to sit in, since the loop is a circle we have to mask out the corners and antialias the outer perimeter. This is accomplished using 2 images, the magnifying glass itself and a mask image with appropriate grayscale levels for masking.</p>
<pre>CGImageRef imageRef = [cachedImage CGImage];
CGImageRef maskRef = [[UIImage imageNamed:@"loopmask.png"] CGImage];
CGImageRef overlay = [[UIImage imageNamed:@"loop.png"] CGImage];
CGImageRef mask = CGImageMaskCreate(CGImageGetWidth(maskRef),
					CGImageGetHeight(maskRef),
					CGImageGetBitsPerComponent(maskRef),
					CGImageGetBitsPerPixel(maskRef),
                                        CGImageGetBytesPerRow(maskRef),
					CGImageGetDataProvider(maskRef),
					NULL,
					true);
//Create Mask
CGImageRef subImage = CGImageCreateWithImageInRect(imageRef, CGRectMake(touchPoint.x-18, touchPoint.y-18, 36, 36));
CGImageRef xMaskedImage = CGImageCreateWithMask(subImage, mask);</pre>
<p>Lastly, we&#8217;ll draw the magnifying glass and magnfied bitmap copy of our orginal view underneath the mask and we&#8217;re done. Since the iPhone uses a different coordinate system then other languages, we have to remember to flip the view upside down before drawing it.</p>
<pre>CGContextRef context = UIGraphicsGetCurrentContext();
CGAffineTransform xform = CGAffineTransformMake(
					1.0,  0.0,
					0.0, -1.0,
					0.0,  0.0);
CGContextConcatCTM(context, xform);
CGRect area = CGRectMake(touchPoint.x-42, -touchPoint.y, 85, 85);
CGRect area2 = CGRectMake(touchPoint.x-40, -touchPoint.y+2, 80, 80);
CGContextDrawImage(context, area2, xMaskedImage);
CGContextDrawImage(context, area, overlay);</pre>
<p>And that&#8217;s it, now we have a modular magnifying glass that can plug in to any UIView with minimal effort. If you&#8217;re looking for a way to add interactivity underneath the magnifying glass, like moving the cursor within a textfield, that&#8217;s gonna require a bit more custom code on the control you&#8217;re dealing with, and this example doesn&#8217;t really address that.</p>
<p>Download example: <a href="http://www.craftymind.com/wp-content/uploads/2009/02/masktest.zip" title="XCode magnifier example for iPhone">XCode magnifier example for iPhone</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.craftymind.com/2009/02/10/creating-the-loupe-or-magnifying-glass-effect-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Max 2008 session material</title>
		<link>http://www.craftymind.com/2008/11/20/max-2008-session-material/</link>
		<comments>http://www.craftymind.com/2008/11/20/max-2008-session-material/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 20:29:45 +0000</pubDate>
		<dc:creator>Sean Christmann</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.craftymind.com/2008/11/20/max-2008-session-material/</guid>
		<description><![CDATA[As promised, here&#8217;s the pdf of my recent Max 2008 session &#8220;Optimizing Adobe AIR for Code Execution, Memory, and Rendering&#8220;. There&#8217;s a good amount of Flash VM tips and tricks in there for reference whether you&#8217;re working in the browser or AIR. Thanks to everyone who attended and gave me high marks for my session. [...]]]></description>
			<content:encoded><![CDATA[<p>As promised, here&#8217;s the pdf of my recent Max 2008 session &#8220;<a href="http://www.craftymind.com/wp-content/uploads/2008/11/sean_christmann_optimizing_air_final.pdf">Optimizing Adobe AIR for Code Execution, Memory, and Rendering</a>&#8220;. There&#8217;s a good amount of Flash VM tips and tricks in there for reference whether you&#8217;re working in the browser or AIR. Thanks to everyone who attended and gave me high marks for my session. I guess I have to start thinking about what to talk about next year. For anyone who didn&#8217;t get to see the session live, the pdf really only tells half the story, so you may want to check out the session when it shows up on <a href="http://tv.adobe.com">http://tv.adobe.com</a> soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.craftymind.com/2008/11/20/max-2008-session-material/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Web app to extract torrent files out of Blizzard Downloader</title>
		<link>http://www.craftymind.com/2008/06/28/web-app-to-extract-torrent-files-out-of-blizzard-downloader/</link>
		<comments>http://www.craftymind.com/2008/06/28/web-app-to-extract-torrent-files-out-of-blizzard-downloader/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 23:54:40 +0000</pubDate>
		<dc:creator>Sean Christmann</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.craftymind.com/2008/06/28/web-app-to-extract-torrent-files-out-of-blizzard-downloader/</guid>
		<description><![CDATA[Diablo 3 was announced today and like many thousands of other gamers online right now I&#8217;m trying to download the 800mb high def gameplay trailer while putting up with the very clumsy Blizzard Downloader application. For those who don&#8217;t know, the Blizzard Downloader is just a mini BitTorrent client with a single torrent file baked [...]]]></description>
			<content:encoded><![CDATA[<p>Diablo 3 was announced today and like many thousands of other gamers online right now I&#8217;m trying to download the 800mb high def gameplay trailer while putting up with the very clumsy Blizzard Downloader application. For those who don&#8217;t know, the Blizzard Downloader is just a mini BitTorrent client with a single torrent file baked in. I&#8217;m not a big fan of the downloader because I already have a BitTorrent client that&#8217;s much better at bandwidth allocation and my firewall&#8217;s already set up for that client. I&#8217;d much rather download the movie with my own client instead of Blizzards so I&#8217;ve written a little flash app to help facilitate that.</p>
<p>To use this, just point the app at the url of any Blizzard Downloader exe file online (I&#8217;m not sure if it&#8217;ll work with the .dmg files) and hit the &#8216;Extract&#8217; button. A link will pop up below that you can click to save the torrent file. The file has no name by default so you&#8217;ll have to rename it &#8216;whatever.torrent&#8217; after it finishes downloading. The resulting torrent will still connect to Blizzards tracker and you&#8217;ll download the same file you would be if you were using the Blizzard Downloader app.</p>
<p>This should work with all browsers other then IE 7 and below, since IE doesn&#8217;t support the data:URI scheme to create dynamic files.</p>
<p style="text-align: center"><iframe src="http://www.craftymind.com/factory/BlizzardDownloader/main.html" style="width: 500px; height: 300px"></iframe><br />
<a href="http://www.craftymind.com/factory/BlizzardDownloader/srcview/">View Source</a></p>
<p>Example URLs:<br />
<a href="http://us.media.blizzard.com/1901200114/_video/downloaders/gameplaytrailer/Diablo3-gameplaytrailer_en-US-downloader.exe">Diablo 3 Gameplay Downloader</a><br />
<a href="http://www.starcraft2.com/movies/gameplay_video/1280_StarCraft2GameplayVideo_EnglishUS2-avi-downloader.exe">Starcraft 2 Gameplay Downloader</a></p>
<p>More Info:<br />
<a href="http://www.wowwiki.com/Blizzard_Downloader">Blizzard Downloader Wiki</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.craftymind.com/2008/06/28/web-app-to-extract-torrent-files-out-of-blizzard-downloader/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Introducing GUIMark &#8211; An RIA benchmark for Flex, Silverlight, HTML and more</title>
		<link>http://www.craftymind.com/2008/05/22/introducing-guimark-an-ria-benchmark-for-flex-silverlight-html-and-more/</link>
		<comments>http://www.craftymind.com/2008/05/22/introducing-guimark-an-ria-benchmark-for-flex-silverlight-html-and-more/#comments</comments>
		<pubDate>Thu, 22 May 2008 16:04:14 +0000</pubDate>
		<dc:creator>Sean Christmann</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Html]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://www.craftymind.com/2008/05/22/introducing-guimark-an-ria-benchmark-for-flex-silverlight-html-and-more/</guid>
		<description><![CDATA[If you&#8217;re wondering why I&#8217;ve been quiet the past few weeks it&#8217;s because I&#8217;ve been devoting most of my free time to finishing off a new benchmark I&#8217;m releasing today called GUIMark. GUIMark is kinda like an Acid3 test on speed that&#8217;s geared towards RIA technologies. The goal was to figure out how to implement [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re wondering why I&#8217;ve been quiet the past few weeks it&#8217;s because I&#8217;ve been devoting most of my free time to finishing off a new benchmark I&#8217;m releasing today called <a href="http://www.craftymind.com/guimark">GUIMark</a>. GUIMark is kinda like an <a href="http://acid3.acidtests.org/">Acid3 test</a> on speed that&#8217;s geared towards RIA technologies. The goal was to figure out how to implement a reference design in different runtimes and then benchmark how smoothly that design could be animated. So far I have implementations in DHTML, Flex, Java, Silverlight 1 and Silverlight 2. All the results and and implementation details can be found under the <a href="http://www.craftymind.com/guimark">GUIMark page</a>.</p>
<p>GUIMark shares alot in common with another RIA benchmark <a href="http://www.bubblemark.com/">Bubblemark</a>. I&#8217;ve <a href="http://www.craftymind.com/2008/04/11/why-bubblemark-is-a-poor-ui-benchmark/">written a bit</a> about Bubblemark and why I think an alternative is necessary, but I do believe Bubblemark and GUIMark can coexist while serving 2 different purposes. Alexey Gavrilov <a href="http://metalinkltd.com/?p=170">stated it best</a> in that he sees Bubblemark as a sortof &#8216;Hello World&#8217; launchpad into comparing different environments and I agree with him. Bubblemark is a *very* accessible test suite and its easy for any kind of developer to jump in and play around with performance techniques. GUIMark takes a different approach by trying to benchmark the types of UI elements common in our Web 2.0 world. This includes things like vector redraws, alpha transparencies, text reflow, bitmap motion, and 9 scale slicing rules. From there I just fill up the render pipeline until it becomes so over-saturated that it becomes easy to visually distinguish which rendering engines are more efficient then others. As a result, the benchmark is more complicated on a visual level and requires a bit more time then Bubblemark to understand the implementation rules. Lastly with GUIMark I&#8217;ve tried to get into some of the lower level details behind <a href="http://craftymind.com/guimark-inside">how rendering engines work</a> and how that&#8217;s affected the creation of this project.</p>
<p>I&#8217;m hoping that developers and designers will be able to use this test suite to identify any pros or cons to choosing a particular environment when visual transitions are a key element of the experience. I&#8217;m also hoping these benchmarks provide a spotlight for the community that we can turn toward the runtime engineers inside Sun or Adobe or Mozilla to demand better performance.</p>
<p><a href="http://www.craftymind.com/guimark">Go to GUIMark home page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.craftymind.com/2008/05/22/introducing-guimark-an-ria-benchmark-for-flex-silverlight-html-and-more/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>From AS3 to Objective-C: Flex vs iPhone development</title>
		<link>http://www.craftymind.com/2008/04/30/from-as3-to-objective-c-flex-vs-iphone-development/</link>
		<comments>http://www.craftymind.com/2008/04/30/from-as3-to-objective-c-flex-vs-iphone-development/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 16:44:54 +0000</pubDate>
		<dc:creator>Sean Christmann</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.craftymind.com/2008/04/30/from-as3-to-objective-c-flex-vs-iphone-development/</guid>
		<description><![CDATA[Recently I&#8217;ve been given the opportunity to work full time on commercial iPhone development at EffectiveUI. The most intriguing thing about the platform for me is having access to non traditional user input mechanisms. When I was playing around with Wii remote integration on the desktop, the potential was exciting, but the ubiquity was limiting. [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been given the opportunity to work full time on commercial iPhone development at <a href="http://effectiveui.com">EffectiveUI</a>. The most intriguing thing about the platform for me is having access to non traditional user input mechanisms. When I was playing around with Wii remote integration on the desktop, the potential was exciting, but the ubiquity was limiting. In the same way that pc game companies develop for the keyboard and mouse first and then provide hooks for joysticks after the fact, I knew that serious Wii remote integration in a desktop app was limited. Knowing that I can write software for the iPhone that always has access to multitouch and accelerometer data from the outset really allows for unique gestures as a first class citizen within an app.</p>
<p>After working with some code and spending time with the SDK itself, I couldn&#8217;t help but naturally compare UI development on the iPhone with GUI frameworks like Flex or Swing, heres the things that stand out so far.</p>
<ol>
<li>I&#8217;m really spoiled by higher level languages. A good high level language like ECMAScript, Ruby, or Java rides the fine line of &#8220;Making things as simple as possible, but no simpler&#8221;. I&#8217;ve never felt constrained by the language features in these technologies, only by the apis exposed. Stepping *back* into Objective-C certainly provides more power and flexibility in the language, but there&#8217;s a loss in productivity for me that I just can&#8217;t shake. Some of this loss comes from Objective-C&#8217;s design itself, and some of it just comes from XCodes introspection ability. For instance, I&#8217;m not sure if I&#8217;ll ever get to the point where I can read these lines of Objective-C as effeciently as their ActionScript counterparts would probably look.
<pre>NSString *aString = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
UIView *contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];</pre>
</li>
<li>Closed source UI frameworks suck. Most of what I learned about custom UI development in Flex I learned by inspecting the source code for the bundled controls. Ripping open Containers to see how layout rules are determined, or Lists to see how delegates are passed around, or the Image control to see how different display types are handled provides invaluable gems about implementing Flash apis. It has also helped me optimize the interactions of an app knowing the intentions of the developer who created the UI controls. With the iPhone SDK, you&#8217;re given documentation for the visual components, but no source to help determine how they work.</li>
<li>Core graphics and animation is really strong. Between Quartz and the OpenGL layer there&#8217;s alot of potential for getting easy access to some of the more complex visual hacks. Although I think 3D user interfaces are prone to usability issues, the iPhone is a much better device to explore them on then a standard keyboard and mouse interface.</li>
<li>Data binding, event listeners, and mxml. The Flash Player and Flex model provide features on top of the ActionScript language that arguably optimize UI needs and keep development more declarative. Cocoa development could really benefit from a &#8216;gui compiler&#8217; that takes Objective-C to a higher level and bakes in features that support common ui design patterns.</li>
<li>Garbage Collection. Objective-C 2.0 provides a unique system that lets you create objects that will be automatically garbage collected, or you can continue to manually manage object allocation/deallocation yourself. The concept sounds cool, but I can imagine allowing both systems to be mixed within the same project is just begging for trouble.</li>
</ol>
<p>So far I think that Objective-C has alot of power and some really awesome features that outclass GUI features in Flash, but compared to Flex development as a whole, I&#8217;d have to say that XCode and the included visual frameworks are not as sophisticated.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.craftymind.com/2008/04/30/from-as3-to-objective-c-flex-vs-iphone-development/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
