<?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; Development and Design</title>
	<atom:link href="http://www.sheysrebellion.net/blog/category/programming/design/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>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>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>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>AMQP Kool-Aid Part 1.5: RabbitMQ Benchmark</title>
		<link>http://www.sheysrebellion.net/blog/2009/06/24/amqp-kool-aid-part-15-rabbitmq-benchmark/</link>
		<comments>http://www.sheysrebellion.net/blog/2009/06/24/amqp-kool-aid-part-15-rabbitmq-benchmark/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 18:46:55 +0000</pubDate>
		<dc:creator>Sheheryar Sewani</dc:creator>
				<category><![CDATA[Development and Design]]></category>
		<category><![CDATA[AMQP]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[RabbitMQ]]></category>

		<guid isPermaLink="false">http://www.sheysrebellion.net/blog/?p=331</guid>
		<description><![CDATA[Introduction As stock markets open, order management systems are flooded with new orders and it&#8217;s crucial that an OMS not miss prices or drop orders during this period.  The purpose of this initial benchmark is to simulate a flood of orders hitting the queue. Benchmark The benchmarking script sets up 10 queues, 10 producers and [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction<br />
</strong>As stock markets open, order management systems are flooded with new orders and it&#8217;s crucial that an OMS not miss prices or drop orders during this period.  The purpose of this initial benchmark is to simulate a flood of orders hitting the queue.</p>
<p><strong>Benchmark<br />
</strong>The benchmarking script sets up 10 queues, 10 producers and 10 consumers, each producer writes to a single queue and each consumer reads from that queue ie: p1 writes to q1 and c1 reads from q1 as fast at it can.  The time measured is the time it takes a message to travel from p1 to the queue and to be read by c1 and it was calculated by appending the timestamp to the message itself.</p>
<p>I chose to run a series of tests with message size varying from 35 bytes to 400 bytes and the message count varying from 50 messages to 100 messages in an attempt to visualize the broker&#8217;s behavior under varying conditions.</p>
<p>The benchmark was performed using a server running 2.8GHz Pentium D with 903464 kB RAM running on Kernel 2.6.18-128.1.10.el5 using RabbitMQ 1.5.5 and a machine with similar specifications as the client—both the producer and consumer run on the same machine.  The network is a typical Fast Ethernet with two switches separating the server and client machines.</p>
<p style="text-align: center;"><a href="http://www.sheysrebellion.net/blog/wp-content/uploads/2009/06/rabbitmq.png"><img class="aligncenter" style="border: 0pt none; display: inline;" title="RabbitMQ" src="http://www.sheysrebellion.net/blog/wp-content/uploads/2009/06/rabbitmq-thumb.png" border="0" alt="RabbitMQ" width="608" height="388" /></a></p>
<p align="justify">
<p align="justify"><strong>Conclusion<br />
</strong>Inconclusive! The numbers are very surprising I wasn&#8217;t expecting the message transfer times to be greater than .5 seconds under this load.  It&#8217;s possible that the <em>consumer</em> may not be able to keep up with flood of messages, if that&#8217;s the case than a consumer written in C# is needed.  What is obvious is that more tests  with a constant message size and a varying number of messages  are needed.</p>
<p align="justify">The standard deviation is also greater than I expected, so I plan on creating longer running tests and see if the broker falls into a steady state.  Finally, I also want to test with 50 messages per producer using 20 queues/producers instead of 10  and see how RabbitMQ responds.</p>
<p align="justify">I&#8217;m wondering what sort of performance others are experiencing—any and all feedback is greatly appreciated.</p>
<p align="justify"><strong>Postscript<br />
</strong>I intended on using C# to benchmark RabbitMQ but for want of time  I used a modified version of <a href="http://eventuallyconsistent.com/blog/">Colin Surprenant</a>&#8216;s <a href="http://github.com/sheysrebellion/bunnypunisher/tree/master">bunnypunisher</a> ruby script.  There&#8217;s a slightly outdated (and dirty) version of the script available on <a href="http://github.com/sheysrebellion/bunnypunisher/blob/6160b0d8e57f78bc6e0f361f6f52581b2afd6d6a/qpid_punisher.rb">github</a>.  I will upload the latest version along with the &#8220;launcher&#8221; tomorrow morning.</p>
<p>Kyle Burton at Asymmetrical View has a fairly comprehensive <a href="http://asymmetrical-view.com/2009/06/02/incanter-amqp-benchmark.html">comparison of RabbitMQ and Qpid</a>.</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%2F06%2F24%2Famqp-kool-aid-part-15-rabbitmq-benchmark%2F&amp;title=AMQP%20Kool-Aid%20Part%201.5%3A%20RabbitMQ%20Benchmark" 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%2F06%2F24%2Famqp-kool-aid-part-15-rabbitmq-benchmark%2F&amp;title=AMQP%20Kool-Aid%20Part%201.5%3A%20RabbitMQ%20Benchmark" 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%2F06%2F24%2Famqp-kool-aid-part-15-rabbitmq-benchmark%2F&amp;t=AMQP%20Kool-Aid%20Part%201.5%3A%20RabbitMQ%20Benchmark" 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%2F06%2F24%2Famqp-kool-aid-part-15-rabbitmq-benchmark%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%2F06%2F24%2Famqp-kool-aid-part-15-rabbitmq-benchmark%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/06/24/amqp-kool-aid-part-15-rabbitmq-benchmark/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Taking a sip of the AMQP Kool-Aid Part I</title>
		<link>http://www.sheysrebellion.net/blog/2009/06/21/taking-a-sip-of-the-amqp-kool-aid-part-i/</link>
		<comments>http://www.sheysrebellion.net/blog/2009/06/21/taking-a-sip-of-the-amqp-kool-aid-part-i/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 18:28:47 +0000</pubDate>
		<dc:creator>Sheheryar Sewani</dc:creator>
				<category><![CDATA[Development and Design]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[AMQP]]></category>
		<category><![CDATA[RabbitMQ]]></category>

		<guid isPermaLink="false">http://www.sheysrebellion.net/blog/?p=297</guid>
		<description><![CDATA[Overview Performance is vital in the world of stock trading, you can easily lose hundreds of thousands of dollars if the trading platform you’re using routes orders to the stock exchanges too slowly and you miss the your target price. The order management system I work on uses IRC as the messaging middle ware&#8211; a [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Overview</strong><br />
Performance is vital in the world of stock trading, you can easily lose hundreds of thousands of dollars if the trading platform you’re using routes orders to the stock exchanges too slowly and you miss the your target price.</p>
<p>The order management system I work on uses IRC as the messaging middle ware&#8211; a message is sent to a channel and another process reads and processes the message.  This gives us great flexibility, letting us write the user interface in .NET and the back-end server code in whichever language we choose and it also allows us to scale the system by moving processes to different machines.</p>
<p>But this setup has problems, if a message is missed by a process, there&#8217;s no easy to way to retrieve it and recent benchmarking showed that the latency of the messaging system spikes, unpredictably to 300 ms or more.  Initially IRC made sense but the requirements have grown and it’s clear a more robust solution which provides greater reliability, performance and scalability is needed.</p>
<p><strong>AMQP</strong><br />
The Advanced Message Queuing Protocol (AMQP) is an open standard, vendor neutral binary protocol for messaging middleware. AMQP features: messages, queuing and routing and it was designed by the financial industry to replace existing proprietary message queues.  It seems to be the Promised Land—the perfect replacement for IRC.</p>
<p>After a quick evaluation of messaging brokers, the best candidates appear to be RabbitMQ and Apache Qpid. Both support AMQP, seem to have low latency and have vendor support—Qpid in the form of RedHat MRG.  While both seem to be faster than IRC, I needed to be sure.</p>
<p>AMQP is more complicated than IRC and replacing the current messaging system won’t be easy. I wanted to create a benchmark that simulates the load we see in a production environment, but before I could create the test, I need to better understand what AMQP provides and the terminology it uses.</p>
<p><strong>AMQP Features</strong></p>
<p><em>Messages</em> are glorified strings which are published to an exchange. They consist of a header and a content body, while headers have several properties; you only need to know one to get started: the routing-key, a field used by exchanges to determine which queue the message will be routed to.</p>
<p><em></em><em>Queues</em> are where your messages wait until they are consumed.  Queues can be configured to let messages die if a consumer is not available, queues along with exchanges can be made durable.  Message can persists if the queue and the exchange are marked as durable and the message&#8217;s delivery mode is set to persistent.</p>
<p><em>Exchanges</em> the help the broker decide which queue to route your message to.  While they’re slated for removal in AMQP  1.0,  but they’re still important and difficult to ignore&#8211;  there are four types of exchanges:  Fanout, Direct, Topic and Header.</p>
<ul>
<li>Direct exchange: Use routing keys, messages sent to a direct exchange are routed to exchanges where the routing key matches exactly.</li>
<li>Topic exchange: A hierarchical exchange which also uses routing keys, routing keys are matched against a pattern, the hierarchy is established by separating keywords with the dot symbol.</li>
<li>Fanout Exchange: A 1:N exchange, any message sent to an exchange is sent to all queues bound to that exchange.</li>
</ul>
<p>A <em>Channel</em> is to AMQP what session is to HTTP, I&#8217;m not sure if that&#8217;s very accurate&#8211; all communication over a channel is stateful, and each instance of your program will have at least one channel.</p>
<p><strong>Conclusion</strong><br />
There’s a lot to digest, I spent the better part of the day reading <a href="http://www.rabbitmq.com/releases/rabbitmq-dotnet-client/v1.6.0/rabbitmq-dotnet-client-1.6.0-user-guide.pdf">RabbitMQ’s .NET API Guide</a>.  In part two of this series I&#8217;ll walkthrough C# client and benchmark RabbitMQ.  As always, your feedback and comments are appreciated.</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%2F06%2F21%2Ftaking-a-sip-of-the-amqp-kool-aid-part-i%2F&amp;title=Taking%20a%20sip%20of%20the%20AMQP%20Kool-Aid%20Part%20I" 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%2F06%2F21%2Ftaking-a-sip-of-the-amqp-kool-aid-part-i%2F&amp;title=Taking%20a%20sip%20of%20the%20AMQP%20Kool-Aid%20Part%20I" 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%2F06%2F21%2Ftaking-a-sip-of-the-amqp-kool-aid-part-i%2F&amp;t=Taking%20a%20sip%20of%20the%20AMQP%20Kool-Aid%20Part%20I" 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%2F06%2F21%2Ftaking-a-sip-of-the-amqp-kool-aid-part-i%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%2F06%2F21%2Ftaking-a-sip-of-the-amqp-kool-aid-part-i%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/06/21/taking-a-sip-of-the-amqp-kool-aid-part-i/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Questioning ASP.NET MVC</title>
		<link>http://www.sheysrebellion.net/blog/2009/05/04/questioning-aspnet-mvc/</link>
		<comments>http://www.sheysrebellion.net/blog/2009/05/04/questioning-aspnet-mvc/#comments</comments>
		<pubDate>Sun, 03 May 2009 20:09:24 +0000</pubDate>
		<dc:creator>Sheheryar Sewani</dc:creator>
				<category><![CDATA[Development and Design]]></category>

		<guid isPermaLink="false">http://www.sheysrebellion.net/blog/2009/05/04/questioning-aspnet-mvc/</guid>
		<description><![CDATA[ASP.NET MVC has always bothered me; even now I’m not sure exactly what bothers me, but it’s enough to make me question using .NET to develop web applications. No longer working at a .NET shop and having escaped from the realty distortion field I’ve pushed myself to revaluate languages and frameworks which I had ignored [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">ASP.NET MVC has always bothered me; even now I’m not sure exactly what bothers me, but it’s enough to make me question using .NET to develop web applications. No longer working at a .NET shop and having escaped from the realty distortion field I’ve pushed myself to revaluate languages and frameworks which I had ignored in the past.</p>
<p align="justify">Django, a Python framework for creating web applications which is loosely based on MVC architecture.&#160; In the two-three-odd hours I spent with <a href="http://www.instantdjango.com/">Instant Django</a> I realized that I’ve never had a compelling reason to develop web applications in ASP.NET and&#160; “I know C#” is not a not a reason to learn ASP.NET MVC.</p>
<p align="justify">Almost Immediately I noticed I wasn’t fighting the language, interpreted languages are much more compatible with the web development story, web application development with static languages is time consuming and tiresome.&#160; Within the first hour I was in love with the <a href="http://www.djangobook.com/en/2.0/">documentation</a>, not that I needed it *too* much, the different components fit well together and that’s fairly significant friction point for me. To do web development with ASP.NET MVC properly you need some sort of ORM, usually NHibernate, a dependency injection framework and 3rd party validators—I’m left wondering, isn’t this getting too complicated, where is my productivity?&#160; </p>
<p align="justify">By the second hour I’m sold, my gut tells me that Django is good and my brain is agreeing with my gut on this one. </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%2F05%2F04%2Fquestioning-aspnet-mvc%2F&amp;title=Questioning%20ASP.NET%20MVC" 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%2F05%2F04%2Fquestioning-aspnet-mvc%2F&amp;title=Questioning%20ASP.NET%20MVC" 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%2F05%2F04%2Fquestioning-aspnet-mvc%2F&amp;t=Questioning%20ASP.NET%20MVC" 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%2F05%2F04%2Fquestioning-aspnet-mvc%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%2F05%2F04%2Fquestioning-aspnet-mvc%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/05/04/questioning-aspnet-mvc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>VSS to Subversion Migration</title>
		<link>http://www.sheysrebellion.net/blog/2009/03/26/vss-to-subversion-migration/</link>
		<comments>http://www.sheysrebellion.net/blog/2009/03/26/vss-to-subversion-migration/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 17:40:05 +0000</pubDate>
		<dc:creator>Sheheryar Sewani</dc:creator>
				<category><![CDATA[Development and Design]]></category>
		<category><![CDATA[best-practices]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.sheysrebellion.net/blog/?p=164</guid>
		<description><![CDATA[Source control is the bedrock of your development effort, it contains the history of your entire project and it&#8217;s too important to trust it to VSS.  Visual Source Safe is a horrible source control system and i keeps you from being productive. Teams using VSS love to use exclusive locks on source files, this only [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/onkel_wart/3102392463/"><img style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 15px 3px 20px; border-right-width: 0px" title="nowhere_m" src="http://www.sheysrebellion.net/blog/wp-content/uploads/2009/03/nowhere-m.jpg" border="0" alt="nowhere_m" width="240" height="240" align="right" /></a></p>
<p>Source control is the bedrock of your development effort, it contains the history of your entire project and it&#8217;s too important to trust it to VSS.  Visual Source Safe is a horrible source control system and i keeps you from being productive.</p>
<p>Teams using VSS love to use exclusive locks on source files, this only creates contention for files and kills the team’s productivity.  Even worse, VSS’s doesn’t support branching which makes refactoring your code doubly difficult, all your changes have to be made offline and manually merged into the “trunk,” and only is VSS insanely slow it has no concept of transactions, if a bug fix required you to change and check-in multiple files at once, there’s no way to figure out which files were checked-in together using VSS’s history feature.</p>
<p><a href="http://subversion.tigris.org/" target="_blank">SVN</a> is a much better, free alternative to VSS, which supports many features that you expect from a modern source control system: branching  and merging and transactions and atomic commits.</p>
<p>If you think your project’s history is stuck in VSS, it’s not, there’s a great migration tool called vss2svn which lets you migrate your entire VSS repository along with the project history to SVN.</p>
<p>You’ll need to download and setup SVN server and <a href="http://www.visualsvn.com/server/doc/server-config/">create a repository</a> and users for your projects first, I recommend using <a href="http://www.visualsvn.com/server/" target="_blank">VisualSVN Server</a> if you’re on Windows.  What follows is a painfully long migration, but it’s well worth it in the end.</p>
<ol>
<li>Download and extract <a href="http://www.pumacode.org/projects/vss2svn/wiki/Releases/0.11.0Alpha1" target="_blank">vss2svn</a> to a hard drive which has plenty of space, as a general rule, you should have enough space to hold three copies of your VSS repository;</li>
<li>After making sure that your repository does not have any files checked out, take your VSS repository offline by disabling all access to it, then create a backup of your VSS directory; at this time, you should also delete/destroy any files/projects you do not wish to migrate to svn.</li>
<li>Run the <a href="http://msdn.microsoft.com/en-us/library/ysxsfw4x(VS.80).aspx">analyze</a> command on your VSS repository, you&#8217;ll have to run analyze several times if the analyze utility encounter errors in your repository&#8211; this is very time consuming and but an important step.</li>
<li>Now you&#8217;re ready to run the migration utility from the command prompt.   You&#8217;ll need to use the following command:  <strong>vss2svn.exe &#8211;vssdir &lt;dir&gt; </strong>where &lt;dir&gt; is the directory which contains the scrsafe.ini file.  vss2svn.exe will generate a svn dump file which you&#8217;ll later import into your svn repository;</li>
<li>finally, import the dump file generated by vss2svn by using the following command on the machien where your svn repository resides: <strong>svnadmin load /path/to/repository &lt; dumpfile.txt</strong></li>
</ol>

<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%2F03%2F26%2Fvss-to-subversion-migration%2F&amp;title=VSS%20to%20Subversion%20Migration" 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%2F03%2F26%2Fvss-to-subversion-migration%2F&amp;title=VSS%20to%20Subversion%20Migration" 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%2F03%2F26%2Fvss-to-subversion-migration%2F&amp;t=VSS%20to%20Subversion%20Migration" 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%2F03%2F26%2Fvss-to-subversion-migration%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%2F03%2F26%2Fvss-to-subversion-migration%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/03/26/vss-to-subversion-migration/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Manifesto for Software Craftsmanship</title>
		<link>http://www.sheysrebellion.net/blog/2009/03/08/manifesto-for-software-craftsmanship/</link>
		<comments>http://www.sheysrebellion.net/blog/2009/03/08/manifesto-for-software-craftsmanship/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 13:47:17 +0000</pubDate>
		<dc:creator>Sheheryar Sewani</dc:creator>
				<category><![CDATA[Development and Design]]></category>

		<guid isPermaLink="false">http://www.sheysrebellion.net/blog/2009/03/08/manifesto-for-software-craftsmanship/</guid>
		<description><![CDATA[Manifesto for Software Craftsmanship: As aspiring Software Craftsmen we are raising the bar of professional software development by practicing it and helping others learn the craft. Through this work we have come to value: Not only working software, but also well-crafted software Not only responding to change, but also steadily adding value Not only individuals [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://manifesto.softwarecraftsmanship.org/">Manifesto for Software Craftsmanship</a>:</p>
<p><em>As aspiring Software Craftsmen we are raising the bar of professional software development by practicing it and helping others learn the craft. Through this work we have come to value:</em></p>
<p><em>Not only working software, but also well-crafted software</em></p>
<p><em>Not only responding to change, but also steadily adding value</em></p>
<p><em>Not only individuals and interactions, but also a community of professionals</em></p>
<p><em>Not only customer collaboration, but also productive partnerships</em></p>
<p><em>That is, in pursuit of the items on the left we have found the items on the right to be indispensable.</em></p>
<p><em>© 2009, the undersigned.      <br />this statement may be freely copied in any form,       <br />but only in its entirety through this notice.</em></p>
<p>As of right now, I am the only Pakistani signee of the Manifesto for Software Craftsmanship, why?&#160; </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%2F03%2F08%2Fmanifesto-for-software-craftsmanship%2F&amp;title=Manifesto%20for%20Software%20Craftsmanship" 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%2F03%2F08%2Fmanifesto-for-software-craftsmanship%2F&amp;title=Manifesto%20for%20Software%20Craftsmanship" 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%2F03%2F08%2Fmanifesto-for-software-craftsmanship%2F&amp;t=Manifesto%20for%20Software%20Craftsmanship" 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%2F03%2F08%2Fmanifesto-for-software-craftsmanship%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%2F03%2F08%2Fmanifesto-for-software-craftsmanship%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/03/08/manifesto-for-software-craftsmanship/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Strive to do better</title>
		<link>http://www.sheysrebellion.net/blog/2008/06/18/strive-to-do-better/</link>
		<comments>http://www.sheysrebellion.net/blog/2008/06/18/strive-to-do-better/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 18:08:40 +0000</pubDate>
		<dc:creator>Sheheryar Sewani</dc:creator>
				<category><![CDATA[Development and Design]]></category>

		<guid isPermaLink="false">http://www.sheysrebellion.net/blog/2008/06/18/strive-to-do-better/</guid>
		<description><![CDATA[I&#8217;ve always considered Software Developers to be a special breed.&#160; Good software developers are driven&#8211; they set aside time to hone their technique and learn new methods and technologies, they strive to do better. If this sounds like you, then read on:&#160; I&#8217;m trying to form study group of programmers who are interested in studying [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always considered Software Developers to be a special breed.&#160; Good software developers are driven&#8211; they set aside time to hone their technique and learn new methods and technologies, they strive to do better.</p>
<p>If this sounds like you, then read on:&#160; I&#8217;m trying to form study group of programmers who are interested in studying software development.&#160; The group would meet once or twice a month to present new ideas, discuss technology related articles and read and refactor code.&#160;&#160;&#160; </p>
<p>The main focus of the group would be Object oriented programming and design; initially I would like to cover topics such as ORM, Domain Driven Design and Inversion of Control.</p>
<p>Obviously this is for Karachi only, if you&#8217;re still interested drop a note in the comments.</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%2F2008%2F06%2F18%2Fstrive-to-do-better%2F&amp;title=Strive%20to%20do%20better" 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%2F2008%2F06%2F18%2Fstrive-to-do-better%2F&amp;title=Strive%20to%20do%20better" 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%2F2008%2F06%2F18%2Fstrive-to-do-better%2F&amp;t=Strive%20to%20do%20better" 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%2F2008%2F06%2F18%2Fstrive-to-do-better%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%2F2008%2F06%2F18%2Fstrive-to-do-better%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/2008/06/18/strive-to-do-better/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Design and Architecture:  Is Good Design Worth The Effort?</title>
		<link>http://www.sheysrebellion.net/blog/2008/06/04/design-and-architecture-is-good-design-worth-the-effort/</link>
		<comments>http://www.sheysrebellion.net/blog/2008/06/04/design-and-architecture-is-good-design-worth-the-effort/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 17:05:44 +0000</pubDate>
		<dc:creator>Sheheryar Sewani</dc:creator>
				<category><![CDATA[Development and Design]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://www.sheysrebellion.net/blog/2008/06/04/design-and-architecture-is-good-design-worth-the-effort/</guid>
		<description><![CDATA[As a software developer, I have unintentionally surrounded myself with other software developers who share the same ideals as myself. If you asked any them if good design is worth the effort, they will answer with an unequivocal yes!&#160; They may ask &#8220;How can you question design?&#160; It is the heart of software development.&#8221; Project [...]]]></description>
			<content:encoded><![CDATA[<p>As a software developer, I have unintentionally surrounded myself with other software developers who share the same ideals as myself. If you asked any them if good design is worth the effort, they will answer with an unequivocal yes!&#160; They may ask &#8220;How can you question design?&#160; It is the heart of software development.&#8221;</p>
<p>Project managers will stand behind us, nodding in agreement, because no project manager is brave enough to openly say that design isn&#8217;t a worthwhile activity, instead they&#8217;ll rephrase their disagreement: &#8220;We have a deadline approaching and we need to get this functionality out of the door fast!&#8221; A dangerous phrase which means they want you to churn out code as fast as you can without regard to future costs.</p>
<p>Software developers use the term &#8220;Technical Debt&#8221; to describe the obligation an organization incurs when it chooses a design or approach that&#8217;s quicker in the short term but increases complexity of the software and is more costly in the long term.&#160; </p>
<p>Imagine, skipping the dishes after dinner, instead of washing them you let them pile up in your sink, you&#8217;ll save time now, but eventually, you&#8217;ll have a huge mess in your kitchen and you won&#8217;t have any dishes to eat on. Even worse, imagine that your in-laws drop in on a surprise visit and you don&#8217;t have any dishes to serve them food on&#8212;these imaginary in-laws are clients asking you for new functionality. </p>
<p>Technical debt prevents you from meeting your customer&#8217;s needs quickly, modifications to the code base take exponentially longer and as your technical debt accumulates you expose yourself to more risk.</p>
<p>Sometimes, just like financial debt, it is beneficial to take on technical debt to exploit an opportunity, but like credit card debt, the interest on technical debt can catch up on you, all too often we don&#8217;t manage our debt, it spirals out of control and we spend most of the our money paying of the interest, not the principle. </p>
<p>Software development is a series of compromises, but we can&#8217;t fool ourselves into believing that we can trade good design for greater development speed.</p>
<p>The problem with sacrificing design is that the code becomes unstable, adding a feature will break the software in other places; the code becomes to modify, a simple change requires modifying other parts of the system and finally, the code becomes harder to read, developers spend days trying to figure out which files need to change.&#160; Eventually, your developers will become frustrated and they&#8217;ll start proposing the big rewrite of the system.</p>
<p>Development in the absence of design yields systems which have a high level of coupling, where functionality is spread across the entire application and often duplicated in several locations across the code base. </p>
<p>As the application evolves, these duplicate functions become unsynchronized, making bug fixes more difficult and time consuming. Maintaining a code base with high coupling is difficult and time consuming, your developers waste time looking for the code to modify searching for the duplicate code in ten different files, instead of developing new functionality; they waste time re-understanding the code. All of these problems compound to make maintenance and further development extremely expensive. </p>
<p>Programmers are lazy and if good design actually increased the effort and time required we&#8217;d be against it.&#160; Software design is an effortful activity, but one which leads to a net increase in productivity and efficiency.</p>
<p>For software to remain relevant and profitable, it must change often, add value by growing in features, if your code is brittle and fragile, then adding new features to your application is difficult, eventually you&#8217;ll have to turn away customers because you can&#8217;t meet their requirements in time. Extrapolate this over five years and imagine the profit you had to forgo because your code is unstable.</p>
<p>Good design ensures functionality is confined to a single location, it encourages code reuse, makes maintenance easier and it makes it easier to add new features, in short good design saves you money.</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%2F2008%2F06%2F04%2Fdesign-and-architecture-is-good-design-worth-the-effort%2F&amp;title=Design%20and%20Architecture%3A%20%20Is%20Good%20Design%20Worth%20The%20Effort%3F" 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%2F2008%2F06%2F04%2Fdesign-and-architecture-is-good-design-worth-the-effort%2F&amp;title=Design%20and%20Architecture%3A%20%20Is%20Good%20Design%20Worth%20The%20Effort%3F" 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%2F2008%2F06%2F04%2Fdesign-and-architecture-is-good-design-worth-the-effort%2F&amp;t=Design%20and%20Architecture%3A%20%20Is%20Good%20Design%20Worth%20The%20Effort%3F" 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%2F2008%2F06%2F04%2Fdesign-and-architecture-is-good-design-worth-the-effort%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%2F2008%2F06%2F04%2Fdesign-and-architecture-is-good-design-worth-the-effort%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/2008/06/04/design-and-architecture-is-good-design-worth-the-effort/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

