<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Possibility and Probability &#187; Python</title>
	<atom:link href="http://ironboundsoftware.com/blog/category/programming/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://ironboundsoftware.com/blog</link>
	<description>Droplets of Yes and No</description>
	<lastBuildDate>Thu, 29 Jul 2010 02:53:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Python function overloading via multimethods</title>
		<link>http://ironboundsoftware.com/blog/2010/07/21/python-function-overloading-via-multimethods/</link>
		<comments>http://ironboundsoftware.com/blog/2010/07/21/python-function-overloading-via-multimethods/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 02:13:57 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://ironboundsoftware.com/blog/?p=361</guid>
		<description><![CDATA[One of my favorite features of OO languages like Java is the ability to overload a method, which is where you have several methods with the same name, but they take in different types in their arguments.
I love the python language, but as I blogged about a while ago, not having overloaded methods in python [...]]]></description>
			<content:encoded><![CDATA[<p>One of my favorite features of OO languages like Java is the ability to overload a method, which is where you have several methods with the same name, but they take in different types in their arguments.</p>
<p>I love the python language, but as I blogged about a while ago, <a href="http://ironboundsoftware.com/blog/2007/05/29/a-shortfall-of-python-no-function-overloading/">not having overloaded methods in python</a> is kind of a bummer. But do you have to trade your dynamic freedom in for static types to gain this? It turns out that with a little ingenuity, you can get that functionality using the <a href="http://en.wikipedia.org/wiki/Multiple_dispatch">generic dispatch pattern</a> and python&#8217;s decorator syntax.</p>
<p>The example on the above wiki page is nice and concise, but I think that <a href="http://alexgaynor.net/2010/jun/26/multimethods-python/">Alex Gaynor&#8217;s blog post about multimethods is the best</a> example of how to implement this useful idea. In leiu of an explanation of how it works, Alex gives us a unit test that exercises the mutimethod class and the dispatch/overloading idea that it brings to life. As long as you know what a <a href="http://www.artima.com/weblogs/viewpost.jsp?thread=240808">decorator</a> is the code does make sense.</p>
<p>There are other examples of using a <a href="http://mike.axiak.net/blog/2010/06/25/python-generic-dispatch/">dispatch</a>, but I feel that Alex&#8217;s is more clear. These are of course no substitute for having function overloading built into the python language, but having the functionality wrapped up in a nice neat class like this is a very good thing.</p>
]]></content:encoded>
			<wfw:commentRss>http://ironboundsoftware.com/blog/2010/07/21/python-function-overloading-via-multimethods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linking against Python on the Mac</title>
		<link>http://ironboundsoftware.com/blog/2010/05/29/linking-against-python-on-the-mac/</link>
		<comments>http://ironboundsoftware.com/blog/2010/05/29/linking-against-python-on-the-mac/#comments</comments>
		<pubDate>Sat, 29 May 2010 14:00:12 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.ironboundsoftware.com/blog/?p=344</guid>
		<description><![CDATA[Today while working with swig I kept running into problems trying to get python to read the generated output files. The error I finally wound up with was:

Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap
Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap

It turns out that on the Mac (OSX 10.6) that you have [...]]]></description>
			<content:encoded><![CDATA[<p>Today while working with <a href="http://swig.org">swig</a> I kept running into problems trying to get python to read the generated output files. The error I finally wound up with was:</p>
<blockquote>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Fatal Python error: Interpreter not initialized (version mismatch?)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Abort trap</div>
<blockquote><p>Fatal Python error: Interpreter not initialized (version mismatch?)</p></blockquote>
<blockquote><p>Abort trap</p></blockquote>
</blockquote>
<div>It turns out that on the Mac (OSX 10.6) that you have to pass gcc a special flag if you want to link against the python library. Traditionally you would do something like this:</div>
<blockquote>
<div>gcc myfile.c -l<strong>python</strong> -shared -o mylib.so</div>
</blockquote>
<div>But on the Mac is you have the Mac specific installer version of python (I think as opposed to building it at the command line), there is no libpython.so on your system, so the <em>-lpython</em> flag never works.</div>
<div>The solution is to use the <em>-framework</em> which tells gcc to look into the framework directory where OSX stores all of its specially configured tools/utilities/programs. (If you are wondering the python 2.6 framework is kept at this location: /Library/Frameworks/Python.framework/Versions/2.6/)</div>
<div>So using the example above, the proper incantation to produce a useable shared library linked against python is:</div>
<blockquote>
<div>gcc myfile.c -<strong>framework python</strong> -shared -o mylib.so</div>
</blockquote>
<div>That should produce something useable.</div>
]]></content:encoded>
			<wfw:commentRss>http://ironboundsoftware.com/blog/2010/05/29/linking-against-python-on-the-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion and Mercurial in the same place</title>
		<link>http://ironboundsoftware.com/blog/2010/04/24/subversion-and-mercurial-in-the-same-place/</link>
		<comments>http://ironboundsoftware.com/blog/2010/04/24/subversion-and-mercurial-in-the-same-place/#comments</comments>
		<pubDate>Sat, 24 Apr 2010 21:35:30 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.ironboundsoftware.com/blog/?p=341</guid>
		<description><![CDATA[In a previous post I talked about trying to use Mercurial (hg) in a Subversion (svn) world. Its been almost 2 months, and I&#8217;ve learned quite a bit about hg and how to use it in a svn based environment.
At the time it seemed like the obvious choice was to get something (hgsubversion) that would [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous post I talked about trying to use <a href="http://mercurial.selenic.com/">Mercurial</a> (hg) in a Subversion (svn) world. Its been almost 2 months, and I&#8217;ve learned quite a bit about hg and how to use it in a svn based environment.</p>
<p>At the time it seemed like the obvious choice was to get something (<a href="http://www.bitbucket.org/durin42/hgsubversion/">hgsubversion</a>) that would let hg talk directly to the svn server, but still allow me to explore DVCS workflows. It turns out that this isn&#8217;t the case. Luckily there are several different approaches that can be used.</p>
<h1>I coulda been a contender&#8230;</h1>
<p>The idea behind hgsubversion is to use hg as your version control tool. This extension lets it &#8220;talk&#8221; to svn servers, so you only need one tool. It sounds like a really great idea, but I ran into some stumbling blocks that while not necessarily show stoppers, they did cause me to look around for alternatives (more on that later). Here&#8217;s the issues, good and not-so-good, that I had with this extension:</p>
<ul>
<li><strong>Poor support in cygwin &#8211; </strong>Installing this on cygwin was a bitch-and-half. Getting all of the pieces to compile and install was a major act that I just couldn&#8217;t pull off. Which is a bummer, I do love me some command line. However, <a href="http://tortoisehg.bitbucket.org/">TortoiseHg</a> to the rescue!</li>
<li>It works great on the mac &#8211; I usually have the most trouble installing new stuff on my mac, but hgsubversion works like a champ with no problems.</li>
<li><strong>TortoiseHg rocks -</strong> This program is amazing. It worked correctly right out of the box, and took no effort to get up and running on my windows machine. It really let me get started on this little experiment.</li>
</ul>
<p><strong></p>
<h1>&#8220;Other than that Ms. Lincoln&#8230;&#8221;</h1>
<p><span style="font-weight: normal;">Once I  got rolling with TortoiseHg it was time to rock. </span></p>
<p><span style="font-weight: normal;">My main goal was to use hg to spin off branches of my main code tree to do things like experimental refactorings, playing with some unit tests, and to try and work on bugs in isolation. And I have to say after getting past a few growing pains, it really works well for that. I was off to the races, committing and rolling back my work with out a care in the world, knowing that there was a versioning system watching my back.</span></p>
<p><span style="font-weight: normal;">Everything was going to great until I went to commit my changes back to the svn repository. Then I discovered a problem&#8230;</span></p>
<h1>Too many dicks on the dance floor!</h1>
<p><span style="font-weight: normal;">It turns out that hgsubversion is pretty literal in that it converts hg to svn. It took all of the changes I had made in my branches and pushed them upstream to the svn server. The result was a ton of intermediary messages (from my hg checkins) being dumped into the svn log.</span></p>
<p><span style="font-weight: normal;">Now please note that the code was ok. Nothing bad happened, it just looks like I committed a ton to the svn repository.</span></p>
<p><span style="font-weight: normal;">I was under the impression that it was going to just take the diff of the last svn update and the head of the hg and push that. I wasn&#8217;t thrilled with this, so I decided to look for an alternative that would let me do this. It turns out its really easy to do, simply do an hg init in you svn working directory.</span></p>
<h1><span style="font-weight: normal;">Say whaaaaa?</span></h1>
<p><span style="font-weight: normal;">According the <a href="http://mercurial.selenic.com/wiki/WorkingWithSubversion#With_MQ_only">Mercurial wiki for working with subversion</a>, there&#8217;s a couple of different ways to do this. The easiest is to just do a normal <em>svn co </em>and then in that working directory do an <em>hg init</em> and just let the two share a workspace. </span></p>
<p><span style="font-weight: normal;">This sounds just short of insane, but it works out really well. Just make sure to tell both to ignore the other&#8217;s special directories (.hg, .svn). Once you do that the two get along really well. As you spin off hg branches locally, they won&#8217;t know/care that their parent is actually a svn directory. This allows you to check in to your heart&#8217;s content, but when it is time to push back to the svn repository, there will be only one change!</span></p>
<p><span style="font-weight: normal;">Of course, with the good there is also the not-so-good. Here&#8217;s somethings to be aware of. They aren&#8217;t necessarily bad, but like with hgsubversion you need to make sure you are using the right tool in the correct manner:</span></p>
<ul>
<li>One svn commit is one commit. &#8211; <span style="font-weight: normal;">When you make your commit into svn, the hg history disappears. 20 checkins? Svn only sees 1. This can be both good and bad, so make sure that your commit message relays all of the important messages your checkins express.</span></li>
<li>Only one commit message to svn &#8211; <span style="font-weight: normal;">If you are like me, you hate re-typing the same shit over and over. Committing to svn doesn&#8217;t involve the hg messages at all, so you will need to either copy-and-paste the last hg message, or type something new.</span></li>
<li>You need disciple with branch/directory names. &#8211; <span style="font-weight: normal;">Make sure you know what that directory is. This goes for most dev activites, but with the wild free for all that hg allows it gets really important. You can get turned around really easy, especially if you have multiple svn checkouts (i.e. different branches, etc.)</span></li>
</ul>
<p></strong></p>
<p>Overall I really like using hg. Making it work with svn has been a big bonus because now I can get the best of both worlds without having to abandon svn. (That&#8217;s a big bonus as most day jobs rely on svn!)</p>
]]></content:encoded>
			<wfw:commentRss>http://ironboundsoftware.com/blog/2010/04/24/subversion-and-mercurial-in-the-same-place/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Being subversive with Subversion: Mercurial in the middle</title>
		<link>http://ironboundsoftware.com/blog/2010/02/25/being-subversive-with-subversion-mercurial-in-the-middle/</link>
		<comments>http://ironboundsoftware.com/blog/2010/02/25/being-subversive-with-subversion-mercurial-in-the-middle/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 03:41:52 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.ironboundsoftware.com/blog/?p=329</guid>
		<description><![CDATA[DVCS is a popular topic these days on the internets, but for those of us who code for our day job find that more often than not we have to use the tried-and-true standard of something like CVS. Or if you are lucky, SVN. Personally I think SVN is pretty good (especially compared to CVS), [...]]]></description>
			<content:encoded><![CDATA[<p>DVCS is a popular topic these days on the internets, but for those of us who code for our day job find that more often than not we have to use the tried-and-true standard of something like CVS. Or if you are lucky, SVN. Personally I think SVN is pretty good (especially compared to CVS), but the other day a feature of DVCS&#8217;s caught my eye.</p>
<p>The ability to branch quickly and in a lightweight manner is one of the major selling points of systems like Mercurial and Git. Recently I&#8217;ve been thinking about trying out some refactorings and that can be difficult to do when you need to make sure that you can have a build-able version of your code at all times. Some things just take time, and the whole point of refactoring is to improve your code so rushing through it to meet an unrelated code deadline just doesn&#8217;t make a lot of sense.</p>
<p>Enter <a href="http://mercurial.selenic.com">Mercurial</a>.</p>
<p>There&#8217;s a project for Mercurial called <a href="http://mercurial.selenic.com/wiki/HgSubversion">hgsubversion</a> that will allow you to pull from a subversion repository and make a mercurial repository locally. (Yes, git has something similar) Then you can hack away to your heart&#8217;s content using hg to branch and keep track of changes without pushing the changes out globally to the other SVN users.</p>
<p>This is exactly what all of the cool kids using hg, git, and bzr have been doing for years. Now those of us who talk to SVN can leverage this technique to bring a little more awesomeness to our day-to-day work, and no one is the wiser. At least that&#8217;s my theory.</p>
<p>Installing hgsubversion on a Mac or in Cygwin is like pulling teeth. I take that back, pulling teeth is not as painful. Plus you can leave your teeth under your pillow for some cash&#8230; but I digress. The best way to install it (for me at least) is to do the following:</p>
<ul>
<li>Have the following installed: mercurial, easy_install, the XCode tools (command line tools like gcc)</li>
<li>Get a copy of the python swig bindings for Subversion. <a href="http://www.collab.net/downloads/community/">Collab</a> has prebuilt binaries that seem to work best. I just copied the bindings from /opt/subversion/lib/svn-python/ to my python site-packages directory. I installed Python 2.6, so for me that path is: /Library/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages</li>
<li>Get hgsubversion by typing at the command line: <em><code>hg clone http://bitbucket.org/durin42/hgsubversion/ ~/hgsubversion</code></em></li>
<li>cd into ~/hgsubversion/ and type in <em>python setup.py install</em></li>
<li>For me, the system had to download a few things and build them, so make sure you have XCode and the 10.4 SDK installed. (I&#8217;m running XCode 3.2.1 for this exercise)</li>
<li>Hopefully everything completes normally. If it does, do a victory shot. If it fails, do 2 shots and then try to figure out what went wrong.</li>
<li>Next make a file in your home directory called .hgrc</li>
<li>Inside the file put the following:</li>
</ul>
<blockquote><p>[extensions]<br />
rebase=<br />
svn=/Users/&lt;YOUR USERNAME&gt;/hgsubversion/hgsubversion</p></blockquote>
<ul>
<li>This <strong>should</strong> tell hg that you&#8217;ve got something extra for it. I went blind sometime during my attempts to get this working and had a typo in that line that kept me from getting it working for an embarrassingly long time.</li>
<li>If you have done everything right, the moon is in the proper phase, and the wind is blowing from the NW at 7 mph, then this command should let you pull down a project from Google code:</li>
</ul>
<blockquote><p>hg clone svn+http://&lt;A PROJECT OF YOUR CHOICE&gt;.googlecode.com/svn &lt;WHATEVER DIR&gt;</p></blockquote>
<ul>
<li>The end result should be a mercurial repository on your local machine. Refer to the link for hgsubversion for more details about commands and links to other installation instructions. (Some are older than others, and the commands have changed a little bit over time.)</li>
</ul>
<p>So, that&#8217;s what I&#8217;m up to. Hopefully this will let me do some interesting experiments locally without sacrificing the safety blanket of using version control.</p>
]]></content:encoded>
			<wfw:commentRss>http://ironboundsoftware.com/blog/2010/02/25/being-subversive-with-subversion-mercurial-in-the-middle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Test with big data sets</title>
		<link>http://ironboundsoftware.com/blog/2009/11/21/test-with-big-data-sets/</link>
		<comments>http://ironboundsoftware.com/blog/2009/11/21/test-with-big-data-sets/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 00:01:36 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.ironboundsoftware.com/blog/?p=326</guid>
		<description><![CDATA[Every so often I re-learn this lesson: Make sure you test your code with the same amount of data that your users will use.
Developing with small data sets is fine, and most of the time that is what you want to do as you work out the kinks of the code. But when it is [...]]]></description>
			<content:encoded><![CDATA[<p>Every so often I re-learn this lesson: Make sure you test your code with the same amount of data that your users will use.</p>
<p>Developing with small data sets is fine, and most of the time that is what you want to do as you work out the kinks of the code. But when it is time to ship the code, you must test with a large data set.</p>
<p>For rent my resume.com I&#8217;ve been testing one portion of it with 4 different size documents. This is a fluke however, I chose the documents based on the contents not the size. Today I made a simple change that turned out to have some unforeseen ripple effects.</p>
<p>When I write unit tests, they seem to fall into two categories: Tests where I just do a simple check on the size of a return (i.e. did I get 21 items in the list?), and tests where I check the contents of the resulting data.</p>
<blockquote><p>As a side note, you should really do both kinds of tests, not one or the other. Simply checking to see that the right number of things was returned is no substitute for making sure that the correct data was actually returned!</p></blockquote>
<p>Today I was re-running my pyunit tests and one of the four failed because the size of the returned list wasn&#8217;t what was expected. By coincidence this happened to be the biggest data set I was testing with. If I had not had this test, I would have thought everything was ok, but it truth my modified function is returning questionable data!</p>
<p>There are of course other benefits of using larger data sets, mainly seeing how your code works under stress. What works fine for 10 items might not be so great with 1000 items. Testing with a large data set at the end will help catch these problems and will also help you adhere to Knuths&#8217; advice to not optimize code prematurely.</p>
<p>So, now I&#8217;m off to learn how to trace through python code to find out how such a seemingly simple &#8220;fix&#8221; to my code could so subtly break it&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://ironboundsoftware.com/blog/2009/11/21/test-with-big-data-sets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rate-my-resume.com is now live</title>
		<link>http://ironboundsoftware.com/blog/2009/10/11/rate-my-resume-com-is-now-live/</link>
		<comments>http://ironboundsoftware.com/blog/2009/10/11/rate-my-resume-com-is-now-live/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 22:27:07 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.ironboundsoftware.com/blog/?p=311</guid>
		<description><![CDATA[In my last post, I put up a link to a little project I&#8217;ve been working on. I finally got around to giving it a proper name. (re)Introducing:
Rate-my-resume.com
Now if you are wondering if your resume is a good match for a particular job posting, you can use my site to find out! At the moment [...]]]></description>
			<content:encoded><![CDATA[<p>In my last post, I put up a link to a little project I&#8217;ve been working on. I finally got around to giving it a proper name. (re)Introducing:</p>
<p><a href="http://rate-my-resume.com">Rate-my-resume.com</a></p>
<p>Now if you are wondering if your resume is a good match for a particular job posting, you can use my site to find out! At the moment I&#8217;m giving the score in terms of 0 (being a total non-match) to 100 (being the absolute perfect match). In this economy, the more your resume reflects the skills listed in a particular job, the more likely your resume will be looked at seriously.</p>
<p>If you run your resume through and it gives you a low score, look at your resume and the job posting and try and figure out what keywords are in the job posting that are not in your resume. Then, assuming you have the necessary experience, put those keywords into your resume! Be sure to add them in a way that makes sense to a person, after all humans (especially HR people) don&#8217;t like to read fragments and words peppered into someone&#8217;s resume.</p>
<p><a href="http://rate-my-resume.com">Try out the site with your resume and see how you rank! </a></p>
<p>p.s. Python rocks!</p>
]]></content:encoded>
			<wfw:commentRss>http://ironboundsoftware.com/blog/2009/10/11/rate-my-resume-com-is-now-live/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Matching resumes to jobs</title>
		<link>http://ironboundsoftware.com/blog/2009/10/03/matching-resumes-to-jobs/</link>
		<comments>http://ironboundsoftware.com/blog/2009/10/03/matching-resumes-to-jobs/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 21:50:48 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[django]]></category>

		<guid isPermaLink="false">http://www.ironboundsoftware.com/blog/?p=309</guid>
		<description><![CDATA[Have you ever looked at a job posting and tried to figure out if you are a good match for that job?
I&#8217;ve written a Google App Engine application to try and help people figure that out. Paste in a copy of your resume and a copy of the job description, and it will try and [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever looked at a job posting and tried to figure out if you are a good match for that job?</p>
<p>I&#8217;ve written a Google App Engine application to try and help people figure that out. Paste in a copy of your resume and a copy of the job description, and it will try and figure out how well of a match you would be for that job.</p>
<p>Check it out: <a href="http://app.ironboundsoftware.com">http://app.ironboundsoftware.com</a></p>
<p>I&#8217;m really impressed with the Google App Engine environment (go Python!) and had fun writing this. Hopefully this will help people out in their job hunt. Times are tough, and hopefully this little application will help someone get into the perfect job for them.</p>
<p>Try it out and let me know what you think!</p>
]]></content:encoded>
			<wfw:commentRss>http://ironboundsoftware.com/blog/2009/10/03/matching-resumes-to-jobs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comma Separated Values</title>
		<link>http://ironboundsoftware.com/blog/2009/04/11/comma-separated-values/</link>
		<comments>http://ironboundsoftware.com/blog/2009/04/11/comma-separated-values/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 19:04:49 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.ironboundsoftware.com/blog/2009/04/11/comma-separated-values/</guid>
		<description><![CDATA[Question: How much does python rock?
Answer: More and more every day.
Today I was writing (for what seems like the millionth time) a little script to read CSV (Comma Separated Values) file.  After running into the same issues over and over (picking a delimiter, escaping delimiters, etc.) I decided my sanity is worth the 30 [...]]]></description>
			<content:encoded><![CDATA[<p>Question: How much does python rock?</p>
<p>Answer: More and more every day.</p>
<p>Today I was writing (for what seems like the millionth time) a little script to read CSV (Comma Separated Values) file.  After running into the same issues over and over (picking a delimiter, escaping delimiters, etc.) I decided my sanity is worth the 30 seconds it would take to see if someone else has already written a CSV library. It turns out python has one built in. Since 2.3. D&#8217;oh.</p>
<blockquote><p>import csv</p>
<p>lines =  csv.reader(&#8217;myfile.csv&#8217;)</p></blockquote>
<p>That&#8217;s all that&#8217;s needed to read in a csv file and have it properly handle the delimiters, even when they are inside of escaped text (i.e. something like &#8220;$3,000&#8243; will be read as $3000 instead of $3 and 000).</p>
<p>Python rocks again.</p>
]]></content:encoded>
			<wfw:commentRss>http://ironboundsoftware.com/blog/2009/04/11/comma-separated-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to kill momentum instantly</title>
		<link>http://ironboundsoftware.com/blog/2009/02/16/how-to-kill-momentum-instantly/</link>
		<comments>http://ironboundsoftware.com/blog/2009/02/16/how-to-kill-momentum-instantly/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 21:58:35 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[django]]></category>

		<guid isPermaLink="false">http://www.ironboundsoftware.com/blog/2009/02/16/how-to-kill-momentum-instantly/</guid>
		<description><![CDATA[
Get the itch to finish a stale project
Carve out some time to work on stale project
Upgrade your software stack to make sure you are current*
Spend hours figuring out something simple isn&#8217;t working
Curse, debug, repeat
Curse more when you realize that step 3 was where the train went off the rails

Yes, I made the mistake to upgrading [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>Get the itch to finish a stale project</li>
<li>Carve out some time to work on stale project</li>
<li>Upgrade your software stack to make sure you are current*</li>
<li>Spend hours figuring out something simple isn&#8217;t working</li>
<li>Curse, debug, repeat</li>
<li>Curse more when you realize that step 3 was where the train went off the rails</li>
</ol>
<p>Yes, I made the mistake to upgrading the Google App Engine Launcher only to discover that for some reason it doesn&#8217;t play nice with the Django Helper project (or apparently the latest version of Django).</p>
<p>*sigh*</p>
<p>I know, I can go and continue development without those tools, but I was really looking forward to playing with the AppEngine (using a Django project).</p>
<p>Some days you are the pigeon, some days you are the statue.</p>
]]></content:encoded>
			<wfw:commentRss>http://ironboundsoftware.com/blog/2009/02/16/how-to-kill-momentum-instantly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unicode: Feel the burn</title>
		<link>http://ironboundsoftware.com/blog/2009/01/18/unicode-feel-the-burn/</link>
		<comments>http://ironboundsoftware.com/blog/2009/01/18/unicode-feel-the-burn/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 02:15:27 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[django]]></category>

		<guid isPermaLink="false">http://www.ironboundsoftware.com/blog/2009/01/18/unicode-feel-the-burn/</guid>
		<description><![CDATA[There&#8217;s nothing worse than having a program that has been running great for X amount of time suddenly start crashing. Especially when you discover that its choking on unicode characters you didn&#8217;t expect.
With web addresses (or URLs if you prefer) starting to have unicode values in them, this is a problem that will probably be [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s nothing worse than having a program that has been running great for X amount of time suddenly start crashing. Especially when you discover that its choking on unicode characters you didn&#8217;t expect.</p>
<p>With web addresses (or URLs if you prefer) starting to have unicode values in them, this is a problem that will probably be more common. I noticed this problem when trying to get to web pages that had special characters in them (for example, URLs that feature characters with accent symbols such as in the Spanish language) would cause urllib2.open() to fail. Several website suggested url encoding these special characters, but I didn&#8217;t have much luck with it.</p>
<p>Also today I was using Django&#8217;s model layer to store some data (web pages) into a database so I could try some things out. Even though Django is unicode friendly, if there&#8217;s the slightest problem in mapping text it will pull out the dreaded UnicodeDecodeError at some point.</p>
<p>To get around this I wound up just using unicode(text, errors=&#8217;ignore&#8217;) to make sure that the text that was being passed in was indeed unicode, and to ignore any errors that cropped up. Not ideal, the better solution would be to map correctly, but better than being stuck with data you can&#8217;t load/process.</p>
]]></content:encoded>
			<wfw:commentRss>http://ironboundsoftware.com/blog/2009/01/18/unicode-feel-the-burn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
