<?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>gefira blog</title>
	<atom:link href="http://www.gefira.pl/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gefira.pl/blog</link>
	<description>Les mains de l&#039;empereur</description>
	<lastBuildDate>Wed, 09 May 2012 11:49:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Cython on AIX, HP-UX and z/Linux anyone?</title>
		<link>http://www.gefira.pl/blog/2012/05/09/cython-on-aix-hp-ux-and-zlinux-anyone/</link>
		<comments>http://www.gefira.pl/blog/2012/05/09/cython-on-aix-hp-ux-and-zlinux-anyone/#comments</comments>
		<pubDate>Wed, 09 May 2012 10:48:25 +0000</pubDate>
		<dc:creator>Dariusz Suchojad</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Cython]]></category>
		<category><![CDATA[Planet Python]]></category>
		<category><![CDATA[PyMQI]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[WebSphere MQ]]></category>

		<guid isPermaLink="false">http://www.gefira.pl/blog/?p=1649</guid>
		<description><![CDATA[I&#8217;m considering re-writing a lot of PyMQI in Cython to cut down on the amount of C  I have to deal with but the thing is, one of the most popular platforms PyMQI runs just fine on is AIX and, to some extent, HP-UX and z/Linux. A fellow Python and MQ user has once contributed [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m considering re-writing a lot of <a title="PyMQI - project's homepage" href="http://packages.python.org/pymqi/">PyMQI</a> in <a title="Cython - project's homepage" href="http://cython.org/">Cython</a> to cut down on the amount of C  I have to deal with but the thing is, one of the most popular platforms PyMQI runs just fine on is AIX and, to some extent, HP-UX and z/Linux. A fellow Python and MQ user has once contributed access to a Solaris SPARC box but I have no access to any other of the exotic systems. Well, except for Windows <img src='http://www.gefira.pl/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>So I&#8217;m wondering if people can share their experiences with using Cython on anything else than Linux and Windows, and it would be fantastic if that something else was AIX, HP-UX or z/Linux. Is there anything I should be particularly aware of? Plain sailing? Or better drop the idea for now? What do you think?</p>
<p>Cheers!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.gefira.pl%2Fblog%2F2012%2F05%2F09%2Fcython-on-aix-hp-ux-and-zlinux-anyone%2F&amp;title=Cython%20on%20AIX%2C%20HP-UX%20and%20z%2FLinux%20anyone%3F" id="wpa2a_2"><img src="http://www.gefira.pl/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.gefira.pl/blog/2012/05/09/cython-on-aix-hp-ux-and-zlinux-anyone/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>yEd is my OmniGraffle for Linux</title>
		<link>http://www.gefira.pl/blog/2012/03/12/yed-is-my-omnigraffle-for-linux/</link>
		<comments>http://www.gefira.pl/blog/2012/03/12/yed-is-my-omnigraffle-for-linux/#comments</comments>
		<pubDate>Mon, 12 Mar 2012 14:34:09 +0000</pubDate>
		<dc:creator>Dariusz Suchojad</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[diagramming]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.gefira.pl/blog/?p=1616</guid>
		<description><![CDATA[The only reason I&#8217;ve ever considered buying a Mac is OmniGraffle. This is a really cool program and I wish the company finally released a Linux version. Not sure how close to all the Mac APIs it actually is but that I guess it&#8217;s something that can always be worked around as long as there&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>The only reason I&#8217;ve ever considered buying a Mac is <a title="OmniGraffle features overview" href="http://www.omnigroup.com/products/omnigraffle/features/">OmniGraffle</a>. This is a really cool program and I wish the company finally released a Linux version. Not sure how close to all the Mac APIs it actually is but that I guess it&#8217;s something that can always be worked around as long as there&#8217;s demand, and clearly there is.</p>
<p>So a couple of years ago I started evaluating all sort of diagramming applications available for Linux &#8211; and I do mean spending a couple of weeks on using <strong>all</strong> of them &#8211; and about a year ago I settled on using <a title="yEd - homepage" href="http://www.yworks.com/en/products_yed_about.html">yEd</a> as a diagramming tool of my choice. This the only one that looks decent, is fast enough, and &#8211; the most important bit &#8211; the diagrams look modern, the authors understand that merely displaying crude boxes and arrows isn&#8217;t always enough so they keep attention to a lot of details that make it all look very sharp and attractive.</p>
<p>Here is a couple of diagrams I&#8217;ve recently made though by no means is it the end word, it&#8217;s just a sample of what I&#8217;ve created myself, not the ultimate showcase of the program&#8217;s features.</p>
<p><a href="http://www.gefira.pl/blog/wp-content/uploads/2012/03/internals.png"><img class="aligncenter size-full wp-image-1626" title="internals" src="http://www.gefira.pl/blog/wp-content/uploads/2012/03/internals.png" alt="" width="609" height="169" /></a></p>
<p><a href="http://www.gefira.pl/blog/wp-content/uploads/2012/03/janitor.png"><img class="aligncenter size-full wp-image-1627" title="janitor" src="http://www.gefira.pl/blog/wp-content/uploads/2012/03/janitor.png" alt="" width="449" height="363" /></a></p>
<p><a href="http://www.gefira.pl/blog/wp-content/uploads/2012/03/overview.png"><img class="aligncenter size-full wp-image-1633" title="overview" src="http://www.gefira.pl/blog/wp-content/uploads/2012/03/overview.png" alt="" width="586" height="253" /></a></p>
<p><a href="http://www.gefira.pl/blog/wp-content/uploads/2012/03/zmq-sockets.png"><img class="aligncenter size-medium wp-image-1636" title="zmq-sockets" src="http://www.gefira.pl/blog/wp-content/uploads/2012/03/zmq-sockets-300x132.png" alt="" width="300" height="132" /></a></p>
<p><a href="http://www.gefira.pl/blog/wp-content/uploads/2012/03/server.png"><img class="aligncenter size-medium wp-image-1634" title="server" src="http://www.gefira.pl/blog/wp-content/uploads/2012/03/server-300x239.png" alt="" width="300" height="239" /></a></p>
<p><a href="http://www.gefira.pl/blog/wp-content/uploads/2012/03/subscribe-undelivered.png"><img class="aligncenter size-medium wp-image-1635" title="subscribe-undelivered" src="http://www.gefira.pl/blog/wp-content/uploads/2012/03/subscribe-undelivered-300x112.png" alt="" width="300" height="112" /></a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.gefira.pl%2Fblog%2F2012%2F03%2F12%2Fyed-is-my-omnigraffle-for-linux%2F&amp;title=yEd%20is%20my%20OmniGraffle%20for%20Linux" id="wpa2a_4"><img src="http://www.gefira.pl/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.gefira.pl/blog/2012/03/12/yed-is-my-omnigraffle-for-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dummy/safe ping SQL queries</title>
		<link>http://www.gefira.pl/blog/2012/02/04/dummysafe-ping-sql-queries/</link>
		<comments>http://www.gefira.pl/blog/2012/02/04/dummysafe-ping-sql-queries/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 20:32:04 +0000</pubDate>
		<dc:creator>Dariusz Suchojad</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.gefira.pl/blog/?p=1612</guid>
		<description><![CDATA[Just in case someone needs it, here&#8217;s a set of SQL ping queries I use in the application I work on now. This is mostly used when checking if a database is alive but I&#8217;m sure it will come in handy at other times as well ping_queries = &#123; 'access': 'SELECT 1', 'db2': 'SELECT current_date [...]]]></description>
			<content:encoded><![CDATA[<p>Just in case someone needs it, here&#8217;s a set of SQL ping queries I use in the application I work on now. This is mostly used when checking if a database is alive but I&#8217;m sure it will come in handy at other times as well <img src='http://www.gefira.pl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">ping_queries = <span style="color: black;">&#123;</span>
    <span style="color: #483d8b;">'access'</span>: <span style="color: #483d8b;">'SELECT 1'</span>,
    <span style="color: #483d8b;">'db2'</span>: <span style="color: #483d8b;">'SELECT current_date FROM sysibm.sysdummy1'</span>,
    <span style="color: #483d8b;">'firebird'</span>: <span style="color: #483d8b;">'SELECT current_timestamp FROM rdb$database'</span>,
    <span style="color: #483d8b;">'informix'</span>: <span style="color: #483d8b;">'SELECT 1 FROM systables WHERE tabid=1'</span>,
    <span style="color: #483d8b;">'mssql'</span>: <span style="color: #483d8b;">'SELECT 1'</span>,
    <span style="color: #483d8b;">'mysql'</span>: <span style="color: #483d8b;">'SELECT 1+1'</span>,
    <span style="color: #483d8b;">'oracle'</span>: <span style="color: #483d8b;">'SELECT 1 FROM dual'</span>,
    <span style="color: #483d8b;">'postgresql'</span>: <span style="color: #483d8b;">'SELECT 1'</span>,
<span style="color: black;">&#125;</span></pre></div></div>

<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.gefira.pl%2Fblog%2F2012%2F02%2F04%2Fdummysafe-ping-sql-queries%2F&amp;title=Dummy%2Fsafe%20ping%20SQL%20queries" id="wpa2a_6"><img src="http://www.gefira.pl/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.gefira.pl/blog/2012/02/04/dummysafe-ping-sql-queries/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t register the same ZeroMQ socket with a poller twice</title>
		<link>http://www.gefira.pl/blog/2011/11/10/dont-register-the-same-zeromq-socket-with-a-poller-twice/</link>
		<comments>http://www.gefira.pl/blog/2011/11/10/dont-register-the-same-zeromq-socket-with-a-poller-twice/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 15:11:17 +0000</pubDate>
		<dc:creator>Dariusz Suchojad</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[ZeroMQ]]></category>

		<guid isPermaLink="false">http://www.gefira.pl/blog/?p=1608</guid>
		<description><![CDATA[Remember not to register the same ZeroMQ socket with a poller twice or it will seem it&#8217;s hanging or processing every other message only &#8211; that&#8217;s a piece of advice I have for you after several hours of bug squashing]]></description>
			<content:encoded><![CDATA[<p>Remember not to register the same ZeroMQ socket with a poller twice or it will seem it&#8217;s hanging or processing every other message only &#8211; that&#8217;s a piece of advice I have for you after several hours of bug squashing <img src='http://www.gefira.pl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.gefira.pl%2Fblog%2F2011%2F11%2F10%2Fdont-register-the-same-zeromq-socket-with-a-poller-twice%2F&amp;title=Don%E2%80%99t%20register%20the%20same%20ZeroMQ%20socket%20with%20a%20poller%20twice" id="wpa2a_8"><img src="http://www.gefira.pl/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.gefira.pl/blog/2011/11/10/dont-register-the-same-zeromq-socket-with-a-poller-twice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A book wrecks my car</title>
		<link>http://www.gefira.pl/blog/2011/11/02/a-book-wrecks-my-car/</link>
		<comments>http://www.gefira.pl/blog/2011/11/02/a-book-wrecks-my-car/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 17:19:39 +0000</pubDate>
		<dc:creator>Dariusz Suchojad</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.gefira.pl/blog/?p=1592</guid>
		<description><![CDATA[Hm.. when I hear that &#8216;the research says the [Duqu] Trojan exploited a previously unknown vulnerability embedded in Word files, allowing Duqu to modify computers&#8217; security protection&#8216;, I just can&#8217;t help but imagine my opening a car, tossing a book on the back seat and then later on, being unable to use the brakes anymore [...]]]></description>
			<content:encoded><![CDATA[<p>Hm.. when I hear that &#8216;<a title="BBC - Duqu infection linked to Microsoft Word exploit" href="http://www.bbc.co.uk/news/technology-15554361">the research says the [Duqu] Trojan exploited a previously unknown vulnerability embedded in Word files, allowing Duqu to modify computers&#8217; security protection</a>&#8216;, I just can&#8217;t help but imagine my opening a car, tossing a book on the back seat and then later on, being unable to use the brakes anymore because the publisher had used a wrong type of ink, one that makes the disc brakes vaporise immediately upon the book&#8217;s opening on page 51 when it lands on the seat.</p>
<p>That&#8217;s simply insane.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.gefira.pl%2Fblog%2F2011%2F11%2F02%2Fa-book-wrecks-my-car%2F&amp;title=A%20book%20wrecks%20my%20car" id="wpa2a_10"><img src="http://www.gefira.pl/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.gefira.pl/blog/2011/11/02/a-book-wrecks-my-car/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>advWhy prnI vDon&#8217;t vLike daThe adjHungarian nNotation</title>
		<link>http://www.gefira.pl/blog/2011/10/21/why-i-dont-like-the-hungarian-notation/</link>
		<comments>http://www.gefira.pl/blog/2011/10/21/why-i-dont-like-the-hungarian-notation/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 12:59:08 +0000</pubDate>
		<dc:creator>Dariusz Suchojad</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.gefira.pl/blog/?p=1553</guid>
		<description><![CDATA[vNote cThat pThis vIs prpTo vDo prpWith nProgramming adjOnly advNot daThe nCountry pm! sml:-) nTwo naThings vPrompted prnMe prpInto nWriting pThis pm. prnI&#8217;ve adjRecently vSeen iaA adjPromising nJavaScript nLibrary cnjAnd prnI vWas intrjOh advSo advClose prpTo vStart vUsing cnjExcept prnThat cnjWhen prnI vHad iaA vLook prpAt adjIts nAPI adjMy nJaw vFell prpTo daThe nFloor pm- [...]]]></description>
			<content:encoded><![CDATA[<p>vNote cThat pThis vIs prpTo vDo prpWith nProgramming adjOnly advNot daThe nCountry pm! sml:-)</p>
<p>nTwo naThings vPrompted prnMe prpInto nWriting pThis pm.</p>
<p>prnI&#8217;ve adjRecently vSeen iaA adjPromising nJavaScript nLibrary cnjAnd prnI vWas intrjOh advSo advClose prpTo vStart vUsing cnjExcept prnThat cnjWhen prnI vHad iaA vLook prpAt adjIts nAPI adjMy nJaw vFell prpTo daThe nFloor pm- daThe nThing vWas vUsing daThe adjHungarian nNotation, vIncluding vPrefixing naFunctions prpWith iaAn nFn pm- advSo prnI vConsulted iaA nCalendar cnjAnd advYes pm, prnIt vWas advStill daThe nNear n2011 pm.  </p>
<p>prnI vAm vWriting prnThis nPost advSo prnThat adjPotential adjHungarian nNotation naUsers vCan vUnderstand advHow adjSuch iaAn nAPI vLooks prpLike prpIn daThe nEye prpOf daThe nBeholder pm, prnI vAm advPerfectly adjSure penThey advJust vDo advNot vRealise adjWhat nSort prpOf nCommotion prnThey vCause pm. prnThere vIs adjNo nBeauty prpIn prnIt pm, vDon&#8217;t prnYou vAgree pm? intrjSo vPlease pm, vCan pwnWe vStop prnIt advNow pm? </p>
<p>prnI vRemember vSeeing adjSuch naThings prpLike n15 naYears advAgo cnjAnd advReally pm, adThe nWorld vHas advSince vChanged pm, prnWe vDon&#8217;t advLonger vUse nVi cnjOr nEd pm- intrjWell, advNot prpTo daThe advSame nExtent prpAt advLeast pm- prnWe vHave nAuto-completion pm, nSyntax vHighlighting pm, nCode vRefactoring pm, nUnit vTesting pm, adjContinuous nIntegration cnjAnd nWhatnot pm. </p>
<p>vLet&#8217;s vLeave daThe adjMundane nJob prpOf nType nInference prpTo naCompilers cnjAnd prpUnless daThe adjParticular nLanguage vDoesn&#8217;t  vEnforce daThe nUsage prpOf prnThese naPrefixes pm, intrjWell pm, vLet&#8217;s advNot vDo prnIt advThen pm, advAright pm? naThanks pm!</p>
<p>prnAnother nThing vWas iaAn nSQLite nDatabase prnI vHad iaA nMisfortune prpOf vHaving vHad iaA vLook prpAt prnWhich vHad adjEach nTable conjAnd nColumn vPrefixed prpWith nTbl cnjAnd nCol advRespectively pm. prnI vMean pm, prnI&#8217;ve vSeen prpAt advLeast naDozens prpOf naDatabases pm, prpFrom nFirebird prpOn nWindows prpTo nDB2 prpOn nMainframe cnjAnd prnI&#8217;m advYet prpTo vConfuse iaA nTable prpWith iaA nColumn pm- prnIt vIs advOK prpTo vUse nUq or nIdx prpIn daThe naNames cnjBut prpBy nApollo&#8217;s adjHoly naTrousers, vLet&#8217;s advNot vDo daThe prnSame prpWith naTables cnjAnd naAolumns prnThemselves pm!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.gefira.pl%2Fblog%2F2011%2F10%2F21%2Fwhy-i-dont-like-the-hungarian-notation%2F&amp;title=advWhy%20prnI%20vDon%E2%80%99t%20vLike%20daThe%20adjHungarian%20nNotation" id="wpa2a_12"><img src="http://www.gefira.pl/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.gefira.pl/blog/2011/10/21/why-i-dont-like-the-hungarian-notation/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Read about securing web services with Python using UserNameTokens</title>
		<link>http://www.gefira.pl/blog/2011/10/20/read-about-securing-web-services-with-python-using-usernametokens/</link>
		<comments>http://www.gefira.pl/blog/2011/10/20/read-about-securing-web-services-with-python-using-usernametokens/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 13:40:51 +0000</pubDate>
		<dc:creator>Dariusz Suchojad</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Planet Python]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[sec-wall]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.gefira.pl/blog/?p=1547</guid>
		<description><![CDATA[András Veres-Szentkirályi has started a series on securing web services with Python; the first part deals with UserNameTokens and mentions sec-wall, the security proxy, yay!]]></description>
			<content:encoded><![CDATA[<p><a title="VSzA techblog" href="http://techblog.vsza.hu/">András Veres-Szentkirályi</a> has started a series on securing web services with Python; <a title="VSzA techblog - Secure web services with Python part 1 - UserNameToken" href="http://techblog.vsza.hu/posts/Secure_web_services_with_Python_part_1_-_UserNameToken.html">the first part</a> deals with UserNameTokens and mentions <a title="sec-wall project's home page" href="http://sec-wall.gefira.pl/">sec-wall</a>, the security proxy, yay! <img src='http://www.gefira.pl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.gefira.pl%2Fblog%2F2011%2F10%2F20%2Fread-about-securing-web-services-with-python-using-usernametokens%2F&amp;title=Read%20about%20securing%20web%20services%20with%20Python%20using%20UserNameTokens" id="wpa2a_14"><img src="http://www.gefira.pl/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.gefira.pl/blog/2011/10/20/read-about-securing-web-services-with-python-using-usernametokens/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sort of tired of long constant names &#8211; Bunch to the rescue!</title>
		<link>http://www.gefira.pl/blog/2011/10/14/sort-of-tired-of-long-constant-names-bunch-to-the-rescue/</link>
		<comments>http://www.gefira.pl/blog/2011/10/14/sort-of-tired-of-long-constant-names-bunch-to-the-rescue/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 16:05:13 +0000</pubDate>
		<dc:creator>Dariusz Suchojad</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Planet Python]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.gefira.pl/blog/?p=1509</guid>
		<description><![CDATA[I&#8217;ve gotten a little bit tired of long constant names, like imagine there&#8217;s constants.py module which has the following: &#160; MESSAGE_CREATE_FOO = '1000' MESSAGE_DELETE_FOO = '1001' &#160; # And so on.. Now the trouble is with importing it all. I can do either: from constants import * Which may be considered a bad style on [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve gotten a little bit tired of long constant names, like imagine there&#8217;s constants.py module which has the following:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">&nbsp;
MESSAGE_CREATE_FOO = <span style="color: #483d8b;">'1000'</span>
MESSAGE_DELETE_FOO = <span style="color: #483d8b;">'1001'</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># And so on..</span></pre></div></div>

<p>Now the trouble is with importing it all. I can do either:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> constants <span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #66cc66;">*</span></pre></div></div>

<p>Which may be considered a bad style on one hand and on the other hand it becomes a mess if your IDE, like <a title="Wing IDE homepage" href="http://www.wingware.com/">Wing IDE</a>, autocompletes the names for you, so you type ME and then have to scroll through several dozens of them. Not to mention that it&#8217;s hardly ever the case that all of the constants are needed in any single module.</p>
<p>I can also carefully pick the names I need, like so:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> constants <span style="color: #ff7700;font-weight:bold;">import</span> MESSAGE_CREATE_FOO, MESSAGE_DELETE_FOO <span style="color: #808080; font-style: italic;"># And so on..</span></pre></div></div>

<p>But that&#8217;s yet another place that needs to be kept in sync with the rest of the code.</p>
<p>So I&#8217;ve finally settled on using the <a title="Bunch class on PyPI" href="http://pypi.python.org/pypi/bunch">Bunch</a> class, which basically is a regular dictionary with an extra attribute-style access, meaning I can now write it all like so:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> bunch <span style="color: #ff7700;font-weight:bold;">import</span> Bunch
&nbsp;
MESSAGE = Bunch<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
MESSAGE.<span style="color: black;">CREATE_FOO</span> = <span style="color: #483d8b;">'1000'</span>
MESSAGE.<span style="color: black;">DELETE_FOO</span> = <span style="color: #483d8b;">'1001'</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># And so on..</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;"># Yay, we're importing one thing only, the only one needed</span>
<span style="color: #808080; font-style: italic;"># in this module, and if the code below ever starts deleting</span>
<span style="color: #808080; font-style: italic;"># FOO, we won't have to update the import statement!</span>
<span style="color: #ff7700;font-weight:bold;">from</span> constants <span style="color: #ff7700;font-weight:bold;">import</span> MESSAGE
&nbsp;
<span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span>MESSAGE.<span style="color: black;">CREATE_FOO</span><span style="color: black;">&#41;</span></pre></div></div>

<p>Isn&#8217;t that nicer? <img src='http://www.gefira.pl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.gefira.pl%2Fblog%2F2011%2F10%2F14%2Fsort-of-tired-of-long-constant-names-bunch-to-the-rescue%2F&amp;title=Sort%20of%20tired%20of%20long%20constant%20names%20%E2%80%93%20Bunch%20to%20the%20rescue%21" id="wpa2a_16"><img src="http://www.gefira.pl/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.gefira.pl/blog/2011/10/14/sort-of-tired-of-long-constant-names-bunch-to-the-rescue/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>ON DELETE CASCADE and LEFT JOIN in SQLAlchemy</title>
		<link>http://www.gefira.pl/blog/2011/10/10/on-delete-cascade-and-left-join-in-sqlalchemy/</link>
		<comments>http://www.gefira.pl/blog/2011/10/10/on-delete-cascade-and-left-join-in-sqlalchemy/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 21:16:34 +0000</pubDate>
		<dc:creator>Dariusz Suchojad</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Planet Python]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQLAlchemy]]></category>

		<guid isPermaLink="false">http://www.gefira.pl/blog/?p=1490</guid>
		<description><![CDATA[Here&#8217;s another one in the hoping-it-saves-someone-at-least-half-an-hour-worth-of-searching-around category which shows nothing but how to define an ON DELETE CASCADE constraint and then how to issue a LEFT JOIN in SQLAlchemy. # -*- coding: utf-8 -*- &#160; # SQLAlchemy from sqlalchemy import create_engine from sqlalchemy import Column, Integer, String, ForeignKey from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s another one in the hoping-it-saves-someone-at-least-half-an-hour-worth-of-searching-around category <img src='http://www.gefira.pl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  which shows nothing but how to define an ON DELETE CASCADE constraint and then how to issue a LEFT JOIN in SQLAlchemy.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;"># -*- coding: utf-8 -*-</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># SQLAlchemy</span>
<span style="color: #ff7700;font-weight:bold;">from</span> sqlalchemy <span style="color: #ff7700;font-weight:bold;">import</span> create_engine
<span style="color: #ff7700;font-weight:bold;">from</span> sqlalchemy <span style="color: #ff7700;font-weight:bold;">import</span> Column, Integer, String, ForeignKey
<span style="color: #ff7700;font-weight:bold;">from</span> sqlalchemy.<span style="color: black;">ext</span>.<span style="color: black;">declarative</span> <span style="color: #ff7700;font-weight:bold;">import</span> declarative_base
<span style="color: #ff7700;font-weight:bold;">from</span> sqlalchemy.<span style="color: black;">orm</span> <span style="color: #ff7700;font-weight:bold;">import</span> backref, relationship, sessionmaker
&nbsp;
Base = declarative_base<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># The definitions, note the use of both 'ondelete' and 'cascade'.</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> Mom<span style="color: black;">&#40;</span>Base<span style="color: black;">&#41;</span>:
    __tablename__ = <span style="color: #483d8b;">'mom'</span>
&nbsp;
    <span style="color: #008000;">id</span> = Column<span style="color: black;">&#40;</span>Integer, primary_key=<span style="color: #008000;">True</span><span style="color: black;">&#41;</span>
    name = Column<span style="color: black;">&#40;</span>String<span style="color: black;">&#40;</span><span style="color: #ff4500;">60</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> Daughter<span style="color: black;">&#40;</span>Base<span style="color: black;">&#41;</span>:
    __tablename__ = <span style="color: #483d8b;">'daughter'</span>
&nbsp;
    <span style="color: #008000;">id</span> = Column<span style="color: black;">&#40;</span>Integer, primary_key=<span style="color: #008000;">True</span><span style="color: black;">&#41;</span>
    name = Column<span style="color: black;">&#40;</span>String<span style="color: black;">&#40;</span><span style="color: #ff4500;">60</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
    mom_id = Column<span style="color: black;">&#40;</span>Integer, ForeignKey<span style="color: black;">&#40;</span><span style="color: #483d8b;">'mom.id'</span>, ondelete=<span style="color: #483d8b;">'CASCADE'</span><span style="color: black;">&#41;</span>, 
                nullable=<span style="color: #008000;">False</span><span style="color: black;">&#41;</span>
    mom = relationship<span style="color: black;">&#40;</span>Mom, 
        backref=backref<span style="color: black;">&#40;</span><span style="color: #483d8b;">'daughters'</span>, cascade=<span style="color: #483d8b;">'all, delete, delete-orphan'</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> Son<span style="color: black;">&#40;</span>Base<span style="color: black;">&#41;</span>:
    __tablename__ = <span style="color: #483d8b;">'son'</span>
&nbsp;
    <span style="color: #008000;">id</span> = Column<span style="color: black;">&#40;</span>Integer, primary_key=<span style="color: #008000;">True</span><span style="color: black;">&#41;</span>    
    name = Column<span style="color: black;">&#40;</span>String<span style="color: black;">&#40;</span><span style="color: #ff4500;">60</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
    mom_id = Column<span style="color: black;">&#40;</span>Integer, ForeignKey<span style="color: black;">&#40;</span><span style="color: #483d8b;">'mom.id'</span>, ondelete=<span style="color: #483d8b;">'CASCADE'</span><span style="color: black;">&#41;</span>, 
                nullable=<span style="color: #008000;">False</span><span style="color: black;">&#41;</span>
    mom = relationship<span style="color: black;">&#40;</span>Mom, 
                backref=backref<span style="color: black;">&#40;</span><span style="color: #483d8b;">'sons'</span>, cascade=<span style="color: #483d8b;">'all, delete, delete-orphan'</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #808080; font-style: italic;"># Create an in-memory database.</span>
engine = create_engine<span style="color: black;">&#40;</span><span style="color: #483d8b;">'sqlite:///:memory:'</span>, echo=<span style="color: #008000;">True</span><span style="color: black;">&#41;</span>
Base.<span style="color: black;">metadata</span>.<span style="color: black;">create_all</span><span style="color: black;">&#40;</span>engine<span style="color: black;">&#41;</span>
Session = sessionmaker<span style="color: black;">&#40;</span>bind=engine<span style="color: black;">&#41;</span>
session = Session<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Let's find out how LEFT JOIN works, note the usage of .outerjoin</span>
&nbsp;
mom1 = Mom<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
mom1.<span style="color: black;">name</span> = <span style="color: #483d8b;">'Molly'</span>
&nbsp;
mom2 = Mom<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
mom2.<span style="color: black;">name</span> = <span style="color: #483d8b;">'Sarah'</span>
&nbsp;
mom3 = Mom<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
mom3.<span style="color: black;">name</span> = <span style="color: #483d8b;">'Martha'</span>
&nbsp;
daughter = Daughter<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
daughter.<span style="color: black;">name</span> = <span style="color: #483d8b;">'Matilda'</span>
daughter.<span style="color: black;">mom</span> = mom1
&nbsp;
son1 = Son<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
son1.<span style="color: black;">name</span> = <span style="color: #483d8b;">'Robert'</span>
son1.<span style="color: black;">mom</span> = mom1
&nbsp;
son2 = Son<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
son2.<span style="color: black;">name</span> = <span style="color: #483d8b;">'Tom'</span>
son2.<span style="color: black;">mom</span> = mom2
&nbsp;
session.<span style="color: black;">add_all</span><span style="color: black;">&#40;</span><span style="color: black;">&#91;</span>mom1, mom2, mom3<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
session.<span style="color: black;">commit</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
session.<span style="color: black;">delete</span><span style="color: black;">&#40;</span>mom2<span style="color: black;">&#41;</span>
session.<span style="color: black;">commit</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># All moms and their children.</span>
rows1 = session.<span style="color: black;">query</span><span style="color: black;">&#40;</span>Mom.<span style="color: #008000;">id</span>, Mom.<span style="color: black;">name</span>, 
            Daughter.<span style="color: black;">name</span>.<span style="color: black;">label</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'daughter_name'</span><span style="color: black;">&#41;</span>,
            Son.<span style="color: black;">name</span>.<span style="color: black;">label</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'son_name'</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>.\
              outerjoin<span style="color: black;">&#40;</span>Daughter, Mom.<span style="color: #008000;">id</span>==Daughter.<span style="color: black;">mom_id</span><span style="color: black;">&#41;</span>.\
              outerjoin<span style="color: black;">&#40;</span>Son, Mom.<span style="color: #008000;">id</span>==Son.<span style="color: black;">mom_id</span><span style="color: black;">&#41;</span>.\
              order_by<span style="color: black;">&#40;</span><span style="color: #483d8b;">'mom.name'</span><span style="color: black;">&#41;</span>.\
              <span style="color: #008000;">all</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Sarah doesn't like us anymore so Tom should be gone as well.</span>
rows2 = session.<span style="color: black;">query</span><span style="color: black;">&#40;</span>Son.<span style="color: #008000;">id</span>, Son.<span style="color: black;">name</span><span style="color: black;">&#41;</span>.<span style="color: #008000;">all</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">for</span> row <span style="color: #ff7700;font-weight:bold;">in</span> rows1:
    <span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span>row<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">''</span><span style="color: black;">&#41;</span>    
&nbsp;
<span style="color: #ff7700;font-weight:bold;">for</span> row <span style="color: #ff7700;font-weight:bold;">in</span> rows2:
    <span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span>row<span style="color: black;">&#41;</span></pre></div></div>

<p>As expected, the result is</p>
<pre>
(3, u'Martha', None, None)
(1, u'Molly', u'Matilda', u'Robert')

(1, u'Robert')
</pre>
<p>We can also confirm the SQL code that&#8217;s being generated &#8211; notice the ON DELETE CASCADE clause ..</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> mom <span style="color: #66cc66;">&#40;</span>
	id <span style="color: #993333; font-weight: bold;">INTEGER</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> 
	name <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">60</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> 
	<span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> daughter <span style="color: #66cc66;">&#40;</span>
	id <span style="color: #993333; font-weight: bold;">INTEGER</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> 
	name <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">60</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> 
	mom_id <span style="color: #993333; font-weight: bold;">INTEGER</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> 
	<span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> 
	<span style="color: #993333; font-weight: bold;">FOREIGN</span> <span style="color: #993333; font-weight: bold;">KEY</span><span style="color: #66cc66;">&#40;</span>mom_id<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">REFERENCES</span> mom <span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ON</span> <span style="color: #993333; font-weight: bold;">DELETE</span> CASCADE
<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> son <span style="color: #66cc66;">&#40;</span>
	id <span style="color: #993333; font-weight: bold;">INTEGER</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> 
	name <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">60</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> 
	mom_id <span style="color: #993333; font-weight: bold;">INTEGER</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span> 
	<span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> 
	<span style="color: #993333; font-weight: bold;">FOREIGN</span> <span style="color: #993333; font-weight: bold;">KEY</span><span style="color: #66cc66;">&#40;</span>mom_id<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">REFERENCES</span> mom <span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ON</span> <span style="color: #993333; font-weight: bold;">DELETE</span> CASCADE
<span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>.. and the LEFT JOIN is here indeed.</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> mom<span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">AS</span> mom_id<span style="color: #66cc66;">,</span> mom<span style="color: #66cc66;">.</span>name <span style="color: #993333; font-weight: bold;">AS</span> mom_name<span style="color: #66cc66;">,</span> 
    daughter<span style="color: #66cc66;">.</span>name <span style="color: #993333; font-weight: bold;">AS</span> daughter_name<span style="color: #66cc66;">,</span> son<span style="color: #66cc66;">.</span>name <span style="color: #993333; font-weight: bold;">AS</span> son_name 
<span style="color: #993333; font-weight: bold;">FROM</span> mom 
    <span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">OUTER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> daughter <span style="color: #993333; font-weight: bold;">ON</span> mom<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> daughter<span style="color: #66cc66;">.</span>mom_id 
    <span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">OUTER</span> <span style="color: #993333; font-weight: bold;">JOIN</span> son <span style="color: #993333; font-weight: bold;">ON</span> mom<span style="color: #66cc66;">.</span>id <span style="color: #66cc66;">=</span> son<span style="color: #66cc66;">.</span>mom_id
<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> mom<span style="color: #66cc66;">.</span>name</pre></div></div>

<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.gefira.pl%2Fblog%2F2011%2F10%2F10%2Fon-delete-cascade-and-left-join-in-sqlalchemy%2F&amp;title=ON%20DELETE%20CASCADE%20and%20LEFT%20JOIN%20in%20SQLAlchemy" id="wpa2a_18"><img src="http://www.gefira.pl/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.gefira.pl/blog/2011/10/10/on-delete-cascade-and-left-join-in-sqlalchemy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If version control systems were vehicles&#8230;</title>
		<link>http://www.gefira.pl/blog/2011/10/02/if-version-control-systems-were-vehicles/</link>
		<comments>http://www.gefira.pl/blog/2011/10/02/if-version-control-systems-were-vehicles/#comments</comments>
		<pubDate>Sun, 02 Oct 2011 10:50:48 +0000</pubDate>
		<dc:creator>Dariusz Suchojad</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Bazaar]]></category>
		<category><![CDATA[BitKeeper]]></category>
		<category><![CDATA[CVS]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[hg]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.gefira.pl/blog/?p=1423</guid>
		<description><![CDATA[Here&#8217;s a short visualisation of how I perceive various revision control systems, given in the order of my being exposed to each of them throughout all those years. BitKeeper Many winters ago, it was the first RCS I used and I remember it was pretty powerful yet somewhat clumsy to steer and handle not to [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a short visualisation of how I perceive various revision control systems, given in the order of my being exposed to each of them throughout all those years.</p>
<h2>BitKeeper</h2>
<p><br/></p>
<p>
Many winters ago, it was the first RCS I used and I remember it was pretty powerful yet somewhat clumsy to steer and handle not to mention the thick armour that wouldn&#8217;t let me peek inside and have a look at its source code. I hear it&#8217;s still being sold to customers around the world who don&#8217;t mind to trade a little bit of the manoeuvrability in exchange for its main gun&#8217;s fire-power.
</p>
<p><a href="http://www.gefira.pl/blog/wp-content/uploads/2011/10/vcs-bk.jpg"><img class="aligncenter size-medium wp-image-1426" title="vcs-bk" src="http://www.gefira.pl/blog/wp-content/uploads/2011/10/vcs-bk-300x185.jpg" alt="" width="300" height="185" /></a></p>
<h2>CVS</h2>
<p><br/></p>
<p>
A funny-looking though not really forgiving system that would bring a lot of projects home. The crucial point was its low price (opensource) yet the lack of features (like no real &#8216;reverse gear&#8217;, one couldn&#8217;t easily delete empty directories) meant I was looking for something else pretty soon.
</p>
<p><a href="http://www.gefira.pl/blog/wp-content/uploads/2011/10/vcs-cvs.jpg"><img class="aligncenter size-medium wp-image-1425" title="vcs-cvs" src="http://www.gefira.pl/blog/wp-content/uploads/2011/10/vcs-cvs-300x257.jpg" alt="" width="300" height="257" /></a></p>
<h2>Subversion (svn)</h2>
<p><br/></p>
<p>
Now, I spent a couple of years working with svn for various corporate clients and it&#8217;s clear that&#8217;s what the prevailing majority of them can easily understand. It&#8217;s a centrally-managed system with no push and pull steps like in those fancy modern <i>distributed</i> ones and usually does its job sufficiently well. The feature most important for all the selfish &#8216;enterprise&#8217; clients is that it has a built-in <i>lock</i> command with the power to break the locks if need be.
</p>
<p><a href="http://www.gefira.pl/blog/wp-content/uploads/2011/10/vcs-svn.jpg"><img class="aligncenter size-medium wp-image-1428" title="vcs-svn" src="http://www.gefira.pl/blog/wp-content/uploads/2011/10/vcs-svn-300x225.jpg" alt="" width="300" height="225" /></a></p>
<h2>Bazaar (bzr)</h2>
<p><br/></p>
<p>
A very versatile modern system whose only issue was the maker&#8217;s marketing department who in the system&#8217;s early days wasn&#8217;t able to stop warning people that features were first and the speed advancements would come later so in the end pretty much everyone still thinks the system&#8217;s slow. Well, it isn&#8217;t. It&#8217;s called being &#8216;fast enough&#8217; my friend. Oh, and the maker&#8217;s move to hire a couple of experienced user interface designers means the system&#8217;s a pure pleasure to use with no surprising commands required for everyday usage.
</p>
<p><a href="http://www.gefira.pl/blog/wp-content/uploads/2011/10/vcs-bzr.jpg"><img class="aligncenter size-medium wp-image-1435" title="vcs-bzr" src="http://www.gefira.pl/blog/wp-content/uploads/2011/10/vcs-bzr-300x215.jpg" alt="" width="300" height="215" /></a></p>
<h2>Mercurial (hg)</h2>
<p><br/></p>
<p>
Another system that&#8217;s good all-around, fast,  fuel efficient and very comfortable to drive. Doesn&#8217;t have as many fans as it deserves to because it&#8217;s not called Volkswagen Golf even though 99% of the features are precisely the same.
</p>
<p><a href="http://www.gefira.pl/blog/wp-content/uploads/2011/10/vcs-hg.jpg"><img class="aligncenter size-full wp-image-1430" title="vcs-hg" src="http://www.gefira.pl/blog/wp-content/uploads/2011/10/vcs-hg.jpg" alt="" width="294" height="171" /></a></p>
<h2>Git</h2>
<p><br/></p>
<p>
So now it&#8217;s git. A prime example of why space rocket engineers shouldn&#8217;t really design end user-facing technologies. It&#8217;s fast and that&#8217;s all one can say. There&#8217;s no hood so all of the gory details are left exposed and you&#8217;re supposed to deal with it (like it&#8217;s natural that one needs to check out two consecutive dashes when there&#8217;s a need to <i>revert</i> something). Just notice the number of times the words &#8216;unusual&#8217;, &#8216;surprising&#8217;, &#8216;unexpected&#8217; get mentioned in books on git. Really, the only thing that makes git usable is GitHub, which indeed is a very good service, like git done correctly only in the browser.
</p>
<p><a href="http://www.gefira.pl/blog/wp-content/uploads/2011/10/vcs-git.jpg"><img class="aligncenter size-medium wp-image-1427" title="vcs-git" src="http://www.gefira.pl/blog/wp-content/uploads/2011/10/vcs-git-300x188.jpg" alt="" width="300" height="188" /></a></p>
<h2></h2>
<p>
I guess you can easily tell where my heart is, eh? <img src='http://www.gefira.pl/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.gefira.pl%2Fblog%2F2011%2F10%2F02%2Fif-version-control-systems-were-vehicles%2F&amp;title=If%20version%20control%20systems%20were%20vehicles%E2%80%A6" id="wpa2a_20"><img src="http://www.gefira.pl/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.gefira.pl/blog/2011/10/02/if-version-control-systems-were-vehicles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

