<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" 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/" version="2.0">
<channel>
	<title>Comments for inamerrata</title>
	
	<link>http://www.erisian.com.au/wordpress</link>
	<description>Anthony Towns' blog</description>
	<lastBuildDate>Wed, 01 May 2013 01:13:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/inamerrata-comments" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="inamerrata-comments" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Comment on Messing with taxes by Russell Stuart</title>
		<link>http://www.erisian.com.au/wordpress/2013/05/01/messing-with-taxes/comment-page-1#comment-2001</link>
		<dc:creator>Russell Stuart</dc:creator>
		<pubDate>Wed, 01 May 2013 01:13:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.erisian.com.au/wordpress/?p=912#comment-2001</guid>
		<description>Amazing.  I didn't realise our tax system was that badly warped.  That spike in the marginal rate at around $20k is insane.

I don't know why they don't use a continuous curve.  Something simple like y = (log(x^4) + 10)/5 has roughly the right shape so it only has to be scaled appropriately.  It would get rid of all those discontinuities, and when they go so will the income peaks at $35k and $80k.</description>
		<content:encoded><![CDATA[<p>Amazing.  I didn&#8217;t realise our tax system was that badly warped.  That spike in the marginal rate at around $20k is insane.</p>
<p>I don&#8217;t know why they don&#8217;t use a continuous curve.  Something simple like y = (log(x^4) + 10)/5 has roughly the right shape so it only has to be scaled appropriately.  It would get rid of all those discontinuities, and when they go so will the income peaks at $35k and $80k.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Henry Tax Review, post release by inamerrata » Blog Archive » Messing with taxes</title>
		<link>http://www.erisian.com.au/wordpress/2010/05/03/henry-tax-review-post-release/comment-page-1#comment-2000</link>
		<dc:creator>inamerrata » Blog Archive » Messing with taxes</dc:creator>
		<pubDate>Tue, 30 Apr 2013 16:13:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.erisian.com.au/wordpress/?p=664#comment-2000</guid>
		<description>[...] Way back when, I wrote fairly approvingly of the recommendations to simplify the income tax system. The idea being to more or less keep charging everyone the same tax rate, but to simplify the formulae from five different tax rates, a medicare levy, and a gradually disappearing low-income tax offset, to just a couple of different rates (one kicking in at $25k pa, one at $180k pa). The government’s adopted that in a half-hearted way — raising the tax free threshold to $18,200 instead of $25,000, and reducing but not eliminating the low-income tax offset. There’s still the medicare levy with its weird phase-in procedure, and there’s still four different tax rates. And there’s still all sorts of other deductions etc to keep people busy around tax time. [...]</description>
		<content:encoded><![CDATA[<p>[...] Way back when, I wrote fairly approvingly of the recommendations to simplify the income tax system. The idea being to more or less keep charging everyone the same tax rate, but to simplify the formulae from five different tax rates, a medicare levy, and a gradually disappearing low-income tax offset, to just a couple of different rates (one kicking in at $25k pa, one at $180k pa). The government&#8217;s adopted that in a half-hearted way &#8212; raising the tax free threshold to $18,200 instead of $25,000, and reducing but not eliminating the low-income tax offset. There&#8217;s still the medicare levy with its weird phase-in procedure, and there&#8217;s still four different tax rates. And there&#8217;s still all sorts of other deductions etc to keep people busy around tax time. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Bits by Ritesh Raj Sarraf</title>
		<link>http://www.erisian.com.au/wordpress/2012/05/29/bits/comment-page-1#comment-1904</link>
		<dc:creator>Ritesh Raj Sarraf</dc:creator>
		<pubDate>Mon, 04 Jun 2012 11:21:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.erisian.com.au/wordpress/?p=895#comment-1904</guid>
		<description>Wow!! if you seriously rode 5000 kilometers.</description>
		<content:encoded><![CDATA[<p>Wow!! if you seriously rode 5000 kilometers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Babysitting bankers by mgregoire</title>
		<link>http://www.erisian.com.au/wordpress/2009/01/05/babysitting-bankers/comment-page-1#comment-1839</link>
		<dc:creator>mgregoire</dc:creator>
		<pubDate>Sat, 26 Nov 2011 18:42:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.erisian.com.au/wordpress/?p=396#comment-1839</guid>
		<description>For a link to the original paper, and a disagreement with Prof. Krugman's interpretation, see

http://betweenthebalancesheets.wordpress.com/2011/10/05/the-lessons-of-the-baby-sitting-co-op-reconsidered/</description>
		<content:encoded><![CDATA[<p>For a link to the original paper, and a disagreement with Prof. Krugman&#8217;s interpretation, see</p>
<p><a href="http://betweenthebalancesheets.wordpress.com/2011/10/05/the-lessons-of-the-baby-sitting-co-op-reconsidered/" rel="nofollow">http://betweenthebalancesheets.wordpress.com/2011/10/05/the-lessons-of-the-baby-sitting-co-op-reconsidered/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Pro-Linux bias at linux.conf.au by donna</title>
		<link>http://www.erisian.com.au/wordpress/2011/02/22/pro-linux-bias-at-linux-conf-au/comment-page-1#comment-1788</link>
		<dc:creator>donna</dc:creator>
		<pubDate>Tue, 09 Aug 2011 20:57:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.erisian.com.au/wordpress/?p=885#comment-1788</guid>
		<description>Another thing I'd add....  is rather than linux biassed, I suspect LCA might be GPL biassed...  Also - open web people are marginalised and unwelcome by those who suggest it's a kernel conference.</description>
		<content:encoded><![CDATA[<p>Another thing I&#8217;d add&#8230;.  is rather than linux biassed, I suspect LCA might be GPL biassed&#8230;  Also &#8211; open web people are marginalised and unwelcome by those who suggest it&#8217;s a kernel conference.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Pro-Linux bias at linux.conf.au by donna</title>
		<link>http://www.erisian.com.au/wordpress/2011/02/22/pro-linux-bias-at-linux-conf-au/comment-page-1#comment-1787</link>
		<dc:creator>donna</dc:creator>
		<pubDate>Tue, 09 Aug 2011 20:55:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.erisian.com.au/wordpress/?p=885#comment-1787</guid>
		<description>There seem to be a lot of misconceptions about linux.conf.au - and some of them are perpetuated by the non-existent cabal.

I had a number of people tell me they weren't going to submit to the call for papers because of posts discouraging them from doing so...

*shrug*

Also - "I don't use linux"

Dunno how we change the script in people's heads - perhaps talking about it, and blogging about it, and perhaps getting next year's call for papers to explicitly reach out to different groups...  perhaps going back to old model and inviting speakers from under represented open source projects like Java, like BSD... rather than expecting them to submit to our rigorous CFP?</description>
		<content:encoded><![CDATA[<p>There seem to be a lot of misconceptions about linux.conf.au &#8211; and some of them are perpetuated by the non-existent cabal.</p>
<p>I had a number of people tell me they weren&#8217;t going to submit to the call for papers because of posts discouraging them from doing so&#8230;</p>
<p>*shrug*</p>
<p>Also &#8211; &#8220;I don&#8217;t use linux&#8221;</p>
<p>Dunno how we change the script in people&#8217;s heads &#8211; perhaps talking about it, and blogging about it, and perhaps getting next year&#8217;s call for papers to explicitly reach out to different groups&#8230;  perhaps going back to old model and inviting speakers from under represented open source projects like Java, like BSD&#8230; rather than expecting them to submit to our rigorous CFP?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Owning the new now by donna</title>
		<link>http://www.erisian.com.au/wordpress/2011/08/06/owning-the-new-now/comment-page-1#comment-1786</link>
		<dc:creator>donna</dc:creator>
		<pubDate>Tue, 09 Aug 2011 20:50:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.erisian.com.au/wordpress/?p=888#comment-1786</guid>
		<description>Hey that's cool!  And congrats. And stuff. :)</description>
		<content:encoded><![CDATA[<p>Hey that&#8217;s cool!  And congrats. And stuff. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Upstarta by Arjen Lentz</title>
		<link>http://www.erisian.com.au/wordpress/2010/03/14/upstarta/comment-page-1#comment-1773</link>
		<dc:creator>Arjen Lentz</dc:creator>
		<pubDate>Tue, 28 Jun 2011 00:47:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.erisian.com.au/wordpress/?p=616#comment-1773</guid>
		<description>Late reply - I forget which one of my reference books cover it, but essentially there is "good money" and "bad money". The trick is to distinguish - now for starting a business and various aspects of the innovation, time to market, chance of success/failure, and the type of company that comes from it, most money turns out to be bad.
The added problem there is that most people involved with starting/building a company will not have an angle on the good/bad money thing or an appreciation of how little early decisions can build a monster.
So, as a baseline, "the polonious rule" works really well. It forces people to think about it rather than take "get some capital" as a standard approach.
It does need more documentation/references for full background - work in progress!

Btw pity we only saw you at a meeting once - you have excellent insights, it'd be great to have you there!</description>
		<content:encoded><![CDATA[<p>Late reply &#8211; I forget which one of my reference books cover it, but essentially there is &#8220;good money&#8221; and &#8220;bad money&#8221;. The trick is to distinguish &#8211; now for starting a business and various aspects of the innovation, time to market, chance of success/failure, and the type of company that comes from it, most money turns out to be bad.<br />
The added problem there is that most people involved with starting/building a company will not have an angle on the good/bad money thing or an appreciation of how little early decisions can build a monster.<br />
So, as a baseline, &#8220;the polonious rule&#8221; works really well. It forces people to think about it rather than take &#8220;get some capital&#8221; as a standard approach.<br />
It does need more documentation/references for full background &#8211; work in progress!</p>
<p>Btw pity we only saw you at a meeting once &#8211; you have excellent insights, it&#8217;d be great to have you there!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Pro-Linux bias at linux.conf.au by Christopher Neugebauer</title>
		<link>http://www.erisian.com.au/wordpress/2011/02/22/pro-linux-bias-at-linux-conf-au/comment-page-1#comment-1736</link>
		<dc:creator>Christopher Neugebauer</dc:creator>
		<pubDate>Tue, 22 Feb 2011 06:47:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.erisian.com.au/wordpress/?p=885#comment-1736</guid>
		<description>As far as I can tell, I've seen one Java submission in the list of rejected papers, which I've had as a miniconf organiser for two years running.  I extended an offer to that submission to present at the Open Programming Miniconf.  We had another Java-related talk show up in our separate call for papers.

It seems fairly clear to me that the lack of JVM talks at LCA is due to a lack of submissions, but we're doing work to make sure that talks for developers from all open source ecosystems (including OpenJVM) are welcomed there.  We just need more submissions!</description>
		<content:encoded><![CDATA[<p>As far as I can tell, I&#8217;ve seen one Java submission in the list of rejected papers, which I&#8217;ve had as a miniconf organiser for two years running.  I extended an offer to that submission to present at the Open Programming Miniconf.  We had another Java-related talk show up in our separate call for papers.</p>
<p>It seems fairly clear to me that the lack of JVM talks at LCA is due to a lack of submissions, but we&#8217;re doing work to make sure that talks for developers from all open source ecosystems (including OpenJVM) are welcomed there.  We just need more submissions!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Britney’s Delay by hothead</title>
		<link>http://www.erisian.com.au/wordpress/2003/06/26/britneys-delay/comment-page-1#comment-1711</link>
		<dc:creator>hothead</dc:creator>
		<pubDate>Sat, 01 Jan 2011 20:46:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.erisian.com.au/wordpress/?p=60#comment-1711</guid>
		<description>Hi,
I think you srsly can't judge a packaged software's quality by version number, imagine you do a major repack/release and often these new versions include many new bugs as developers do often work on new major versions without any public review or feedback process.
Maybe something like a weighting system that calculates package "priorities" or importance of availability (maybe through popcon?) evaluates all "risk factors" of dependency packages and decides upon the result. this way britney could also find the most "bad-weighing" dependencies that hold back many packages, or maybe even show which bugfixes enable the most packages to be moved to testing and thus reduce the total time that is minimally needed, because developers can set priorities accordingly.
i'm not really familiar with that topic, but maybe this could be an idea to start with.

regards,

hothead</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I think you srsly can&#8217;t judge a packaged software&#8217;s quality by version number, imagine you do a major repack/release and often these new versions include many new bugs as developers do often work on new major versions without any public review or feedback process.<br />
Maybe something like a weighting system that calculates package &#8220;priorities&#8221; or importance of availability (maybe through popcon?) evaluates all &#8220;risk factors&#8221; of dependency packages and decides upon the result. this way britney could also find the most &#8220;bad-weighing&#8221; dependencies that hold back many packages, or maybe even show which bugfixes enable the most packages to be moved to testing and thus reduce the total time that is minimally needed, because developers can set priorities accordingly.<br />
i&#8217;m not really familiar with that topic, but maybe this could be an idea to start with.</p>
<p>regards,</p>
<p>hothead</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Silly testcase hacks by Martin Pool</title>
		<link>http://www.erisian.com.au/wordpress/2010/12/14/silly-testcase-hacks/comment-page-1#comment-1658</link>
		<dc:creator>Martin Pool</dc:creator>
		<pubDate>Wed, 22 Dec 2010 04:52:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.erisian.com.au/wordpress/?p=879#comment-1658</guid>
		<description>That is a better example.  It still seems a little odd to be recreating by hand something very close to being a generator.  

Perhaps the tests would be better factored as first checking on generation of the sieve, and then that the sieve is used correctly.  (Or perhaps that is just arguing the example.)</description>
		<content:encoded><![CDATA[<p>That is a better example.  It still seems a little odd to be recreating by hand something very close to being a generator.  </p>
<p>Perhaps the tests would be better factored as first checking on generation of the sieve, and then that the sieve is used correctly.  (Or perhaps that is just arguing the example.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Silly testcase hacks by aj</title>
		<link>http://www.erisian.com.au/wordpress/2010/12/14/silly-testcase-hacks/comment-page-1#comment-1619</link>
		<dc:creator>aj</dc:creator>
		<pubDate>Fri, 17 Dec 2010 07:43:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.erisian.com.au/wordpress/?p=879#comment-1619</guid>
		<description>Oh, the above comment's output is generated by invoking:

&lt;blockquote&gt;&lt;code&gt;&lt;pre&gt;for test, res, exc in run_tests(prime_test):
    if exc is None:
        if not res: print "FAIL: %s : wrong result" % (test)
    else:
        print "FAIL: %s : exception %s" % (test, exc)&lt;/pre&gt;&lt;/code&gt;&lt;/blockquote&gt;</description>
		<content:encoded><![CDATA[<p>Oh, the above comment&#8217;s output is generated by invoking:</p>
<blockquote><p><code>
<pre>for test, res, exc in run_tests(prime_test):
    if exc is None:
        if not res: print "FAIL: %s : wrong result" % (test)
    else:
        print "FAIL: %s : exception %s" % (test, exc)</pre>
<p></code></p></blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Silly testcase hacks by aj</title>
		<link>http://www.erisian.com.au/wordpress/2010/12/14/silly-testcase-hacks/comment-page-1#comment-1618</link>
		<dc:creator>aj</dc:creator>
		<pubDate>Fri, 17 Dec 2010 07:41:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.erisian.com.au/wordpress/?p=879#comment-1618</guid>
		<description>Okay, I think that's the fault of my examples more than the idea though. Here's (I think) a better example.

Code under test is a primality test that (optionally) also does the &lt;a href="http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes" rel="nofollow"&gt;Sieve of Eratosthenes&lt;/a&gt; thing to speed things up.

&lt;blockquote&gt;&lt;code&gt;&lt;pre&gt;def euler_sieve(n):
    if n &gt; 1000:
        raise Exception("cannot do a sieve with %d elements" % n)
    # from wikipedia
    candidates = range(n+1)
    fin = int(n**0.5)
    for i in xrange(2, fin+1):
        if not candidates[i]:
            continue
        candidates[2*i::i] = [None] * (n//i - 1)
    return [i for i in candidates[2:] if i]

def is_prime(n, sieve = None, sieve_max = None):
    if sieve is None:
        i = 2
    else:
        if n &lt;= sieve_max:
            return n in sieve
        else:
            for i in sieve:
                if n % i == 0:
                    return False
            i = sieve_max
    while i*i &lt;= n:
        if n % i == 0: return False
        i += 1
    return True&lt;/pre&gt;&lt;/code&gt;&lt;/blockquote&gt;

Test code that deals with a bunch of different cases (are we using a pregenerated sieve, does the sieve actually generate, is the number prime, a unit, negative) might be:

&lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;def prime_test(branch):
    have_sieve = branch(True, False)
    if have_sieve:
        sieve_size = branch(-1, 0, 1, 2, 10, 100, 500, 1000)
        sieve = euler_sieve(sieve_size)
    else:
        sieve_size = 0
        sieve = None
    actual_prime = branch(True, False)
    if actual_prime:
        n = branch(2, 3, 5, 7, 30133, 1231231)
    else:
        n = branch(-1, 0, 1, 4, 6, 8, 100, 1000000)
    return is_prime(n, sieve, sieve_size) == actual_prime&lt;/pre&gt;&lt;/code&gt;&lt;/blockquote&gt;

Failures are:

&lt;blockquote&gt;&lt;code&gt;&lt;pre&gt;FAIL: [True, -1] : exception negative number cannot be raised to a fractional power
FAIL: [True, 0, True, 2] : exception integer division or modulo by zero
FAIL: [True, 0, True, 3] : exception integer division or modulo by zero
FAIL: [True, 0, True, 5] : exception integer division or modulo by zero
FAIL: [True, 0, True, 7] : exception integer division or modulo by zero
FAIL: [True, 0, True, 30133] : exception integer division or modulo by zero
FAIL: [True, 0, True, 1231231] : exception integer division or modulo by zero
FAIL: [True, 0, False, 1] : exception integer division or modulo by zero
FAIL: [True, 0, False, 4] : exception integer division or modulo by zero
FAIL: [True, 0, False, 6] : exception integer division or modulo by zero
FAIL: [True, 0, False, 8] : exception integer division or modulo by zero
FAIL: [True, 0, False, 100] : exception integer division or modulo by zero
FAIL: [True, 0, False, 1000000] : exception integer division or modulo by zero
FAIL: [True, 1, True, 2] : wrong result
FAIL: [True, 1, True, 3] : wrong result
FAIL: [True, 1, True, 5] : wrong result
FAIL: [True, 1, True, 7] : wrong result
FAIL: [True, 1, True, 30133] : wrong result
FAIL: [True, 1, True, 1231231] : wrong result
FAIL: [True, 2000] : exception cannot do a sieve with 2000 elements
FAIL: [False, False, -1] : wrong result
FAIL: [False, False, 0] : wrong result
FAIL: [False, False, 1] : wrong result&lt;/pre&gt;&lt;/code&gt;&lt;/blockquote&gt;

So you only get one message when your sieve creation fails (creating a sieve of the first -1 numbers [True, -1] fails when sqrt(-1) gets invoked, and for the first 2000 numbers fails because it's deliberately disabled), but when sieve creation (apparently) succeeds you get results for each of the following-on branches you've setup.</description>
		<content:encoded><![CDATA[<p>Okay, I think that&#8217;s the fault of my examples more than the idea though. Here&#8217;s (I think) a better example.</p>
<p>Code under test is a primality test that (optionally) also does the <a href="http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes" rel="nofollow">Sieve of Eratosthenes</a> thing to speed things up.</p>
<blockquote><p><code>
<pre>def euler_sieve(n):
    if n > 1000:
        raise Exception("cannot do a sieve with %d elements" % n)
    # from wikipedia
    candidates = range(n+1)
    fin = int(n**0.5)
    for i in xrange(2, fin+1):
        if not candidates[i]:
            continue
        candidates[2*i::i] = [None] * (n//i - 1)
    return [i for i in candidates[2:] if i]

def is_prime(n, sieve = None, sieve_max = None):
    if sieve is None:
        i = 2
    else:
        if n < = sieve_max:
            return n in sieve
        else:
            for i in sieve:
                if n % i == 0:
                    return False
            i = sieve_max
    while i*i <= n:
        if n % i == 0: return False
        i += 1
    return True</pre>
</pre>
<p></code></p></blockquote>
<p>Test code that deals with a bunch of different cases (are we using a pregenerated sieve, does the sieve actually generate, is the number prime, a unit, negative) might be:</p>
<blockquote><pre><code>def prime_test(branch):
    have_sieve = branch(True, False)
    if have_sieve:
        sieve_size = branch(-1, 0, 1, 2, 10, 100, 500, 1000)
        sieve = euler_sieve(sieve_size)
    else:
        sieve_size = 0
        sieve = None
    actual_prime = branch(True, False)
    if actual_prime:
        n = branch(2, 3, 5, 7, 30133, 1231231)
    else:
        n = branch(-1, 0, 1, 4, 6, 8, 100, 1000000)
    return is_prime(n, sieve, sieve_size) == actual_prime</code></pre>
</blockquote>
<p>Failures are:</p>
<blockquote><p><code>
<pre>FAIL: [True, -1] : exception negative number cannot be raised to a fractional power
FAIL: [True, 0, True, 2] : exception integer division or modulo by zero
FAIL: [True, 0, True, 3] : exception integer division or modulo by zero
FAIL: [True, 0, True, 5] : exception integer division or modulo by zero
FAIL: [True, 0, True, 7] : exception integer division or modulo by zero
FAIL: [True, 0, True, 30133] : exception integer division or modulo by zero
FAIL: [True, 0, True, 1231231] : exception integer division or modulo by zero
FAIL: [True, 0, False, 1] : exception integer division or modulo by zero
FAIL: [True, 0, False, 4] : exception integer division or modulo by zero
FAIL: [True, 0, False, 6] : exception integer division or modulo by zero
FAIL: [True, 0, False, 8] : exception integer division or modulo by zero
FAIL: [True, 0, False, 100] : exception integer division or modulo by zero
FAIL: [True, 0, False, 1000000] : exception integer division or modulo by zero
FAIL: [True, 1, True, 2] : wrong result
FAIL: [True, 1, True, 3] : wrong result
FAIL: [True, 1, True, 5] : wrong result
FAIL: [True, 1, True, 7] : wrong result
FAIL: [True, 1, True, 30133] : wrong result
FAIL: [True, 1, True, 1231231] : wrong result
FAIL: [True, 2000] : exception cannot do a sieve with 2000 elements
FAIL: [False, False, -1] : wrong result
FAIL: [False, False, 0] : wrong result
FAIL: [False, False, 1] : wrong result</pre>
<p></code></p></blockquote>
<p>So you only get one message when your sieve creation fails (creating a sieve of the first -1 numbers [True, -1] fails when sqrt(-1) gets invoked, and for the first 2000 numbers fails because it's deliberately disabled), but when sieve creation (apparently) succeeds you get results for each of the following-on branches you've setup.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Silly testcase hacks by Martin Pool</title>
		<link>http://www.erisian.com.au/wordpress/2010/12/14/silly-testcase-hacks/comment-page-1#comment-1611</link>
		<dc:creator>Martin Pool</dc:creator>
		<pubDate>Thu, 16 Dec 2010 05:14:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.erisian.com.au/wordpress/?p=879#comment-1611</guid>
		<description>html-stripping web forms are particularly cruel to python...</description>
		<content:encoded><![CDATA[<p>html-stripping web forms are particularly cruel to python&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Silly testcase hacks by Martin Pool</title>
		<link>http://www.erisian.com.au/wordpress/2010/12/14/silly-testcase-hacks/comment-page-1#comment-1610</link>
		<dc:creator>Martin Pool</dc:creator>
		<pubDate>Thu, 16 Dec 2010 05:13:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.erisian.com.au/wordpress/?p=879#comment-1610</guid>
		<description>That is a cute way to write inverted control, but is it really the same thing?  You are not testing what happens in a situation built up by previous tests, which is what seems to me to be essential there.

The situation he describes could be described as an application of the &lt;a href="http://xunitpatterns.com/Chained%20Tests.html" rel="nofollow"&gt;Chained Tests&lt;/a&gt; pattern, and it has mixed benefits.  One of the benefits is that you may need less explicit setup code; one drawback is it's hard to implement correctly and hard to maintain in non-pure languages and in particular it is hard to have branching.

The kind of case you're describing is something a lot like what &lt;a href="http://launchpad.net/testscenarios/" rel="nofollow"&gt;testscenarios&lt;/a&gt; handles:


    class TestPrimality(TestCase):
        scenarios = [(str(a), {'number': a, 'prime': b)
            for a, b in 
            [(1, True), (2, True), (3, True), (4, False), (6, False)]]

        def test_is_prime(self):
            self.assertEquals(self.prime, is_prime(self.number))
</description>
		<content:encoded><![CDATA[<p>That is a cute way to write inverted control, but is it really the same thing?  You are not testing what happens in a situation built up by previous tests, which is what seems to me to be essential there.</p>
<p>The situation he describes could be described as an application of the <a href="http://xunitpatterns.com/Chained%20Tests.html" rel="nofollow">Chained Tests</a> pattern, and it has mixed benefits.  One of the benefits is that you may need less explicit setup code; one drawback is it&#8217;s hard to implement correctly and hard to maintain in non-pure languages and in particular it is hard to have branching.</p>
<p>The kind of case you&#8217;re describing is something a lot like what <a href="http://launchpad.net/testscenarios/" rel="nofollow">testscenarios</a> handles:</p>
<p>    class TestPrimality(TestCase):<br />
        scenarios = [(str(a), {'number': a, 'prime': b)<br />
            for a, b in<br />
            [(1, True), (2, True), (3, True), (4, False), (6, False)]]</p>
<p>        def test_is_prime(self):<br />
            self.assertEquals(self.prime, is_prime(self.number))</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Silly testcase hacks by aj</title>
		<link>http://www.erisian.com.au/wordpress/2010/12/14/silly-testcase-hacks/comment-page-1#comment-1598</link>
		<dc:creator>aj</dc:creator>
		<pubDate>Tue, 14 Dec 2010 13:48:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.erisian.com.au/wordpress/?p=879#comment-1598</guid>
		<description>After posting I had an idea for a more general approach. First a class:

&lt;blockquote&gt;&lt;code&gt;&lt;pre&gt;class Brancher:
    def __iter__(self):
        return self

    def next(self):
        if not hasattr(self, "idx"):
            self.idx = []
        elif self.nxt is not None:
            self.idx[self.nxt] += 1
            self.idx[self.nxt+1:] = []
        else:
            raise StopIteration()
        self.vals = []
        self.cnt, self.nxt = 0, None
        return self


    def __call__(self, *options):
        if len(self.idx) == self.cnt:
            self.idx.append(0)
        n = self.idx[self.cnt]
        if n+1 &lt; len(options):
            self.nxt = self.cnt
        r = options[n]
        self.vals.append(r)
        self.cnt += 1
        return r&lt;/pre&gt;&lt;/code&gt;&lt;/blockquote&gt;

Then you can do something like:

&lt;blockquote&gt;&lt;code&gt;&lt;pre&gt;for branch in Brancher():
    n = branch(*range(2,10))
    m = branch(*range(2,10))
    if is_prime(n*m):
        print "FAIL: is_prime(%d*%d) = TRUE" % (n, m)&lt;/pre&gt;&lt;/code&gt;&lt;/blockquote&gt;

and have the loop cover all combinations of the branches. The run_tests function then becomes:

&lt;blockquote&gt;&lt;code&gt;&lt;pre&gt;def run_tests(test_fn):
    for branch in Brancher():
        try:
            res = test_fn(branch)
        except Exception as e:
            yield (branch.vals, None, e)
        else:
            yield (branch.vals, res, None)&lt;/pre&gt;&lt;/code&gt;&lt;/blockquote&gt;

(at least, it does when you add in support for exception handling).</description>
		<content:encoded><![CDATA[<p>After posting I had an idea for a more general approach. First a class:</p>
<blockquote><p><code>
<pre>class Brancher:
    def __iter__(self):
        return self

    def next(self):
        if not hasattr(self, "idx"):
            self.idx = []
        elif self.nxt is not None:
            self.idx[self.nxt] += 1
            self.idx[self.nxt+1:] = []
        else:
            raise StopIteration()
        self.vals = []
        self.cnt, self.nxt = 0, None
        return self

    def __call__(self, *options):
        if len(self.idx) == self.cnt:
            self.idx.append(0)
        n = self.idx[self.cnt]
        if n+1 < len(options):
            self.nxt = self.cnt
        r = options[n]
        self.vals.append(r)
        self.cnt += 1
        return r</pre>
</pre>
<p></code></p></blockquote>
<p>Then you can do something like:</p>
<blockquote><p><code>
<pre>for branch in Brancher():
    n = branch(*range(2,10))
    m = branch(*range(2,10))
    if is_prime(n*m):
        print "FAIL: is_prime(%d*%d) = TRUE" % (n, m)</pre>
<p></code></p></blockquote>
<p>and have the loop cover all combinations of the branches. The run_tests function then becomes:</p>
<blockquote><p><code>
<pre>def run_tests(test_fn):
    for branch in Brancher():
        try:
            res = test_fn(branch)
        except Exception as e:
            yield (branch.vals, None, e)
        else:
            yield (branch.vals, res, None)</pre>
<p></code></p></blockquote>
<p>(at least, it does when you add in support for exception handling).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Silly hacks by aj</title>
		<link>http://www.erisian.com.au/wordpress/2010/12/09/silly-hacks/comment-page-1#comment-1573</link>
		<dc:creator>aj</dc:creator>
		<pubDate>Thu, 09 Dec 2010 14:55:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.erisian.com.au/wordpress/?p=865#comment-1573</guid>
		<description>Hey, it kinda &lt;a href="https://github.com/ajtowns/challenge/blob/master/guidemo" rel="nofollow"&gt;worked&lt;/a&gt;!

&lt;pre&gt;import guif, wx
frame = guif.dispguif("Enter some text: %(edit)250t \n %(button)b", 
                      "", "Press me!",
                      ExitOn = ("button", wx.EVT_BUTTON))
guif.dispguif("You typed: %l", frame.edit.GetValue())&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Hey, it kinda <a href="https://github.com/ajtowns/challenge/blob/master/guidemo" rel="nofollow">worked</a>!</p>
<pre>import guif, wx
frame = guif.dispguif("Enter some text: %(edit)250t \n %(button)b",
                      "", "Press me!",
                      ExitOn = ("button", wx.EVT_BUTTON))
guif.dispguif("You typed: %l", frame.edit.GetValue())</pre>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on NBN Business Plan by aj</title>
		<link>http://www.erisian.com.au/wordpress/2010/11/25/nbn-business-plan/comment-page-1#comment-1514</link>
		<dc:creator>aj</dc:creator>
		<pubDate>Sat, 27 Nov 2010 04:42:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.erisian.com.au/wordpress/?p=863#comment-1514</guid>
		<description>Internode and iiNet are doing "fetchtv" for TV over IP, and according to it's FAQ "There is no download metering on any of the TV content, Video On Command or pay per view movies." Of course, fetchtv has a monthly subscription fee in addition to your internet fee.

That sort of setup can certainly increase demand for connection speed -- but demand for connection speed is the thing they're assuming won't grow as fast as it historically has in their profit projections. I haven't double checked the numbers, but I'm pretty sure that the historical growth figures were for pretty much a constant price point too.</description>
		<content:encoded><![CDATA[<p>Internode and iiNet are doing &#8220;fetchtv&#8221; for TV over IP, and according to it&#8217;s FAQ &#8220;There is no download metering on any of the TV content, Video On Command or pay per view movies.&#8221; Of course, fetchtv has a monthly subscription fee in addition to your internet fee.</p>
<p>That sort of setup can certainly increase demand for connection speed &#8212; but demand for connection speed is the thing they&#8217;re assuming won&#8217;t grow as fast as it historically has in their profit projections. I haven&#8217;t double checked the numbers, but I&#8217;m pretty sure that the historical growth figures were for pretty much a constant price point too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on NBN Business Plan by Russell Stuart</title>
		<link>http://www.erisian.com.au/wordpress/2010/11/25/nbn-business-plan/comment-page-1#comment-1500</link>
		<dc:creator>Russell Stuart</dc:creator>
		<pubDate>Thu, 25 Nov 2010 05:25:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.erisian.com.au/wordpress/?p=863#comment-1500</guid>
		<description>I get the impression you think they are selling bytes.  I am pretty sure they are selling selling bandwidth.  Thus they say on page 18: "A 12Mbps downstream and 1Mbps upstream entry-level offer across all three access technologies (i.e. fibre, wireless &amp; satellite), at the same price (network ubiquity)".

It is entirely possible the price for bandwidth with go up with inflation while the costs per byte delivered go down.  Thus is it not necessary for them to quote "inflate the cost per GB".  Besides, I suspect something close to what they are planning has been happening for a while now.  The raw cost of a telephone line rental hasn't changed much over the years.  In fact I vaguely recall it going up.  Yet the total price charged per byte on my internet connection has gone down.  I guess that must be probably because the ISP's are now paying less for overseas bytes.

I think the most interesting thing about this is how you will be sold bytes, and who will be selling them to you.  I can't see how the current cable network will be sustainable.  Assuming you write off the capital costs of building it, there is still the ongoing maintenance cost, and surely the NBN will be able to provide the same service cheaper because they can split the maintenance cost over several uses (voice, TV, Internet).

I can't see your local ISP being too keen on the idea of charging you the same rate for each of those bytes.  An internet byte may come from overseas, and so costs them a lot more than a TV byte coming from some local server.  Australian ISP's already charge cheaper rates for some bytes now of course, as they have free zones.  Maybe in future in addition to free zones we will have real time tv zones, voice zones, background download tv zones, global internet zone.  It take is how it pans out, I suspect that like ISP's VOIP services do now, these zones will come different QOS guarantees.  How that will fit in with the "Net Neutrality" sacred cow is a bit if a mystery.

But then again, the NBN can save the cow by deciding it is easier to do the multiplexing themselves.  In that case they will slice and dice the bytes so your ISP gets some fixed chunk of bandwidth, Foxtel some other fixed chunk, your voice provider such as Optus/Telstra another and so on.  The cable is just carrying etherne frames after all, and ethernet supports VLAN's.

This is all wild speculation of course, and I'd be surprised if anybody has a clue where this is going to end up.  The current ISP's, telco's, pay tv, video stores, indeed anybody who makes their living from transporting bytes (its interesting to think of video stores in that way) are probably all looking on very nervously.  The shit is approaching the fan.  Timing when to duck is everything.</description>
		<content:encoded><![CDATA[<p>I get the impression you think they are selling bytes.  I am pretty sure they are selling selling bandwidth.  Thus they say on page 18: &#8220;A 12Mbps downstream and 1Mbps upstream entry-level offer across all three access technologies (i.e. fibre, wireless &amp; satellite), at the same price (network ubiquity)&#8221;.</p>
<p>It is entirely possible the price for bandwidth with go up with inflation while the costs per byte delivered go down.  Thus is it not necessary for them to quote &#8220;inflate the cost per GB&#8221;.  Besides, I suspect something close to what they are planning has been happening for a while now.  The raw cost of a telephone line rental hasn&#8217;t changed much over the years.  In fact I vaguely recall it going up.  Yet the total price charged per byte on my internet connection has gone down.  I guess that must be probably because the ISP&#8217;s are now paying less for overseas bytes.</p>
<p>I think the most interesting thing about this is how you will be sold bytes, and who will be selling them to you.  I can&#8217;t see how the current cable network will be sustainable.  Assuming you write off the capital costs of building it, there is still the ongoing maintenance cost, and surely the NBN will be able to provide the same service cheaper because they can split the maintenance cost over several uses (voice, TV, Internet).</p>
<p>I can&#8217;t see your local ISP being too keen on the idea of charging you the same rate for each of those bytes.  An internet byte may come from overseas, and so costs them a lot more than a TV byte coming from some local server.  Australian ISP&#8217;s already charge cheaper rates for some bytes now of course, as they have free zones.  Maybe in future in addition to free zones we will have real time tv zones, voice zones, background download tv zones, global internet zone.  It take is how it pans out, I suspect that like ISP&#8217;s VOIP services do now, these zones will come different QOS guarantees.  How that will fit in with the &#8220;Net Neutrality&#8221; sacred cow is a bit if a mystery.</p>
<p>But then again, the NBN can save the cow by deciding it is easier to do the multiplexing themselves.  In that case they will slice and dice the bytes so your ISP gets some fixed chunk of bandwidth, Foxtel some other fixed chunk, your voice provider such as Optus/Telstra another and so on.  The cable is just carrying etherne frames after all, and ethernet supports VLAN&#8217;s.</p>
<p>This is all wild speculation of course, and I&#8217;d be surprised if anybody has a clue where this is going to end up.  The current ISP&#8217;s, telco&#8217;s, pay tv, video stores, indeed anybody who makes their living from transporting bytes (its interesting to think of video stores in that way) are probably all looking on very nervously.  The shit is approaching the fan.  Timing when to duck is everything.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Progressive taxation by Antti-Juhani Kaijanaho</title>
		<link>http://www.erisian.com.au/wordpress/2010/10/12/progressive-taxation/comment-page-1#comment-1379</link>
		<dc:creator>Antti-Juhani Kaijanaho</dc:creator>
		<pubDate>Tue, 12 Oct 2010 14:16:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.erisian.com.au/wordpress/?p=831#comment-1379</guid>
		<description />
		<content:encoded><![CDATA[<p>I don&#8217;t understand why a VAT (what&#8217;s GST?) would have to be progressive in order to have progressive taxation.  All you need to have is a flat VAT plus a progressive negative income tax � which we already have, in a crude form, in many industrialized countries in the form of unemployment benefits and various government aids to the poor.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
