<?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>Brian Lyttle</title>
	<atom:link href="http://brianlyttle.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://brianlyttle.com</link>
	<description>What happens when the code just stops</description>
	<lastBuildDate>Wed, 16 May 2012 00:38:21 +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>Building Mobile Web Apps with jQM and Cordova on Azure</title>
		<link>http://brianlyttle.com/2012/05/building-mobile-web-apps-with-jqm-and-cordova-on-azure/</link>
		<comments>http://brianlyttle.com/2012/05/building-mobile-web-apps-with-jqm-and-cordova-on-azure/#comments</comments>
		<pubDate>Wed, 16 May 2012 00:38:20 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[cordova]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[phonegap]]></category>

		<guid isPermaLink="false">http://brianlyttle.com/?p=417</guid>
		<description><![CDATA[Thanks for attending my talk if you were able to make it over to Abington. I had to leave after my presentation so I didn&#8217;t get a chance to see any of the other presentations, but the consensus appears to be that it was another great event. The slides are posted below for anyone that [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Thanks for attending my talk if you were able to make it over to Abington. I had to leave after my presentation so I didn&#8217;t get a chance to see any of the other presentations, but the consensus appears to be that it was another great event. The <a href="http://www.slideshare.net/blytt/building-mobile-web-apps-with-jqm-and-cordova-on-azure">slides</a> are posted below for anyone that wants to reference them.</p>
<div style="width:425px" id="__ss_12948019"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/blytt/building-mobile-web-apps-with-jqm-and-cordova-on-azure" title="Building Mobile Web Apps with jQM and Cordova on Azure" target="_blank">Building Mobile Web Apps with jQM and Cordova on Azure</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/12948019" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
<div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/thecroaker/death-by-powerpoint" target="_blank">PowerPoint</a> from <a href="http://www.slideshare.net/blytt" target="_blank">blytt</a> </div>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://brianlyttle.com/2012/05/building-mobile-web-apps-with-jqm-and-cordova-on-azure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RedSnakePhilly 2012</title>
		<link>http://brianlyttle.com/2012/02/redsnakephilly/</link>
		<comments>http://brianlyttle.com/2012/02/redsnakephilly/#comments</comments>
		<pubDate>Sat, 25 Feb 2012 15:27:12 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[philadelphia]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://brianlyttle.com/?p=396</guid>
		<description><![CDATA[I was asked to take a few photos for this event by fellow pythonista Tom Panzarella. I think they turned out OK for the most part &#8211; although the EF 70-200 L IS II saved my arse in the end. It was difficult shooting with the lighting setup at the venue, but I&#8217;ll be back [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I was asked to take <a href="http://www.flickr.com/photos/brianly/sets/72157629426130039/">a few photos</a> for this <a href="http://redsnakephilly.org/about/">event</a> by fellow pythonista <a href="https://twitter.com/#!/tpanzarella">Tom Panzarella</a>. I think they turned out OK for the most part &#8211; although the EF 70-200 L IS II saved my arse in the end. It was difficult shooting with the lighting setup at the venue, but I&#8217;ll be back there to get some more practice.</p>
<div id="slides">
  <img src="http://farm8.staticflickr.com/7070/6773517118_73536b5d98.jpg" alt="Beer Talk" /><br />
  <img src="http://farm8.staticflickr.com/7196/6919637765_5e9ee91319.jpg" alt="Hunter Blanks" /><br />
  <img src="http://farm8.staticflickr.com/7189/6773518210_c0038e5af9.jpg" alt="Redsnake Attendees" /><br />
  <img src="http://farm8.staticflickr.com/7181/6773521364_b10bb6fae4.jpg" alt="Dustin Getz" /><br />
  <img src="http://farm8.staticflickr.com/7053/6773520580_4d298315db.jpg" alt="Kyle Gorman" /><br />
  <img src="http://farm8.staticflickr.com/7062/6919634927_acdd8100da.jpg" alt="John Granieri" /><br />
  <img src="http://farm8.staticflickr.com/7202/6919635183_443c158d19.jpg" alt="Monetate" />
</div>
<p>All of the photos are <a href="http://www.flickr.com/photos/brianly/sets/72157629426130039/">over on Flickr</a> and they were even <a href="http://technicallyphilly.com/2012/02/24/10-presenters-bring-ruby-and-python-knowledge-to-second-annual-redsnake-philly-meetup-video">linked to</a> by Technically Philly!</p>
]]></content:encoded>
			<wfw:commentRss>http://brianlyttle.com/2012/02/redsnakephilly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python interpreter tab completion on OS X</title>
		<link>http://brianlyttle.com/2011/10/python-interpreter-tab-completion-on-os-x/</link>
		<comments>http://brianlyttle.com/2011/10/python-interpreter-tab-completion-on-os-x/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 04:28:47 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://brianlyttle.com/?p=386</guid>
		<description><![CDATA[This is mainly for me own reference, but it is probably something that other people will find useful. If you attempt to use the rlcompleter module on the Mac you&#8217;ll find that tab completion does not work correctly. Apparently this is because Apple ship a neutered version of readline. To get completion working you have [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>This is mainly for me own reference, but it is probably something that other people will find useful. If you attempt to use the <a href="http://docs.python.org/library/rlcompleter.html">rlcompleter</a> module on the Mac you&#8217;ll find that tab completion does not work correctly. Apparently this is because Apple ship a neutered version of readline.</p>
<p>To get completion working you have to use a different argument to readline.parse_and_bind(). The base example uses:</p>
<pre>readline.parse_and_bind("tab: complete")</pre>
<p>Change that line to: </p>
<pre>readline.parse_and_bind ("bind ^I rl_complete")</pre>
]]></content:encoded>
			<wfw:commentRss>http://brianlyttle.com/2011/10/python-interpreter-tab-completion-on-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Old but interesting news</title>
		<link>http://brianlyttle.com/2011/09/old-but-interesting-news/</link>
		<comments>http://brianlyttle.com/2011/09/old-but-interesting-news/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 01:38:30 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[marketing]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[search engine optimization]]></category>
		<category><![CDATA[sem]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://brianlyttle.com/?p=365</guid>
		<description><![CDATA[I&#8217;ve spent a fairly big chunk of my professional career building public websites for a number of clients. One of the things that comes up again and again is search engine optimisation. Surprisingly there is very little coverage of this is in business and marketing journals. Patrick Reid wanted to start raise awareness, and needed [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I&#8217;ve spent a fairly big chunk of my professional career building public websites for a number of clients. One of the things that comes up again and again is search engine optimisation.</p>
<p>Surprisingly there is very little coverage of this is in business and marketing journals. <a href="http://www.isensa.com/about_us/">Patrick Reid</a> wanted to start raise awareness, and needed my technical help in preparing a paper. We finished it up earlier this year and it was published in the <a href="http://www.senatehall.com/strategic-management">Journal of Strategic Management Education</a>.</p>
<blockquote style="font-size:0.9em;">
<p>Corporate Communications in the FTSE 100: Evidence using Search Engines<br />
JSME Vol 7: Issue 1, 2011<br />
Patrick Reid (Greenwich School of Management, UK), Brian Lyttle (LiquidHub, Inc., USA)</p>
<p>Search engines have become an essential tool for information seekers on the world wide web. This makes it critical that company websites are optimised to achieve the highest possible ranking across the major search engines, in particular Google, ensuring maximum exposure and subsequent awareness. This paper identifies key factors in search engine optimisation and then analyses a sample of the largest 10 firms listed on the London Stock Exchange.</p>
<p>The findings reveal a lack of adoption of best practices which will impact on their search rankings. The paper also discusses tradeoffs inherent in search engine optimisation and draws out key implications for managers and academics.</p>
</blockquote>
<p>The full paper is available from the <a href="http://www.senatehall.com/strategic-management?article=409">Senate Hall</a> site.</p>
]]></content:encoded>
			<wfw:commentRss>http://brianlyttle.com/2011/09/old-but-interesting-news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scrapy dependency problems with lxml</title>
		<link>http://brianlyttle.com/2011/09/scrapy-dependency-problems-with-lxml/</link>
		<comments>http://brianlyttle.com/2011/09/scrapy-dependency-problems-with-lxml/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 19:31:17 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[lxml]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[scrapy]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://brianlyttle.com/?p=355</guid>
		<description><![CDATA[Following the recent PhillyPUG meetup I was trying to install scrapy on an old MacBook Pro running OS X 10.6 (Snow Leopard) and ran into a number of problems with the lxml dependency. This is the parser used to extract data from pages that scrapy downloads so you are not going to get very far [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Following the recent <a href="http://www.meetup.com/phillypug/events/31432902/">PhillyPUG</a> meetup I was trying to install <a href="http://scrapy.org/">scrapy</a> on an old MacBook Pro running OS X 10.6 (Snow Leopard) and ran into a  number of problems with the <a href="http://lxml.de/">lxml</a> dependency. This is the parser used to extract data from pages that scrapy downloads so you are not going to get very far without it.</p>
<p>It seems that the compilation problems experienced when installing with <em>pip</em> result from an attempt to build a universal binary. If you have Xcode 4 installed then you lose some of this capability and need to make sure that the correct architecture is specified.</p>
<h3>Architecture Fix</h3>
<p>Setting the architecture is something you can do in your bash profile, executing it under a new bash ensures that the build script picks it up.</p>
<pre>
sudo bash
export ARCHFLAGS='-arch i386 -arch x86_64'
pip install lxml # test it
pip install scrapy --upgrade # fix the failed scrapy install
</pre>
<h3>Original Error</h3>
<pre>
brianly$ sudo pip install lxml --upgrade
Downloading/unpacking lxml
  Downloading lxml-2.3.tar.gz (3.2Mb): 3.2Mb downloaded
  Running setup.py egg_info for package lxml
    Building lxml version 2.3.
    Building without Cython.
    Using build configuration of libxslt 1.1.24
    warning: no previously-included files found matching '*.py'
Installing collected packages: lxml
  Found existing installation: lxml 2.2.2
    Uninstalling lxml:
      Successfully uninstalled lxml
  Running setup.py install for lxml
    Building lxml version 2.3.
    Building without Cython.
    Using build configuration of libxslt 1.1.24
    building 'lxml.etree' extension
    gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -I/usr/include/libxml2 -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.6-universal-2.6/src/lxml/lxml.etree.o -w -flat_namespace
    /usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed
    Installed assemblers are:
    /usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
    /usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
    src/lxml/lxml.etree.c:161594: fatal error: error writing to -: Broken pipe
    compilation terminated.
    lipo: can't open input file: /var/tmp//ccYr9GpX.out (No such file or directory)
    error: command 'gcc-4.2' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/Users/brianly/dev/github/pyconscrape/build/lxml/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-axeEA7-record/install-record.txt:
    Building lxml version 2.3.

Building without Cython.

Using build configuration of libxslt 1.1.24

running install

running build

running build_py

creating build

creating build/lib.macosx-10.6-universal-2.6

creating build/lib.macosx-10.6-universal-2.6/lxml

copying src/lxml/__init__.py -> build/lib.macosx-10.6-universal-2.6/lxml

copying src/lxml/_elementpath.py -> build/lib.macosx-10.6-universal-2.6/lxml

copying src/lxml/builder.py -> build/lib.macosx-10.6-universal-2.6/lxml

copying src/lxml/cssselect.py -> build/lib.macosx-10.6-universal-2.6/lxml

copying src/lxml/doctestcompare.py -> build/lib.macosx-10.6-universal-2.6/lxml

copying src/lxml/ElementInclude.py -> build/lib.macosx-10.6-universal-2.6/lxml

copying src/lxml/pyclasslookup.py -> build/lib.macosx-10.6-universal-2.6/lxml

copying src/lxml/sax.py -> build/lib.macosx-10.6-universal-2.6/lxml

copying src/lxml/usedoctest.py -> build/lib.macosx-10.6-universal-2.6/lxml

creating build/lib.macosx-10.6-universal-2.6/lxml/html

copying src/lxml/html/__init__.py -> build/lib.macosx-10.6-universal-2.6/lxml/html

copying src/lxml/html/_dictmixin.py -> build/lib.macosx-10.6-universal-2.6/lxml/html

copying src/lxml/html/_diffcommand.py -> build/lib.macosx-10.6-universal-2.6/lxml/html

copying src/lxml/html/_html5builder.py -> build/lib.macosx-10.6-universal-2.6/lxml/html

copying src/lxml/html/_setmixin.py -> build/lib.macosx-10.6-universal-2.6/lxml/html

copying src/lxml/html/builder.py -> build/lib.macosx-10.6-universal-2.6/lxml/html

copying src/lxml/html/clean.py -> build/lib.macosx-10.6-universal-2.6/lxml/html

copying src/lxml/html/defs.py -> build/lib.macosx-10.6-universal-2.6/lxml/html

copying src/lxml/html/diff.py -> build/lib.macosx-10.6-universal-2.6/lxml/html

copying src/lxml/html/ElementSoup.py -> build/lib.macosx-10.6-universal-2.6/lxml/html

copying src/lxml/html/formfill.py -> build/lib.macosx-10.6-universal-2.6/lxml/html

copying src/lxml/html/html5parser.py -> build/lib.macosx-10.6-universal-2.6/lxml/html

copying src/lxml/html/soupparser.py -> build/lib.macosx-10.6-universal-2.6/lxml/html

copying src/lxml/html/usedoctest.py -> build/lib.macosx-10.6-universal-2.6/lxml/html

creating build/lib.macosx-10.6-universal-2.6/lxml/isoschematron

copying src/lxml/isoschematron/__init__.py -> build/lib.macosx-10.6-universal-2.6/lxml/isoschematron

creating build/lib.macosx-10.6-universal-2.6/lxml/isoschematron/resources

creating build/lib.macosx-10.6-universal-2.6/lxml/isoschematron/resources/rng

copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.macosx-10.6-universal-2.6/lxml/isoschematron/resources/rng

creating build/lib.macosx-10.6-universal-2.6/lxml/isoschematron/resources/xsl

copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.macosx-10.6-universal-2.6/lxml/isoschematron/resources/xsl

copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.macosx-10.6-universal-2.6/lxml/isoschematron/resources/xsl

creating build/lib.macosx-10.6-universal-2.6/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.macosx-10.6-universal-2.6/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.macosx-10.6-universal-2.6/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.macosx-10.6-universal-2.6/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.macosx-10.6-universal-2.6/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.macosx-10.6-universal-2.6/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.macosx-10.6-universal-2.6/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

running build_ext

building 'lxml.etree' extension

creating build/temp.macosx-10.6-universal-2.6

creating build/temp.macosx-10.6-universal-2.6/src

creating build/temp.macosx-10.6-universal-2.6/src/lxml

gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -I/usr/include/libxml2 -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.6-universal-2.6/src/lxml/lxml.etree.o -w -flat_namespace

/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed

Installed assemblers are:

/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64

/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386

src/lxml/lxml.etree.c:161594: fatal error: error writing to -: Broken pipe

compilation terminated.

lipo: can't open input file: /var/tmp//ccYr9GpX.out (No such file or directory)

error: command 'gcc-4.2' failed with exit status 1

----------------------------------------
  Rolling back uninstall of lxml
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.6/site-packages/pip-1.0.1-py2.6.egg/pip/basecommand.py", line 126, in main
    self.run(options, args)
  File "/Library/Python/2.6/site-packages/pip-1.0.1-py2.6.egg/pip/commands/install.py", line 228, in run
    requirement_set.install(install_options, global_options)
  File "/Library/Python/2.6/site-packages/pip-1.0.1-py2.6.egg/pip/req.py", line 1104, in install
    requirement.rollback_uninstall()
  File "/Library/Python/2.6/site-packages/pip-1.0.1-py2.6.egg/pip/req.py", line 487, in rollback_uninstall
    self.uninstalled.rollback()
  File "/Library/Python/2.6/site-packages/pip-1.0.1-py2.6.egg/pip/req.py", line 1417, in rollback
    pth.rollback()
AttributeError: 'str' object has no attribute 'rollback'

Storing complete log in /Users/brianly/.pip/pip.log
</pre>
]]></content:encoded>
			<wfw:commentRss>http://brianlyttle.com/2011/09/scrapy-dependency-problems-with-lxml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deleting by ID (or primary key) with Fluent NHibernate</title>
		<link>http://brianlyttle.com/2011/04/delet-by-id-fluent-nh/</link>
		<comments>http://brianlyttle.com/2011/04/delet-by-id-fluent-nh/#comments</comments>
		<pubDate>Sat, 30 Apr 2011 15:02:44 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[fluent-nhibernate]]></category>
		<category><![CDATA[nhibernate]]></category>
		<category><![CDATA[orm]]></category>

		<guid isPermaLink="false">http://brianlyttle.com/?p=333</guid>
		<description><![CDATA[I wasn&#8217;t a big fan of so-called Fluent Interfaces but my fondness is growing as I use Fluent NHibernate on an ASP.NET MVC project. When I started on my project I checked out the repository pattern example from Google Code to see how this was being implemented. The supplied repository interface provided the following interface: [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I wasn&#8217;t a big fan of so-called <a href="http://en.wikipedia.org/wiki/Fluent_interface">Fluent Interfaces</a> but my fondness is growing as I use <a href="http://fluentnhibernate.org/">Fluent NHibernate</a> on an ASP.NET MVC project. When I started on my project I checked out the <a href="http://nhibernate-repository-example.googlecode.com/svn/trunk/RepositoryExample/">repository pattern example</a> from Google Code to see how this was being implemented. The supplied repository interface provided the following interface:</p>
<pre>
public interface IRepository<T>
{
    T Get(object id);
    void Save(T value);
    void Update(T value);
    void Delete(T value);
    IList<T> GetAll();
}
</pre>
<p>Looks great apart from the fact that you need to pass an entity to the Delete() method, which would in turn result in iteration over a large number of objects if I had to do a lot of deletes. If I received an integer with an ID from an ASP.NET MVC controller I&#8217;d have to retrieve the object before sending it to the Delete() method. This is not very efficient. </p>
<p>To remedy this problem I added an additional Delete() method to the interface taking an object ID as the only parameter:</p>
<pre>
public void Delete<TEntity>(object id)
{
    using (var session = sessionFactory.OpenSession())
    using (var transaction = session.BeginTransaction())
    {
        var queryString = string.Format("delete {0} where id = :id", typeof(TEntity));
        session.CreateQuery(queryString)
               .SetParameter("id", id)
               .ExecuteUpdate();

        transaction.Commit();
    }
}
</pre>
<p>This is a very simple method that will generate more efficient SQL under the covers for deletion of objects from the database.</p>
]]></content:encoded>
			<wfw:commentRss>http://brianlyttle.com/2011/04/delet-by-id-fluent-nh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom ASP.NET MVC ActionResult classes</title>
		<link>http://brianlyttle.com/2011/04/custom-asp-net-mvc-actionresult/</link>
		<comments>http://brianlyttle.com/2011/04/custom-asp-net-mvc-actionresult/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 02:11:47 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://brianlyttle.com/?p=325</guid>
		<description><![CDATA[ASP.NET MVC provides a way for developers to extend and create custom ActionResults for controllers. Normally you return a view from a controller and the runtime goes off and hunts down the appropriate view based on the name of your action. This make sense for normal web pages but sometimes you need to build something [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>ASP.NET MVC provides a way for developers to extend and create custom <a href="http://msdn.microsoft.com/en-us/library/system.web.mvc.actionresult.aspx">ActionResults</a> for controllers. Normally you return a view from a controller and the runtime goes off and hunts down the appropriate view based on the name of your action. This make sense for normal web pages but sometimes you need to build something in code or you don&#8217;t want to write a view for it. In this case you can extend ActionResult, set a content type, and render the result to the output stream.</p>
<pre>
public OpenLayersActionResult MapData()
{
    var myPoints = new List<MapPoint>();

    var p = new MapPoint
                {
                    Title = "Title for point on the map",
                    Icon = "marker.png",
                    IconSize = "21,25",
                    LatLon = "12.9715987,77.5945627",
                    Description = "This is the long description for a point on the map"
    };

    myPoints.Add(p);

    return new OpenLayersActionResult { Points = myPoints };
}
</pre>
<p>Over on GitHub you can find some <a href="https://github.com/brianly/Killaloo.Web.Mvc">sample ActionResult classes</a> including one that replicates the built-in <a href="http://msdn.microsoft.com/en-us/library/system.web.mvc.jsonresult.aspx">JsonResult</a>. The one that will probably be most useful to someone is the <a href="https://github.com/brianly/Killaloo.Web.Mvc/blob/master/OpenLayersActionResult.cs">OpenLayersActionResult</a> which simplifies generation of layer data. I&#8217;m digging through various projects and building out that library with other helper code from various projects so keep an eye out for more snippets.</p>
]]></content:encoded>
			<wfw:commentRss>http://brianlyttle.com/2011/04/custom-asp-net-mvc-actionresult/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to Google App Engine with Python</title>
		<link>http://brianlyttle.com/2011/04/appengine-with-python-talk/</link>
		<comments>http://brianlyttle.com/2011/04/appengine-with-python-talk/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 00:28:16 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Talks]]></category>
		<category><![CDATA[appengine]]></category>
		<category><![CDATA[codecamp]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[googleappengine]]></category>
		<category><![CDATA[talk]]></category>

		<guid isPermaLink="false">http://brianlyttle.com/?p=315</guid>
		<description><![CDATA[Thanks to everyone who attended my talk. I hope it was useful! If you haven&#8217;t done so already please complete an evaluation form. I&#8217;ve uploaded the presentation to SlideShare and you can download a PDF from my site too. The code sample I used during the presentation is available on BitBucket, and I&#8217;m going to [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Thanks to everyone who attended my talk. I hope it was useful! If you haven&#8217;t done so already please <a href="http://codecamp.phillydotnet.org/2011-1/Lists/Evaluation/Item/newifs.aspx?source=/2011-1/sitepages/thankyou.aspx">complete an evaluation form</a>.</p>
<p>I&#8217;ve uploaded the presentation to <a href="http://www.slideshare.net/blytt/introduction-to-google-app-engine-with-python">SlideShare</a> and you can <a href="GoogleAppEngineIntroPythonCodeCamp2011.pdf">download a PDF</a> from my site too. The <a href="http://hg.killaloo.org/bookmarkz/src">code sample</a> I used during the presentation is available on BitBucket, and I&#8217;m going to be making various improvements to it over the coming weeks.</p>
<div style="width:425px" id="__ss_7581355"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/blytt/introduction-to-google-app-engine-with-python" title="Introduction to Google App Engine with Python">Introduction to Google App Engine with Python</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/7581355" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
<div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/blytt">blytt</a> </div>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://brianlyttle.com/2011/04/appengine-with-python-talk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Python Imaging on Windows 64-bit (AMD64) Python</title>
		<link>http://brianlyttle.com/2011/03/installing-python-imaging-on-64bit-windows/</link>
		<comments>http://brianlyttle.com/2011/03/installing-python-imaging-on-64bit-windows/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 19:31:49 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[imaging]]></category>
		<category><![CDATA[pil]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://brianlyttle.com/?p=309</guid>
		<description><![CDATA[If you want need a 64-bit version of this module for Google App Engine, or another project, you can run into a couple of issues. Sticking to 32-bit versions of Python and PIL avoids these issues so that may be the best direction for newbies. The downloads on the PIL site are for 32-bit versions [...]]]></description>
			<content:encoded><![CDATA[<p></p><p align="left">If you want need a 64-bit version of this module for <a href="http://code.google.com/appengine/">Google App Engine</a>, or another project, you can run into a couple of issues. Sticking to 32-bit versions of Python and PIL avoids these issues so that may be the best direction for newbies. </p>
<p>The <a href="http://www.pythonware.com/products/pil/">downloads on the PIL site</a> are for 32-bit versions of Python which means that you hit runtime issues as soon as the Python script files attempt to load the 32-bit libraries into 64-bit Python. Annoyingly the installer is unaware of the architecture for the Python installation it finds and will leave you with a broken PIL install. Just uninstall it from Control Panel. My first thought was to try an build from the sources but I figured someone has run into this problem.</p>
<p align="left">After some searching I <a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/">found a site</a> which offers pre-built versions of many Python modules for 64-bit architectures including PIL. If you are in any way concerned about performance, or security a better solution might be to build from source or use versions from a company offering supported versions.</p>
<p align="left">I downloaded the version for Python 2.5 and then discovered that it would not install. What is interesting is that the 32-bit installer was able to find my 64-bit Python, but the 64-bit installer was unable to find it. </p>
<p>After some more searching it turns out that the installer takes it’s cue from a key in the registry and the Registry virtualization in Windows x64 was confusing it. To resolve the issue I had to export the “HKLM\SOFTWARE\Wow6432Node\Python\PythonCore\2.5” key, remove the “Wow6432Node\” string using a text editor, and re-import the key so that it was at “HKLM\SOFTWARE\Python\PythonCore\2.5”.</p>
<p>After doing this the 64-bit installer for PIL detected my Python installation and I was up and running. </p>
]]></content:encoded>
			<wfw:commentRss>http://brianlyttle.com/2011/03/installing-python-imaging-on-64bit-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting the most out of PyCon</title>
		<link>http://brianlyttle.com/2011/03/getting-the-most-out-of-pycon/</link>
		<comments>http://brianlyttle.com/2011/03/getting-the-most-out-of-pycon/#comments</comments>
		<pubDate>Tue, 08 Mar 2011 04:33:26 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[conferences]]></category>
		<category><![CDATA[pycon]]></category>
		<category><![CDATA[pycon2010]]></category>

		<guid isPermaLink="false">http://brianlyttle.com/?p=296</guid>
		<description><![CDATA[Van Lindberg recently tweeted a link to some tips on how to attend a conference. The advice in that article is pretty sound for a business person looking to build up their network to find sales opportunities, but it doesn&#8217;t cover any PyCon-specifics. After a little thinking I&#8217;ve come up with my own list of [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Van Lindberg recently tweeted <ahref="http://twitter.com/VanL/status/41217905408344064">a link</a> to some tips on <a href="http://swombat.com/2011/2/25/kevin-mcdonagh-how-to-attend-a-conference">how to attend a conference</a>. The advice in that article is pretty sound for a business person looking to build up their network to find sales opportunities, but it doesn&#8217;t cover any PyCon-specifics.</p>
<p>After a little thinking I&#8217;ve come up with my own list of tips for new PyCon attendees:</p>
<h3>Attend some open space sessions</h3>
<p><a href="http://www.flickr.com/photos/brianly/3395569416/in/set-72157615936113009/"><img src="/images/cassandra.jpg" alt="" class="portrait_r" /></a><a href="http://us.pycon.org/2010/openspace/">Open spaces</a> are now    happening at a lot of conferences but the PyCon ones    have been the best I&#8217;ve seen. These are ad hoc discussions on a common topic    with participants joining and leaving whenever they want. These sessions are a    lot of fun and you&#8217;ll make a lot of friends in the process. Even if you aren&#8217;t    the most talkative person, or know little about a subject, you are free to just    hang out and listen.</p>
<p>Whilst there is a page on the PyCon website for    these sessions, it is normally best to check the boards outside the rooms    assigned to open space use. You should also monitor the <ahref="https://convore.com/pycon-2011/">Convore backchannel</a> and <a href="http://twitter.com/#search?q=%23pycon">#pycon</a> on Twitter.</p>
<p>If you don&#8217;t see any open space sessions related to your favourite topic just post a session in one of the available time slots. In almost all    cases some likeminded individuals will turn up.</p>
<p><a href="http://www.flickr.com/photos/brianly/3395568732/in/set-72157615936113009/"><img src="/images/openspace-board-closeup.jpg" alt="" class="portrait" /></a>Scheduled talks are normally recorded for viewing later so I&#8217;d recommend    that you try to decide ahead of time which talks are must see, and which ones    could be skipped. That way you can make the most of the open space sessions as    some of these will overlap with scheduled talks, especially on Saturday and    Sunday.</p>
<h3>Help the PyCon staff</h3>
<p>Putting on a conference PyCon is an enormous    effort. They are often looking for runners and other helpers. Spending a little    time helping out introduces you to many interesting people and you&#8217;ll probably    learn a bit too about how conferences run.</p>
<p>Follow <a href="http://twitter.com/pyconvolunteers">@pyconvolunteers</a>,    talk to the organisers, and lurk on the <ahref="http://mail.python.org/mailman/listinfo/pycon-organizers">pycon-organizer</a> mailing list.</p>
<h3>Check out the    lightning talks</h3>
<p>These are very short talks on a variety of Python-related subjects scheduled    at the beginning and end of conference days. If you have something to say to    the community they are a good way to let people know about your project or    passion. For everyone else they are a good way to find out about lesser known    projects, and they are often quite humorous.</p>
<h3>Go off track</h3>
<p>PyCon like many other conferences has tracks with    related content and there are <ahref="http://us.pycon.org/2011/blog/2011/02/28/10-python-conferences-happening-pycon-2011-part-1/">10    virtual tracks </a>for 2011. These are really helpful for finding things that    you are likely to be interested in, but sometimes it is good to check out    something a little bit different. </p>
<p>In particular, veteran PyCon speakers like Alex Martelli, David Beazley, and Raymond Hettinger fill rooms    each year and are always worth watching.</p>
<h3>Chat with    presenters</h3>
<p><a href="http://www.flickr.com/photos/brianly/3395569320/in/set-72157615936113009/"><img class="portrait_r" src="/images/michael-foord.jpg" alt=""/></a>On the topic of presenters there are a lot of opportunities to talk to    presenters at PyCon, either right after a talk, or    later at the conference. If you have questions on their area of expertise or    feedback on their talk it is worth taking some time to talk to them.</p>
<h3>Spend time on    things that are valuable to you</h3>
<p>Sometimes you&#8217;ll end up in a talk or open space session that isn&#8217;t exactly    what you expected. It is best if you go to something more to your taste than    waste your time on a talk that is too basic or not as described. Sometimes this    can be a little difficult if a session is packed with people, but you can do    things to make your exit a little bit more comfortable.</p>
<p>First of all if you have an inkling that you are going to want to leave a    talk don&#8217;t pick a seat in the middle of a row. Instead sit somewhere that that    has easier access to the exit at the back of the room. If there are video    cameras in the talk you might not want to be &quot;the dude that left in the    middle of a talk&quot;. In reality you will likely not be noticed as the    cameras are directed at the speaker.</p>
<p>Second, make sure to pack up your laptop and other things in your bag before    exiting. It&#8217;s kind of annoying to get clobbered with a laptop as someone exits    past you. The same thing goes for anyone sitting in the row. Don&#8217;t make    unnecessary obstacles for anyone that gets out. Move your power cord and move    closer to power strips rather than pulling them out of place.</p>
<h3>Find a group for    dinner in Atlanta</h3>
<p>Watch the <a href="https://convore.com/pycon-2011/">Convore</a> and <a href="http://twitter.com/#search?q=%23pycon">Twitter</a> for information    on groups who are going out for the evening in Atlanta. In many cases an open    space session will continue over dinner!</p>
<h3>Don&#8217;t have too good    a time at night</h3>
<p>It is way too easy to have a good time on Friday and Saturday nights, but    don&#8217;t stay out too late or get too hammered. This seems like a bit silly but you    need quite a bit of energy to make it all the way through a conference like PyCon.</p>
<p>I&#8217;m sure there are many things that I&#8217;ve missed here. Please post other tips    on Twitter under the <a href="http://twitter.com/#search?q=%23pycon">#pycon</a> hash tag, on your blog, or post a comment below    for others to read.</p>
]]></content:encoded>
			<wfw:commentRss>http://brianlyttle.com/2011/03/getting-the-most-out-of-pycon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

