<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/templates/default/atom.css" type="text/css" ?>

<feed 
   xmlns="http://www.w3.org/2005/Atom"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    
    <link href="http://blog.joeysmith.com/feeds/atom.xml" rel="self" title="A River of Words" type="application/atom+xml" />
    <link href="http://blog.joeysmith.com/"                        rel="alternate"    title="A River of Words" type="text/html" />
    <link href="http://blog.joeysmith.com/rss.php?version=2.0"     rel="alternate"    title="A River of Words" type="application/rss+xml" />
    <title type="html">A River of Words</title>
    <subtitle type="html">Drowning In Stupid</subtitle>
    <icon>http://blog.joeysmith.com/templates/default/img/s9y_banner_small.png</icon>
    <id>http://blog.joeysmith.com/</id>
    <updated>2011-09-01T18:27:24Z</updated>
    <generator uri="http://www.s9y.org/" version="1.5.5">Serendipity 1.5.5 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>

    <entry>
        <link href="http://blog.joeysmith.com/articles/117.html" rel="alternate" title="iWorlds" />
        <author>
            <name>TML</name>
                    </author>
    
        <published>2011-09-01T18:27:24Z</published>
        <updated>2011-09-01T18:27:24Z</updated>
        <wfw:comment>http://blog.joeysmith.com/wfwcomment.php?cid=117</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.joeysmith.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=117</wfw:commentRss>
    
    
        <id>http://blog.joeysmith.com/articles/117.html</id>
        <title type="html">iWorlds</title>
        <content type="xhtml" xml:base="http://blog.joeysmith.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                	<p>Saturday.</p>

	<p>Map information is <a onclick="javascript: pageTracker._trackPageview('/extlink/www.thanksgivingpoint.org/plan/your_trip/maps.html');"  href="http://www.thanksgivingpoint.org/plan/your_trip/maps.html">here</a>.</p>

	<p>Be there at 1pm. If you can bring your $15 with you, that&#8217;d be great.</p>

	<p>This will not be a private session &#8211; those cost like an extra $100. But when I spoke to them earlier this morning, they had no other groups lined up for this time slot, so maybe we&#8217;ll get lucky.</p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.joeysmith.com/articles/116.html" rel="alternate" title="A Person, a Painting and a Play" />
        <author>
            <name>TML</name>
                    </author>
    
        <published>2011-08-24T01:59:32Z</published>
        <updated>2011-08-24T02:18:47Z</updated>
        <wfw:comment>http://blog.joeysmith.com/wfwcomment.php?cid=116</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.joeysmith.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=116</wfw:commentRss>
    
            <category scheme="http://blog.joeysmith.com/categories/TW5-Joeys-Culture-Corner" label="TW5: Joey's Culture Corner" term="TW5: Joey's Culture Corner" />
    
        <id>http://blog.joeysmith.com/articles/116.html</id>
        <title type="html">A Person, a Painting and a Play</title>
        <content type="xhtml" xml:base="http://blog.joeysmith.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                	<p>I had promised some time ago to post this, and am just now getting around to it &#8211; unfortunately, some of the content has been lost in the interim. Below is the only version my review &#8220;A Person, a Painting, and a Play&#8221; from the <a onclick="javascript: pageTracker._trackPageview('/extlink/trekwest5.blogspot.com');"  href="http://trekwest5.blogspot.com">TrekWest5</a> segment &#8220;Joey&#8217;s Culture Corner.&#8221;</p>

	<p>Taking it from the end, the play is Steven Sondheim&#8217;s <a onclick="javascript: pageTracker._trackPageview('/extlink/www.amazon.com/Sunday-Park-George-Mandy-Patinkin/dp/630530209X');"  href="http://www.amazon.com/Sunday-Park-George-Mandy-Patinkin/dp/630530209X">Sunday in the Park with George</a>, the Painting is <a onclick="javascript: pageTracker._trackPageview('/extlink/en.wikipedia.org/wiki/A_Sunday_Afternoon_on_the_Island_of_La_Grande_Jatte');"  href="http://en.wikipedia.org/wiki/A_Sunday_Afternoon_on_the_Island_of_La_Grande_Jatte">A Sunday Afternoon on the Island of La Grande Jatte</a>, and the Person is the painter, the French Post-Impressionist and the father of Pointillism, <a onclick="javascript: pageTracker._trackPageview('/extlink/en.wikipedia.org/wiki/Georges_Seurat');"  href="http://en.wikipedia.org/wiki/Georges_Seurat">Georges Seurat</a>.</p>

	<p>On its surface, &#8220;Sunday in the Park with George&#8221; is a play about the birth of Pointillism &#8211; specifically, about the painting of the &#8220;A Sunday Afternoon on the Island of La Grande Jatte&#8221; &#8211; but I think that this is Sondheim&#8217;s most deeply personal piece. It&#8217;s all about the cost of dedication to an ideal, and about the trade-offs we make every day. &#8220;Work is what you do for others &#8211; art is what you do for yourself!&#8221; decries one of the characters early in the play, and Seraut himself &#8211; who is clearly a stand-in for Sondheim &#8211; tells one of his critics &#8220;I do not paint for your approval&#8221;. Last year, Sondheim published the first of two volumes where he talks in depth about his musicals and their lyrics&#8230;I think it&#8217;s telling that the title he selected for <a onclick="javascript: pageTracker._trackPageview('/extlink/www.amazon.com/Finishing-Hat-Collected-1954-1981-Principles/dp/0679439072');"  href="http://www.amazon.com/Finishing-Hat-Collected-1954-1981-Principles/dp/0679439072">this book</a> is <a onclick="javascript: pageTracker._trackPageview('/extlink/www.youtube.com/watch?v=ducG55pfCMQ#t=0m35');"  href="http://www.youtube.com/watch?v=ducG55pfCMQ#t=0m35">Finishing the Hat</a>. While &#8220;Sunday in the Park&#8221; was not much of a critical success &#8211; and was a financial failure &#8211; it is one of only eight musicals to ever win the &#8220;Pulitzer Prize for Drama&#8221;. I give this musical the strongest possible positive recommendation. Probably my favorite thing about the musical is how Sondheim incorporated the musical technique of &#8220;Pointillism&#8221; &#8211; see the musical number <a onclick="javascript: pageTracker._trackPageview('/extlink/www.youtube.com/watch?v=sgQJSomGwDc#t=0m33s');"  href="http://www.youtube.com/watch?v=sgQJSomGwDc#t=0m33s">Color and Light</a> for an excellent example.</p>

	<p>The painting,  &#8220;A Sunday Afternoon on the Island of La Grande Jatte&#8221; is probably my favorite painting <span class="caps">NOT</span> by Monet, and is probably the most famous example of Pointillism. The painting is 6&#8217;10&#8221; x 10&#8217;1&#8221; &#8211; a <span class="caps">MASSIVE</span> work, it took more than two years to finish. An absolutely fascinating principal of Pointillism is that it uniquely engages the brain in a behaviour known as &#8220;Neuroplasticity&#8221;, which refers to the ability of the human brain to change as a result of one&#8217;s experience. In his 2003 book <a onclick="javascript: pageTracker._trackPageview('/extlink/blogcritics.org/books/article/the-mind-and-the-brain/');"  href="http://blogcritics.org/books/article/the-mind-and-the-brain/">The Mind and the Brain: Neuroplasticity and the Power of Mental Force</a>, Jeffrey Schwartz wrote:</p>

