<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Neil Dickson's Blog &#187; PwnIDE</title>
	<atom:link href="http://ndickson.wordpress.com/category/pwnide/feed/" rel="self" type="application/rss+xml" />
	<link>http://ndickson.wordpress.com</link>
	<description>Inventor IDE, PwnOS, and most everything else I'm up to</description>
	<lastBuildDate>Thu, 09 Jul 2009 08:28:16 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<image>
		<url>http://www.gravatar.com/blavatar/39425d5e6fd805e583ea209d05d9fdf7?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Neil Dickson's Blog &#187; PwnIDE</title>
		<link>http://ndickson.wordpress.com</link>
	</image>
			<item>
		<title>Inventor Performance Viewer</title>
		<link>http://ndickson.wordpress.com/2009/07/09/inventor-performance-viewer/</link>
		<comments>http://ndickson.wordpress.com/2009/07/09/inventor-performance-viewer/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 08:22:48 +0000</pubDate>
		<dc:creator>Neil Dickson</dc:creator>
				<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[PwnIDE]]></category>

		<guid isPermaLink="false">http://ndickson.wordpress.com/?p=164</guid>
		<description><![CDATA[I recently put off the release of Inventor IDE Alpha 5b (probably coming in August, since my honours project is highest priority now) to get something ready for DemoCamp Vancouver that I&#8217;ve been wanting for a very long time.  It&#8217;s a feature that probably won&#8217;t be released until Alpha 6, but you can be certain [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ndickson.wordpress.com&blog=1158540&post=164&subd=ndickson&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I recently put off the release of <a href="http://www.codecortex.com/ide/">Inventor IDE</a> Alpha 5b (probably coming in August, since my honours project is highest priority now) to get something ready for <a href="http://www.facebook.com/group.php?gid=2426652061">DemoCamp Vancouver</a> that I&#8217;ve been wanting for a very long time.  It&#8217;s a feature that probably won&#8217;t be released until Alpha 6, but you can be certain that I&#8217;ll try to make good use of it at D-Wave as soon as I can.  I consider it the first truly awesome feature of Inventor IDE.  It&#8217;s easiest to introduce with a picture:</p>
<p style="text-align:left;">
<div id="attachment_163" class="wp-caption aligncenter" style="width: 507px"><a href="http://ndickson.files.wordpress.com/2009/07/sorting.png"><img class="size-full wp-image-163" title="Sorting Performance Analysis" src="http://ndickson.files.wordpress.com/2009/07/sorting.png?w=497&#038;h=357" alt="Rock-solid sorting performance data literally in the blink of an eye" width="497" height="357" /></a><p class="wp-caption-text">Rock-solid performance data literally in the blink of an eye</p></div>
<p style="text-align:left;">(In case you&#8217;re wondering, the times are in clock cycles on a 1.66GHz laptop, so 100,000 clocks = 60 microseconds.)</p>
<p style="text-align:left;">A big problem in doing performance analysis is that getting reliable results and useful scaling info usually means tests that take minutes, so that the impact of the OS or other applications levels off to a constant factor.  If you try to do short tests, you get issues like these:</p>
<p style="text-align:left;">
<div id="attachment_165" class="wp-caption aligncenter" style="width: 310px"><a href="http://ndickson.files.wordpress.com/2009/07/baddata.png"><img class="size-medium wp-image-165" title="BadData" src="http://ndickson.files.wordpress.com/2009/07/baddata.png?w=300&#038;h=208" alt="Bad Performance Data for 2 Mersenne Twister Implementations" width="300" height="208" /></a><p class="wp-caption-text">Bad Performance Data for 2 Mersenne Twister Implementations</p></div>
<div id="attachment_166" class="wp-caption aligncenter" style="width: 310px"><a href="http://ndickson.files.wordpress.com/2009/07/baddata2.png"><img class="size-medium wp-image-166" title="BadData2" src="http://ndickson.files.wordpress.com/2009/07/baddata2.png?w=300&#038;h=214" alt="Bad Performance Data for Sorting Algorithms" width="300" height="214" /></a><p class="wp-caption-text">Bad Performance Data for 3 Sorting Implementations</p></div>
<p style="text-align:left;">These aren&#8217;t exactly reliable results; running a short test multiple times produces wildly different results because of just a few bad data.  On Tuesday around 4am (Pacific Daylight  Time), I finally managed to find a decent approach to eliminate almost all bad data without eliminating much good data.  It&#8217;s certainly not perfect, but here are the results of running the two <a href="http://en.wikipedia.org/wiki/Mersenne_twister">Mersenne Twister</a> tests thrice each while <a href="http://aqua.dwavesys.com/">AQUA@Home</a> is trying to max out the CPU and the harddrive is thrashing like mad (for unknown reasons):</p>
<p style="text-align:left;">
<div id="attachment_167" class="wp-caption aligncenter" style="width: 507px"><a href="http://ndickson.files.wordpress.com/2009/07/mtheavyload.png"><img class="size-full wp-image-167" title="MTHeavyLoad" src="http://ndickson.files.wordpress.com/2009/07/mtheavyload.png?w=497&#038;h=372" alt="Much Better Mersenne Twister Performance Data" width="497" height="372" /></a><p class="wp-caption-text">Much Better Mersenne Twister Performance Data</p></div>
<p style="text-align:left;">It&#8217;s worth pointing out that these times are in fact noticeably worse than the results when the CPU and harddrive aren&#8217;t under heavy load elsewhere (about 1.5 times as long).  The important thing is that the results are still remarkably consistent, and Mersenne128 is still 3.8 times faster than Mersenne32.  You can even still roughly see that Mersenne32 regenerates its data array every 624 elements and Mersenne128 regenerates every 2496 elements.  In case you&#8217;re wondering why CPU times would be so consistently longer instead of scattered, it has to do with process switches flushing the cache and TLBs, only causing cache misses in the good data, whereas the bad data still contain any process switches and other interrupts (like the 1kHz tick and page faults).</p>
<p style="text-align:left;">I&#8217;m still shocked that I can effectively triple-click the test run button on the performance test functions and have the results show up as fast as Windows can show the windows.  It&#8217;s even more responsive than the regular run button in the ImageProgram sample app, and that had shocked me.  That said, I found the ironic-but-not-so-important problem that it names the output files with the time only down to the second, so one that ran in the same second as another wrote over the first&#8217;s data file.</p>
<p style="text-align:left;">This kind of capability finally allows developers to rapidly iterate through possible performance improvements, not only making it faster to optimize, but much easier, because there&#8217;s time to try out many more optimizations in the same amount of time.  For example the faster mergesort in the top graph is from adding a special case for n=2.  In that way, it can also be used as a learning tool for developers to determine what does and doesn&#8217;t improve performance.  Best of all, because of the performance viewer&#8217;s language-independence, its platform-independence, and the many useful analyses it could do on the data, it&#8217;s applicable to many different situations; probably many I won&#8217;t think of myself, so I leave that up to you.  I&#8217;ve just shown you the first glimpse into what I&#8217;ve got planned for it.  <img src='http://s.wordpress.com/wp-includes/images/smilies/face-smile.png' alt=':)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ndickson.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ndickson.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ndickson.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ndickson.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ndickson.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ndickson.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ndickson.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ndickson.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ndickson.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ndickson.wordpress.com/164/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ndickson.wordpress.com&blog=1158540&post=164&subd=ndickson&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ndickson.wordpress.com/2009/07/09/inventor-performance-viewer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/accf49d59449b71b817ca3c4f2c739f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil Dickson</media:title>
		</media:content>

		<media:content url="http://ndickson.files.wordpress.com/2009/07/sorting.png" medium="image">
			<media:title type="html">Sorting Performance Analysis</media:title>
		</media:content>

		<media:content url="http://ndickson.files.wordpress.com/2009/07/baddata.png?w=300" medium="image">
			<media:title type="html">BadData</media:title>
		</media:content>

		<media:content url="http://ndickson.files.wordpress.com/2009/07/baddata2.png?w=300" medium="image">
			<media:title type="html">BadData2</media:title>
		</media:content>

		<media:content url="http://ndickson.files.wordpress.com/2009/07/mtheavyload.png" medium="image">
			<media:title type="html">MTHeavyLoad</media:title>
		</media:content>
	</item>
		<item>
		<title>Bugs that never see the light of day</title>
		<link>http://ndickson.wordpress.com/2009/06/21/bugs-that-never-see-the-light-of-day/</link>
		<comments>http://ndickson.wordpress.com/2009/06/21/bugs-that-never-see-the-light-of-day/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 07:30:18 +0000</pubDate>
		<dc:creator>Neil Dickson</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[PwnIDE]]></category>

		<guid isPermaLink="false">http://ndickson.wordpress.com/?p=152</guid>
		<description><![CDATA[Today, I fixed a ton of bugs in Inventor IDE and added some simple-but-useful functionality I&#8217;d been putting off for a long time.  It occurred to me earlier today that for almost all of these bugs, I&#8217;m probably the only one who&#8217;s ever encountered them, and some of them, even I never encountered them; they&#8217;re fixed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ndickson.wordpress.com&blog=1158540&post=152&subd=ndickson&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Today, I fixed a ton of bugs in Inventor IDE and added some simple-but-useful functionality I&#8217;d been putting off for a long time.  It occurred to me earlier today that for almost all of these bugs, I&#8217;m probably the only one who&#8217;s ever encountered them, and some of them, even I never encountered them; they&#8217;re fixed without ever being experienced.  I thought I&#8217;d share some of these bugs with you to give an idea of what I&#8217;ve been up to and what sort of bugs I encounter in Inventor IDE.</p>
<h1>Bug #1: Huge JComboBox</h1>
<p>This is one of those bugs that I can&#8217;t actually fix, but I managed to find a workaround after a whole lot of banging my head against the wall.  There&#8217;s at least one bug in Java&#8217;s implementation of JComboBox that uses the Windows look-and-feel.  It may have been fixed in Java 1.6 or later, but I have to build with Java 1.5 or nothing will run when somebody tries to run it with Java 1.5, even though I&#8217;m not using any Java 1.6 features.</p>
<p>The bug: suddenly and irregularly, the size of a JComboBox will become larger than 16384 x 16384.  When Java tries to create a buffer into which to paint the JComboBox, it runs out of memory, because 16384 x 16384 x 4 bytes per pixel = 1GB.</p>
<p>It took a few hours to figure this out, because the stack trace for the OutOfMemoryError doesn&#8217;t contain any of my code (since I hadn&#8217;t overridden JComboBox.paintComponent()) and the bug rarely occurs.  The way I eventually figured it out was that I put a breakpoint at one of the low levels in the stack trace, ran the code until I got a debugger trace that looked similar, and looked back at the object up the chain at the last pair of paint()/paintChildren() calls, and it turned out to be an ObservedStringComboBox (one of my classes).  It wasn&#8217;t for a few minutes that I realized the size was so huge, and I discovered that getPreferredSize() and getMinimumSize() return similarly huge sizes too, so I traced into them.  After an hour of crawling through the mess that is Java&#8217;s Swing, I found that it was probably that some object was giving a dummy value to indicate that it didn&#8217;t really know how large something was supposed to be.</p>
<p>The solution: I&#8217;ve overridden JComponent.paintComponent() in both classes I have that extend JComboBox, and they check whether the width or height is over 16384, in which case, they do a rough estimation of the size based on the string widths of their options.  Then, they call setSize(), setMinimumSize(), setPreferredSize(), and setMaximumSize(), just to make sure, before calling the original paintComponent().  It successfully picked up the error when it occurred, and set the JComboBox to a reasonable size that didn&#8217;t look out of place.</p>
<h1>Bug #2: Where&#8217;s the caret?</h1>
<p>This bug has been around for quite some time, and although I was stumped on a good way to solve it (partly due to the next bug), it&#8217;s solution was a one-character change.</p>
<p>The bug:</p>
<div id="attachment_153" class="wp-caption aligncenter" style="width: 455px"><a href="http://ndickson.files.wordpress.com/2009/06/caretbad.png"><img class="size-full wp-image-153" title="CaretBad" src="http://ndickson.files.wordpress.com/2009/06/caretbad.png?w=445&#038;h=216" alt="The caret is currently at the beginning of the first &quot;SegmentDescriptor&quot;, but it's impossible to see." width="445" height="216" /></a><p class="wp-caption-text">The caret is currently at the beginning of the first &quot;SegmentDescriptor&quot;, but it&#39;s impossible to see.</p></div>
<p>The border of the LineFields blocks out the one pixel-width of the caret that would be visible if it had no border.</p>
<p>The solution:</p>
<div id="attachment_154" class="wp-caption aligncenter" style="width: 455px"><a href="http://ndickson.files.wordpress.com/2009/06/caretgood.png"><img class="size-full wp-image-154" title="CaretGood" src="http://ndickson.files.wordpress.com/2009/06/caretgood.png?w=445&#038;h=216" alt="The exact same thing, but everything in a LineField is drawn 2 pixels to the right" width="445" height="216" /></a><p class="wp-caption-text">The exact same thing, but everything in a LineField is drawn 2 pixels to the right</p></div>
<p>This was literally solved by changing the insets from (0,0,0,0) to (0,2,0,0).  Now the full caret is visible.  (It didn&#8217;t look as good with just one pixel-width showing, so I have both pixels showing.)</p>
<h1>Bug #3: The layout war</h1>
<p>I hate layout issues; Java seems to have a neverending supply of them, which is why I removed LayoutManagers from a vast majority of the components that need good layout.  There were a few major layout bugs that I still had though, and the most ridiculous-looking was to do with the layout of my ObservedStringTables (shown above correctly, but I&#8217;ll use a new example).</p>
<p>The bug: the ObservedStringTable should control the layout of the LineFields it contains, since they should be kept looking tabular, but many LineFields elsewhere are supposed to resize automatically to fit the current size of their text, so that behaviour was built into LineField.</p>
<div id="attachment_155" class="wp-caption aligncenter" style="width: 480px"><a href="http://ndickson.files.wordpress.com/2009/06/tablebad.png"><img class="size-full wp-image-155" title="TableBad" src="http://ndickson.files.wordpress.com/2009/06/tablebad.png?w=470&#038;h=234" alt="An enumeration isn't supposed to look this bad (btw, here, it auto-increments by &quot;sizeof SegmentDescriptor&quot; if no value specified)" width="470" height="234" /></a><p class="wp-caption-text">An enumeration isn&#39;t supposed to look this bad (btw, here, it auto-increments by &quot;sizeof SegmentDescriptor&quot; if no value specified)</p></div>
<p>The solution: it&#8217;s not a great solution, but by the time it&#8217;s lack of greatness would matter, it&#8217;ll have changed or need changing for other reasons already.  I just have LineField check whether it&#8217;s in an ObservedStringTable, and if it is, it doesn&#8217;t change its own size.</p>
<div id="attachment_156" class="wp-caption aligncenter" style="width: 480px"><a href="http://ndickson.files.wordpress.com/2009/06/tablegood.png"><img class="size-full wp-image-156" title="TableGood" src="http://ndickson.files.wordpress.com/2009/06/tablegood.png?w=470&#038;h=234" alt="TableGood" width="470" height="234" /></a><p class="wp-caption-text">Finally, it looks like a table</p></div>
<p>In case you&#8217;re wondering, yes, the caret is now not visible if it&#8217;s at the end of the Increment field.  I&#8217;ll fix it now, &#8217;cause I&#8217;ll forget something small like that&#8230; there we go; insets are now (0,2,0,2).  <img src='http://s.wordpress.com/wp-includes/images/smilies/face-smile.png' alt=':)' class='wp-smiley' /> </p>
<h1>Bug #4: When the impossible is possible</h1>
<p>Moving away from UI-related bugs, this bug was technically fixed today, though only because today started at midnight, not when I got up (11:30 AM).  A few days ago, I added support for compiling inline functions that have only text-replacement parameters (i.e. macros minus support for elaborate macro stuff).  That way, I can use it for having debug output functions in PwnOS that don&#8217;t get called at all if &#8220;TEXT_TESTING_MODE&#8221; is false.  However, fairly often when compiling, though unpredictably, there&#8217;d be an ArrayIndexOutOfBoundsException when adding a reference to a line or when adding an error to a line.</p>
<p>It&#8217;s fairly common to add errors to lines during compilation, since the error detection doesn&#8217;t check for everything before compile-time, but the only code that would be adding references to lines would be the code for inline function compiling.  When I encounter a call to an inline function, I copy the function, replace the parameter references in the code with their given values, and remove the parameters.  Then I compile it as a regular function, just in the middle of another function.  The weird thing about this error is that upon adding a check to make sure that the array was large enough (which was even redundant, because the line before had been a call to ensureRefCapacity(), which expands the reference array if needed), it still had the same array index exception.  The only way I could think of that this could happen is if multiple threads were messing around with the same line at the same time, but the odds of that were pretty low, considering I&#8217;d explicitly designed the compilation not to modify anything concurrently.</p>
<p>The bug: when a parameter is removed from a function that is in global scope, things observing the global scope get notified about it.  A temporary copy of an inline function shouldn&#8217;t really be notifying the global scope about its parameters being removed, and updating code based on a notification is probably not something that should occur while compiling.  Sure enough, functions didn&#8217;t like getting told that a temporary function they can&#8217;t actually access has lost a parameter.</p>
<p>The solution: this is one bug where I haven&#8217;t actually determined exactly how/why it was occurring, but the stack traces and stepping through debugging clearly showed that the error was only occurring when a temporary function was broadcasting to everybody that it had lost a parameter, which it shouldn&#8217;t be doing.  I just stopped temporary functions from notifying the global scope of anything.  It&#8217;s usually not advisable to fix something without fully understanding it, but often, such a restriction would mean that few bugs would get fixed.  For now, I&#8217;m okay with this lack of understanding, because I&#8217;ll need to re-investigate and adjust this type of thing when I add support for function overloading when I add support for C, and until then, it&#8217;s unlikely that any oversight here will rear its head again.</p>
<h1>Yesterday&#8217;s Bug: The complete round-off problem</h1>
<p>So this wasn&#8217;t from today, but it&#8217;s a cool quirk of floating-point calculation with which programmers should familiarize themselves.  Suppose that you have an array of floats (4-byte real numbers) that&#8217;s 2 billion elements long, and every single element contains the value 1.  If you simply go through the array and sum up the values of the elements, what is the final sum?</p>
<p>You might guess that it&#8217;s 2 billion plus or minus some relatively small amount of error, but in fact, the sum is exactly 8,388,608.  This is the case whether you have 10 million elements, 2 billion elements, or 1 trillion elements.  The answer is still 8,388,608.  Why?</p>
<p>floats have 23 bits of mantissa, and once they get to the value 8,388,608 (i.e. 1.0000&#8230;0×2^23), adding the value 1 would make it 8,388,609, but this can&#8217;t be represented exactly in floating point, so it gets rounded down (following the round even rule), back to 8,388,608.  This happens for every single 1 that is added after that too.  In general, when adding many values that are all positive (or all negative) of similar magnitude, the final sum will be around 8,388,608 times the average value.</p>
<p>This is exactly what I found in a piece of code I had changed to use floats instead of doubles at work (at D-Wave).  It was trying to add 14,400,000 elements with roughly the value 1, and it gave 8,388,608 every time.  Instead of reading the sum, I was actually reading the average, 0.582542 instead of about 1.0, so it wasn&#8217;t immediately apparent why it was wrong.  I realized that this was the error when I ran it for 144,000,000 elements and got 0.058254, which is 10 times less for 10 times as many elements, meaning that the sum hadn&#8217;t changed.  That brings up the question, how do you add up the elements in an array to avoid this?</p>
<p>The solution: Well, the way I fixed it at work was to just change it back to using a double (8-byte real number) to accumulate the values.  That doesn&#8217;t encounter the complete round-off problem until 2^52 additions; it can still result in bad round-off error before then, but it shouldn&#8217;t be an issue for the piece of code we were doing this in.  Is there a way that works for any number of additions?</p>
<p>One way that works in O(logn) extra space (or inline if you can destroy the data), while still being in O(n) time, is that you break it up by adding every pair, then adding every pair of those, then adding every pair of those, etc.  The way that can be done in O(logn) space is that you keep a value for every level, all starting at zero, and when you&#8217;re done a level, you add the value to the next level up.  If that was the end of the next level up, it goes up more, else you go back to the next at the bottom.  This is equivalent to splitting it up recursively (using O(logn) stack space), only without the disadvantages of recursion.  It also has the advantage that it could be done with data coming in over time.  Note that there&#8217;s still the issue of round-off from adding positive and negative numbers that sum to near zero, but there&#8217;s not much that can be done about that.</p>
<p><strong><span style="text-decoration:underline;">Edit:</span> </strong>Here&#8217;s code for this approach (<em>untested</em>):</p>
<pre>float sum(const float*const array,const size_t size) {
    // Assuming there is a function to compute the ceiling of log_2 of size
    // The -1 is because the lowest level (pairs) gets added immediately instead of waiting
    const size_t logSize = ceilLog2(size)-1;
    float accumulators[logSize] = {0};
    bool isSecondHalf[logSize] = {0};
    float sum;
    for (size_t i=0; i&lt;size-1; i+=2) {
        // Add together a pair of elements
        sum = array[i];
        sum += array[i+1];
        size_t level = 0;
        // Go up the tree until reaching the end
        // or a place where it's the first half
        while (isSecondHalf[level]) {
            isSecondHalf[level] = 0;
            accumulators[level] = 0;
            sum += accumulators[level+1]
            ++level;
            // Handle case of size being an exact power of two
            if (level==logSize) {
                return sum;
            }
        }
        // Save the sum at the highest level reached
        accumulators[level] = sum;
        // Now on the second half of that level
        isSecondHalf[level] = 1;
    }
    // Make sure to get the last element if there were an odd number of elements
    sum = (size&amp;1) ? array[size-1] : 0;
    // Add up all values left in accumulators (order matters)
    for (size_t level=0; level&lt;logSize-1; ++level) {
        sum += accumulators[level];
    }
    return sum;
}</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ndickson.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ndickson.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ndickson.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ndickson.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ndickson.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ndickson.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ndickson.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ndickson.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ndickson.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ndickson.wordpress.com/152/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ndickson.wordpress.com&blog=1158540&post=152&subd=ndickson&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ndickson.wordpress.com/2009/06/21/bugs-that-never-see-the-light-of-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/accf49d59449b71b817ca3c4f2c739f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil Dickson</media:title>
		</media:content>

		<media:content url="http://ndickson.files.wordpress.com/2009/06/caretbad.png" medium="image">
			<media:title type="html">CaretBad</media:title>
		</media:content>

		<media:content url="http://ndickson.files.wordpress.com/2009/06/caretgood.png" medium="image">
			<media:title type="html">CaretGood</media:title>
		</media:content>

		<media:content url="http://ndickson.files.wordpress.com/2009/06/tablebad.png" medium="image">
			<media:title type="html">TableBad</media:title>
		</media:content>

		<media:content url="http://ndickson.files.wordpress.com/2009/06/tablegood.png" medium="image">
			<media:title type="html">TableGood</media:title>
		</media:content>
	</item>
		<item>
		<title>Inventor IDE Alpha 5a and Inspiration</title>
		<link>http://ndickson.wordpress.com/2009/05/29/inventor-ide-alpha-5a-and-inspiration/</link>
		<comments>http://ndickson.wordpress.com/2009/05/29/inventor-ide-alpha-5a-and-inspiration/#comments</comments>
		<pubDate>Fri, 29 May 2009 20:22:55 +0000</pubDate>
		<dc:creator>Neil Dickson</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[PwnIDE]]></category>

		<guid isPermaLink="false">http://ndickson.wordpress.com/?p=146</guid>
		<description><![CDATA[After fixing dozens of bugs (probably between 50 and 75), adding a Stop button to stop a running app, and adding support for building operating system code, Inventor IDE Alpha 5a is now out.   
It now no longer freezes if an error (like running out of memory) occurs while compiling, and numerous other checks [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ndickson.wordpress.com&blog=1158540&post=146&subd=ndickson&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>After fixing dozens of bugs (probably between 50 and 75), adding a Stop button to stop a running app, and adding support for building operating system code, <a href="http://www.codecortex.com/ide/">Inventor IDE Alpha 5a</a> is now out.  <img src='http://s.wordpress.com/wp-includes/images/smilies/face-smile.png' alt=':)' class='wp-smiley' /> </p>
<p>It now no longer freezes if an error (like running out of memory) occurs while compiling, and numerous other checks for errors were added.  If you get an error message, please send me a screenshot and a description of what led to it.  I&#8217;ve got a cool idea for a full debugging system for reproducing errors, but unfortunately, there&#8217;s no way that I have time to make it.</p>
<p>Alpha 5b should be out soon with a project settings dialog box, so that you can choose to make a 64-bit executable, set up the segments in an operating system build, and hopefully create a DLL that actually has exports.</p>
<p>Alpha 6 will introduce what I consider the first <strong><em>truly awesome</em></strong> feature of Inventor IDE, and it&#8217;s something I&#8217;ve been waiting years to see in an IDE, even though it&#8217;s so simple, but you&#8217;ll just have to wait to see what it is&#8230; or badger me until I spill the beans.  <img src='http://s.wordpress.com/wp-includes/images/smilies/face-wink.png' alt=';)' class='wp-smiley' /> </p>
<p>In other news, Code Cortex is now incorporated, so I can start applying for funding, and if that works out, hopefully I&#8217;ll finally be able to start paying people for their work.  Also, I stumbled upon some notes I took at a <a href="http://cutc.ca/">CUTC</a> 2006 presentation by <a href="http://www.infusion.com/">Infusion Development</a>&#8217;s CEO, Greg Brill, and I remembered how inspiring and encouraging they were:</p>
<ul>
<li>make something you&#8217;re passionate about first; don&#8217;t think too hard about the business stuff</li>
<li>find the opportunity missed by the industry now; who&#8217;s being ignored?</li>
<li>business plan sometimes comes after the success</li>
<li>shut up; do something!</li>
<li>try it; fail</li>
<li>business is easy: find a need, fill a need</li>
<li>learn</li>
<li>if you love it, you&#8217;ll do it</li>
</ul>
<p>I get a lot of discouraging, useless business advice, usually from people who only care about making money, so Mr. Brill&#8217;s talk gave me hope that one person really can make a difference.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ndickson.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ndickson.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ndickson.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ndickson.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ndickson.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ndickson.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ndickson.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ndickson.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ndickson.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ndickson.wordpress.com/146/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ndickson.wordpress.com&blog=1158540&post=146&subd=ndickson&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ndickson.wordpress.com/2009/05/29/inventor-ide-alpha-5a-and-inspiration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/accf49d59449b71b817ca3c4f2c739f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil Dickson</media:title>
		</media:content>
	</item>
		<item>
		<title>Inventor IDE Debugging</title>
		<link>http://ndickson.wordpress.com/2009/04/14/inventor-ide-debugging/</link>
		<comments>http://ndickson.wordpress.com/2009/04/14/inventor-ide-debugging/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 07:44:59 +0000</pubDate>
		<dc:creator>Neil Dickson</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[PwnIDE]]></category>

		<guid isPermaLink="false">http://ndickson.wordpress.com/?p=128</guid>
		<description><![CDATA[First, I&#8217;d like to say sorry that I haven&#8217;t yet posted the contest that I&#8217;ve planned to hold.  I&#8217;ve now got a source of legal advice, and since the first contest is for a fairly important-but-simple component of Inventor IDE, I don&#8217;t want to risk screwing it up until I get a lawyer&#8217;s ideas for it.  I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ndickson.wordpress.com&blog=1158540&post=128&subd=ndickson&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>First, I&#8217;d like to say sorry that I haven&#8217;t yet posted the contest that I&#8217;ve planned to hold.  I&#8217;ve now got a source of legal advice, and since the first contest is for a fairly important-but-simple component of Inventor IDE, I don&#8217;t want to risk screwing it up until I get a lawyer&#8217;s ideas for it.  I might hold the competition on <a href="http://www.topcoder.com/">Top Coder</a>, but it looks like they&#8217;ve changed their model of letting people host contests.  If I can find someone up for making some really cool interactive GUI components, I could contract it out to them, but I&#8217;d like to see what different people can come up with, since there&#8217;s a lot of room for creativity.</p>
<p>Also, sorry to those who&#8217;ve experienced bugs with <a href="http://www.codecortex.com/ide/">Inventor IDE</a> alpha 5.  I was going to make a special build just for one bug reporter so that I can fix a freezing bug that I can&#8217;t reproduce on my machine.  However there should really be a more extensive debugging system, logging information to files that can help me identify what went wrong when I get a bug report.  As such, I&#8217;ll release the regular version with logging of error information, and a special debugging version that will periodically check for model consistency and log extensively, even when no error has occurred, so that errors can be fixed more easily.  I can&#8217;t give a reliable ETA on this release yet, since I&#8217;ve got a lot going on this week, but it&#8217;s something I really need for future releases anyway.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ndickson.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ndickson.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ndickson.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ndickson.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ndickson.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ndickson.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ndickson.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ndickson.wordpress.com/128/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ndickson.wordpress.com/128/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ndickson.wordpress.com/128/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ndickson.wordpress.com&blog=1158540&post=128&subd=ndickson&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ndickson.wordpress.com/2009/04/14/inventor-ide-debugging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/accf49d59449b71b817ca3c4f2c739f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil Dickson</media:title>
		</media:content>
	</item>
		<item>
		<title>Inventor IDE Alpha 5</title>
		<link>http://ndickson.wordpress.com/2009/03/30/inventor-ide-alpha-5/</link>
		<comments>http://ndickson.wordpress.com/2009/03/30/inventor-ide-alpha-5/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 08:27:24 +0000</pubDate>
		<dc:creator>Neil Dickson</dc:creator>
				<category><![CDATA[Jobs]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[PwnIDE]]></category>

		<guid isPermaLink="false">http://ndickson.wordpress.com/?p=118</guid>
		<description><![CDATA[
After many months of mind-breaking work, Inventor IDE Alpha 5 is finally here with built-in assembling, a greatly-improved UI, and a new sample application!  These should make the rest of the assembly language video tutorial go much more smoothly.  I encourage those of you running Windows to download it and press the bright green Run [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ndickson.wordpress.com&blog=1158540&post=118&subd=ndickson&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://www.codecortex.com/ide/"><img class="aligncenter size-full wp-image-119" title="Compile and run code with a single click in Inventor IDE Alpha 5" src="http://ndickson.files.wordpress.com/2009/03/run.png?w=51&#038;h=46" alt="Compile and run code with a single click in Inventor IDE Alpha 5" width="51" height="46" /></a></p>
<p>After many months of mind-breaking work, <a href="http://www.codecortex.com/ide/">Inventor IDE Alpha 5</a> is finally here with built-in assembling, a greatly-improved UI, and a new sample application!  These should make the rest of the <a href="http://www.showmedo.com/videos/series?name=qdrYRTz8Z">assembly language video tutorial</a> go much more smoothly.  I encourage those of you running Windows to download it and press the bright green Run button to see what I mean.  (Sorry to Linux users without WINE; I only have it compiling to 32-bit Windows executables so far.)  I was going to post more videos this weekend, but some last-minute bugs cropped up that couldn&#8217;t be ignored.</p>
<p>Also of note is that soon (probably a couple of weeks, since I&#8217;m swamped with 3 performances, 3 assignments, and 2 exams in these next 2 weeks) I&#8217;ll be posting details of some competitions I&#8217;ll be holding to let you all get involved with developing important (and very cool) pieces of Inventor IDE.  It&#8217;s no fun doing this all alone, so I&#8217;m eager to see what people come up with for creative and cutting-edge components.  <img src='http://s.wordpress.com/wp-includes/images/smilies/face-smile-big.png' alt=':D' class='wp-smiley' /> </p>
<p>I don&#8217;t want to jinx it, but if all goes well I may be able to get enough government funding for Code Cortex to start paying people a salary too.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ndickson.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ndickson.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ndickson.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ndickson.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ndickson.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ndickson.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ndickson.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ndickson.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ndickson.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ndickson.wordpress.com/118/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ndickson.wordpress.com&blog=1158540&post=118&subd=ndickson&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ndickson.wordpress.com/2009/03/30/inventor-ide-alpha-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/accf49d59449b71b817ca3c4f2c739f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil Dickson</media:title>
		</media:content>

		<media:content url="http://ndickson.files.wordpress.com/2009/03/run.png" medium="image">
			<media:title type="html">Compile and run code with a single click in Inventor IDE Alpha 5</media:title>
		</media:content>
	</item>
		<item>
		<title>Fourth Assembly Language Video Up</title>
		<link>http://ndickson.wordpress.com/2009/01/10/fourth-assembly-language-video-up/</link>
		<comments>http://ndickson.wordpress.com/2009/01/10/fourth-assembly-language-video-up/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 04:44:35 +0000</pubDate>
		<dc:creator>Neil Dickson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[PwnIDE]]></category>

		<guid isPermaLink="false">http://ndickson.wordpress.com/?p=95</guid>
		<description><![CDATA[The fourth video in the assembly language  tutorial, (episode 3, since real programmers number things from 0  ), is finally up.  I had some problems with the upload and conversion, mostly because 30-minute, 800&#215;600, losslessly-compressed videos are huge, but now it&#8217;s fine.  I&#8217;ll make shorter videos from now on, since it can be a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ndickson.wordpress.com&blog=1158540&post=95&subd=ndickson&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The <a title="The Stack and Looking Back" href="http://showmedo.com/videos/video?name=3200030&amp;fromSeriesID=320">fourth video</a> in the <a title="Assembly Language Tutorial" href="http://showmedo.com/videos/series?id=320">assembly language  tutorial</a>, (episode 3, since real programmers number things from 0 <img src='http://s.wordpress.com/wp-includes/images/smilies/face-smile.png' alt=':)' class='wp-smiley' /> ), is finally up.  I had some problems with the upload and conversion, mostly because 30-minute, 800&#215;600, losslessly-compressed videos are huge, but now it&#8217;s fine.  I&#8217;ll make shorter videos from now on, since it can be a bit much to absorb in one sitting anyway.</p>
<p>On a completely different note, my friend, Ben, has produced a C++ version of the hypercube application that uses OpenGL, cutting the CPU use to around 2%.  I&#8217;ll post it eventually, but I&#8217;ve got a lot on my plate right now.  I should have some form of assembling and linking (probably not working correctly, but close) working in <a title="Inventor IDE" href="http://www.codecortex.com/ide/">Inventor IDE</a> by Monday.  I won&#8217;t release it until it&#8217;s stable, though, since that&#8217;s not the sort of thing you want to use until it&#8217;s rock solid.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ndickson.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ndickson.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ndickson.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ndickson.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ndickson.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ndickson.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ndickson.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ndickson.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ndickson.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ndickson.wordpress.com/95/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ndickson.wordpress.com&blog=1158540&post=95&subd=ndickson&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ndickson.wordpress.com/2009/01/10/fourth-assembly-language-video-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/accf49d59449b71b817ca3c4f2c739f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil Dickson</media:title>
		</media:content>
	</item>
		<item>
		<title>Assembling Progress and a Paper</title>
		<link>http://ndickson.wordpress.com/2008/12/30/assembling-progress-and-a-paper/</link>
		<comments>http://ndickson.wordpress.com/2008/12/30/assembling-progress-and-a-paper/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 01:28:31 +0000</pubDate>
		<dc:creator>Neil Dickson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[PwnIDE]]></category>

		<guid isPermaLink="false">http://ndickson.wordpress.com/?p=85</guid>
		<description><![CDATA[I&#8217;ve been making lots of progress on assembling support for Inventor IDE in the past couple of weeks.  In particular, I&#8217;ve looked at what I&#8217;m calling the x86 jump encoding problem.  The only piece of literature I&#8217;ve found referring to this problem calls it branch displacement optimization, but it allows convoluted declarations that are never useful, making [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ndickson.wordpress.com&blog=1158540&post=85&subd=ndickson&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve been making lots of progress on assembling support for <a title="Inventor IDE" href="http://www.codecortex.com/ide/">Inventor IDE</a> in the past couple of weeks.  In particular, I&#8217;ve looked at what I&#8217;m calling the x86 jump encoding problem.  <a title="Branch Displacement Optimization" href="http://coding.derkeiler.com/pdf/Archive/Assembler/alt.lang.asm/2006-11/msg00216.pdf">The only piece of literature</a> I&#8217;ve found referring to this problem calls it branch displacement optimization, but it allows convoluted declarations that are never useful, making the problem NP-complete.  There is a simple quadratic-time algorithm to solve the problem optimally (assuming there are no declarations of arrays whose size depends on the negative of the size of any code; if you do, you&#8217;ve got bigger problems than a few extra bytes of data), and I went in search of a simple linear-time algorithm to solve it optimally.</p>
<p>In the past week <a title="Optimal x86 Jump Encoding" href="http://arxiv.org/abs/0812.4973/">I managed to create such an algorithm</a>. :)  It is simple, using no obscure data structures, no recursion, and no randomization, plus it should be as fast or faster than the quadratic-time algorithms on average.  I&#8217;ve also since come up with a simple way to eliminate most jumps from consideration in the single pass through to determine the initial jump distances.  Simplicity is nice.</p>
<p>On a semi-related note, I won&#8217;t have the next video in <a title="Assembly Language Video Tutorial" href="http://showmedo.com/videos/series?name=qdrYRTz8Z">my video tutorial on assembly language</a> out by year&#8217;s end because of my current lack of internet access at home and all of the time I&#8217;ve been spending on Inventor IDE, but it should be out no later than January 5th or 6th.  Sorry for the delay.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ndickson.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ndickson.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ndickson.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ndickson.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ndickson.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ndickson.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ndickson.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ndickson.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ndickson.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ndickson.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ndickson.wordpress.com&blog=1158540&post=85&subd=ndickson&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ndickson.wordpress.com/2008/12/30/assembling-progress-and-a-paper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/accf49d59449b71b817ca3c4f2c739f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil Dickson</media:title>
		</media:content>
	</item>
		<item>
		<title>Working Alone Sucks</title>
		<link>http://ndickson.wordpress.com/2008/10/26/working-alone-sucks/</link>
		<comments>http://ndickson.wordpress.com/2008/10/26/working-alone-sucks/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 21:44:49 +0000</pubDate>
		<dc:creator>Neil Dickson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[PwnIDE]]></category>
		<category><![CDATA[PwnOS]]></category>

		<guid isPermaLink="false">http://ndickson.wordpress.com/?p=59</guid>
		<description><![CDATA[That&#8217;s an exaggeration, of course, but what I&#8217;m really trying to say is that working alone on a project for an extended period of time really sucks the life out of me.  With my busy schedule this term, I&#8217;m finding it really hard to find time to work on Inventor IDE.  Next term I&#8217;ll be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ndickson.wordpress.com&blog=1158540&post=59&subd=ndickson&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>That&#8217;s an exaggeration, of course, but what I&#8217;m really trying to say is that working alone on a project for an extended period of time really sucks the life out of me.  With my busy schedule this term, I&#8217;m finding it really hard to find time to work on Inventor IDE.  Next term I&#8217;ll be working on it as part of a directed study, and I do have a hard deadline of the end of 2008 for getting built-in assembling fully functional, but progress has been slow.</p>
<p>I got asked about teamwork in an interview with Microsoft&#8217;s Photosynth group, so that got me really thinking about team dynamics.  At the very least, on any sizable project, having someone else to bounce ideas off of is a must.  Since for assignments 1 and 2, the professor of the course I&#8217;m helping with hasn&#8217;t posted my alternate assignments, until I get built-in assembling working and start posting about it widely, I won&#8217;t even have many users off of which  to bounce ideas about Inventor IDE.</p>
<p>Beyond that, assuming there&#8217;s an actual team, there must be some sort of division of labour such that what needs to get done gets done without losing the members.  I&#8217;ve started organizing the team for the next big Code Cortex project, codenamed PwnOS, and it&#8217;s interesting trying to figure out how to split up the work and to keep people interested.  Conveniently, the team came up with a great idea: each person investigates a device protocol and goes through developing support for that device.  It works perfectly, since getting a device to work is one of the really satisfying parts of OS development, and it only depends on having as much of a bootloader as I&#8217;ve already got.  I can then focus on getting some of the other parts of the OS up and running without everyone waiting for me.</p>
<p>Other good news includes that I&#8217;ve found someone quite eager to get a third (unnamed) project off the ground, and I may have found another person to help with Inventor IDE next term.  It&#8217;ll take lots of work to get things going, but I&#8217;m optimistic that we can find a way to make things work, together.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ndickson.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ndickson.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ndickson.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ndickson.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ndickson.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ndickson.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ndickson.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ndickson.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ndickson.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ndickson.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ndickson.wordpress.com&blog=1158540&post=59&subd=ndickson&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ndickson.wordpress.com/2008/10/26/working-alone-sucks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/accf49d59449b71b817ca3c4f2c739f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil Dickson</media:title>
		</media:content>
	</item>
		<item>
		<title>Progress Report</title>
		<link>http://ndickson.wordpress.com/2008/09/09/progress-report/</link>
		<comments>http://ndickson.wordpress.com/2008/09/09/progress-report/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 15:04:56 +0000</pubDate>
		<dc:creator>Neil Dickson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[PwnIDE]]></category>

		<guid isPermaLink="false">http://ndickson.wordpress.com/?p=57</guid>
		<description><![CDATA[So how did I do on that agenda I listed for August?  This is what got done for Inventor IDE Alpha 4:

Layout problems fixed
Enough support for external includes for COMP 2003, but it still needs some work for the future
The first two videos of the video tutorial are out, with the rest coming over the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ndickson.wordpress.com&blog=1158540&post=57&subd=ndickson&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So how did I do on that agenda I listed for August?  This is what got done for <a href="http://www.codecortex.com/ide/">Inventor IDE</a> Alpha 4:</p>
<ul>
<li>Layout problems fixed</li>
<li>Enough support for external includes for COMP 2003, but it still needs some work for the future</li>
<li>The first two videos of the video tutorial are out, with the rest coming over the next few weeks (It turned out that they weren&#8217;t needed immediately.)</li>
<li>Most auto-complete cases handled</li>
<li>Slightly more go-to-definition support</li>
<li>Tons of bugs fixed</li>
</ul>
<p>That means that the next thing on the agenda (other than more tutorial videos) is built-in assembling.  I can&#8217;t wait until I can just hit a &#8220;run&#8221; button and have the thing compile and run.  Check out the <a href="http://showmedo.com/videos/series?id=320">assembly language video tutorial</a> at ShowMeDo, and be sure to post any questions or comments about it or Inventor IDE on <a title="Code Cortex Forum" href="http://www.codecortex.com/forum/">the forum</a> I&#8217;ve just set up.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ndickson.wordpress.com/57/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ndickson.wordpress.com/57/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ndickson.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ndickson.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ndickson.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ndickson.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ndickson.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ndickson.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ndickson.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ndickson.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ndickson.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ndickson.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ndickson.wordpress.com&blog=1158540&post=57&subd=ndickson&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ndickson.wordpress.com/2008/09/09/progress-report/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/accf49d59449b71b817ca3c4f2c739f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil Dickson</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;Catastrophic&#8221; Bug</title>
		<link>http://ndickson.wordpress.com/2008/08/26/catastrophic-bug/</link>
		<comments>http://ndickson.wordpress.com/2008/08/26/catastrophic-bug/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 16:20:52 +0000</pubDate>
		<dc:creator>Neil Dickson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[PwnIDE]]></category>

		<guid isPermaLink="false">http://ndickson.wordpress.com/?p=53</guid>
		<description><![CDATA[Don&#8217;t worry, no damage done to the code&#8230; though I suppose there could have been if I wasn&#8217;t careful.  Then what am I talking about when I say catastrophic?  Well, as always, complexity came back to bite me, whereby a bug of the following type occurs in the development version of Inventor IDE [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ndickson.wordpress.com&blog=1158540&post=53&subd=ndickson&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Don&#8217;t worry, no damage done to the code&#8230; though I suppose there could have been if I wasn&#8217;t careful.  Then what am I talking about when I say catastrophic?  Well, as always, complexity came back to bite me, whereby a bug of the following type occurs in the development version of Inventor IDE (and probably Alpha 3 and earlier too).</p>
<ul>
<li>A common operation doesn&#8217;t work properly. (e.g. in this case, dragging text or pasting text will cause it in certain cases)</li>
<li>Any further operations by the user to fix the invalid result of the failed operation will not work. (e.g. in this case, even typing is unreliable after the bug occurs)</li>
<li>Some further operations by the user to fix the problem make the problem worse or different. (e.g. in this case, deleting anything in global scope deletes the object but doesn&#8217;t remove the object&#8217;s representation from the UI or update any references to the object)</li>
<li>The only indication the user has that there is a bug is that things are going horribly wrong. (unless they can see the stack traces mounting in the optional console when running a JAR file)</li>
</ul>
<p>The bug in this case involves a few operations involving editing text containing line labels (very common in assembly).  In order to support refactoring of line labels in the code, I&#8217;ve got a bunch of special cases, and it seems that once again, they don&#8217;t handle every case.  That&#8217;s right, I&#8217;ve had bugs with them before, including one I knew about but haven&#8217;t fixed yet because it wasn&#8217;t as serious or common as the many other problems (it was that swapping two adjacent line labels didn&#8217;t work).</p>
<p>This isn&#8217;t something easy to ignore either, because both C/C++ and Java have line labels, and more importantly, refactoring of local variables not at the top of a function in C/C++ and Java will need to work almost the same way as refactoring of line labels.  This time, I&#8217;ll try to find a simpler solution that could be applied to any sort of declaration on a line.</p>
<p>It does set back some of what I was hoping to do by September 4th, but I&#8217;ll still at least finish what I really had to get done.  Thankfully, that layout problem is almost completely fixed after a lot of work.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ndickson.wordpress.com/53/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ndickson.wordpress.com/53/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ndickson.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ndickson.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ndickson.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ndickson.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ndickson.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ndickson.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ndickson.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ndickson.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ndickson.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ndickson.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ndickson.wordpress.com&blog=1158540&post=53&subd=ndickson&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://ndickson.wordpress.com/2008/08/26/catastrophic-bug/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/accf49d59449b71b817ca3c4f2c739f0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil Dickson</media:title>
		</media:content>
	</item>
	</channel>
</rss>