<?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>Calculating Infinity &#187; Hint</title>
	<atom:link href="http://calculating-infinity.de/category/hint/feed/" rel="self" type="application/rss+xml" />
	<link>http://calculating-infinity.de</link>
	<description></description>
	<lastBuildDate>Sun, 23 May 2010 16:38:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Combining phing and Closure Compiler</title>
		<link>http://calculating-infinity.de/2010/05/23/combining-phing-and-closure-compiler/</link>
		<comments>http://calculating-infinity.de/2010/05/23/combining-phing-and-closure-compiler/#comments</comments>
		<pubDate>Sun, 23 May 2010 16:34:54 +0000</pubDate>
		<dc:creator>Jan Gorman</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Hint]]></category>
		<category><![CDATA[build automation]]></category>
		<category><![CDATA[Closure]]></category>
		<category><![CDATA[Compiler]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[phing]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://calculating-infinity.de/?p=221</guid>
		<description><![CDATA[I have been relatively late to the exciting world of build automation. This has mainly to do with the sys-admin at my old job who insisted on deploying everything himself. By hand. Which left us developers with the task of writing job descriptions for each deploy. And they would typically consist of a list similar [...]]]></description>
			<content:encoded><![CDATA[<p>I have been relatively late to the exciting world of build automation. This has mainly to do with the sys-admin at my old job who insisted on deploying everything himself. By hand. Which left us developers with the task of writing job descriptions for each deploy. And they would typically consist of a list similar to this:</p>
<ul>
<li>Move the packed tar.gz to the server</li>
<li>Unpack the tar.gz</li>
<li>Copy the contents to the web root</li>
<li>Chmod files xyz to 777</li>
<li>…</li>
</ul>
<p>Oh the madness. Seeing this it should of course be immediately clear that doing this by hand is extremely error prone and slow and plain stupid. Time to automate!</p>
<p><strong>What can my build-file do for me?</strong></p>
<p><strong> </strong>There are plenty of flavours to choose from. After some evaluation I settled on <a href="http://phing.info/trac/" target="_blank">phing</a> since the project I&#8217;m currently using this for is PHP based, the build files are easy to read (based on <a href="http://ant.apache.org/" target="_blank">Apache Ant</a>) and it&#8217;s extensible. phing comes shipped with plenty of tasks for you to choose from and if there&#8217;s ever anything missing you want to get done quick and dirty you can run an <a href="http://phing.info/docs/guide/stable/chapters/appendixes/AppendixB-CoreTasks.html#ExecTask" target="_blank">Exec Task</a> and have PHP run something on the console for you – neat!</p>
<p><strong>Closure</strong></p>
<p>Phing also comes with a JSMin task but this being 2010 I wanted to use Closure compiler because it&#8217;s a much sweeter deal and because I wanted to write this blog post. The files produced are smaller and you can do all kinds of cool things like merging files into one (fewer requests!) or removing dead code. It&#8217;s pretty cool. I put the whole thing up on <a href="http://github.com/JanGorman/ClosureTask" target="_blank">Github</a> so feel free to download it from there and fork me. I&#8217;ve included a sample task as well so that should get you up and running pretty quickly.  And did I mention <a href="http://github.com/JanGorman/ClosureTask" target="_blank">Github</a>?</p>
]]></content:encoded>
			<wfw:commentRss>http://calculating-infinity.de/2010/05/23/combining-phing-and-closure-compiler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Chrome for Mac</title>
		<link>http://calculating-infinity.de/2009/12/08/google-chrome-for-mac/</link>
		<comments>http://calculating-infinity.de/2009/12/08/google-chrome-for-mac/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 19:30:50 +0000</pubDate>
		<dc:creator>Jan Gorman</dc:creator>
				<category><![CDATA[Hint]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Chromium]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[Webkit]]></category>

		<guid isPermaLink="false">http://calculating-infinity.de/?p=205</guid>
		<description><![CDATA[It has arrived, the official Google Chrome Beta for Mac is here. I&#8217;ve been regularly compiling the Chromium project for Mac for a while now and it soon replaced Safari as my default browser. I can honestly recommend it to anyone. Lightning fast with beautiful Webkit font rendering; give it a try, you won&#8217;t be [...]]]></description>
			<content:encoded><![CDATA[<p>It has arrived, the official <a href="http://www.google.com/chrome" target="_blank">Google Chrome Beta for Mac</a> is here. I&#8217;ve been regularly compiling the Chromium project for Mac for a while now and it soon replaced Safari as my default browser. I can honestly recommend it to anyone. Lightning fast with beautiful Webkit font rendering; give it a try, you won&#8217;t be disappointed!</p>
]]></content:encoded>
			<wfw:commentRss>http://calculating-infinity.de/2009/12/08/google-chrome-for-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Framework Classloading Performance</title>
		<link>http://calculating-infinity.de/2009/08/25/zend-framework-classloading-performance/</link>
		<comments>http://calculating-infinity.de/2009/08/25/zend-framework-classloading-performance/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 20:56:36 +0000</pubDate>
		<dc:creator>Jan Gorman</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Hint]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Autoloading]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[classloading]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[gsed]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[micro-optimization]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[phing]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[require_once]]></category>
		<category><![CDATA[S3]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://calculating-infinity.de/?p=178</guid>
		<description><![CDATA[As outlined in the Zend Framework Documentation it&#8217;s possible to speed things up a little by removing (almost) all require_once calls from the Framework and relying solely on the autoloading mechanism. I haven&#8217;t benchmarked this and I&#8217;m fairly certain that it&#8217;s a case of micro-optimization but I thought I&#8217;d give it a try anyway. The [...]]]></description>
			<content:encoded><![CDATA[<p>As outlined in the <a href="http://framework.zend.com/manual/en/performance.classloading.html#performance.classloading.striprequires.sed" target="_blank">Zend Framework Documentation</a> it&#8217;s possible to speed things up a little by removing (almost) all require_once calls from the Framework and relying solely on the autoloading mechanism. I haven&#8217;t benchmarked this and I&#8217;m fairly certain that it&#8217;s a case of <a href="http://www.codinghorror.com/blog/archives/000185.html" target="_blank">micro-optimization</a> but I thought I&#8217;d give it a try anyway. The snipped posted there has some minor problems on OS X however. For one the -wholename parameter for find isn&#8217;t implemented (can be replaced with -path) and although sed does work, you need to use gsed if you want to pass the arguments as described in the documentation. So here&#8217;s the OS X version of the snippet:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-name</span> <span style="color: #ff0000;">'*.php'</span> <span style="color: #660033;">-not</span> <span style="color: #660033;">-path</span> <span style="color: #ff0000;">'*/Loader/Autoloader.php'</span> \
  <span style="color: #660033;">-not</span> <span style="color: #660033;">-path</span> <span style="color: #ff0000;">'*/Application.php'</span> <span style="color: #660033;">-print0</span> <span style="color: #000000; font-weight: bold;">|</span> \
  <span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #660033;">-0</span> gsed <span style="color: #660033;">--regexp-extended</span> <span style="color: #660033;">--in-place</span> <span style="color: #ff0000;">'s/(require_once)/\/\/ \1/g'</span></pre></div></div>

<p><strong>Update:</strong> As part of my new job we&#8217;re currently working on a merchandise management system which is hosted somewhere in the Amazon S3 Cloud. The performance impact of removing all the require_once calls was very dramatic on that system. So looks like this hint can come in handy after all in certain situations. What I now did is add the snippet to the <a href="http://phing.info/trac/" target="_blank">phing</a> deployment task that takes care of updating Zend Framework. Since it&#8217;s hardly any effort at all there really isn&#8217;t any reason not to do this.</p>
]]></content:encoded>
			<wfw:commentRss>http://calculating-infinity.de/2009/08/25/zend-framework-classloading-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let&#8217;s make the web faster</title>
		<link>http://calculating-infinity.de/2009/06/24/lets-make-the-web-faster/</link>
		<comments>http://calculating-infinity.de/2009/06/24/lets-make-the-web-faster/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 05:40:39 +0000</pubDate>
		<dc:creator>Jan Gorman</dc:creator>
				<category><![CDATA[Hint]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[faster-loader websites]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[Steve Souders]]></category>
		<category><![CDATA[Yslow]]></category>

		<guid isPermaLink="false">http://calculating-infinity.de/?p=170</guid>
		<description><![CDATA[This is interesting, Google ist putting together a site about best practices on how to speed up websites. I&#8217;ve long been a fan of Yslow and using Steve Souders&#8217; 14 rules for faster-loading websites so this is will be a very welcome addition. Evangelize, spread the message to your colleagues at work. From my experience [...]]]></description>
			<content:encoded><![CDATA[<p>This is interesting, Google ist putting together <a href="http://code.google.com/speed/" target="_blank">a site</a> about best practices on how to speed up websites. I&#8217;ve long been a fan of <a href="https://addons.mozilla.org/de/firefox/addon/5369" target="_blank">Yslow</a> and using <a href="http://stevesouders.com/hpws/" target="_blank">Steve Souders&#8217; 14 rules for faster-loading websites</a> so this is will be a very welcome addition. Evangelize, spread the message to your colleagues at work. From my experience there&#8217;s still a lot to be done!</p>
]]></content:encoded>
			<wfw:commentRss>http://calculating-infinity.de/2009/06/24/lets-make-the-web-faster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Typing The Letters A-E-S Into Your Code? You’re Doing It Wrong!</title>
		<link>http://calculating-infinity.de/2009/06/07/typing-the-letters-a-e-s-into-your-code-you%e2%80%99re-doing-it-wrong/</link>
		<comments>http://calculating-infinity.de/2009/06/07/typing-the-letters-a-e-s-into-your-code-you%e2%80%99re-doing-it-wrong/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 08:42:58 +0000</pubDate>
		<dc:creator>Jan Gorman</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Hint]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[AES]]></category>
		<category><![CDATA[Encryption]]></category>
		<category><![CDATA[Matasano Chargen]]></category>

		<guid isPermaLink="false">http://calculating-infinity.de/?p=167</guid>
		<description><![CDATA[Really interesting article about encryption by Matasano Chargen, well worth a read.]]></description>
			<content:encoded><![CDATA[<p>Really interesting article about <a href="http://www.matasano.com/log/1749/typing-the-letters-a-e-s-into-your-code-youre-doing-it-wrong/" target="_blank">encryption</a> by Matasano Chargen, well worth a read.</p>
]]></content:encoded>
			<wfw:commentRss>http://calculating-infinity.de/2009/06/07/typing-the-letters-a-e-s-into-your-code-you%e2%80%99re-doing-it-wrong/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend_Form_Element_Exception</title>
		<link>http://calculating-infinity.de/2009/05/28/zend_form_element_exception/</link>
		<comments>http://calculating-infinity.de/2009/05/28/zend_form_element_exception/#comments</comments>
		<pubDate>Thu, 28 May 2009 12:32:18 +0000</pubDate>
		<dc:creator>Jan Gorman</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Hint]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[Zend_Form]]></category>
		<category><![CDATA[Zend_Form_Element_Exception]]></category>
		<category><![CDATA[Zend_Form_Element_File]]></category>

		<guid isPermaLink="false">http://calculating-infinity.de/?p=158</guid>
		<description><![CDATA[After upgrading to Zend Framework 1.8 earlier this week we&#8217;ve had a few more minor glitches that have surfaced since. The one which took me some time to figure out was 'Zend_Form_Element_Exception' with message 'No file decorator found... unable to render file element' To ease the generation of forms and get them all to look [...]]]></description>
			<content:encoded><![CDATA[<p>After <a href="http://calculating-infinity.de/2009/05/25/replacing-zend_loader-with-zend_loader_autoloader/">upgrading to Zend Framework 1.8</a> earlier this week we&#8217;ve had a few more minor glitches that have surfaced since. The one which took me some time to figure out was <code>'Zend_Form_Element_Exception' with message 'No file decorator found... unable to render file element'</code> To ease the generation of forms and get them all to look the same we use a class named Form_Static_Render that the Zend_Form gets pushed into and which takes care of styling, decorators, preview pages and display of form errors. It&#8217;s quite a clever little thing. To achieve the proper styling our extension to Zend_Form calls</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$element</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">clearDecorators</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p> and then either adds the default ViewHelper or whatever gets passed to the method and that was the root of the problem. When clearing the decorators, Zend_Form_Element_File now explicitly requires you to add the File Decorator again before rendering. After discovering that, it turned out being a quick fix…</p>
]]></content:encoded>
			<wfw:commentRss>http://calculating-infinity.de/2009/05/28/zend_form_element_exception/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Replacing Zend_Loader with Zend_Loader_Autoloader</title>
		<link>http://calculating-infinity.de/2009/05/25/replacing-zend_loader-with-zend_loader_autoloader/</link>
		<comments>http://calculating-infinity.de/2009/05/25/replacing-zend_loader-with-zend_loader_autoloader/#comments</comments>
		<pubDate>Mon, 25 May 2009 12:25:16 +0000</pubDate>
		<dc:creator>Jan Gorman</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Hint]]></category>
		<category><![CDATA[Autoloading]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[Zend_Loader]]></category>
		<category><![CDATA[Zend_Loader_Autoloader]]></category>

		<guid isPermaLink="false">http://calculating-infinity.de/?p=153</guid>
		<description><![CDATA[It&#8217;s been a while since my last post but I&#8217;ve been very busy the last couple of weeks. That&#8217;s what also kept me from updating to Zend Framework 1.8 (or 1.8.1 by now already) in our production environment. It has been very smooth so far, the only change that required some work was the deprecation [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while since my last post but I&#8217;ve been very busy the last couple of weeks. That&#8217;s what also kept me from updating to Zend Framework 1.8 (or 1.8.1 by now already) in our production environment. It has been very smooth so far, the only change that required some work was the deprecation of the old</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">Zend_Loader<span style="color: #339933;">::</span><span style="color: #004000;">registerAutoload</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'...'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>However, upgrading everything to the new Zend_Loader_Autoloader_Interface actually worked quite a lot easier than expected:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> Webwerk_Autoloader implements Zend_Loader_Autoloader_Interface
<span style="color: #009900;">&#123;</span>
  <span style="color: #009933; font-style: italic;">/**
   * Autoloader
   */</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> autoload <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$class</span> <span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// Custom autoloading of different classes</span>
    <span style="color: #666666; font-style: italic;">// Each one has a return value</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Fallback</span>
    try <span style="color: #009900;">&#123;</span>
      Zend_Loader<span style="color: #339933;">::</span><span style="color: #004000;">loadClass</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$class</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">return</span> <span style="color: #000088;">$class</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> catch <span style="color: #009900;">&#40;</span> Exception <span style="color: #000088;">$e</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Nothing there</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>And in the bootstrapper we have:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$autoloader</span> <span style="color: #339933;">=</span> Zend_Loader_Autoloader<span style="color: #339933;">::</span><span style="color: #004000;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$autoloader</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setFallbackAutoloader</span><span style="color: #009900;">&#40;</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$autoloader</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">pushAutoloader</span><span style="color: #009900;">&#40;</span> <span style="color: #000000; font-weight: bold;">new</span> Webwerk_Autoloader<span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>So the only change was making Webwerk_Autoloader match the Zend_Loader_Autoloader_Interface as well as changing the bootstrap to use the default autoloader as fallback and registering the custom autoloader.</p>
]]></content:encoded>
			<wfw:commentRss>http://calculating-infinity.de/2009/05/25/replacing-zend_loader-with-zend_loader_autoloader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Quick Profiler</title>
		<link>http://calculating-infinity.de/2009/04/23/php-quick-profiler/</link>
		<comments>http://calculating-infinity.de/2009/04/23/php-quick-profiler/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 18:12:50 +0000</pubDate>
		<dc:creator>Jan Gorman</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Hint]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PQP]]></category>
		<category><![CDATA[Zend]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://calculating-infinity.de/?p=151</guid>
		<description><![CDATA[Wow, this is really cool. Ryan Campbell of Particle Tree just put up a post about a tool they developed and now released called PQP to help with profiling PHP code. We developed and use something similar on top of Zend Framework (just not as cool looking) and ours doesn&#8217;t come with the memory logging [...]]]></description>
			<content:encoded><![CDATA[<p>Wow, this is really cool. Ryan Campbell of Particle Tree just put up a post about a tool they developed and now released called <a href="http://particletree.com/features/php-quick-profiler/" target="_blank">PQP</a> to help with profiling PHP code. We developed and use something similar on top of Zend Framework (just not as cool looking) and ours doesn&#8217;t come with the memory logging and timing features that PQP provides. Definitely going to give this a try and spruce up the own tool..</p>
]]></content:encoded>
			<wfw:commentRss>http://calculating-infinity.de/2009/04/23/php-quick-profiler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend_Form decorator</title>
		<link>http://calculating-infinity.de/2009/04/06/zend_form-decorator/</link>
		<comments>http://calculating-infinity.de/2009/04/06/zend_form-decorator/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 07:05:05 +0000</pubDate>
		<dc:creator>Jan Gorman</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Hint]]></category>
		<category><![CDATA[decorator]]></category>
		<category><![CDATA[duck typing]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[Zend_Form]]></category>

		<guid isPermaLink="false">http://calculating-infinity.de/?p=136</guid>
		<description><![CDATA[Since Matthew Weier O&#8217;Phinney can explain this a lot better than I ever could, I&#8217;ll simply refer you to his excellent post about Zend_Form decorators, well worth a read.]]></description>
			<content:encoded><![CDATA[<p>Since Matthew Weier O&#8217;Phinney can explain this a lot better than I ever could, I&#8217;ll simply refer you to his excellent post about <a href="http://weierophinney.net/matthew/archives/212-The-simplest-Zend_Form-decorator.html" target="_blank">Zend_Form decorators</a>, well worth a read.</p>
]]></content:encoded>
			<wfw:commentRss>http://calculating-infinity.de/2009/04/06/zend_form-decorator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting swf to flv</title>
		<link>http://calculating-infinity.de/2009/03/30/converting-swf-to-flv/</link>
		<comments>http://calculating-infinity.de/2009/03/30/converting-swf-to-flv/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 20:48:05 +0000</pubDate>
		<dc:creator>Jan Gorman</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Hint]]></category>
		<category><![CDATA[Convert]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[FLV]]></category>
		<category><![CDATA[Macports]]></category>
		<category><![CDATA[Pygame]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[pyvnc2swf]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://calculating-infinity.de/?p=122</guid>
		<description><![CDATA[.. the open source way. I&#8217;m always amazed by the search results that come up for some additional functionality you need for Flash. Today I was trying to find a good way to convert a swf file to an flv (btw. Adobe, you&#8217;d think that something as simple as this should be possible out of [...]]]></description>
			<content:encoded><![CDATA[<p>.. the open source way. I&#8217;m always amazed by the search results that come up for some additional functionality you need for Flash. Today I was trying to find a good way to convert a swf file to an flv (btw. Adobe, you&#8217;d think that something as simple as this should be possible out of the box, right?). What you end up with are some dodgy looking sites with ugly Windows-only software that always seems to cost either $49.99 or $99.99. Whatev&#8217;s I thought, there must be a better way. This is the story of how Python saved the day.</p>
<p><span id="more-122"></span> First we head to the distinctly uber-hacker-looking project home page for <a href="http://www.unixuser.org/~euske/vnc2swf/pyvnc2swf.html" target="_blank">pyvnc2swf</a>. As the documentation states, you should go with the Python version since it&#8217;s the one that&#8217;s actively being developed. To run the code you&#8217;ll also need <a href="http://www.pygame.org/download.shtml" target="_blank">pygame</a> (takes the &#8220;C++&#8221; out of &#8220;Game Development&#8221;). Being a <a href="http://www.macports.org" target="_blank">Macports</a> man myself, I was happy to find a portfile by the name of <a href="http://trac.macports.org/browser/trunk/dports/python/py-game/Portfile" target="_blank">py-game</a>. A quick</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> py-game</pre></div></div>

<p>and we&#8217;re off. Pygame runs under Python 2.4 so it&#8217;s a good idea to also install the <a href="http://trac.macports.org/browser/trunk/dports/sysutils/python_select/Portfile" target="_blank">python_select</a> port so that you can switch between different versions of Python in case you need to.</p>
<p>Back to pyvnc2swf. Now it&#8217;s simply a matter of copying your swf to the directory where you downloaded the files to. It comes with three executable files, in this case we&#8217;re interested in edit.py. The simplest usage would simply be</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ .<span style="color: #000000; font-weight: bold;">/</span>edit.py <span style="color: #660033;">-o</span> out.flv input.swf</pre></div></div>

<p>and you&#8217;re off. Brilliant!</p>
]]></content:encoded>
			<wfw:commentRss>http://calculating-infinity.de/2009/03/30/converting-swf-to-flv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