<blockquote style="color: #770000">If your mind has been primed with the theory of pointillism&#8230;then you will see a Seurat painting in a very different way than if you are ignorant of his technique. Yet the photons of light reflecting off the Seurat&#8230;are identical to the photons striking the retina of a less knowledgeable viewer.</blockquote>

	<p>Seurat himself, and his impact on the world at large, is nothing less than astounding. There are very few places in this world today we can turn without seeing the influences of the theory behind divisionism and pointillism &#8211; film and photos, televisions and computer monitors, airbrushes and spray paint, digital cameras and cell phone screens &#8211; these all operate on the same basic principles of pointillism. The theories of color and vision that were explored in the work of Seurat and his contemporaries have had a profound effect on every part of our modern world.</p>

	<p>So &#8211; Georges Seurat, &#8220;A Sunday Afternoon on the Island of La Grande Jatte&#8221;, and Sondheim&#8217;s &#8220;Sunday in the Park with George&#8221; &#8211; I heartily endorse them all.</p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.joeysmith.com/articles/114.html" rel="alternate" title="Pylons &quot;Classic&quot; (pre-pyramid) and LDAP Auth" />
        <author>
            <name>TML</name>
                    </author>
    
        <published>2011-07-12T17:27:57Z</published>
        <updated>2011-07-12T17:44:00Z</updated>
        <wfw:comment>http://blog.joeysmith.com/wfwcomment.php?cid=114</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://blog.joeysmith.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=114</wfw:commentRss>
    
            <category scheme="http://blog.joeysmith.com/categories/Python" label="Python" term="Python" />
    
        <id>http://blog.joeysmith.com/articles/114.html</id>
        <title type="html">Pylons &quot;Classic&quot; (pre-pyramid) and LDAP Auth</title>
        <content type="xhtml" xml:base="http://blog.joeysmith.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                	<p>It took me a long time to figure this out, I didn&#8217;t want it to end up locked in my head, so here&#8217;s a rough guide on how I managed to get a pylons 0.9.7 project to do <span class="caps">LDAP</span> authentication. All of the below is done in config/middleware.py.</p>

	<p>The key points are:
	<ol>
		<li>&#8220;import ldap&#8221; (for the obvious reason) and &#8220;from paste.auth.basic import AuthBasicHandler&#8221;</li>
		<li>Wrap the stacked <span class="caps">WSGI</span> &#8216;app&#8217; object in the AuthBasicHandler you just imported: <code>app = AuthBasicHandler(app, &#39;The value you want to appear on the browser dialog box&#39;, yourAuthFunctionHere)</code></li>
		<li>Define an auth function &#8220;yourAuthFunctionHere(requestEnvironment, username, password)&#8221;. Some tricky bits:
	<ol>
		<li>If this function returns &#8220;True&#8221;, the request will proceed and there will be a new key in the Request object named &#8216;REMOTE_USER&#8217; that contains the passed username.</li>
		<li>If this function returns &#8220;False&#8221;, the user will be prompted again until it succeeds. (I should probably find a way to limit these so people cannot just keep guessing.)</li>
		<li><a onclick="javascript: pageTracker._trackPageview('/extlink/pypi.python.org/pypi/python-ldap/2.4.1');"  href="http://pypi.python.org/pypi/python-ldap/2.4.1">Python&#8217;s LDAP</a> has some strange behaviours:</li>
	<ul>
		<li>Do ldap.initialize outside the auth function or you will swamp the <span class="caps">LDAP</span> server with bind requests</li>
		<li>Use synchronous bind (&#8216;bind_s&#8217; as opposed to &#8216;bind&#8217;) &#8211; asynchronous bind in the <span class="caps">WSGI</span> middleware layer caused some really bizarre behaviour here, including segfaults</li>
		<li>Trap ldap.INVALID_CREDENTIALS and return False when it is raised, or watch all invalid logins crash the server process</li>
		<li>bind (and bind_s) return a tuple, if the first item in the tuple is int(97), the bind worked &#8211; otherwise, they might have bound but as an anonymous user, and we need to fail</li>
		<li>the second item in that tuple is a list of messages from the server &#8211; I&#8217;m not handling those at all today, becuase in the sole case we&#8217;re interested in (97, or &#8220;auth&#8221;),  the messages appear to be blank in our environment &#8211; there&#8217;s no reason to believe this is consistent, and I should probably research this further at some point to provide meaningful feedback to the user on failed auth.</li>
	</ul></li>
	</ol></li>
		<li>You can&#8217;t touch the session from within the <span class="caps">WSGI</span> middleware layer</li>
	</ol></p>

	<p>All of this was done because a new server in our datacenter doesn&#8217;t have packages for the old build of Apache that we used to configure our <span class="caps">LDAP</span> auth back in the day. I&#8217;m actually quite pleased at how the new system works, and am glad to be rid of that Apache+<span class="caps">PHP</span> millstone that&#8217;s been lurking as a dependancy in all of our Pylons projects simply for the <span class="caps">LDAP</span> authentication solution.</p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.joeysmith.com/articles/93.html" rel="alternate" title="Watchmen: A Response to Radar" />
        <author>
            <name>TML</name>
                    </author>
    
        <published>2009-03-05T08:34:55Z</published>
        <updated>2011-07-07T17:58:50Z</updated>
        <wfw:comment>http://blog.joeysmith.com/wfwcomment.php?cid=93</wfw:comment>
    
        <slash:comments>7</slash:comments>
        <wfw:commentRss>http://blog.joeysmith.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=93</wfw:commentRss>
    
            <category scheme="http://blog.joeysmith.com/categories/Books" label="Books" term="Books" />
    
        <id>http://blog.joeysmith.com/articles/93.html</id>
        <title type="html">Watchmen: A Response to Radar</title>
        <content type="xhtml" xml:base="http://blog.joeysmith.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                	<p>[Edited on 2009-07-13 to include link to Radar&#8217;s original article, as I just noticed I never linked to it directly]</p>

	<p>[If you don&#8217;t know how Watchmen ends, stop reading now. This is a good rule of thumb for my blog: I have no qualms about &#8220;spoiling&#8221; &#8211; if you&#8217;re reading an article discussing a subject, you&#8217;d darn well better be familiar with the material.]</p>

	<p>Let me start here by pointing out something I don&#8217;t know that I&#8217;ve ever mentioned. I owe <a onclick="javascript: pageTracker._trackPageview('/extlink/www.thehomestarmy.com/s9y/index.php?/authors/1-The-Mad-Giggler');"  href="http://www.thehomestarmy.com/s9y/index.php?/authors/1-The-Mad-Giggler">The Mad Giggler</a> a deep debt &#8211; back when The Homestarmy looked like <a onclick="javascript: pageTracker._trackPageview('/extlink/thehomestarmy.com/andy_andco_index.php');"  href="http://thehomestarmy.com/andy_andco_index.php">this</a>, asked me if I would be interested in writing a <a onclick="javascript: pageTracker._trackPageview('/extlink/thehomestarmy.com/article_viewer.php?article=170804_joey');"  href="http://thehomestarmy.com/article_viewer.php?article=170804_joey">Guest Post</a> on his blog/web site, thehomestarmy.com. To that point, I didn&#8217;t get it &#8211; the whole concept of blogs escaped me &#8211; and frankly, pissed me off a little bit. (Hmm&#8230;sort like Facebook and Twitter do today &#8211; no, no; don&#8217;t chase that particular dragon right now, Joey, you&#8217;re going somewhere with this post&#8230;). If it weren&#8217;t for him encouraging me, I might have missed out on a number of incredible things, including the two blogs I write on, as well as my podcast with The One Named Peter. Thank you, MG.</p>

	<p>Last night, or early this morning, over at <a onclick="javascript: pageTracker._trackPageview('/extlink/www.thehomestarmy.com/s9y');"  href="http://www.thehomestarmy.com/s9y">The Homestarmy</a> (as it is <span class="caps">TODAY</span>), <a onclick="javascript: pageTracker._trackPageview('/extlink/www.thehomestarmy.com/s9y/index.php?/archives/1565-The-Watchmen-Novel-or-just-Graphic.html');"  href="http://www.thehomestarmy.com/s9y/index.php?/archives/1565-The-Watchmen-Novel-or-just-Graphic.html">Radar posted what I believe is his longest entry to date</a> </p>

	<p>[<br />
&#160;&#160;&#160;&#160;wait, let&#8217;s just check that&#8230;<pre>
    select title from blog_entries where authorid = 8 order by length(body)+length(extended) desc;
    16305: Where I Boldly Went
    11273: The Watchmen: Novel or just Graphic?</pre>&#160;&#160;&#160;&#160;Nope, turns out <a onclick="javascript: pageTracker._trackPageview('/extlink/thehomestarmy.com/s9y/index.php?/archives/1424-Where-I-Boldly-Went.html');"  href="http://thehomestarmy.com/s9y/index.php?/archives/1424-Where-I-Boldly-Went.html">this</a> has that honor &#8211; dangit, Joey, stay on topic!<br />
]</p>

	<p>...discussing graphic novels in general, but focused mostly on Watchmen. Radar made a lot of apologies for the quality of his writing (which turned out to be entirely unnecessary, man), so I&#8217;ll follow his pattern &#8211; the main body of this article was written between the time Radar posted his article (around 01:00 on Thursday) and the time I went to bed. In between putting my thoughts down here, I was also working, and so wasn&#8217;t giving the care I usually prefer to give to my writing. However, at this point, I&#8217;m so late in publishing this response, I&#8217;m more interested in getting it out than in quality-checking it, so I&#8217;m sorry if there&#8217;s anything wrong, rude, offensive, or dumb.</p> <br /><a href="http://blog.joeysmith.com/articles/93.html#extended">Continue reading "Watchmen: A Response to Radar"</a>
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.joeysmith.com/articles/113.html" rel="alternate" title="Peter Nash Day" />
        <author>
            <name>TML</name>
                    </author>
    
        <published>2010-12-02T23:58:59Z</published>
        <updated>2010-12-03T00:58:02Z</updated>
        <wfw:comment>http://blog.joeysmith.com/wfwcomment.php?cid=113</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.joeysmith.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=113</wfw:commentRss>
    
            <category scheme="http://blog.joeysmith.com/categories/CPH12Y" label="CPH12Y" term="CPH12Y" />
    
        <id>http://blog.joeysmith.com/articles/113.html</id>
        <title type="html">Peter Nash Day</title>
        <content type="xhtml" xml:base="http://blog.joeysmith.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                	<p>As most of you know, December 2nd is Peter Nash Day. I thought I&#8217;d share some of the photos that are pouring in from around the world demonstrating how Peter Nash Day is celebrated &#8211; feel free to add a link to your own Peter Nash Day celebration photojournal in the comments! More will be added as they come in, so keep watching this space.</p> <br /><a href="http://blog.joeysmith.com/articles/113.html#extended">Continue reading "Peter Nash Day"</a>
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.joeysmith.com/articles/111.html" rel="alternate" title="AlivePDF and Pylons" />
        <author>
            <name>TML</name>
                    </author>
    
        <published>2010-10-05T22:40:28Z</published>
        <updated>2010-10-05T22:40:28Z</updated>
        <wfw:comment>http://blog.joeysmith.com/wfwcomment.php?cid=111</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://blog.joeysmith.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=111</wfw:commentRss>
    
            <category scheme="http://blog.joeysmith.com/categories/Python" label="Python" term="Python" />
    
        <id>http://blog.joeysmith.com/articles/111.html</id>
        <title type="html">AlivePDF and Pylons</title>
        <content type="xhtml" xml:base="http://blog.joeysmith.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                	<p>I have a project at work where we are using Pylons/paster as the web service provider. One of the &#8220;clients&#8221; of this service is written in Flex/Flash, and had as a component the <a onclick="javascript: pageTracker._trackPageview('/extlink/alivepdf.bytearray.org/');"  href="http://alivepdf.bytearray.org/">AlivePDF</a> AS3 library for generating a static <span class="caps">PDF</span> of the Flash content. </p>

	<p>Unfortunately, because Flash cannot save content locally, in order to actually <span class="caps">GET</span> this <span class="caps">PDF</span> content back to the user, AlivePDF posts a byte array to the service and expects the service to bundle that as a <span class="caps">PDF</span> and send it back. They provide a &#8220;content.php&#8221; file as an example &#8211; which, frankly, is some pretty inscrutable code until you manage to figure out what it&#8217;s working around. So when one of my employees (the one who selected AlivePDF in the first place) sent me the <span class="caps">PHP</span> file, it took as long to understand what he wanted as it did to come up with a Pylons solution. You can find the latter bit below &#8211; replace ${service} and ${controller} with your actual values through-out, and trim the ellipses (they are there to indicate there may be additional context on either side of the line I&#8217;m giving you):</p>

	<p><code style="white-space: pre"><br />
${service}/config/routing.py:<br />
def make_map():<br />
...
	map.connect(&#8217;/${controller}/create.php&#8217;, controller=&#8217;${controller}&#8217;, action=&#8216;pdf&#8217;)     # put this before the default routes, if you have any<br />
...</p>

	<p>${service}/controllers/${controller}.py:<br />
Class ${controller}(BaseController):<br />
...
    def pdf(self):
        response.headers[&#8216;Content-Type&#8217;] = request.environ[&#8216;CONTENT_TYPE&#8217;]
        response.headers[&#8216;Content-Disposition&#8217;] = &#8216;inline; filename=&#8221;%s&#8221;&#8217; % request.GET[&#8216;name&#8217;]
        return request.environ[&#8216;wsgi.input&#8217;].read(int(request.environ[&#8216;CONTENT_LENGTH&#8217;]))<br />
...<br />
</code></p> 
            </div>
        </content>
        
    </entry>

</feed>
