<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
     xmlns:atom="http://www.w3.org/2005/Atom"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:wfw="http://wellformedweb.org/CommentAPI/"
     >
  <channel>
    <title>david stanek's digressions</title>
    <link>http://traceback.org</link>
    <description>thoughts from the trenches</description>
    <pubDate>Thu, 17 Nov 2011 21:27:57 GMT</pubDate>
    <generator>Blogofile</generator>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Clepy July 11, 2011 Summary</title>
      <link>http://traceback.org/2011/07/11/clepy-20110711-summary</link>
      <pubDate>Mon, 11 Jul 2011 23:22:02 EDT</pubDate>
      <category><![CDATA[python]]></category>
      <category><![CDATA[clepy]]></category>
      <guid>clepy-20110711-summary</guid>
      <description>Clepy July 11, 2011 Summary</description>
      <content:encoded><![CDATA[<p>After a long hiatus from <a href="http://clepy.org" title="Visit Clepy">Clepy</a> I'm back. I had a great time at the last meeting and I'm going to make a sincere effort to make it each month.</p>
<p>No official talks were scheduled so we resorted to the old standby of asking for <a href="http://en.wikipedia.org/wiki/Lightning_Talk" title="What is a lightning talk">lightning talks</a>. Lightning talk nights are great because there's always a wide variety of content. The group gets so engage in the topic and inline discussions that the talks will last for upwards of 20 minutes instead of the standard 5. That's an observation not a complaint.</p>
<p><a href="http://faehnri.ch/" title="faehnri.ch - the blog fantastic">Eric Faehnrich</a> teed up some great discussions with a <a href="http://en.wikipedia.org/wiki/Closure_%28computer_science%29" title="What is a closure">closure</a> talk. The coolest thing I learned during the talk was that Eric learned Python so that he could experiment with closures. Very awesome!</p>
<p><a href="http://jeff.rainbow-100.com/" title="PrintStar’s Blog - Ramblings of a Fortran Nut">Jeff Armstrong</a> gave us a preview of his upcoming <a href="http://pyohio.org" title="PyOhio 2011">PyOhio 2011</a> <a href="http://pyohio.org/schedule/presentations/5/" title="Bringing Modern Python to the Atari">talk</a>. He got Python working on the FreeMiNT operating system which is a UNIX-like environment for ancient Atari hardware. It got me thinking about hacking CPython again...we'll see if time permits...</p>
<p>Beyond those two great talks we talked about a wide range of topics. I talked about my use of closures in <a href="http://code.google.com/p/snake-guice/" title="Discover snake-guice">snake-guice</a>. Mike Nugent drove some conversation with his Django questions. On the way out Dale Smith was explaining the Emacs operating sys^H^H^H editor. He may be talking about it next month.</p>
<p>Summary: looking forward to the next meeting.</p>]]></content:encoded>
    </item>
    <item>
      <title>Unit Testing The Algorithm - Not The Entire Possible Dataset</title>
      <link>http://traceback.org/2011/01/14/unit-testing-the-algorithm-not-the-entire-possible-dataset/</link>
      <pubDate>Fri, 14 Jan 2011 17:23:48 EST</pubDate>
      <category><![CDATA[Uncategorized]]></category>
      <guid>http://traceback.org/2011/01/14/unit-testing-the-algorithm-not-the-entire-possible-dataset/</guid>
      <description>Unit Testing The Algorithm - Not The Entire Possible Dataset</description>
      <content:encoded><![CDATA[<div class="document">
<p>This morning I attended a very inspiring talk by <a class="reference external" href="http://onestepback.org/">Jim Weirich</a> where he talked about the correct way to do unit testing. Someone (aka Skeptic) asked an interesting question during the Q &amp; A and unfortunately it wasn't really answered. The lack of time and detail made it difficult for Jim to answer and he punted. I'm going to attempt to answer the question as I understand it (or as I want it to be).</p>
<p>If I understand the question correctly Skeptic was asking how to test an algorithm. His example was a system where forms were generated dynamically based on prior input. For example, if a user checked a checkbox on formA then formB contained a few extra fields. When submitting a form the system must be able to handle dealing with knowing what fields are there/not there. The concern was that there are so many combinations of forms and fields that testing each one would not be worth it.</p>
<p>I agree! So what would you do? Step back and think about the fundamental problem. Skeptic really wanted to test the fact that the system can deal with a missing field. It really doesn't matter that there are 5 possible combinations of fields or 50,000. If the algorithm for validating the missing field handling is correct you are likely in a good position.</p>
<p>Unit test the algorithm and not the entire dataset. Take a look at the <a class="reference external" href="http://butunclebob.com/ArticleS.UncleBob.ThePrimeFactorsKata">prime factors kata</a> for a really simple example of what I'm talking about.</p>
</div>
]]></content:encoded>
    </item>
    <item>
      <title>PyOhio 2010 Plans</title>
      <link>http://traceback.org/2010/07/28/pyohio-2010-plans/</link>
      <pubDate>Wed, 28 Jul 2010 23:20:36 EDT</pubDate>
      <category><![CDATA[python]]></category>
      <category><![CDATA[pyohio]]></category>
      <category><![CDATA[Uncategorized]]></category>
      <guid>http://traceback.org/2010/07/28/pyohio-2010-plans/</guid>
      <description>PyOhio 2010 Plans</description>
      <content:encoded><![CDATA[
<a href="http://pyohio.org">PyOhio</a> is this weekend! If you are thinking about going you should stop thinking and register. You'll have a good time.

I've been asked several times over the last few days about what to expect and if it is worth going. It's definitely worth your time. You can't beat a free, high quality conference. (You may need to to pay ~$100 or so for a hotel and spring for some food if you are too far away to drive.) What to expect is a bit harder to answer.

Much like peace or love everyone experiences conferences in their own way. If you are mostly into sessions then you'll enjoy our two tracks of talks. If you are a Python newbie we have a track for beginners. If you want to participate in active discussions you can attend an open space or run one of your own. Want to code? There are a few sprints scheduled for Saturday evening and I believe the few days following the conference.

I'm going to try to do more open spaces/socializing this year. There are a few talks I'd like to attend, but I don't think that's how I'll be most productive. The <a href="http://frompythonimportpodcast.com/">From Python Import Podcast</a> crew will be around on Saturday and we plan on doing some interviews. That should be a lot of fun.

If you see me walking around please stop me and introduce yourself. I'm very interested in hearing about the cool things you are doing in Python. I'll see you in a few days.]]></content:encoded>
    </item>
    <item>
      <title>PyOhio 2010 Registration Open!</title>
      <link>http://traceback.org/2010/06/17/pyohio-2010-registration-open/</link>
      <pubDate>Thu, 17 Jun 2010 20:29:45 EDT</pubDate>
      <category><![CDATA[python]]></category>
      <category><![CDATA[pyohio]]></category>
      <guid>http://traceback.org/2010/06/17/pyohio-2010-registration-open/</guid>
      <description>PyOhio 2010 Registration Open!</description>
      <content:encoded><![CDATA[
From the official PyOhio <a href="http://pyohio.org">website</a>:
<blockquote cite="http://pyohio.org">
<p>PyOhio is an annual conference for Python programmers in and around Ohio. PyOhio 2010, the third annual conference, will take place July 31 - August 1, 2010 at Ohio State University's Ohio Union.</p>
</blockquote>

<a href="http://pyohio2010.eventbrite.com">Register now!</a>]]></content:encoded>
    </item>
    <item>
      <title>FPIP Episode 001 Has Been Released</title>
      <link>http://traceback.org/2010/04/01/fpip-episode-001-has-been-released/</link>
      <pubDate>Thu, 01 Apr 2010 09:46:41 EDT</pubDate>
      <category><![CDATA[python]]></category>
      <category><![CDATA[podcast]]></category>
      <guid>http://traceback.org/2010/04/01/fpip-episode-001-has-been-released/</guid>
      <description>FPIP Episode 001 Has Been Released</description>
      <content:encoded><![CDATA[
Get it while it's <a href="http://frompythonimportpodcast.com/?p=10">hot</a>! It was a lot of fun to make and I'm looking forward to really making ut a success. Mad props go out to <a href="http://unquietdesperation.com/">Chris Miller</a> for carrying the podcast newbies.

Please subscribe, listen and enjoy. We have some great ideas for upcoming shows that you won't want to miss.]]></content:encoded>
    </item>
    <item>
      <title>From Python Import Podcast</title>
      <link>http://traceback.org/2010/03/25/from-python-import-podcast/</link>
      <pubDate>Thu, 25 Mar 2010 20:55:27 EDT</pubDate>
      <category><![CDATA[python]]></category>
      <category><![CDATA[podcast]]></category>
      <guid>http://traceback.org/2010/03/25/from-python-import-podcast/</guid>
      <description>From Python Import Podcast</description>
      <content:encoded><![CDATA[
<p>The first podcast in the <i><a href="http://frompythonimportpodcast.com/">From Python Import Podcast</a></i> series has been recorded. <a href="http://www.unquietdesperation.com/">Chris Miller</a> did a really good job of explaining the concept in a <a href="http://www.unquietdesperation.com/2010/03/24/from-python-import-podcast/">blog post</a> yesterday. In my mind Chris, <a href="http://mike.crute.org/blog/">Mike Crute</a> and I will start peeling the onion of the Python community. Stay tuned, I think you'll enjoy it.</p>]]></content:encoded>
    </item>
    <item>
      <title>Setting Gmail As The Preferred Mail Reader In Gnome</title>
      <link>http://traceback.org/2009/11/28/setting-gmail-as-the-preferred-mail-reader-in-gnome/</link>
      <pubDate>Sat, 28 Nov 2009 23:24:38 EST</pubDate>
      <category><![CDATA[linux]]></category>
      <guid>http://traceback.org/2009/11/28/setting-gmail-as-the-preferred-mail-reader-in-gnome/</guid>
      <description>Setting Gmail As The Preferred Mail Reader In Gnome</description>
      <content:encoded><![CDATA[
A Google search turns up lots of dead ends. Some are <a href="http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/">pretty good</a>, but most are completely useless. I tried a couple of the configuration variations suggested in the article and its comments and didn't have much luck.

It turns out that it's actually easy. Just follow these simple steps:

<ol>
<li>Download <a href="http://sourceforge.net/projects/gnome-gmail/">Gnome Gmail</a></li>
<li>Install it! I used the .deb because I run Ubuntu.</li>
<li>Go to <b>System -> Preferences -> Preferred Applications</b></li>
<li>Select <b>Gmail</b> in the Mail Reader drop down</li>
</ol>]]></content:encoded>
    </item>
    <item>
      <title>Getting Branch Coverage In Nose</title>
      <link>http://traceback.org/2009/11/13/getting-branch-coverage-in-nose/</link>
      <pubDate>Fri, 13 Nov 2009 19:18:45 EST</pubDate>
      <category><![CDATA[python]]></category>
      <guid>http://traceback.org/2009/11/13/getting-branch-coverage-in-nose/</guid>
      <description>Getting Branch Coverage In Nose</description>
      <content:encoded><![CDATA[
Just a few days ago Ned Batchelder <a href="http://nedbatchelder.com/blog/200911/coverage_v32b1_branch_coverage.html">announced</a> experimental branch coverage support in coverage.py. I have been waiting a long time for this. I had a few false starts myself so I know how much time Ned put into it. Thanks Ned!

I changed the coverage plugin included with <a href="http://somethingaboutorange.com/mrl/projects/nose/">nose</a> to interact better with coverage.py.
<ul>
<li>I added a <code>--cover-branches</code> option to make coverage.py generate branch coverage statistics.</li>
<li>I changed the existing <code>--cover-html</code> option to use coverage.py's built-in HTML report generator. Why have old, outdated logic hanging around?</li>
</ul>

You can find my changes here: <a href="http://code.google.com/r/dstanekcom-python-nose/source/list">http://code.google.com/r/dstanekcom-python-nose/source/list</a>.]]></content:encoded>
    </item>
    <item>
      <title>Hacking On A super Alternative</title>
      <link>http://traceback.org/2009/08/01/hacking-on-a-super-alternative/</link>
      <pubDate>Sat, 01 Aug 2009 01:21:07 EDT</pubDate>
      <category><![CDATA[python]]></category>
      <guid>http://traceback.org/2009/08/01/hacking-on-a-super-alternative/</guid>
      <description>Hacking On A super Alternative</description>
      <content:encoded><![CDATA[<p>Python's <code>super</code> built-in has always bugged me. I'm talking about something
much more superficial than James Knight's thoughts on it being
<a href="http://fuhm.net/super-harmful/">harmful</a>. I'm  talking out its signature.
I dislike the fact that it requires the current class and instance to be
passed in. For example:</p>
<div class="pygments_autumn"><pre><span class="k">class</span> <span class="nc">SubClass</span><span class="p">(</span><span class="n">BaseClass</span><span class="p">):</span><br/><br/>    <span class="k">def</span> <span class="nf">method</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">arg</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="n">that</span><span class="p">):</span><br/>        <span class="nb">super</span><span class="p">(</span><span class="n">SubClass</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">method</span><span class="p">(</span><span class="n">arg</span><span class="p">,</span> <span class="n">this</span><span class="p">)</span><br/></pre></div>

<p>To avoid doing an real work I hacked together an alternative implementation.
I was able to get something that appears to work correctly, but I can't
guarantee it. With my new <code>super</code> the code would look like:</p>
<div class="pygments_autumn"><pre><span class="kn">from</span> <span class="nn">better_super</span> <span class="kn">import</span> <span class="nb">super</span><br/><br/><span class="k">class</span> <span class="nc">SubClass</span><span class="p">(</span><span class="n">BaseClass</span><span class="p">):</span><br/><br/>    <span class="k">def</span> <span class="nf">method</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">arg</span><span class="p">,</span> <span class="n">this</span><span class="o">=</span><span class="n">that</span><span class="p">):</span><br/>        <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">method</span><span class="p">(</span><span class="n">arg</span><span class="p">,</span> <span class="n">this</span><span class="p">)</span><br/></pre></div>

<p>This should not be used in any real production code. There are likely bugs
lurking in corner cases and strange failure modes. It's also four times slower
than the built-in <code>super</code>.</p>
<p>It was still interesting to explore the implementation and I learned a bit
about frames in the process.</p>
<p>My hacky implementation:</p>
<div class="pygments_autumn"><pre><span class="c"># better_super.py</span><br/><span class="kn">import</span> <span class="nn">inspect</span> <span class="kn">as</span> <span class="nn">_inspect</span><br/><span class="kn">from</span> <span class="nn">__builtin__</span> <span class="kn">import</span> <span class="nb">super</span> <span class="k">as</span> <span class="n">_builtin_super</span><br/><br/><br/><span class="k">def</span> <span class="nf">_what_class_am_i_in</span><span class="p">(</span><span class="n">mro</span><span class="p">,</span> <span class="n">func_name</span><span class="p">,</span> <span class="n">func_code</span><span class="p">):</span><br/>    <span class="k">for</span> <span class="n">c</span> <span class="ow">in</span> <span class="n">mro</span><span class="p">:</span><br/>        <span class="k">if</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="n">func_name</span><span class="p">)</span><span class="o">.</span><span class="n">func_code</span> <span class="ow">is</span> <span class="n">func_code</span><span class="p">:</span><br/>            <span class="k">return</span> <span class="n">c</span><br/>    <span class="k">return</span> <span class="bp">None</span><br/><br/><br/><span class="k">def</span> <span class="nf">super</span><span class="p">():</span><br/>    <span class="n">frame</span> <span class="o">=</span> <span class="n">_inspect</span><span class="o">.</span><span class="n">currentframe</span><span class="p">()</span><span class="o">.</span><span class="n">f_back</span><br/>    <span class="n">arg_info</span> <span class="o">=</span> <span class="n">_inspect</span><span class="o">.</span><span class="n">getargvalues</span><span class="p">(</span><span class="n">frame</span><span class="p">)</span><br/>    <span class="bp">self</span> <span class="o">=</span> <span class="n">arg_info</span><span class="p">[</span><span class="mi">3</span><span class="p">][</span><span class="n">arg_info</span><span class="p">[</span><span class="mi">0</span><span class="p">][</span><span class="mi">0</span><span class="p">]]</span><br/>    <span class="n">mro</span> <span class="o">=</span> <span class="n">_inspect</span><span class="o">.</span><span class="n">getmro</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span>\<span class="n">__class__</span><span class="p">)</span><br/>    <span class="n">method_name</span> <span class="o">=</span> <span class="n">frame</span><span class="o">.</span><span class="n">f_code</span><span class="o">.</span><span class="n">co_name</span><br/>    <span class="n">code_obj</span> <span class="o">=</span> <span class="n">frame</span><span class="o">.</span><span class="n">f_code</span><br/>    <span class="n">cls</span> <span class="o">=</span> <span class="n">_what_class_am_i_in</span><span class="p">(</span><span class="n">mro</span><span class="p">,</span> <span class="n">method_name</span><span class="p">,</span> <span class="n">code_obj</span><span class="p">)</span><br/>    <span class="k">return</span> <span class="n">_builtin_super</span><span class="p">(</span><span class="n">cls</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><br/></pre></div>

<p>I'd love to hear about other ways to implement this. Have you tried yet?</p>]]></content:encoded>
    </item>
    <item>
      <title>PyOhio 2009 Call For Proposals</title>
      <link>http://traceback.org/2009/04/13/pyohio-2009-call-for-proposals/</link>
      <pubDate>Mon, 13 Apr 2009 15:04:18 EDT</pubDate>
      <category><![CDATA[python]]></category>
      <category><![CDATA[pyohio]]></category>
      <guid>http://traceback.org/2009/04/13/pyohio-2009-call-for-proposals/</guid>
      <description>PyOhio 2009 Call For Proposals</description>
      <content:encoded><![CDATA[
The <a href="http://wiki.python.org/moin/PyOhio/CallForProposals">PyOhio Call for Proposals</a> has been issued!
<center><a href="http://pyohio.org"><img src="http://66.35.48.8/catherine/blogbadge.png" alt="PyOhio" border="0"/></a></center>
  <a href="http://pyohio.org ">PyOhio 2009</a> takes place <a href="http://www.google.com/calendar/event?action=TEMPLATE&amp;tmeid=YTkwbjJlcjRjNGFsNzhvMmhxN2VxajVxZW8gY2F0aGVyaW5lLmRldmxpbkBt&amp;tmsrc=Y2F0aGVyaW5lLmRldmxpbkBnbWFpbC5jb20">July 25-26, 2009</a> at the Ohio State University <a href="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=275+W+Woodruff+Ave,+Columbus,+OH&sll=40.013515,-83.014455&sspn=0.022811,0.04755&ie=UTF8&ll=40.002372,-83.012695&spn=5.839762,12.172852&z=7&iwloc=A">in Columbus, Ohio</a>.  Much like a mini-PyCon, it includes scheduled talks, tutorials, Lightning Talks, Open Spaces, and room for your own unique ideas.  If you can make it to Ohio this summer, please consider participating.
<center>
<a target="_blank" href="http://www.google.com/calendar/event?action=TEMPLATE&amp;tmeid=YTkwbjJlcjRjNGFsNzhvMmhxN2VxajVxZW8gY2F0aGVyaW5lLmRldmxpbkBt&amp;tmsrc=Y2F0aGVyaW5lLmRldmxpbkBnbWFpbC5jb20"><img border=0 src="http://www.google.com/calendar/images/ext/gc_button1_en.gif"></a>
</center>

PyOhio 2009, the second annual Python programming mini-conference for Ohio and surrounding areas, will take place Saturday-Sunday, July 25-26, 2009 at the Ohio State University in Columbus, Ohio. A variety of activities are planned, including tutorials, scheduled talks, Lightning Talks, and Open Spaces.

PyOhio invites all interested people to submit proposals for scheduled talks and tutorials. PyOhio will accept abstracts on any topics of interest to Python programmers.

Standard presentations are expected to last 40 minutes with a 10 minute question-and-answer period. Other talk formats will also be considered, however; please indicate your preferred format in your proposal. Hands-on tutorial sessions are also welcomed. Tutorial instructors should indicate the expected length

PyOhio is especially interested in hosting a Beginners' Track for those new to Python or new to programming in general. If your proposal would be suitable for inclusion in the Beginners' Track, please indicate so. Organizers will work with speakers and instructors in the Beginners' Track to help them coordinate their talks/tutorials into a smooth, coherent learning curve for new Python users.

All proposals should include abstracts no longer than 500 words in length. Abstracts must include the title, summary of the presentation, the expertise level targeted, and a brief description of the area of Python programming it relates to.

All proposals should be emailed to cfp@pyohio.org for review. Please submit proposals by May 15, 2009. Accepted speakers will be notified by June 1.

You can read more about the conference at http://pyohio.org

If you have questions about proposals, please email cfp@pyohio.org. You can also contact the PyOhio organizers at pyohio-organizers@python.org.]]></content:encoded>
    </item>
  </channel>
</rss>
