<?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>Straw Dogs &#187; Category List @ Straw Dogs</title>
	<atom:link href="http://www.straw-dogs.co.uk/category/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.straw-dogs.co.uk</link>
	<description>The Tao of Ruby, Python, and....Straw Dogs?</description>
	<lastBuildDate>Tue, 15 Nov 2011 06:47:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>History of Python &#8211; Guido van Rossum</title>
		<link>http://www.straw-dogs.co.uk/11/13/history-of-python-guido-van-rossum/</link>
		<comments>http://www.straw-dogs.co.uk/11/13/history-of-python-guido-van-rossum/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 06:38:54 +0000</pubDate>
		<dc:creator>KingOfThisHereBlog</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[talk]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.straw-dogs.co.uk/?p=683</guid>
		<description><![CDATA[Here&#8217;s a video of Guido giving a talk on the history and philosophy of Python. Total length: 1hr:50m.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a video of Guido giving a talk on the history and philosophy of Python. Total length: 1hr:50m.</p>
<p><object width="560" height="315"><param name="movie" value="http://www.youtube.com/v/ugqu10JV7dk?version=3&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ugqu10JV7dk?version=3&amp;hl=en_US" type="application/x-shockwave-flash" width="560" height="315" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.straw-dogs.co.uk/11/13/history-of-python-guido-van-rossum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PyQuery &#8211; Bringing jQuery Syntax to Python</title>
		<link>http://www.straw-dogs.co.uk/11/09/pyquery-bringing-jquery-syntax-to-python/</link>
		<comments>http://www.straw-dogs.co.uk/11/09/pyquery-bringing-jquery-syntax-to-python/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 07:58:30 +0000</pubDate>
		<dc:creator>KingOfThisHereBlog</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[library]]></category>

		<guid isPermaLink="false">http://www.straw-dogs.co.uk/?p=677</guid>
		<description><![CDATA[If BeautifulSoup has ever felt unwieldily or you&#8217;ve looked upon Ruby&#8217;s NokoGiri with envy then you may find this funky Python library interesting. PyQuery brings jQuery selector syntax to Python. If you&#8217;re already familiar with jQuery selectors you&#8217;ll be right at home. Even if you don&#8217;t its easy enough to pick up. Here&#8217;s a quick [...]]]></description>
			<content:encoded><![CDATA[<p>If BeautifulSoup has ever felt unwieldily or you&#8217;ve looked upon Ruby&#8217;s <a href="http://nokogiri.org/">NokoGiri</a> with envy then you may find this funky Python library interesting.</p>
<p><b>PyQuery</b> brings <a href="http://jquery.com/">jQuery</a> selector syntax to Python. If you&#8217;re already familiar with jQuery selectors you&#8217;ll be right at home. Even if you don&#8217;t its easy enough to pick up.</p>
<p>Here&#8217;s a quick example:</p>
<pre name="code" class="python">
from pyquery import PyQuery as pq

d = pq(url="http://www.straw-dogs.co.uk")
# d is now like the jQuery $

for post in d('div.post'):
	p = pq(post)
	print p('h2').text()
</pre>
<p><a href="http://packages.python.org/pyquery/" title="PyQuery">Get it here</a>.</p>
<p>PyQuery is also available to install via &#8220;pip&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.straw-dogs.co.uk/11/09/pyquery-bringing-jquery-syntax-to-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finally &#8211; A Python HTTP Lib that&#8217;s as nice as&#8230;</title>
		<link>http://www.straw-dogs.co.uk/11/05/finally-a-python-http-lib-thats-as-nice-as/</link>
		<comments>http://www.straw-dogs.co.uk/11/05/finally-a-python-http-lib-thats-as-nice-as/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 06:43:45 +0000</pubDate>
		<dc:creator>KingOfThisHereBlog</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[urllib2]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.straw-dogs.co.uk/?p=680</guid>
		<description><![CDATA[…Ruby. One thing I envy in Ruby is the simplicity of so many of their libraries &#8211; both core and 3rd party. Python&#8217;s urllib2 never really felt natural but here is a solution. Requests: &#8220;HTTP for humans&#8221;. An example will do it justice: r = requests.get('http://www.straw-dogs.co.uk') r.content Wow &#8211; clean, simple and quick. Add to [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.straw-dogs.co.uk/wp-content/uploads/2011/10/requests-turtle.png" alt="Requests turtle" border="0" width="224" height="200" style="float:right;" />
<p>…Ruby. One thing I envy in Ruby is the simplicity of so many of their libraries &#8211; both core and 3rd party. Python&#8217;s urllib2 never really felt natural but here is a solution. <a href="http://docs.python-requests.org/en/latest/index.html">Requests: &#8220;HTTP for humans&#8221;</a>.</p>
<p>An example will do it justice:</p>
<pre name="code" class="python">
r = requests.get('http://www.straw-dogs.co.uk')
r.content
</pre>
<p>Wow &#8211; clean, simple and quick.</p>
<p>Add to that the awesome logo and you have a winner.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.straw-dogs.co.uk/11/05/finally-a-python-http-lib-thats-as-nice-as/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Halloween Python</title>
		<link>http://www.straw-dogs.co.uk/10/31/halloween-python/</link>
		<comments>http://www.straw-dogs.co.uk/10/31/halloween-python/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 08:42:11 +0000</pubDate>
		<dc:creator>KingOfThisHereBlog</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[halloween]]></category>

		<guid isPermaLink="false">http://www.straw-dogs.co.uk/?p=685</guid>
		<description><![CDATA[Seems fitting for today. Credit to rkem&#8217;s wife via Reddit.]]></description>
			<content:encoded><![CDATA[<p>Seems fitting for today. Credit to <a href="http://www.reddit.com/user/rkern">rkem&#8217;s</a> wife via <a href="http://www.reddit.com">Reddit</a>.</p>
<p><img src="http://i.imgur.com/umdTL.jpg" style="width:440px;" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.straw-dogs.co.uk/10/31/halloween-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Macs Make Terrible Development Platforms</title>
		<link>http://www.straw-dogs.co.uk/09/17/macs-make-terrible-development-platforms/</link>
		<comments>http://www.straw-dogs.co.uk/09/17/macs-make-terrible-development-platforms/#comments</comments>
		<pubDate>Sat, 17 Sep 2011 14:34:23 +0000</pubDate>
		<dc:creator>KingOfThisHereBlog</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://www.straw-dogs.co.uk/?p=642</guid>
		<description><![CDATA[Mac&#8217;s are not a panacea for programming/web development. There! I said it. I feel like an alcoholic finally admitting he has a problem. So desperate to cling to the ideal that Macs make the perfect development machines but I was kidding myself all along. As a web developer/coder I used Windows and Linux (mainly Debian, [...]]]></description>
			<content:encoded><![CDATA[<p>Mac&#8217;s are not a panacea for programming/web development. There! I said it. I feel like an alcoholic finally admitting he has a problem. So desperate to cling to the ideal that Macs make the perfect development machines but I was kidding myself all along.</p>
<div id="attachment_647" class="wp-caption alignnone" style="width: 330px"><a href="http://www.straw-dogs.co.uk/wp-content/uploads/2011/09/everyone-has-mac-loser-has-acer.jpg"><img src="http://www.straw-dogs.co.uk/wp-content/uploads/2011/09/everyone-has-mac-loser-has-acer-300x199.jpg" alt="Everyone Has a Mac" title="Everyone Has a Mac" width="320" height="210" class="size-medium wp-image-647" /></a><p class="wp-caption-text">Everyone Has a Mac</p></div>
<p>As a web developer/coder I used Windows and Linux (mainly Debian, Arch &#038; Mint) for everything. I switched to a Macbook Pro in 2008 (the first unibody model) while at home.</p>
<p>When I first got it, I loved it. It was the best thing since getting my first computer as a kid. It made web development easier and all the major scripting languages I used were installed by default.</p>
<p>But now &#8211; 3 years later I&#8217;m having doubts and here&#8217;s why:</p>
<h3>Cross platform GUI development is bad</h3>
<p>If you want to create something in Objective C you&#8217;re fine and there&#8217;s bindings for all the major languages. However, if you want to create, say, a GTK app or QT app then you&#8217;re screwed. Especially if you want to do them in Ruby or Python. Want to use Python&#8217;s wxWidgets? ok &#8211; as long as you use 32bit mode. But this will cause problems when you package it for distribution. GTK &#8211; you&#8217;ll need the buggy, messy X11 server running on the host system. A GTK app on Windows and Linux &#8216;just work&#8217; &#8211; to steal a favourite Apple phrase.</p>
<h3>MacPorts is a Mess</h3>
<p>I didn&#8217;t realise at first until I started getting numerous version conflicts between packages. MacPorts tries to make sure dependencies are kept in check but whenever I ran an update I hit numerous snags about active ports which required me to manually activate and deactivate things. There&#8217;s actually an FAQ entry about this but only for Perl. However, it doesn&#8217;t just affect Perl. I&#8217;ve had it happen with Python, Ruby, Lua, Perl and numerous others I&#8217;ve probably forgotten.</p>
<p>Lesson learnt &#8211; don&#8217;t fall into the trap of using MacPorts. You WILL regret it. It will take a while for you to notice the problems but they&#8217;ll come, especially if you want to do anything different and during upgrades.</p>
<h3>The MacPorts alternatives aren&#8217;t much better</h3>
<p>Although removing Macports solved a lot of problems there were still issues installing some libraries for Python and Ruby. The library would often recommend Macports because that was the easiest way to install it. Otherwise they&#8217;d provide difficult custom setup instructions that would invariably break numerous other things on your system. The whole phrase &#8211; &#8220;it just works&#8221; rapidly starts to lose its credibility after 2 hours trying to setup a Python library.</p>
<h3>Too many versions and conflicts</h3>
<p>There&#8217;s been so many times I&#8217;ve had the existing base installed software conflict with a MacPorts package or a binary install. I couldn&#8217;t understand why my dev web server wasn&#8217;t working. I was editing config files but nothing happened. After an hour of digging I discovered MacPorts had installed Apache as a dependency of some obscure library and I had that running instead of my usual web server &#8211; which died when it couldn&#8217;t use port 80. I&#8217;ve had the same issues with MySQL. I had the binary installed but it conflicted with a MacPorts install. I&#8217;ve got about 4 versions of Python and although virtualenv can make life easier its still a pain if you want to package anything. At one point I ran &#8220;python&#8221; on the terminal and it was version 2.5.5. Odd &#8211; I thought &#8211; Lion is meant to be 2.7. That explained that when I ran &#8220;easy_install xxx&#8221; I couldn&#8217;t access it on the Python shell. Because easy_install was installing to version 2.7 of &#8220;site-packages&#8221;. Not 2.5. Turns out &#8220;python&#8221; was pointing to the wrong version. Mac NEEDS the other Python versions for various internal things so you can&#8217;t get rid of them.</p>
<p>Of course I&#8217;m sure some will comment that I&#8217;m an idiot. I should have been more careful, more thoughtful, etc. However, what happened to: &#8220;it just works&#8221;? The fact is I was able to develop on a Linux box for years without having to obsessively keep track of versions and installs.</p>
<h3>Its too similar to Linux/Unix &#8211; Some simple apps just don&#8217;t work</h3>
<p>As an extension to the comments on GUI frameworks I mentioned I wanted to check out <a href="http://deluge-torrent.org/">Deluge</a> (a torrent client). Its built in Python so surely it&#8217;ll run? Oh yes &#8211; if you jump through numerous hoops, sacrifice a goat, pray to Beelzebub and eat a few virgins. The gods may allow you to run it fully. I wanted to use Deluge mainly to tinker with plugin development for it. I eventually used a Linux VM instead. The fact is, OSX is similar to Linux/Unix in many ways. Which is why so many Linux apps will run on it with very little change. But thats actually a hinderance. Its close but there&#8217;s just enough differences to make it really awkward to install many things. Unless you use Macports but as I&#8217;ve already pointed out that is a poisoned chalice destined to murder your sanity in the future.</p>
<h3>Fuse/FTPFS</h3>
<p>I&#8217;ve found it very useful to use <a href="http://en.wikipedia.org/wiki/FTPFS">FTPFS</a> which enables me to link a local directory to a remote FTP location. So I can effectively edit remote code like it was local. Yes I&#8217;m well aware using FTP is frowned upon but we don&#8217;t always get a choice.</p>
<p>This was very easy on Leopard. Its <b>extremely</b> easy on Linux. However, on Snow Leopard <a href="http://code.google.com/p/macfuse/">MacFUSE</a> broke. There&#8217;s a <a href="http://fuse4x.org/">few</a> <a href="https://github.com/osxfuse">new</a> libraries trying to fill the gaping hole but none of them support FTPFS (last I checked a month ago).</p>
<p>I still love my Mac but I&#8217;m under no illusions that if I want to do anything remotely off the beaten path its a nightmare. I find myself switching to Linux VM&#8217;s or Linux servers to do coding work now. Because more often than not &#8211; <b>Linux &#8220;just works&#8221;</b>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.straw-dogs.co.uk/09/17/macs-make-terrible-development-platforms/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Python: Beginner to Expert</title>
		<link>http://www.straw-dogs.co.uk/11/17/python-beginner-to-expert/</link>
		<comments>http://www.straw-dogs.co.uk/11/17/python-beginner-to-expert/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 15:07:40 +0000</pubDate>
		<dc:creator>KingOfThisHereBlog</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[haskell]]></category>

		<guid isPermaLink="false">http://www.straw-dogs.co.uk/?p=613</guid>
		<description><![CDATA[This was lifted mainly from a Stack Overflow thread which I discovered from one of my favourite sites: Reddit /r/python. It details a few paths people can take to go form Python beginner to expert. Its one of the most insightful answers/postings I&#8217;ve come across on SO. Here&#8217;s the summary &#8211; link at the end: [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.straw-dogs.co.uk/wp-content/uploads/2010/11/kung-fu-master-300x260.jpg" alt="Python Master" title="Python Master" width="250" class="alignright size-medium wp-image-614" />This was lifted mainly from a Stack Overflow thread which I discovered from one of my favourite sites: <a href="http://www.reddit.com/r/Python">Reddit /r/python</a>.</p>
<p>It details a few paths people can take to go form Python beginner to expert. Its one of the most insightful answers/postings I&#8217;ve come across on SO. Here&#8217;s the summary &#8211; link at the end:</p>
<blockquote>
<li>Discover list comprehensions</li>
<li>Discover generators</li>
<li>Incorporate map, reduce, filter, iter, range, xrange often into your code</li>
<li>Discover Decorators</li>
<li>Write recursive functions, a lot</li>
<li>Discover itertools and functools</li>
<li>Read Real World Haskell</li>
<li>Rewrite all your old Python code with tons of higher order functions, recursion, and whatnot.</li>
<li>Annoy your cubicle mates every time they present you with a Python class. Claim it could be &#8220;better&#8221;</li>
<li>Implemented as a dictionary plus some functions. Embrace functional programming.</li>
<li>Rediscover the Strategy pattern and then all those things from imperative code you tried so hard to forget after Haskell.</li>
<li>Find a balance.</li>
</blockquote>
<p>I really don&#8217;t agree with the Haskell bit &#8211; I hate Haskell more than cancer. Obviously my &#8216;reasoning&#8217; is well thought out and completely unbiased by my bastard of a lecturer at university who had anger management issues and a fundamental lack of people skills. I hate Haskell.</p>
<p>You may also find this post I did previously which lists a number of places you can <a href="http://www.straw-dogs.co.uk/01/26/practice-makes-perfect/">get practice coding small apps</a>.</p>
<p><a href="http://stackoverflow.com/questions/2573135/python-progression-path-from-apprentice-to-guru?resubmitted">Full post at Stack Overflow</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.straw-dogs.co.uk/11/17/python-beginner-to-expert/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python&#8217;s Beards and Ruby&#8217;s &#8216;Cool&#8217; Guys</title>
		<link>http://www.straw-dogs.co.uk/07/30/pythons-beards-and-rubys-cool-guys/</link>
		<comments>http://www.straw-dogs.co.uk/07/30/pythons-beards-and-rubys-cool-guys/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 22:01:10 +0000</pubDate>
		<dc:creator>KingOfThisHereBlog</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[silliness]]></category>

		<guid isPermaLink="false">http://www.straw-dogs.co.uk/?p=516</guid>
		<description><![CDATA[I was having a chat on the MicroSoft Networks fancy comms protocol. Aka: MSN. Along came someone with an opinion. As is customary I shot it down with wild abandon!! The quickie backstory: I suggested Python is better than Ruby. They argued using two example pictures &#8211; see below. Rubyists I Said: The Ruby pic: [...]]]></description>
			<content:encoded><![CDATA[<p>I was having a chat on the MicroSoft Networks fancy comms protocol. Aka: MSN. Along came someone with an opinion. As is customary I shot it down with wild abandon!!</p>
<p>The quickie backstory:</p>
<ul>
<li>I suggested Python is better than Ruby.</li>
<li>They argued using two example pictures &#8211; see below.</li>
</ul>
<h3>Rubyists</h3>
<div style="text-align:center;"><img src="http://www.straw-dogs.co.uk/wp-content/uploads/2009/07/ruby_programmers.jpg" alt="ruby_programmers.jpg" border="0" width="500" height="375" /></div>
<p><br/><br />
<strong>I Said:</strong></p>
<blockquote><p>
The Ruby pic: The guy on the right has his eyebrow raised as if to say: &#8220;I&#8217;m fucking amazing&#8221;. The rest of them are all geeks who are using Ruby as their way to be cool in a world that rejected them at high school age for being geeks. Little do they realise (maybe deep down they do) but the only people who may think they&#8217;re cool is a small fringe group of other Ruby-ists and beginner coders. The other Ruby-ists will be consumed by an undertone of competitiveness. The Python coders will think they&#8217;re rubbish fanboys. The hot girl who rejected them at high school will think they&#8217;re just like any other geek.</p></blockquote>
<h3>Pythonistas</h3>
<div style="text-align:center;"><img src="http://www.straw-dogs.co.uk/wp-content/uploads/2009/07/504x_Picture_2_23-18-44.png" alt="504x_Picture_2_23-18-44.png" border="0" width="504" height="250" /></div>
<p><br/><br />
<strong>I Said:</strong></p>
<blockquote><p>
The good thing about the Python coders is they&#8217;re not bothered. They&#8217;re just not even trying. They&#8217;re so past giving a shit about being cool that they&#8217;ve all grown ugly facial hair.
</p></blockquote>
<p>This piercing psychological insight into the programmers of Python and Ruby is just the tip of the iceberg. For $200 I&#8217;ll furnish you with a graph showing my facts in a nice way that will go well in a professional report.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.straw-dogs.co.uk/07/30/pythons-beards-and-rubys-cool-guys/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Excellent Apache Log Analyser &amp; Monitor</title>
		<link>http://www.straw-dogs.co.uk/07/23/excellent-apache-log-analyser-monitor/</link>
		<comments>http://www.straw-dogs.co.uk/07/23/excellent-apache-log-analyser-monitor/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 19:43:50 +0000</pubDate>
		<dc:creator>KingOfThisHereBlog</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://www.straw-dogs.co.uk/?p=496</guid>
		<description><![CDATA[I&#8217;ve been looking up hill and down dale for a good (Python-based &#8211; fanboy!! Woo!!) log analyser and monitor for Apache. It looks like I&#8217;ve found one &#8211; and awesome it is too! wtop is by far the best I&#8217;ve come across of the options available and I&#8217;m not just saying that because its Python [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.straw-dogs.co.uk/wp-content/uploads/2009/07/python-logo-master-v3-TM.png" alt="python-logo-master-v3-TM.png" border="0" width="200" align="right" />I&#8217;ve been looking up hill and down dale for a good (Python-based &#8211; fanboy!! Woo!!) log analyser and monitor for Apache.</p>
<p>It looks like I&#8217;ve found one &#8211; and awesome it is too!</p>
<p><a href="http://code.google.com/p/wtop/">wtop</a> is by far the best I&#8217;ve come across of the options available and I&#8217;m not just saying that because its Python based. It nicely formats based on a variety of rules you give to it.</p>
<p>I plan on using it to monitor when certain IP&#8217;s access my server then hooking it upto an SMS API to text me when it happens. You can use it for monitoring of dodgy behaviour such as accesses to Paypal folders and such.</p>
<p>Some important points though:</p>
<ol>
<li>Make sure your log format is configured properly. You need to add the %D option which the default &#8220;combined&#8221; format doesn&#8217;t have.</li>
<li>After changing the formats and making sure the wtop config matches your new Apache log format you may need to delete or archive your old &#8216;badly&#8217; formatted logs. As wtop won&#8217;t cope well with the new/old format mix.</li>
<li>Install it &#8211; don&#8217;t think it&#8217;ll work straight off the bat.</li>
<li>Read the instructions.</li>
<li>To make sure you&#8217;ve got it working run a very basic command with it that does no filtering.
<pre name="code" class="bash">logrep -o 'class,max(bytes),avg(msec)' access.log</pre>
</li>
<li>More info on using logrep for monitoring your Apache logs is <a href="http://code.google.com/p/wtop/wiki/UsingLogrep">here</a>.</li>
</ol>
<h3>Some More Examples&#8230;</h3>
<ul>
<li>Show all 404 page errors in log with a count:<br/>
<pre name="code" class="bash">logrep -m grep -o 'status,count(*),url' -f 'status=404' access.log</pre>
</li>
<li>Show visits of a certain IP to the homepage of the site:<br/>
<pre name="code" class="bash">logrep -f 'ip~192.29.29,class=home' -o hour,minute,ip,url access.log</pre>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.straw-dogs.co.uk/07/23/excellent-apache-log-analyser-monitor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASE Makes Android Development Pleasant</title>
		<link>http://www.straw-dogs.co.uk/07/12/ase-makes-android-development-pleasant/</link>
		<comments>http://www.straw-dogs.co.uk/07/12/ase-makes-android-development-pleasant/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 10:08:03 +0000</pubDate>
		<dc:creator>KingOfThisHereBlog</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[lua]]></category>

		<guid isPermaLink="false">http://www.straw-dogs.co.uk/?p=459</guid>
		<description><![CDATA[Having got myself a G1 phone a few weeks back I&#8217;ve been tinkering a lot. Mainly with the Android Scripting Environment that I plan on writing about soon but I thought I&#8217;d give a quick summary of what I&#8217;ve found so far on this platform &#8211; and why I don&#8217;t like it (kind of)! It [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.straw-dogs.co.uk/wp-content/uploads/2009/07/android-logo.jpg" border="0" alt="android-logo.jpg" width="239" height="264" align="right" />Having got myself a G1 phone a few weeks back I&#8217;ve been tinkering a lot. Mainly with the Android Scripting Environment that I plan on writing about soon but I thought I&#8217;d give a quick summary of what I&#8217;ve found so far on this platform &#8211; and why I don&#8217;t like it (kind of)!</p>
<p>It uses Java &#8211; of a sort. More specifically it uses the <a href="http://en.wikipedia.org/wiki/Dalvik_virtual_machine">Dalvik VM</a> which is a register based as opposed to stack based VM and has many of its core classes based on Apache Harmony.</p>
<p><em>(Did I sound like I knew what that meant? Because I didn&#8217;t. I was paraphrasing Wikipedia &#8211; I love Wikipedia&#8217;s ability to make you sound like an expert at anything)</em></p>
<p>That&#8217;s why I hate it &#8211; the Java part. I hate Java. I&#8217;ve not developed in Java since university and have conducted a mental cleansing of all my painful memories of the language. As such I am a desperate &#8216;newbie&#8217; on this platform. Scrabbling round like some lost raccoon on the <a href="http://www.northyorkmoors.org.uk/">North York Moors</a> (there are no raccons in England so it would be VERY lost).</p>
<p><a href="http://code.google.com/p/android-scripting/">ASE comes to rescue the day</a> but first&#8230;.</p>
<h3>Why ASE? Android programs are &#8216;easy&#8221; enough to write.</h3>
<p>This is in the wiki docs of ASE. This question gets asked &#8211; apparently quite <strong>frenquently</strong>.</p>
<p><strong>All I can say is:</strong> <em>&#8220;Holy mother of jesus-bloody-ballsing-christ&#8221;.</em></p>
<p>What I find even more shocking is the answer&#8230;</p>
<blockquote><p>That&#8217;s very true. Android&#8217;s development environment does make life pretty easy.</p></blockquote>
<p>PRETTY EASY?!?!</p>
<p>WHAT?!?!</p>
<p>Are you a masochist??</p>
<p>It took an hour just to get it all up &amp; running. Getting Eclipse working how its meant to with the right plugins, setting up emulator images, downloading tutorials and the multitude of other faffing tasks.</p>
<p>If you&#8217;ve gotten used to scripting languages like Python, Ruby or PHP then programming Java is akin to stabbing your eyeballs repeatedly with a rusty fork. Its rammed full of verbose bullshit, silly configs, insane amounts of setup, strict typing, misery, self abuse, pain, kitten torture, puppy genocide, etc, etc.</p>
<p>For example try taking a look at the Android Dev tutorial. Part 1 will consume 6hrs of your life. After which you will have created a useless &#8216;notepad app&#8217; that doesn&#8217;t allow you to edit or delete notes. Only create a new one with hard coded contents and a name. 6 hours and I could have built Athens Online &#8211; an online city of dreams and Greek pornography. What? Everything online is porn.</p>
<p>Anyway&#8230;</p>
<h3>Java Can Come Later</h3>
<p><img class="alignleft size-full wp-image-464" title="I hate Java" src="http://www.straw-dogs.co.uk/wp-content/uploads/2009/07/no-java.png" alt="I hate Java" width="104" height="104" />The Android Scripting Environment is a breath of fresh air though. This was released in May/June and allows development of quick, funky scripts in Python, Lua or BeanShell (*hiss*, *spit*). Ruby and Javascript are to follow soon.</p>
<p>If you fancy developing the scripts on your PC and running them on the phone you&#8217;ll need a tool available in the Android SDK called <a href="http://developer.android.com/guide/developing/tools/adb.html">ADB</a> (Android Debug Bridge). Though if you&#8217;re <a href="http://code.google.com/p/android-scripting/wiki/UserGuide">following the ASE docs</a> don&#8217;t forget you need to turn on USB Debugging on the phone to enable it.</p>
<h3>What It Can&#8217;t Do &#8211; Yet</h3>
<p>I love ASE and I love the German gent who made it even more &#8211; even though I know only his name. I&#8217;m sure that he&#8217;s a great man for only a great man would create ASE.</p>
<p>Okay &#8211; I&#8217;ll stop now.</p>
<p>ASE can&#8217;t do the following at the moment:</p>
<ul>
<li>Compile in to APK/packages for selling or distributing on Market or elsewhere.</li>
<li>Its restricted to a subset of the Android API made available by an RPC interface.</li>
<li>It can&#8217;t cure cancer.</li>
</ul>
<p>I&#8217;ve got high hopes for ASE and its making my life more fun. If you&#8217;re a Python/Lua/scripting sort then you&#8217;ll love it too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.straw-dogs.co.uk/07/12/ase-makes-android-development-pleasant/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Django Debug Toolbar</title>
		<link>http://www.straw-dogs.co.uk/12/20/django-debug-toolbar/</link>
		<comments>http://www.straw-dogs.co.uk/12/20/django-debug-toolbar/#comments</comments>
		<pubDate>Sat, 20 Dec 2008 12:16:31 +0000</pubDate>
		<dc:creator>KingOfThisHereBlog</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[django]]></category>

		<guid isPermaLink="false">http://www.straw-dogs.co.uk/?p=260</guid>
		<description><![CDATA[This looks very sexy &#8211; almost as sexy as DjangoPony.  Its a debug toolbar that was inspired by the PHP Symphony project.  Hold on now, don&#8217;t run away just cos I mentioned PHP.  This is pure Python goodness and its damn useful too.  It provides a load of debug info such as headers, exec time, [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_261" class="wp-caption alignright" style="width: 310px"><a href="http://www.straw-dogs.co.uk/wp-content/uploads/2008/11/django-debug-toolbar.png"><img class="size-medium wp-image-261" title="Django Debug Toolbar" src="http://www.straw-dogs.co.uk/wp-content/uploads/2008/11/django-debug-toolbar-300x9.png" alt="Django Debug Toolbar" width="300" height="9" /></a><p class="wp-caption-text">Django Debug Toolbar</p></div>
<p>This looks very sexy &#8211; almost as sexy as <a href="http://www.djangopony.com/">DjangoPony</a>.  Its a debug toolbar that was inspired by the PHP Symphony project.  Hold on now, don&#8217;t run away just cos I mentioned PHP.  This is pure Python goodness and its damn useful too.  It provides a load of debug info such as headers, exec time, SQL queries, variables, etc.</p>
<p>Its a MiddleWare app you can install into your Django installation.  Methinks I&#8217;ll give it a go at the weekend and report back.</p>
<p><strong>Get it <a href="http://github.com/robhudson/django-debug-toolbar/tree/master">here</a>.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.straw-dogs.co.uk/12/20/django-debug-toolbar/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

