<?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>alecmce.com &#187; tools</title>
	<atom:link href="http://alecmce.com/category/tools/feed" rel="self" type="application/rss+xml" />
	<link>http://alecmce.com</link>
	<description></description>
	<lastBuildDate>Fri, 18 May 2012 02:54:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Working remotely and SVN</title>
		<link>http://alecmce.com/opinion/working-remotely-and-svn</link>
		<comments>http://alecmce.com/opinion/working-remotely-and-svn#comments</comments>
		<pubDate>Fri, 27 May 2011 11:48:31 +0000</pubDate>
		<dc:creator>alecmce</dc:creator>
				<category><![CDATA[opinion]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://alecmce.com/?p=1112</guid>
		<description><![CDATA[I am working remotely with a company in Beijing from Aberdeen, UK. The Beijing team is primary, they have setup an svn server to host code and have a QA team for testing. Whatever other test harnesses are in play, a commit isn&#8217;t solid until it passes QA. This is a diary of events, written [...]]]></description>
			<content:encoded><![CDATA[<p>I am working remotely with a company in Beijing from Aberdeen, UK. The Beijing team is primary, they have setup an svn server to host code and have a QA team for testing. Whatever other test harnesses are in play, a commit isn&#8217;t solid until it passes QA. This is a diary of events, written retrospectively.</p>
<h3>Abereen 9am, Beijing 5pm</h3>
<p>Conference call with Beijing to decide what I&#8217;m working on. All goes well, I start working.</p>
<h3>Aberdeen 2pm, Beijing 10pm (Commit +0 hours)</h3>
<p>I try to commit and discover that the svn server has gone down. I am stuck with a commit that I cannot commit. What do I do? The Beijing team will want this commit first thing their time, but that&#8217;s 11 hours away, at 1am my time. I can&#8217;t sit on it until then, and I don&#8217;t want to do nothing. I decide to create a patch</p>
<pre class="brush: bash; title: ; notranslate">svn diff &gt; mywork.diff</pre>
<p>Now, if I get stuck, I can</p>
<pre class="brush: bash; title: ; notranslate">
svn revert -R *
patch -p0 -i mywork.diff
</pre>
<p>and I&#8217;m back to what would be HEAD if svn wasn&#8217;t down! Essentially I&#8217;ve found a way to store atomic commits before they&#8217;re committed, marvellous. And so I continue&#8230;</p>
<h3>Aberdeen 4pm, Beijing: 12pm (Commit +2 hours)</h3>
<pre class="brush: bash; title: ; notranslate">
svn revert -R *
patch -p0 -i mywork.diff

15 out of 15 hunks failed
8 out of 8 hunks failed
3 out of 3 hunks failed
...
</pre>
<p>What!? The patch failed? How can this be!? It makes no sense! Slowly it dawns on me that the Beijing office is universally PC, whereas I am using a Mac. diff and patch expect unix line-endings, and something in there has confused them. Without any external changes at all, I&#8217;ve screwed myself. My work is gone, and I&#8217;ll have to manually apply my diffs back to the source.</p>
<p>Now, clearly I&#8217;m at fault here. I make no bones about the fact that I should have thought long and hard before I svn reverted, but I didn&#8217;t. More fool me.</p>
<h3>Aberdeen 6pm, Beijing 2am (Commit +4 hours)</h3>
<p>I have manually applied my diffs to the source and now I&#8217;m going to stop working on that and do work on a personal project. The last thing I want to do is to have to do that again!</p>
<h3>Aberdeen 1am,  Beijing 9am (Commit +11 hours)</h3>
<p>I&#8217;m asleep, meanwhile Beijing sort out the svn server and get my emails. They don&#8217;t dare touch the diff, especially after my problems.</p>
<h3>Aberdeen 9am, Beijing 4pm (Commit +19 hours)</h3>
<p>I awake, and commit my code. I do other work&#8230;</p>
<h3>Aberdeen 1am, Beijing 9am (Commit +36 hours)</h3>
<p>This is the first opportunity Beijing has had to test my work.</p>
<h2>If we&#8217;d been using git</h2>
<p>Imagine what would have happened if we&#8217;d been using git. I put it to you that I would have saved maybe 6 hours of my time and my work would have been QAed 25 hours sooner.</p>
<h3>Aberdeen: 2pm, Beijing: 10pm (Commit +0 hours)</h3>
<p>Having git committed incrementally into a local branch in my locally cloned repo, I decide it&#8217;s time to merge back to master and push. Push fails, seems like their repo is down. Oh well. I&#8217;ll keep working.</p>
<h3>Aberdeen: 1am,  Beijing 9am (Commit +11 hours)</h3>
<p>Beijing comes in, sort out the git server and get my emails. Realising what has happened they pull from my repo as a remote, which I have made sure is available for them in as a conscientious guy, not only that commit but also the other work I could have done in the 4-6 extra hours I had during that day to do work. My work can be QAed, 25 hours sooner than it actually was.</p>
<h2>Discussion</h2>
<p>Is git better than svn, or svn better than git? Almost certainly your reaction to this question is that the one that you use most and are most comfortable with is better. Of course it is, and I&#8217;m not going to be able to dissuade you with one anecdote.</p>
<p>Don&#8217;t delude yourself: most people when asked this question don&#8217;t say or even think &#8220;well, I use x more so x is better&#8221;, they think of all the reasons why x is better&#8230; but here&#8217;s the thing, they do so <em>after</em> they make their mind up, and usually their minds are made up by emotion rather than rationality. Think about it; it happens a lot. It happens to me, and to everyone at one time or another.</p>
<p>So I&#8217;m not going to tell you that git is better than svn categorically, I&#8217;m just going to say that in this scenario, I think wouldn&#8217;t git have been much better?</p>
]]></content:encoded>
			<wfw:commentRss>http://alecmce.com/opinion/working-remotely-and-svn/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Working with Firefox</title>
		<link>http://alecmce.com/as3/working-with-firefox</link>
		<comments>http://alecmce.com/as3/working-with-firefox#comments</comments>
		<pubDate>Thu, 31 Mar 2011 23:31:04 +0000</pubDate>
		<dc:creator>alecmce</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://alecmce.com/?p=1108</guid>
		<description><![CDATA[Just a quickie, that you probably already know. I don&#8217;t think have I updated Firefox in a while, and suddenly when I did I was getting a lot of firefox Flash crashes when I was studying code on a breakpoint. It turns out that recent versions of Firefox run the Flash Player on a separate [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quickie, that you probably already know. I don&#8217;t think have I updated Firefox in a while, and suddenly when I did I was getting a lot of firefox Flash crashes when I was studying code on a breakpoint.</p>
<p>It turns out that recent versions of Firefox run the Flash Player on a separate process that has a timeout of 45 seconds. If the player hangs for that long then the Flash Player will be crashed. That&#8217;s fine for people consuming content, but for developers it is not acceptable.</p>
<p>The solution is to modify <code>about:config</code>, and to amend the value of <code>dom.ipc.plugins.timeoutSecs</code> to the number of seconds before a crash is triggered. You can choose -1 for never, or some sufficiently long period of time.</p>
]]></content:encoded>
			<wfw:commentRss>http://alecmce.com/as3/working-with-firefox/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing RacetrackStats v.0.0.1</title>
		<link>http://alecmce.com/as3/introducing-racetrackstats</link>
		<comments>http://alecmce.com/as3/introducing-racetrackstats#comments</comments>
		<pubDate>Tue, 02 Mar 2010 08:08:34 +0000</pubDate>
		<dc:creator>alecmce</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://alecmce.com/?p=741</guid>
		<description><![CDATA[Introduction RacetrackStats is an in-Flash performance profiler that gives real-time feedback about how the code it is contained within is performing. It can be found at GitHub: http://github.com/alecmce/RacetrackStats RacetrackStats is inspired by and seeks to move forward from Mr Doob&#8216;s Stats package (http://code.google.com/p/mrdoob/wiki/stats) In Action Below is the first alpha of RacetrackStats in action. source: [...]]]></description>
			<content:encoded><![CDATA[<h2>Introduction</h2>
<p>RacetrackStats is an in-Flash performance profiler that gives real-time feedback about how the code it is contained within is performing. It can be found at GitHub:</p>
<h3 style="text-align: center;"><a href="http://github.com/alecmce/RacetrackStats">http://github.com/alecmce/RacetrackStats</a></h3>
<p>RacetrackStats is inspired by and seeks to move forward from <a href="http://twitter.com/mrdoob/">Mr Doob</a>&#8216;s Stats package (<a href="http://code.google.com/p/mrdoob/wiki/stats">http://code.google.com/p/mrdoob/wiki/stats</a>)</p>
<h2>In Action</h2>
<p>Below is the first alpha of RacetrackStats in action.</p>
<div style="text-align: center;">

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="swfobj_0" width="660" height="500">
      <param name="movie" value="http://www.alecmce.com.php5-16.dfw1-1.websitetestlink.com/wp-content/uploads/2010/03/RacetrackStatsDemo2.swf" />
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="http://www.alecmce.com.php5-16.dfw1-1.websitetestlink.com/wp-content/uploads/2010/03/RacetrackStatsDemo2.swf" width="660" height="500">
      <!--<![endif]-->
        
      <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>
</div>
<p style="text-align: center;">source: <a href="http://github.com/alecmce/RacetrackStats/blob/master/test/demo/RacetrackStatsDemo.as">http://github.com/alecmce/RacetrackStats/blob/master/test/demo/RacetrackStatsDemo.as</a></p>
<p>The SWF comprises three small animations (from left to right):</p>
<ul>
<li>A mixture of computation and rendering: A simple BitmapData-driven particle system attempting to model smoke using 100000 pixels and a heavy glow filter and blur filter;</li>
<li>Heavy computation: A prime-factorisation algorithm, which computes 24 * 100 prime factor decompositions per frame. As it continues to run, the numbers get larger which leads to heavier calculation cycles;</li>
<li>Extremely heavy rendering: A cycadelic circle pattern that has hundreds of semi-transparent circular sprites moving around and overlapping with each other.</li>
</ul>
<p></p>
<h2>The &#8216;Elastic Racetrack&#8217;</h2>
<p>RacetrackStats attempts to go beyond Mr Doob&#8217;s Stats by measuring how the elastic racetrack is being stretched. The Elastic Racetrack was a phrase coined to describe how the original AVM1 Flash Player segmented each second into frames and attempted to balance the requirements of code, refreshing the screen and doing work like garbage collection. The AVM2 player&#8217;s model is sufficiently similar, that the name remains appropriate.</p>
<h3>Code Execution</h3>
<p>It does this by hooking into the Event.ENTER_FRAME and Event.RENDER events to record when portions of the code start and end. By recording when the ENTER_FRAME starts and when the RENDER starts, the intervening time is taken to be code execution.</p>
<h3>Pre-Render Code Execution</h3>
<p>Commonly this part of the code cycle is almost unused. If you exploit stage.invalidate and Event.RENDER in order for your classes to execute code after the main code execution has completed, then it will be captured here, between the top-priority Event.RENDER and the bottom-priority Event.RENDER calls.</p>
<h3>Rendering</h3>
<p>A problem is, the time between the RENDER ending and the ENTER_FRAME starting is used to draw the screen but if time is left over in which the Flash Player has nothing to do, it will idle during this time also. To counteract this, RacetrackStats attempts to throttle the FlashPlayer so that the application is always running as fast as it can, minimising, or even eliminating that idle time. I call this the &#8220;render&#8221; portion &#8211; the &#8220;Event.RENDER&#8221; event is badly named &#8211; screen rendering happens after the RENDER event has finished.</p>
<h2>Work To Do</h2>
<p>As soon as you add weight like this to an application, the speed at which it runs changes. By measuring the speed, you change the speed. It is the classic scientific paradox. It is mitigated by shrinking down the weight of the stats package as far as possible. At the moment, functionality rather than size is the chief concern, though I have tried to minimize the package by avoiding embedding fonts, and so forth.</p>
<p>I would love to hear what you think about the package, whether positive or negative. I&#8217;d also really appreciate it if you use it in your applications. If you have any problems, questions, queries or comments, please leave a comment below, or open an issue on GitHub.</p>
]]></content:encoded>
			<wfw:commentRss>http://alecmce.com/as3/introducing-racetrackstats/feed</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Debugging Web-Embedded Movies in FDT</title>
		<link>http://alecmce.com/tools/debugging-web-embedded-movies-in-fdt</link>
		<comments>http://alecmce.com/tools/debugging-web-embedded-movies-in-fdt#comments</comments>
		<pubDate>Sat, 31 Oct 2009 14:23:50 +0000</pubDate>
		<dc:creator>alecmce</dc:creator>
				<category><![CDATA[tools]]></category>
		<category><![CDATA[fdt]]></category>

		<guid isPermaLink="false">http://alecmce.com/?p=439</guid>
		<description><![CDATA[This is something I find myself setting up again and again for different projects: how to launch the debugger to enable step-through debugging and trace output for a swf that is being viewed in a browser, all inside the FDT environment. The solution is to create an ant script to launch the debugger, and to [...]]]></description>
			<content:encoded><![CDATA[<p>This is something I find myself setting up again and again for different projects: how to launch the debugger to enable step-through debugging and trace output for a swf that is being viewed in a browser, all inside the <a href="http://www.fdt.powerflasher.com/">FDT</a> environment.</p>
<p>The solution is to create an ant script to launch the debugger, and to run it before the flash movie&#8217;s web page is launched. The simple script follows:</p>
<h2>debugger.xml</h2>
<pre class="brush: xml; title: ; notranslate">
&lt;project name=&quot;launch debugger&quot; default=&quot;launchDebugger&quot;&gt;

	&lt;property file=&quot;mac.properties&quot; /&gt;
	&lt;taskdef resource=&quot;flexTasks.tasks&quot; classpath=&quot;${FLEX_HOME}/ant/lib/flexTasks.jar&quot; /&gt;

	&lt;target name=&quot;launchDebugger&quot; description=&quot;launches the debugger only&quot;&gt;
		&lt;fdt.startDebugger projectname=&quot;${PROJECT_NAME}&quot; saveLocation=&quot;tmp&quot; /&gt;
	&lt;/target&gt;

&lt;/project&gt;
</pre>
<p>This script requires a properties file. I flip between working on my mac at home and on my PC at work, so I tent to create two properties files, <em>mac.properties</em> and <em>pc.properties</em>. This allows me to share files across the two contexts without changing the particular ant scripts. The properties file contains the following:</p>
<h2>mac.properties</h2>
<pre class="brush: plain; title: ; notranslate">
FLEX_HOME = the path to the flex SDK folder
PROJECT_NAME = the FDT project name
</pre>
<p>With these files defined and stored (probably in an &#8216;ant&#8217; folder), the debugger.xml should be dragged into the Ant view (if it is not already visible, goto <em>Window > Show View > Ant</em> to make the ant view visible.)</p>
<p>Finally, the most important trick is to go to the <em>Run > External Tools > External Tools Configuration&#8230;</em> to bring up a dialog. There you should see your ant script on the left under </em>Ant Build</em>. Choose the <em>JRE tab</em> and specify that the ant script is going to <em>Run in the same JRE as the workspace</em>. I always forget that step, and it always fails to work first time!</p>
]]></content:encoded>
			<wfw:commentRss>http://alecmce.com/tools/debugging-web-embedded-movies-in-fdt/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Detecting Class-Recursion in AS3</title>
		<link>http://alecmce.com/as3/detecting-class-recursion-in-as3</link>
		<comments>http://alecmce.com/as3/detecting-class-recursion-in-as3#comments</comments>
		<pubDate>Sun, 25 Oct 2009 21:40:21 +0000</pubDate>
		<dc:creator>alecmce</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[asunit]]></category>

		<guid isPermaLink="false">http://alecmce.com/?p=404</guid>
		<description><![CDATA[This article has arisen because I found that every now and again while I was writing unit tests for my code, I would find myself coming across stack overflows caused by an infinite recursion of classes. The unit-testing framework didn&#8217;t provide a very helpful error message informing me what was going wrong. I decided if [...]]]></description>
			<content:encoded><![CDATA[<p>This article has arisen because I found that every now and again while I was writing unit tests for my code, I would find myself coming across stack overflows caused by an infinite recursion of classes. The unit-testing framework didn&#8217;t provide a very helpful error message informing me what was going wrong. I decided if I could amend the framework so that it gave me a message which I could resolve easily. It turns out to be harder than it first appeared.</p>
<h2>The Recursive Problem</h2>
<p>It is unlikely that you would ever write a class like this:</p>
<pre class="brush: as3; title: ; notranslate">
class Recursive
{
	public function Recursive()
	{
		new Recursive();
	}
}
</pre>
<p>However, there is a context where it&#8217;s not as unlikely as you&#8217;d think. One of the more annoying aspects of test-driven development is the creation of test suites and test classes to reflect each of the packages in your source folder. By convention each package contains an <code>AllTests</code> test suite which adds all the tests within that package. Below is an example:</p>
<pre class="brush: as3; title: ; notranslate">
package mypackage
{
	import asunit.framework.TestSuite;
	import mypackage.subpackage.AllTests;

	public class AllTests extends TestSuite
	{
		public function AllTests()
		{
			addTest(new mypackage.AllTests());
			addTest(new ExampleTestCase());
		}
	}
}
</pre>
<p>If you spotted the deliberate mistake, award yourself ten points. <code>mypackage.AllTests</code> was supposed to add <code>mypackage.subpackage.AllTests</code> as a test suite, but it inadvertently added itself. This will cause a stack overflow in ASUnit. It will tell you that:</p>
<pre class="brush: as3; title: ; notranslate">
Could not create and run test suite: Error: Error #1023: Stack overflow occurred.
</pre>
<p>It&#8217;s accurate, but not massively informative. We can do better than that.</p>
<h2>A Generic Solution</h2>
<p>I wanted to approach the problem generically before applying any solution to the ASUnit framework. How, then, can you detect that a constructor method calls another instance of the same method?</p>
<p>In AS2 there was an <code>arguments.caller</code> object, which would have allowed me to access the referring method. <code>describeType</code> could be used to inspect the caller and the current method, and check whether they&#8217;re the same&#8230; unfortunately, <code>arguments.caller</code> is not supported in AS3, as the <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/arguments.html">AS3 Language Reference</a> explains.</p>
<p>However, it is still possible to discover information about the methods in the stack of currently-called elements: by creating (but not throwing) an error. As long as you are running Flash in the debug player, then you can inspect that stack trace created by the error, and determine the sequence of constructions.</p>
<p style="text-align:center;"><a href="http://github.com/alecmce/recursion-watcher/">Check out the github repository for this approach</a></p>
<p>The main class in this repository is the <a href="http://github.com/alecmce/recursion-watcher/blob/master/src/recursionwatcher/ResursionWatcher.as">RecursionWatcher.as</a> file. The workhorse method is the <code>stackIndicatesRecursion</code> method which takes a generated error and inspects the stack trace that it produces to determine whether class-recursion is taking place.</p>
<h2>A Solution for ASUnit?</h2>
<p>So far this I&#8217;ve created this solution generically in its own repository, and I haven&#8217;t tried to integrate it into ASUnit. Some issues need to be thought through:</p>
<ul>
<li>Should this sort of solution be integrated into the TestCase or TestSuite class?</li>
<li>What are the speed implications of adding this? What sort of speed reduction is the extra functionality worth?</li>
<li>Can the functionality be put into a class which decorates the TestCase, minimising the footprint of the core code changes?</li>
</ul>
<p>I will be approaching integrating this work into the latest versions of ASUnit in the next few weeks, but I would like to guage whether this is the most appropriate course of action to take, and whether it&#8217;s even worth putting this sort of test into the framework. All comments welcome!</p>
]]></content:encoded>
			<wfw:commentRss>http://alecmce.com/as3/detecting-class-recursion-in-as3/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Windows, Eclipse and GitHub</title>
		<link>http://alecmce.com/library/windows-eclipse-and-github</link>
		<comments>http://alecmce.com/library/windows-eclipse-and-github#comments</comments>
		<pubDate>Mon, 28 Sep 2009 15:48:58 +0000</pubDate>
		<dc:creator>alecmce</dc:creator>
				<category><![CDATA[library]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[walkthrough]]></category>

		<guid isPermaLink="false">http://alecmce.com/?p=340</guid>
		<description><![CDATA[Setting up for using GitHub on my mac was a breeze. Setting up at work on Windows was a pain. I think that these steps will satisfactorily setup Eclipse to work with GitHub. If you haven&#8217;t got a GitHub account, create one; Install eGit in Eclipse; EGit for Eclipse is at http://www.jgit.org/updates; I was unable [...]]]></description>
			<content:encoded><![CDATA[<p>Setting up for using GitHub on my mac was a breeze. Setting up at work on Windows was a pain. I <em>think</em> that these steps will satisfactorily setup Eclipse to work with GitHub.</p>
<ol>
<li>If you haven&#8217;t got a GitHub account, create one;</li>
<li>Install eGit in Eclipse;</li>
<ul>
<li>EGit for Eclipse is at <a href="http://www.jgit.org/updates">http://www.jgit.org/updates</a>;</li>
<li>I was unable to install EGit into the FDT &#8216;standalone&#8217; version of Eclipse. If you have this problem you will need to download and install the (superior) <a href="http://www.eclipse.org/downloads/">Eclipse Classic Version</a>;</li>
</ul>
<li>Download and install <a href="http://code.google.com/p/msysgit/downloads/list">msysgit</a> from Google Code;</li>
<li>Create your own ssh key using
<pre class="brush: bash; title: ; notranslate">$ ssh-keygen -C &quot;your@email.com&quot; -t rsa
</pre>
</li>
<ul>
<li>Personally I&#8217;d use the &#8220;Use Git Bash only&#8221; option;</li>
</ul>
<li>This will generate your key to (typically):
<pre class="brush: plain; title: ; notranslate">c:\Documents and Settings\[yourname]\.ssh</pre>
<p> Change the folder from <strong>.ssh</strong> to <strong>ssh</strong>, otherwise EGit will look in the wrong place;</li>
<li>In Eclipse, &#8220;Import&#8230;&#8221; a new project and choose &#8220;Git Repository&#8221;.</li>
<li>Copy the Public Clone URL from the GitHub repository that you want to clone into the Location URI.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://alecmce.com/library/windows-eclipse-and-github/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding Methods without JavaDoc comments in AS3</title>
		<link>http://alecmce.com/as3/finding-methods-without-javadoc-comments-in-as3</link>
		<comments>http://alecmce.com/as3/finding-methods-without-javadoc-comments-in-as3#comments</comments>
		<pubDate>Fri, 21 Aug 2009 10:42:49 +0000</pubDate>
		<dc:creator>alecmce</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[RegExp]]></category>

		<guid isPermaLink="false">http://alecmce.com/?p=274</guid>
		<description><![CDATA[If you need to find methods in a project that don&#8217;t have JavaDoc comments in them, Java developers can use checkstyle. Unfortunately, it doesn&#8217;t appear to work with AS3 files. (At least, in the limited amount of time I&#8217;ve had to look at it, I can&#8217;t make it work. If you know how to, please [...]]]></description>
			<content:encoded><![CDATA[<p>If you need to find methods in a project that don&#8217;t have JavaDoc comments in them, Java developers can use <a href="http://eclipse-cs.sourceforge.net/">checkstyle</a>. Unfortunately, it doesn&#8217;t appear to work with AS3 files. (At least, in the limited amount of time I&#8217;ve had to look at it, I can&#8217;t make it work. If you know how to, please let me know!)</p>
<p>Instead, if you want to find uncommented methods in an AS3 project, you can use the following regular expression. It looks for alpha-numeric characters between the end of a variable definition or method and the start of a method, and as such it is not infallible. However, it works for me using Eclipse, and I thought it might be useful for others:</p>
<pre class="brush: as3; title: ; notranslate">
(?s)(}|;)([^\w\}\;]+?)((override |)(private|public|protected)( override|) function)
</pre>
<p>If you have a superior mechanism for finding uncommented AS3 methods (particularly if it is integrated into Eclipse), please let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://alecmce.com/as3/finding-methods-without-javadoc-comments-in-as3/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

