<?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>Shey's Rebellion &#187; programming</title>
	<atom:link href="http://www.sheysrebellion.net/blog/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sheysrebellion.net/blog</link>
	<description>I sleep with pillows on my head.</description>
	<lastBuildDate>Thu, 27 Jan 2011 18:59:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Introducing Cushion, a simple python wrapper for CouchDB</title>
		<link>http://www.sheysrebellion.net/blog/2011/01/27/introducing-cushion-a-simple-python-wrapper-for-couchdb/</link>
		<comments>http://www.sheysrebellion.net/blog/2011/01/27/introducing-cushion-a-simple-python-wrapper-for-couchdb/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 07:16:31 +0000</pubDate>
		<dc:creator>Sheheryar Sewani</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.sheysrebellion.net/blog/?p=420</guid>
		<description><![CDATA[Introducing Cushion, a very thin python wrapper around CouchDB&#8217;s Document API. Its interface closely mimics REST and it was created primarily as an exercise to learn CouchDB&#8217;s API. Cushion is not an object mapper, it doesn’t enforce ‘OOP’, and if you found it difficult to get started with CouchDB using other libraries then you might [...]]]></description>
			<content:encoded><![CDATA[<p>Introducing <a href="http://pypi.python.org/pypi/cushion/0.2">Cushion</a>, a very thin python wrapper around CouchDB&#8217;s Document API. Its interface closely mimics REST and it was created primarily as an exercise to learn CouchDB&#8217;s API. Cushion is not an object mapper, it doesn’t enforce ‘OOP’, and if you found it difficult to get started with CouchDB using other libraries then you might be interested in Cushion.</p>
<p>To retrieve a document using Cushion:</p>
<p><script src="https://gist.github.com/798184.js?file=get.py"></script></p>
<p>To create a document with a document id using Cushion:</p>
<p><script src="https://gist.github.com/798186.js?file=put.py"></script></p>
<p>To install Cushion:  <code>easy_install cushion</code>.  If you&#8217;re interested, the source code and more documentation is available on GitHub: <a href="https://github.com/sheysrebellion/cushion">git://github.com/sheysrebellion/cushion.git</a></p>
<p>Relax, enjoy.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li><a rel="nofollow" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2011%2F01%2F27%2Fintroducing-cushion-a-simple-python-wrapper-for-couchdb%2F&amp;title=Introducing%20Cushion%2C%20a%20simple%20python%20wrapper%20for%20CouchDB" title="del.icio.us"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2011%2F01%2F27%2Fintroducing-cushion-a-simple-python-wrapper-for-couchdb%2F&amp;title=Introducing%20Cushion%2C%20a%20simple%20python%20wrapper%20for%20CouchDB" title="Reddit"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2011%2F01%2F27%2Fintroducing-cushion-a-simple-python-wrapper-for-couchdb%2F&amp;t=Introducing%20Cushion%2C%20a%20simple%20python%20wrapper%20for%20CouchDB" title="Facebook"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2011%2F01%2F27%2Fintroducing-cushion-a-simple-python-wrapper-for-couchdb%2F" title="Identi.ca"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://twitter.com/home?status=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2011%2F01%2F27%2Fintroducing-cushion-a-simple-python-wrapper-for-couchdb%2F" title="TwitThis"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/twitter.gif" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sheysrebellion.net/blog/2011/01/27/introducing-cushion-a-simple-python-wrapper-for-couchdb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dispatch Tables:  The forgotten design pattern</title>
		<link>http://www.sheysrebellion.net/blog/2011/01/23/dispatch-tables-the-forgotten-design-pattern/</link>
		<comments>http://www.sheysrebellion.net/blog/2011/01/23/dispatch-tables-the-forgotten-design-pattern/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 22:12:51 +0000</pubDate>
		<dc:creator>Sheheryar Sewani</dc:creator>
				<category><![CDATA[Development and Design]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.sheysrebellion.net/blog/?p=413</guid>
		<description><![CDATA[Long if-else statements and tall case statements are scary. As the number of lines and conditional branches grow, the more difficult it becomes to fit the program&#8217;s logic inside your head and the more likely you are to introduce bugs into the code. We rely on polymorphism and design patterns to help reduce complexity; often [...]]]></description>
			<content:encoded><![CDATA[<p>Long if-else statements and tall case statements are scary. As the number of lines and conditional branches grow, the more difficult it becomes to fit the program&#8217;s logic inside your head and the more likely you are to introduce bugs into the code.</p>
<p>We rely on polymorphism and design patterns to help reduce complexity; often those solutions are well suited for static programming languages like Java, but feel ceremonious in languages like Python and Javascript.  If you&#8217;re programming in a dynamic programming language that supports dictionaries out of the box, then you may find the Dispatch Table &#8220;pattern&#8221; a useful way to simply your code.</p>
<p>The pattern uses a dictionary where the keys represent possible actions, and the value of each key contains a callable that does the actual work. Compared to if-else statements, dispatch tables require fewer lines of code, and we know fewer lines of code equals fewer bugs.</p>
<p>Here&#8217;s a mostly real world example that creates handlers for webhooks.  You can imagine how long the if-else statement, that is used to decide which handler to instantiate, can become, especially when the consuming code has to respond to multiple keys.</p>
<p><script src="https://gist.github.com/792485.js?file=dispatch.py"></script></p>
<p>Neat.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li><a rel="nofollow" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2011%2F01%2F23%2Fdispatch-tables-the-forgotten-design-pattern%2F&amp;title=Dispatch%20Tables%3A%20%20The%20forgotten%20design%20pattern" title="del.icio.us"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2011%2F01%2F23%2Fdispatch-tables-the-forgotten-design-pattern%2F&amp;title=Dispatch%20Tables%3A%20%20The%20forgotten%20design%20pattern" title="Reddit"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2011%2F01%2F23%2Fdispatch-tables-the-forgotten-design-pattern%2F&amp;t=Dispatch%20Tables%3A%20%20The%20forgotten%20design%20pattern" title="Facebook"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2011%2F01%2F23%2Fdispatch-tables-the-forgotten-design-pattern%2F" title="Identi.ca"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://twitter.com/home?status=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2011%2F01%2F23%2Fdispatch-tables-the-forgotten-design-pattern%2F" title="TwitThis"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/twitter.gif" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sheysrebellion.net/blog/2011/01/23/dispatch-tables-the-forgotten-design-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Experimenting with partial application in Python</title>
		<link>http://www.sheysrebellion.net/blog/2010/12/06/experimenting-with-partial-application-in-python/</link>
		<comments>http://www.sheysrebellion.net/blog/2010/12/06/experimenting-with-partial-application-in-python/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 00:05:48 +0000</pubDate>
		<dc:creator>Sheheryar Sewani</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.sheysrebellion.net/blog/?p=407</guid>
		<description><![CDATA[In a recent project, I&#8217;ve experimented with &#8220;partial()&#8221; to simplify object creation. Partially applying a function, similar to currying, is a technique in which a new function is synthesized by pre-filling the arguments to an existing function. Python&#8217;s implementation of partial is available in two separate modules: functools and functional. It&#8217;s best understood with an [...]]]></description>
			<content:encoded><![CDATA[<p>In a recent project, I&#8217;ve experimented with &#8220;partial()&#8221; to simplify object creation. Partially applying a function, similar to currying, is a technique in which a new function is synthesized by pre-filling the arguments to an existing function.  Python&#8217;s implementation of partial is available in two separate modules: functools and functional.  It&#8217;s best understood with an example, albeit contrived:</p>
<p><script src="https://gist.github.com/731212.js?file=OOPy.py"></script></p>
<p><script src="https://gist.github.com/731213.js?file=partial.py"></script></p>
<p>Instead of defining a factory class and a creation method on that class, I define creation function which accepts the dependencies as parameters, partially apply them and use the new function as my &#8220;creation function.&#8221;  I prefer the second example, I enjoyed writing it, but both examples perform the same function with essentially the same number of lines and ultimately my preference is as basic as preferring a functional style of programming over object oriented.</p>
<p>So I&#8217;m wondering, how do other developers use currying or partial application in their projects?</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li><a rel="nofollow" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2010%2F12%2F06%2Fexperimenting-with-partial-application-in-python%2F&amp;title=Experimenting%20with%20partial%20application%20in%20Python" title="del.icio.us"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2010%2F12%2F06%2Fexperimenting-with-partial-application-in-python%2F&amp;title=Experimenting%20with%20partial%20application%20in%20Python" title="Reddit"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2010%2F12%2F06%2Fexperimenting-with-partial-application-in-python%2F&amp;t=Experimenting%20with%20partial%20application%20in%20Python" title="Facebook"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2010%2F12%2F06%2Fexperimenting-with-partial-application-in-python%2F" title="Identi.ca"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://twitter.com/home?status=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2010%2F12%2F06%2Fexperimenting-with-partial-application-in-python%2F" title="TwitThis"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/twitter.gif" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sheysrebellion.net/blog/2010/12/06/experimenting-with-partial-application-in-python/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Consuming AMQP messages with Python and Sparkplug</title>
		<link>http://www.sheysrebellion.net/blog/2010/08/22/consuming-amqp-messages-with-python-and-sparkplug/</link>
		<comments>http://www.sheysrebellion.net/blog/2010/08/22/consuming-amqp-messages-with-python-and-sparkplug/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 22:24:33 +0000</pubDate>
		<dc:creator>Sheheryar Sewani</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[AMQP]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[RabbitMQ]]></category>

		<guid isPermaLink="false">http://www.sheysrebellion.net/blog/?p=401</guid>
		<description><![CDATA[Consuming AMQP/RabbitMQ messages in Python is simple if you use Sparkplug. I read &#8220;Building RabbitMQ apps using Python&#8220;, and there&#8217;s just too much code in the monitor method and the separation of concerns aren&#8217;t very clear. With Sparkplug, you create a configuration file, then define Consumer class to handle each message. As messages are pushed [...]]]></description>
			<content:encoded><![CDATA[<p>Consuming AMQP/RabbitMQ messages in Python is simple if you use Sparkplug.  I read &#8220;<a href="http://blog.springsource.com/2010/08/19/building-rabbitmq-apps-using-python/">Building RabbitMQ apps using Python</a>&#8220;, and there&#8217;s just too much code in the monitor method and the separation of concerns aren&#8217;t very clear. </p>
<p>With <a href="http://pypi.python.org/pypi/sparkplug/1.0.2">Sparkplug</a>, you create a configuration file, then define Consumer class to handle each message.  As messages are pushed into the queue, Sparkplug will call your class and you decide how you want handle the message in the __call__ method.  The great thing about this is that all the connection logic is removed from your code letting you concentrate on how you want to handle each message. </p>
<p><script src="http://gist.github.com/544350.js?file=consumer.py"></script></p>
<p>Now you can run your app using <code>sparkplug --daemon consumer.ini</code>.  Configuration is boring, so I&#8217;ve left the <a href="http://gist.github.com/544350#file_consumer.ini">consumer.ini</a> out of the blog post and put it up on github instead.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li><a rel="nofollow" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2010%2F08%2F22%2Fconsuming-amqp-messages-with-python-and-sparkplug%2F&amp;title=Consuming%20AMQP%20messages%20with%20Python%20and%20Sparkplug" title="del.icio.us"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2010%2F08%2F22%2Fconsuming-amqp-messages-with-python-and-sparkplug%2F&amp;title=Consuming%20AMQP%20messages%20with%20Python%20and%20Sparkplug" title="Reddit"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2010%2F08%2F22%2Fconsuming-amqp-messages-with-python-and-sparkplug%2F&amp;t=Consuming%20AMQP%20messages%20with%20Python%20and%20Sparkplug" title="Facebook"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2010%2F08%2F22%2Fconsuming-amqp-messages-with-python-and-sparkplug%2F" title="Identi.ca"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://twitter.com/home?status=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2010%2F08%2F22%2Fconsuming-amqp-messages-with-python-and-sparkplug%2F" title="TwitThis"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/twitter.gif" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sheysrebellion.net/blog/2010/08/22/consuming-amqp-messages-with-python-and-sparkplug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple, Expressive Builders in Python</title>
		<link>http://www.sheysrebellion.net/blog/2010/08/09/simple-expressive-builders-in-python/</link>
		<comments>http://www.sheysrebellion.net/blog/2010/08/09/simple-expressive-builders-in-python/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 02:46:32 +0000</pubDate>
		<dc:creator>Sheheryar Sewani</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.sheysrebellion.net/blog/?p=397</guid>
		<description><![CDATA[Jesse has written a great blog post on using test builders to improve the expressiveness of unit tests. He has convinced me that builders are useful and that they provide an easy way to construct objects that are in a valid state. Testing can be hard; I find defining a method for each of the [...]]]></description>
			<content:encoded><![CDATA[<p>Jesse has written a great blog post on using <a href="http://jessejoelmiller.com/2010/07/builders-in-python/">test builders to improve the expressiveness of unit tests</a>. He has convinced me that builders are useful and that they provide an easy way to construct objects that are in a valid state. Testing can be hard; I find defining a method for each of the object&#8217;s properties to be tedious and repetitive.  This is especially problematic if you&#8217;re working with an object with dozens of properties.</p>
<p>To balance expressive with conciseness, I&#8217;ve refactored the builder to use Python dictionaries<br />
<script src="http://gist.github.com/516560.js?file=builders.py"></script><br />
<script src="http://gist.github.com/516560.js?file=test-banker.py"></script></p>
<p>I find this code to be just as expressive, easier to use and most importantly not repetitive.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li><a rel="nofollow" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2010%2F08%2F09%2Fsimple-expressive-builders-in-python%2F&amp;title=Simple%2C%20Expressive%20Builders%20in%20Python" title="del.icio.us"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2010%2F08%2F09%2Fsimple-expressive-builders-in-python%2F&amp;title=Simple%2C%20Expressive%20Builders%20in%20Python" title="Reddit"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2010%2F08%2F09%2Fsimple-expressive-builders-in-python%2F&amp;t=Simple%2C%20Expressive%20Builders%20in%20Python" title="Facebook"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2010%2F08%2F09%2Fsimple-expressive-builders-in-python%2F" title="Identi.ca"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://twitter.com/home?status=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2010%2F08%2F09%2Fsimple-expressive-builders-in-python%2F" title="TwitThis"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/twitter.gif" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sheysrebellion.net/blog/2010/08/09/simple-expressive-builders-in-python/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Dependency Injection</title>
		<link>http://www.sheysrebellion.net/blog/2010/01/18/dependency-injection/</link>
		<comments>http://www.sheysrebellion.net/blog/2010/01/18/dependency-injection/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 01:19:09 +0000</pubDate>
		<dc:creator>Sheheryar Sewani</dc:creator>
				<category><![CDATA[Development and Design]]></category>
		<category><![CDATA[dependency injection]]></category>

		<guid isPermaLink="false">http://www.sheysrebellion.net/blog/?p=384</guid>
		<description><![CDATA[My previous discussion on Inversion of Control raised some questions so I want to take a step back and discuss Dependency Injection. Dependency Injection is a pattern where software components (classes, methods or functions) are given their dependencies as parameters and these software components do not instantiate their dependencies directly. Dependency Injection is an important [...]]]></description>
			<content:encoded><![CDATA[<p>My previous discussion on <a href="http://www.sheysrebellion.net/blog/2009/08/24/inversion-of-control-in-python/">Inversion of Control</a> raised some questions so I want to take a step back and discuss Dependency Injection.  Dependency Injection is a pattern where software components (classes, methods or functions) are given their dependencies as parameters and these software components do not instantiate their dependencies directly.</p>
<p>Dependency Injection is an important pattern to use when you wan to create classes that are easier to reuse and unit test.  Since the dependencies are external, they can be configured and maintained outside class or function and there&#8217;s no need to change the code in order to reuse it.  Also, when dependencies are injected into a class or a function it is possible to substitute a mock implementation of the dependency. In unit tests, mock objects are used as replacement for the real implementation, this helps isolate the functionality being tested.</p>
<p><strong>A simple example</strong></p>
<p>The following function has it&#8217;s dependencies, a list of numbers, passed to it, and since calculate_average only talks to a list of numbers it is easy to reuse.</p>
<pre class="brush: py">
def calculate_average(list_of_numbers):
  x = sum(list_of_numbers)
  return x/len(list_of_numbers)
</pre>
<p>Imagine a similar function which uses a database connection, retrieves a list of numbers then calculates the average.</p>
<pre class="brush: py">
def calculate_average():
  sql_query = "select numbers from table"
  list_of_numbers = db.query(sql_query)
  x = sum(list_of_numbers)
  return x/len(list_of_numbers)
</pre>
<p>This function is difficult to reuse because it depends on the database, future users of this function will have to either modify the function or create and maintain a database just to use it.  More importantly it&#8217;s difficult to test this function.  A test would require a database connection and a fixture to populate the database with data.</p>
<p>You should be thinking, but Shey, I would never do this with a simple function like this.  You&#8217;re right, you wouldn&#8217;t do this with a simple function, but as soon as calculate_average turns into a more complicated calculation such as calculate_value_at_risk we start instantiating or dependencies.</p>
<p><strong>A slightly less contrived example</strong></p>
<p>The BillingService class is responsible for charging your customers a fee.</p>
<pre class="brush: py">
class BillingService
  def initialize(credit_card_processor)
    self.processor = processor

  def charge(account, amount):
    if account.has_balance:
      result = processor.charge(account.cc_number, amount)
    if result == "success":
      account.deduct(amount)
</pre>
<p>Lets assume that Authorize.net is offering better rates than PayPal.  If the class accepts an implementation of a credit card processor as a dependency it is possible to switch to the authorize.net implementation of the credit card processor class without changing the BillingService class.  Similarly during unit testing, a mock implementation of a credit card processor can be used to alwasy return &#8220;success&#8221; and isolate the charge functionality of the BillingService.</p>
<pre class="brush: py">
class mock_credit_card_processor:
  def charge(cc_number, amount):
    return "success"

    def test_charge():
      bs = BillingService(mock_credit_card_processor)
      a = Account(cc_number="411111111111111", balance=300.00)
      bs.charge(a, 300.00)
      assert(a.balance == 0)
</pre>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li><a rel="nofollow" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2010%2F01%2F18%2Fdependency-injection%2F&amp;title=Dependency%20Injection" title="del.icio.us"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2010%2F01%2F18%2Fdependency-injection%2F&amp;title=Dependency%20Injection" title="Reddit"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2010%2F01%2F18%2Fdependency-injection%2F&amp;t=Dependency%20Injection" title="Facebook"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2010%2F01%2F18%2Fdependency-injection%2F" title="Identi.ca"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://twitter.com/home?status=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2010%2F01%2F18%2Fdependency-injection%2F" title="TwitThis"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/twitter.gif" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sheysrebellion.net/blog/2010/01/18/dependency-injection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moneytracking API, Ruby, Mash and HTTParty</title>
		<link>http://www.sheysrebellion.net/blog/2009/10/11/moneytracking-api-ruby-mash-and-httparty/</link>
		<comments>http://www.sheysrebellion.net/blog/2009/10/11/moneytracking-api-ruby-mash-and-httparty/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 21:45:00 +0000</pubDate>
		<dc:creator>Sheheryar Sewani</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[moneytracking]]></category>

		<guid isPermaLink="false">http://www.sheysrebellion.net/blog/2009/10/11/moneytracking-api-ruby-mash-and-httparty/</guid>
		<description><![CDATA[Moneytrackin is a cool online accounting application that lets you track expenses and income, unlike other accounting applications it lets you add tags to each transactions. I love it!&#160; Tagging transactions makes it easier to track exactly where my money is going; not only can I see how much money I’ve spent on junk food [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://www.moneytrackin.com">Moneytrackin</a> is a cool online accounting application that lets you track expenses and income, unlike other accounting applications it lets you add tags to each transactions. I love it!&#160; Tagging transactions makes it easier to track exactly where my money is going; not only can I see how much money I’ve spent on junk food but also at which store, and all without having to explicitly create an account for that store.</p>
<p>Unfortunately Moneytracking has an annoying limitation which prevents you from tracking tags across accounts, so if you’re buying junk food with cash and credit tagging loses it appeal.&#160; Luckily, they provide an API which will allow us to easily get around the tagging limitation programmatically.&#160; </p>
<p>I can imagine some pretty cool analytics and infographics coming out of 6 months of data so I wrote <a href="http://code.google.com/p/moenytrackin/wiki/MoneyTrackin">Moneytrackin.rb</a>, a Ruby interface to the MoneyTrackin API.&#160; It exposes easy-to-use methods to interact with your Moneytrackin account. While it only implements the methods exposed by their API but I intend to add more functionality like tag searches across all accounts soon, imagine piping an amounte-weighted stream of tags to wordle!</p>
<p>With two gems, HTTParty and Mash, I was easily able to create the client interface.&#160; I included the HTTParty module within connection class and it gave it a &quot;get&quot; method that retrieves data over HTTP.&#160;&#160; Usage is simple:</p>
<pre class="csharpcode">response = self.<span class="kwrd">class</span>.<span class="kwrd">get</span>(self.<span class="kwrd">class</span>.base_uri + '/listProjects/')</pre>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>Then I passed the response to Mash which converts the XML response into a hash that acts more like a an object., it also also recursively descends down the response converting hashes into Mashes making it easy to get the transactions and the tags associated with them.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li><a rel="nofollow" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2009%2F10%2F11%2Fmoneytracking-api-ruby-mash-and-httparty%2F&amp;title=Moneytracking%20API%2C%20Ruby%2C%20Mash%20and%20HTTParty" title="del.icio.us"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2009%2F10%2F11%2Fmoneytracking-api-ruby-mash-and-httparty%2F&amp;title=Moneytracking%20API%2C%20Ruby%2C%20Mash%20and%20HTTParty" title="Reddit"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2009%2F10%2F11%2Fmoneytracking-api-ruby-mash-and-httparty%2F&amp;t=Moneytracking%20API%2C%20Ruby%2C%20Mash%20and%20HTTParty" title="Facebook"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2009%2F10%2F11%2Fmoneytracking-api-ruby-mash-and-httparty%2F" title="Identi.ca"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://twitter.com/home?status=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2009%2F10%2F11%2Fmoneytracking-api-ruby-mash-and-httparty%2F" title="TwitThis"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/twitter.gif" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sheysrebellion.net/blog/2009/10/11/moneytracking-api-ruby-mash-and-httparty/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Install sqlite3 for RoR on Windows Vista</title>
		<link>http://www.sheysrebellion.net/blog/2009/09/19/install-sqlite3-for-ror-on-windows-vista/</link>
		<comments>http://www.sheysrebellion.net/blog/2009/09/19/install-sqlite3-for-ror-on-windows-vista/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 05:47:56 +0000</pubDate>
		<dc:creator>Sheheryar Sewani</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[sqlite3]]></category>

		<guid isPermaLink="false">http://www.sheysrebellion.net/blog/?p=378</guid>
		<description><![CDATA[SQLite is a great little embeddable database engine but the installation of the Ruby library is not obvious or straightforward on Windows XP or Vista.  To install SQLite for Ruby 1.8, perform the following steps: download sqlitedll-3_6_18.zip, copy the two files that are part of the archive to your Ruby bin directory; run &#8220;gem install [...]]]></description>
			<content:encoded><![CDATA[<p>SQLite is a great little embeddable database engine but the installation of the Ruby library is not obvious or straightforward on Windows XP or Vista.  To install SQLite for Ruby 1.8, perform the following steps:</p>
<ol>
<li>download <a style="color: #45735f;" href="http://www.sqlite.org/sqlitedll-3_6_18.zip">sqlitedll-3_6_18.zip</a>,</li>
<li>copy the two files that are part of the archive to your Ruby bin directory;</li>
<li>run &#8220;gem install &#8211;version 1.2.3 sqlite3-ruby&#8221; from the command prompt.</li>
</ol>
<p>Enjoy!</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li><a rel="nofollow" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2009%2F09%2F19%2Finstall-sqlite3-for-ror-on-windows-vista%2F&amp;title=Install%20sqlite3%20for%20RoR%20on%20Windows%20Vista" title="del.icio.us"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2009%2F09%2F19%2Finstall-sqlite3-for-ror-on-windows-vista%2F&amp;title=Install%20sqlite3%20for%20RoR%20on%20Windows%20Vista" title="Reddit"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2009%2F09%2F19%2Finstall-sqlite3-for-ror-on-windows-vista%2F&amp;t=Install%20sqlite3%20for%20RoR%20on%20Windows%20Vista" title="Facebook"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2009%2F09%2F19%2Finstall-sqlite3-for-ror-on-windows-vista%2F" title="Identi.ca"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://twitter.com/home?status=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2009%2F09%2F19%2Finstall-sqlite3-for-ror-on-windows-vista%2F" title="TwitThis"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/twitter.gif" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sheysrebellion.net/blog/2009/09/19/install-sqlite3-for-ror-on-windows-vista/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Inversion of Control in Python</title>
		<link>http://www.sheysrebellion.net/blog/2009/08/24/inversion-of-control-in-python/</link>
		<comments>http://www.sheysrebellion.net/blog/2009/08/24/inversion-of-control-in-python/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 17:33:00 +0000</pubDate>
		<dc:creator>Sheheryar Sewani</dc:creator>
				<category><![CDATA[Development and Design]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[IoC]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.sheysrebellion.net/blog/2009/08/24/inversion-of-control-in-python/</guid>
		<description><![CDATA[Coming from a .NET background and having applied SOLID principles to software development, I was surprised by the lack of inversion of control containers for Python. The few discussions I read online implied that Python doesn’t need an IoC framework because it is a dynamically typed language.  Dynamically typed languages eliminate the need to use [...]]]></description>
			<content:encoded><![CDATA[<p>Coming from a .NET background and having applied <a href="http://www.lostechies.com/blogs/chad_myers/archive/2008/03/07/pablo-s-topic-of-the-month-march-solid-principles.aspx">SOLID principles</a> to software development, I was surprised by the lack of <a href="http://www.martinfowler.com/articles/injection.html">inversion of control containers</a> for Python.</p>
<p>The few discussions I read online implied that Python doesn’t need an IoC framework because it is a dynamically typed language.  Dynamically typed languages eliminate the need to use interfaces, they do not do away with the need for inversion of control.</p>
<p>IoC is used to decouple components of an application, remove direct dependencies so that replacing a component will not have a side effects on the rest of the system.  As <a href="http://pragdave.blogs.pragprog.com/pragdave/2004/11/transparent_inv.html">Dave Thomas explains</a></p>
<blockquote><p>a DI application is written as a set of loosely coupled components. These components contain no knitting code: nothing in the application code itself is responsible, for example, for making sure that the necessary objects somehow get an instance of the database connection. Instead, the components all run in a container. This container is given a description of the knitting to be done (typically using an XML file). The container then instantiates objects and sets them into components that need them</p></blockquote>
<p>I’m new to the language and there maybe a more “pythonic” way to handle inversion of control than using a container. Here is small and contrived example of inversion of control using <a href="http://code.google.com/p/pinsor/">Pinsor, a IoC container in Python</a>. Those coming from a .NET or Java background will find Pinsor easy to use, but slightly lacking in features.</p>
<script src="http://gist.github.com/172997.js"></script>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li><a rel="nofollow" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2009%2F08%2F24%2Finversion-of-control-in-python%2F&amp;title=Inversion%20of%20Control%20in%20Python" title="del.icio.us"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2009%2F08%2F24%2Finversion-of-control-in-python%2F&amp;title=Inversion%20of%20Control%20in%20Python" title="Reddit"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2009%2F08%2F24%2Finversion-of-control-in-python%2F&amp;t=Inversion%20of%20Control%20in%20Python" title="Facebook"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2009%2F08%2F24%2Finversion-of-control-in-python%2F" title="Identi.ca"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://twitter.com/home?status=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2009%2F08%2F24%2Finversion-of-control-in-python%2F" title="TwitThis"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/twitter.gif" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sheysrebellion.net/blog/2009/08/24/inversion-of-control-in-python/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Change point analysis in Python</title>
		<link>http://www.sheysrebellion.net/blog/2009/08/19/change-point-analysis-in-python/</link>
		<comments>http://www.sheysrebellion.net/blog/2009/08/19/change-point-analysis-in-python/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 02:31:12 +0000</pubDate>
		<dc:creator>Sheheryar Sewani</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[changepoint]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[pyton]]></category>

		<guid isPermaLink="false">http://www.sheysrebellion.net/blog/?p=361</guid>
		<description><![CDATA[With most of the paperwork done I&#8217;ve started to make use of my free time in Toronto.  In an effort to improve my Python programming I implemented a cummulative sum estimation based change point detection algorithm in Pyton based on an article by Dr. Wayne A. Taylor.  The changepoint project is available on Google code&#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>With most of the paperwork done I&#8217;ve started to make use of my free time in Toronto.  In an effort to improve my Python programming I implemented a cummulative sum estimation based change point detection algorithm in Pyton based on an <a href="http://www.variation.com/cpa/tech/changepoint.html#Procedure">article by Dr. Wayne A. Taylor</a>.  The <a href="http://code.google.com/p/changepoint/">changepoint project</a> is available on Google code&#8211; all comments are apprecaited.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li><a rel="nofollow" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2009%2F08%2F19%2Fchange-point-analysis-in-python%2F&amp;title=Change%20point%20analysis%20in%20Python" title="del.icio.us"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2009%2F08%2F19%2Fchange-point-analysis-in-python%2F&amp;title=Change%20point%20analysis%20in%20Python" title="Reddit"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2009%2F08%2F19%2Fchange-point-analysis-in-python%2F&amp;t=Change%20point%20analysis%20in%20Python" title="Facebook"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2009%2F08%2F19%2Fchange-point-analysis-in-python%2F" title="Identi.ca"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" href="http://twitter.com/home?status=http%3A%2F%2Fwww.sheysrebellion.net%2Fblog%2F2009%2F08%2F19%2Fchange-point-analysis-in-python%2F" title="TwitThis"><img src="http://www.sheysrebellion.net/blog/wp-content/plugins/sociable/images/twitter.gif" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.sheysrebellion.net/blog/2009/08/19/change-point-analysis-in-python/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

