<?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>Dev @ Work &#187; Python</title>
	<atom:link href="http://www.devatwork.nl/category/software-development/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devatwork.nl</link>
	<description>A day in the life of a developer</description>
	<lastBuildDate>Tue, 18 Oct 2011 16:32:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Python, without using Python</title>
		<link>http://www.devatwork.nl/2008/08/python-without-using-python/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=python-without-using-python</link>
		<comments>http://www.devatwork.nl/2008/08/python-without-using-python/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 19:19:01 +0000</pubDate>
		<dc:creator>Trilobyte</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Software Architecture]]></category>
		<category><![CDATA[architecture]]></category>

		<guid isPermaLink="false">http://www.devatwork.nl/?p=178</guid>
		<description><![CDATA[Today I faced a problem at work: I had to come up with a flexible, extendable architecture for a XML-RPC client service application. Both the client and server code had to be integrated into existing applications which makes the impact of introducing new message handlers painful if not designed properly. While thinking about those requirements [...]]]></description>
			<content:encoded><![CDATA[<p>Today I faced a problem at work: I had to come up with a flexible, extendable architecture for a XML-RPC client service application. Both the client and server code had to be integrated into existing applications which makes the impact of introducing new message handlers painful if not designed properly.</p>
<p>While thinking about those requirements I quickly thought of a concept I saw in Python: Try to call find a callable method, otherwise do the default action. In Python you can use &#8216;getattr(&#8230;)&#8217; to get a possible method of a class and with &#8216;callable(&#8230;)&#8217; you can check if the method is actually a method.</p>
<p>You get something like this on your dispatcher object:</p>
<pre class="brush: python; title: ; notranslate">def Dispatch(self, methodName, arguments=None)
   method = getattr(self, methodName, None)
   if callable( method ): method( arguments )</pre>
<p>I implemented this extensible architecture in exactly the same way. It was fairly easy to do, painless and it is extensible.</p>
<p>Learning multiple programming languages/concepts pay off!</p>

	Tags: <a href="http://www.devatwork.nl/tag/architecture/" title="architecture" rel="tag">architecture</a>, <a href="http://www.devatwork.nl/tag/python/" title="Python" rel="tag">Python</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.devatwork.nl/2008/08/python-without-using-python/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Learning Python part 2</title>
		<link>http://www.devatwork.nl/2008/08/learning-python-part-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=learning-python-part-2</link>
		<comments>http://www.devatwork.nl/2008/08/learning-python-part-2/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 17:54:16 +0000</pubDate>
		<dc:creator>Trilobyte</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.devatwork.nl/?p=139</guid>
		<description><![CDATA[I just finished the book &#8216;Beginning Python, from Novice to Professional&#8217; written by &#8216;Magnus Lie Hetland&#8217; and it has been a great experience for me. I have played with Python a little and I have discovered a few features I wish C# supported. The most powerful feature of Python, in my opinion, is the &#8216;slice&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished the book &#8216;Beginning Python, from Novice to Professional&#8217; written by &#8216;Magnus Lie Hetland&#8217; and it has been a great experience for me. I have played with Python a little and I have discovered a few features I wish C# supported.</p>
<p>The most powerful feature of Python, in my opinion, is the &#8216;slice&#8217; operation: It allows you to efficiently select a portion of a collection by providing 2 indexes.</p>
<p>For example:</p>
<pre class="brush: python; title: ; notranslate">&gt;&gt;&gt; word = 'Hello, World'
&gt;&gt;&gt; word
'Hello, World'
&gt;&gt;&gt; word[6:]
'World'
&gt;&gt;&gt; word[1:2]
'e'
&gt;&gt;&gt; word[-5:]
'World'</pre>
<p>If I ever had to write an interpreter, I would write it in Python, because of the &#8216;slice&#8217; operation it is a natural thing to do.</p>
<p>Another thing that I like about Python is that it is a dynamic language. You can do some really cool stuff like: &#8216;runtime dynamic method invocation&#8217;. It is supported in C#, however, it is painful and unnatural.</p>
<p>One thing I don&#8217;t like is that you are forced to use &#8216;self&#8217; as an argument on every instance method. I understand the concept but in my opinion it to much of a hassle.</p>
<p>For me personally, learning Python gave me more insight into the problems I encounter daily in C#, because I learned to solve the same problems in different ways, which might be more efficient.</p>
<p>My conclusion is: Every developer should think about learning multiple programming languages, preferably not in the same family (like C based languages), so he/she is able to select the right tool for the job and keep an open mind. That is it for now, I hope I will have some time to write something cool in Python.</p>

	Tags: <a href="http://www.devatwork.nl/tag/python/" title="Python" rel="tag">Python</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.devatwork.nl/2008/08/learning-python-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning Python</title>
		<link>http://www.devatwork.nl/2008/08/learning-python/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=learning-python</link>
		<comments>http://www.devatwork.nl/2008/08/learning-python/#comments</comments>
		<pubDate>Fri, 01 Aug 2008 08:16:38 +0000</pubDate>
		<dc:creator>Trilobyte</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.devatwork.nl/?p=134</guid>
		<description><![CDATA[Yesterday I started reading the book &#8216;Beginning Python, from Novice to Professional&#8217; by &#8216;Magnus Lie Hetland&#8217; and so far it is really interesting. I choose to learn Python because I wanted to learn a new, non C based, programming language. I am really looking forward to write some programs in this powerful language. I will [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devatwork.nl/wp-content/uploads/2008/08/python-logo.gif" rel="lightbox[134]"><img class="size-medium wp-image-135 alignright" style="margin: 3px;float:right;" title="Python" src="http://www.devatwork.nl/wp-content/uploads/2008/08/python-logo.gif" alt="" width="211" height="71" /></a>Yesterday I started reading the book &#8216;Beginning Python, from Novice to Professional&#8217; by &#8216;Magnus Lie Hetland&#8217; and so far it is really interesting. I choose to learn Python because I wanted to learn a new, non C based, programming language.</p>
<p>I am really looking forward to write some programs in this powerful language. I will keep you posted!</p>

	Tags: <a href="http://www.devatwork.nl/tag/python/" title="Python" rel="tag">Python</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.devatwork.nl/2008/08/learning-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

