<?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>ShowMeDo Blogs the World &#187; Building a Website</title>
	<atom:link href="http://blog.showmedo.com/category/building-a-website/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.showmedo.com</link>
	<description>Building the site, promoting the videos, sharing the knowledge</description>
	<lastBuildDate>Tue, 03 Aug 2010 14:57:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Site Relaunch &#8211; customizing that Twitter Widget</title>
		<link>http://blog.showmedo.com/showmedo-front-page/site-relaunch-customizing-that-twitter-widget/</link>
		<comments>http://blog.showmedo.com/showmedo-front-page/site-relaunch-customizing-that-twitter-widget/#comments</comments>
		<pubDate>Thu, 13 May 2010 15:47:00 +0000</pubDate>
		<dc:creator>wizzy</dc:creator>
				<category><![CDATA[Building a Website]]></category>
		<category><![CDATA[Showmedo Front-page]]></category>
		<category><![CDATA[Site Relauch]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://blog.showmedo.com/?p=738</guid>
		<description><![CDATA[<p>With limited time to post any content to the Blog or Twitter micro-blog, being able to reuse/advartise that content seems like a win-win. Twitter helpfully provide a widget for just this purpose but, out of the box, it&#8217;s not quite right for my purposes. But with a little javascript, jQuery and CSS magic that can [...]


Related posts:<ol><li><a href='http://blog.showmedo.com/news/showmedo-is-on-twitter/' rel='bookmark' title='Permanent Link: ShowMeDo is on Twitter'>ShowMeDo is on Twitter</a></li>
<li><a href='http://blog.showmedo.com/news/relaunch-refresh-renew/' rel='bookmark' title='Permanent Link: Relaunch, Refresh, Renew'>Relaunch, Refresh, Renew</a></li>
<li><a href='http://blog.showmedo.com/showmedoservices/new-services-site-for-professional-screencasts/' rel='bookmark' title='Permanent Link: New Services Site for Professional Screencasts'>New Services Site for Professional Screencasts</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>With limited time to post any content to the Blog or Twitter micro-blog, being able to reuse/advartise that content seems like a win-win. Twitter helpfully provide a widget for just this purpose but, out of the box, it&#8217;s not quite right for my purposes. But with a little javascript, jQuery and CSS magic that can all be put right.</p>
<p>First a little screenshot to show what the vanilla widget looks like, after a bit of customization that you can perform on the Twitter site (you&#8217;ll find the widgets hanging off the &#8216;Goodies&#8217; link at the bottom of your facebook page:</p>
<p><a href="http://blog.showmedo.com/wp-content/uploads/twitter_widget_default.png"><img src="http://blog.showmedo.com/wp-content/uploads/twitter_widget_default-203x300.png" alt="" title="twitter_widget_default" width="203" height="300" class="aligncenter size-medium wp-image-740" /></a></p>
<p>The widget shown is ok but:</p>
<ul>
<li>I don&#8217;t like the header area, with those two Showmedos and a rather redundant Showmedo logo (this is appearing on the Showmedo site).</li>
<li> I&#8217;d also like to remove the padding to left and right of the tweets to align the text with the rest of the column content.</li>
<li>The font-used is lucida-grand but I would prefer to use Verdana, the default font for my site.</li>
<li>The &#8216;twitter&#8217; badge on the bottom left, which is probably most likely to be clicked, takes users to the twitter home page &#8216;http://twitter.com&#8217; but I would like it to direct to my twitter page &#8216;http://twitter.com/ShowMeDo&#8217;.</li>
</ul>
<p>With a few a lines of css and jQuery javascript these problems are easily addressed.</p>
<p>First we remove the header by finding its css class, &#8216;twtr-hd&#8217;, and using jQuery to hide it. This is equivalent to setting its css &#8216;display&#8217; attribute to &#8216;none&#8217;.</p>
<pre>$('.twtr-hd').hide();</pre>
<p>To change the padding and font-family just add some css to your style-file:</p>
<pre>
div#contentRight .twtr-widget{
    font-family:Verdana,Arial,Helvetica,"Trebuchet MS",Trebuchet,sans-serif !important;
}

.twtr-widget .twtr-tweet-wrap {
    padding:6px 0 !important;
}
</pre>
<p>Note the use of the !important flags to override existing settings and escape the css cascade. Now twitter themselves, rather frustratingly, set the widget font-style using an !important tag. This means that in order to override it we need to prioritise our !important using the identity &#8216;contentRight&#8217; of the right column in which the twitter widget appears.</p>
<p>Lastly, in order to direct users clicking the twitter badge to ShowMeDo&#8217;s twitter site we use a little jQuert to change the &#8216;href&#8217; attribute of the twitter link:</p>
<pre>
    $('.twtr-doc a').attr('href', 'http://twitter.com/ShowMeDo');
</pre>
<p>And we have the resulting, pretty satisfactory widget:<br />
<a href="http://blog.showmedo.com/wp-content/uploads/twitter_widget_custom.png"><img src="http://blog.showmedo.com/wp-content/uploads/twitter_widget_custom-242x300.png" alt="Showmedo&#039;s customized twitter widget" title="twitter_widget_custom" width="242" height="300" class="aligncenter size-medium wp-image-744" /></a></p>


<p>Related posts:<ol><li><a href='http://blog.showmedo.com/news/showmedo-is-on-twitter/' rel='bookmark' title='Permanent Link: ShowMeDo is on Twitter'>ShowMeDo is on Twitter</a></li>
<li><a href='http://blog.showmedo.com/news/relaunch-refresh-renew/' rel='bookmark' title='Permanent Link: Relaunch, Refresh, Renew'>Relaunch, Refresh, Renew</a></li>
<li><a href='http://blog.showmedo.com/showmedoservices/new-services-site-for-professional-screencasts/' rel='bookmark' title='Permanent Link: New Services Site for Professional Screencasts'>New Services Site for Professional Screencasts</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.showmedo.com/showmedo-front-page/site-relaunch-customizing-that-twitter-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Python  strings and dictionaries to create video embedding templates</title>
		<link>http://blog.showmedo.com/showmedo-front-page/using-python-strings-and-dictionaries-to-create-video-embedding-templates/</link>
		<comments>http://blog.showmedo.com/showmedo-front-page/using-python-strings-and-dictionaries-to-create-video-embedding-templates/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 13:31:02 +0000</pubDate>
		<dc:creator>wizzy</dc:creator>
				<category><![CDATA[Building a Website]]></category>
		<category><![CDATA[Python tips and tricks]]></category>
		<category><![CDATA[Showmedo Front-page]]></category>

		<guid isPermaLink="false">http://blog.showmedo.com/showmedo-front-page/using-python-strings-and-dictionaries-to-create-video-embedding-templates/</guid>
		<description><![CDATA[<p>All Pythonistas will recognize the % operator used to format strings:</p>
print "%s world from %s!"%('hello', 'showmedo')
<p>This is similar to its &#8216;C&#8217; antecedent but, as you would expect and probably know, Python allows containers other than tuples (in the case containing the &#8216;hello&#8217; and &#8217;showmedo&#8217; strings) to be used in the string formatting operation.</p>
<p>The use of [...]


Related posts:<ol><li><a href='http://blog.showmedo.com/python-showmedos/testing-flowplayer-embedding-script/' rel='bookmark' title='Permanent Link: Testing Flowplayer embedding script'>Testing Flowplayer embedding script</a></li>
<li><a href='http://blog.showmedo.com/news/new-scribus-video-published/' rel='bookmark' title='Permanent Link: New Scribus Video Published'>New Scribus Video Published</a></li>
<li><a href='http://blog.showmedo.com/news/congratulations-for-dais-40th-scribus-video/' rel='bookmark' title='Permanent Link: Congratulations for Dai&#8217;s 40th Scribus Video!'>Congratulations for Dai&#8217;s 40th Scribus Video!</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>All Pythonistas will recognize the % operator used to format strings:</p>
<pre>print "%s world from %s!"%('hello', 'showmedo')</pre>
<p>This is similar to its &#8216;C&#8217; antecedent but, as you would expect and probably know, Python allows containers other than tuples (in the case containing the &#8216;hello&#8217; and &#8217;showmedo&#8217; strings) to be used in the string formatting operation.</p>
<p>The use of a dictionary rather than tuple to format the string provides a very handy little templating mechanism, used recently in the addition of video embedding strings to the site.</p>
<p>We start with our text-file template, one long string with no pesky line-breaks:</p>
<pre>&lt;object width="%(width)d" height="%(height)d" id="%(id)s" data="http://showmedo.com/static/flowplayer/flowplayer-3.1.5.swf" type="application/x-shockwave-flash"&gt;&lt;param name="m    ovie" value="http://showmedo.com/static/flowplayer/flowplayer-3.1.5.swf" /&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param  [...]   &amp;quot;%(url)s&amp;quot;,&amp;quot;title&amp;quot;:&amp;quot;%(title)s&amp;quot;,&amp;quot;baseUrl&amp;quot;:&amp;quot;http://showmedo.com&amp;quot;,&amp;quot;autoPlay&amp;quot;:false,&amp;quot;autoBuffering&amp;quot;:true}],    &amp;quot;plugins&amp;quot;:{&amp;quot;controls&amp;quot;:{&amp;quot;url&amp;quot;:&amp;quot;http://showmedo.com/static/flowplayer/flowplayer.controls-3.1.5.swf&amp;quot;,&amp;quot;playlist&amp;quot;:true}}}' /&gt;&lt;/object&gt;&lt;br /&gt;</pre>
<p>Note the variables scattered through the string starting with %(width)d. We&#8217;ll be using these, together with a Python dictionary, to create our video-specific embedding string. The method that does the legwork is shown below. It is a member of the &#8216;Video&#8217; class and in this context &#8217;self&#8217; refers to the video instance in question:</p>
<pre>
def get_embed_string(self, width=425, height=344):
    t_dir = os.path.join(os.path.dirname(__file__),'templates/')
    embed_template = open(t_dir + 'embed_video.txt').read()
    embed_str = embed_template%dict(
                                  width=width,
                                  height=height,
                                  url=movieDirectory() + "%s"%self.get_flv_file_name()
                                  title=self.title,
                                  id='_%d'%self.id
                                  )
    return embed_str</pre>
<p>We open the &#8216;embed_video.txt&#8217; file (using a little Python os magic to establish a relative directory path) and read its contents, storing them in the &#8216;embed_template&#8217; string. We then use the &#8216;%&#8217; operator to assign values to the special (of the form %(foo)x) variables in the template, using a Python dictionary.</p>
<p>The resulting &#8216;embed_str&#8217; string defines a flash
<div class="youtube-video"><object> which can be used to embed Showmedo videos in blogs, articles and the like:</p>
<pre>
&lt;object width=&quot;425&quot; height=&quot;344&quot; id=&quot;_672&quot; data=&quot;http://showmedo.com/static/flowplayer/flowplayer-3.1.5.swf&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://showmedo.com/static/flowplayer/flowplayer-3.1.5.swf&quot; /&gt;&lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot; /&gt;&lt;param name=&quot;flashvars&quot; value='config={&amp;quot;key&amp;quot;:&amp;quot;#$824e5316466b69d76dc&amp;quot;,&amp;quot;logo&amp;quot;:{&amp;quot;url&amp;quot;:&amp;quot;http://showmedo.com/static/images/showmedo_logo_vp.png&amp;quot;,&amp;quot;fullscreenOnly&amp;quot;:false,&amp;quot;top&amp;quot;:20,&amp;quot;right&amp;quot;:20,&amp;quot;opacity&amp;quot;:0.5,&amp;quot;displayTime&amp;quot;:0,&amp;quot;linkUrl&amp;quot;:&amp;quot;http://showmedo.com&amp;quot;},&amp;quot;clip&amp;quot;:{&amp;quot;baseUrl&amp;quot;:&amp;quot;http://showmedo.com&amp;quot;,&amp;quot;autoPlay&amp;quot;:false,&amp;quot;autoBuffering&amp;quot;:true},&amp;quot;playlist&amp;quot;:[{&amp;quot;url&amp;quot;:&amp;quot;http://showmedovideos4.com/ShowMeDos/2450010.flv&amp;quot;,&amp;quot;title&amp;quot;:&amp;quot;Scientific Computing Using SAGE: Introduction&amp;quot;,&amp;quot;baseUrl&amp;quot;:&amp;quot;http://showmedo.com&amp;quot;,&amp;quot;autoPlay&amp;quot;:false,&amp;quot;autoBuffering&amp;quot;:true}],&amp;quot;plugins&amp;quot;:{&amp;quot;controls&amp;quot;:{&amp;quot;url&amp;quot;:&amp;quot;http://showmedo.com/static/flowplayer/flowplayer.controls-3.1.5.swf&amp;quot;,&amp;quot;playlist&amp;quot;:true}}}' /&gt;&lt;/object&gt;
</pre>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=3597d4cb-7343-8165-8acc-df1eef48b8d4" /></div>
<p></object></div>


<p>Related posts:<ol><li><a href='http://blog.showmedo.com/python-showmedos/testing-flowplayer-embedding-script/' rel='bookmark' title='Permanent Link: Testing Flowplayer embedding script'>Testing Flowplayer embedding script</a></li>
<li><a href='http://blog.showmedo.com/news/new-scribus-video-published/' rel='bookmark' title='Permanent Link: New Scribus Video Published'>New Scribus Video Published</a></li>
<li><a href='http://blog.showmedo.com/news/congratulations-for-dais-40th-scribus-video/' rel='bookmark' title='Permanent Link: Congratulations for Dai&#8217;s 40th Scribus Video!'>Congratulations for Dai&#8217;s 40th Scribus Video!</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.showmedo.com/showmedo-front-page/using-python-strings-and-dictionaries-to-create-video-embedding-templates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python to the Rescue</title>
		<link>http://blog.showmedo.com/showmedo-front-page/python-to-the-rescue/</link>
		<comments>http://blog.showmedo.com/showmedo-front-page/python-to-the-rescue/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 14:59:26 +0000</pubDate>
		<dc:creator>wizzy</dc:creator>
				<category><![CDATA[Building a Website]]></category>
		<category><![CDATA[Kyran's thought for the day]]></category>
		<category><![CDATA[Python tips and tricks]]></category>
		<category><![CDATA[Showmedo Front-page]]></category>

		<guid isPermaLink="false">http://blog.showmedo.com/showmedo-front-page/python-to-the-rescue/</guid>
		<description><![CDATA[<p>Showmedo caught some flak from the recent Westhost (our main server-provider) troubles. Catch this pretty interesting thread for the gory details. We were actually pretty lucky as the main site remained standing (not the case for many others) but did manage to lose our cron daemon. As a result some restart scripts which check on [...]


Related posts:<ol><li><a href='http://blog.showmedo.com/showmedo-front-page/a-little-downtime/' rel='bookmark' title='Permanent Link: A Little Downtime :('>A Little Downtime :(</a></li>
<li><a href='http://blog.showmedo.com/news/using-non-python-files-with-py2exe/' rel='bookmark' title='Permanent Link: Using non-Python files with py2exe'>Using non-Python files with py2exe</a></li>
<li><a href='http://blog.showmedo.com/news/optimising-genshi-imports/' rel='bookmark' title='Permanent Link: Optimising Genshi Imports'>Optimising Genshi Imports</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Showmedo caught some flak from the recent Westhost (our main server-provider) troubles. Catch <a href="http://www.webhostingtalk.com/showthread.php?t=358323">this</a> pretty interesting thread for the gory details. We were actually pretty lucky as the main site remained standing (not the case for many others) but did manage to lose our <a href="http://en.wikipedia.org/wiki/Cron">cron daemon</a>. As a result some restart scripts which check on the health of, among other things, the Python <a href="http://turbogears.org/">Turbogears</a> process running the site died. Now this script isn&#8217;t needed too often &lt;fingers crossed&gt; but if the site falls down and we&#8217;re literally asleep then it avoids more than a minute or sos downtime. The crontab line in question looks like this:</p>
<pre>*/1 * * * * source /.bashrc &#038;&#038; /usr/local/bin/python2.5 /home/showmedo/showmedo/cron_start_showmedo.py &gt; /var/log/cron_log</pre>
<p>This line tells cron to run cron_start_showmedo.py every minute and the python process will check the health of Showmedo&#8217;s main process, our memcache and mysql servers and a few other things and restart them if anything has fallen over. Having lost cron, I needed a quick hack to perform these duties and found some very cool advice <a href="http://stackoverflow.com/questions/696839/how-do-i-write-a-bash-script-to-restart-a-process-if-it-dies">here</a> at Slashdot. For various reasons the recommended bash-scripts seemed to be dying on me, and lacking the time or will to try debugging on fairly foreign turf, I hacked a little Python substitute to do much the same:</p>
<pre>
  1 import time
  2 import subprocess
  3
  4 while 1:
  5     subprocess.Popen(['/usr/local/bin/python2.5', '/home/showmedo/showmedo/cron_start_showmedo.py'])
  6     time.sleep(60)
</pre>
<p>Not pretty, but at five lines quick and succinct. The line 4 while loop sets things running in perpetuity, line 5 uses Python&#8217;s newish (and pretty powerful) subprocess module call the cron_start_showmedo.py module and line 6 takes a 60 second break before continuing the loop.</p>
<p>The script sat duty while I waited for our cron-daemon to return and I slept sounder in my bed as a result.</p>


<p>Related posts:<ol><li><a href='http://blog.showmedo.com/showmedo-front-page/a-little-downtime/' rel='bookmark' title='Permanent Link: A Little Downtime :('>A Little Downtime :(</a></li>
<li><a href='http://blog.showmedo.com/news/using-non-python-files-with-py2exe/' rel='bookmark' title='Permanent Link: Using non-Python files with py2exe'>Using non-Python files with py2exe</a></li>
<li><a href='http://blog.showmedo.com/news/optimising-genshi-imports/' rel='bookmark' title='Permanent Link: Optimising Genshi Imports'>Optimising Genshi Imports</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.showmedo.com/showmedo-front-page/python-to-the-rescue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing Flowplayer embedding script</title>
		<link>http://blog.showmedo.com/python-showmedos/testing-flowplayer-embedding-script/</link>
		<comments>http://blog.showmedo.com/python-showmedos/testing-flowplayer-embedding-script/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 14:20:44 +0000</pubDate>
		<dc:creator>wizzy</dc:creator>
				<category><![CDATA[Building a Website]]></category>
		<category><![CDATA[Python ShowMeDos]]></category>

		<guid isPermaLink="false">http://blog.showmedo.com/?p=696</guid>
		<description><![CDATA[<p>This little script, appearing below Showmedo&#8217;s video-boxes should allow easy embedding of the videos in blogs, articles and the like. As ever, avoid the WYSIWYG editors or the pristine HTML is likely to be horribly mangled.</p>
<p>If everything goes according to plan, you should be seeing a Showmedo video below (The first part of Chris Perkins&#8217; [...]


Related posts:<ol><li><a href='http://blog.showmedo.com/new-showmedo-videos/xmlrpc-and-unit-testing-screencasts-by-florian-mayer/' rel='bookmark' title='Permanent Link: XMLRPC and unit-testing screencasts by Florian Mayer'>XMLRPC and unit-testing screencasts by Florian Mayer</a></li>
<li><a href='http://blog.showmedo.com/showmedo-front-page/using-python-strings-and-dictionaries-to-create-video-embedding-templates/' rel='bookmark' title='Permanent Link: Using Python  strings and dictionaries to create video embedding templates'>Using Python  strings and dictionaries to create video embedding templates</a></li>
<li><a href='http://blog.showmedo.com/kyrans-thought-for-the-day/taming-flowplayer-pt-1/' rel='bookmark' title='Permanent Link: Taming Flowplayer Pt. 1'>Taming Flowplayer Pt. 1</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This little script, appearing below Showmedo&#8217;s video-boxes should allow easy embedding of the videos in blogs, articles and the like. As ever, avoid the WYSIWYG editors or the pristine HTML is likely to be horribly mangled.</p>
<p>If everything goes according to plan, you should be seeing a Showmedo video below (The first part of Chris Perkins&#8217; rather wonderful series on <a href="http://showmedo.com/videotutorials/series?name=mcfckfJ4w">Agile Development Tools in Python</a>):</p>
<p><object width="425" height="344" id="_785" data="http://showmedo.com/static/flowplayer/flowplayer-3.1.5.swf" type="application/x-shockwave-flash"><param name="movie" value="http://showmedo.com/static/flowplayer/flowplayer-3.1.5.swf"/><param name="allowfullscreen" value="true"/><param name="allowscriptaccess" value="always"/><param name="flashvars" value="config={&quot;clip&quot;:{&quot;baseUrl&quot;:&quot;http://showmedo.com&quot;,&quot;autoPlay&quot;:false,&quot;autoBuffering&quot;:true},&quot;playlist&quot;:[{&quot;url&quot;:&quot;http://showmedovideos4.com/ShowMeDos/2910000.flv&quot;,&quot;title&quot;:&quot;Using Virtualenv and PasteScript&quot;,&quot;baseUrl&quot;:&quot;http://showmedo.com&quot;,&quot;autoPlay&quot;:false,&quot;autoBuffering&quot;:true}],&quot;plugins&quot;:{&quot;controls&quot;:{&quot;url&quot;:&quot;http://showmedo.com/static/flowplayer/flowplayer.controls-3.1.5.swf&quot;,&quot;playlist&quot;:true}}}"/></object></p>


<p>Related posts:<ol><li><a href='http://blog.showmedo.com/new-showmedo-videos/xmlrpc-and-unit-testing-screencasts-by-florian-mayer/' rel='bookmark' title='Permanent Link: XMLRPC and unit-testing screencasts by Florian Mayer'>XMLRPC and unit-testing screencasts by Florian Mayer</a></li>
<li><a href='http://blog.showmedo.com/showmedo-front-page/using-python-strings-and-dictionaries-to-create-video-embedding-templates/' rel='bookmark' title='Permanent Link: Using Python  strings and dictionaries to create video embedding templates'>Using Python  strings and dictionaries to create video embedding templates</a></li>
<li><a href='http://blog.showmedo.com/kyrans-thought-for-the-day/taming-flowplayer-pt-1/' rel='bookmark' title='Permanent Link: Taming Flowplayer Pt. 1'>Taming Flowplayer Pt. 1</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.showmedo.com/python-showmedos/testing-flowplayer-embedding-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The font of knowledge</title>
		<link>http://blog.showmedo.com/kyrans-thought-for-the-day/the-font-of-knowledge/</link>
		<comments>http://blog.showmedo.com/kyrans-thought-for-the-day/the-font-of-knowledge/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 22:51:09 +0000</pubDate>
		<dc:creator>wizzy</dc:creator>
				<category><![CDATA[Building a Website]]></category>
		<category><![CDATA[Distraction therapy]]></category>
		<category><![CDATA[Kyran's thought for the day]]></category>

		<guid isPermaLink="false">http://blog.showmedo.com/?p=626</guid>
		<description><![CDATA[<p>One of the nice things about the web and coding in general is the occasional little distraction thrown up in the space of toolsets, coding-practice and the like. Today those eddies in cyberspace have brought fonts to the fore, after a while in which I really hadn&#8217;t given it too much thought. But the fact [...]


Related posts:<ol><li><a href='http://blog.showmedo.com/showmedo-front-page/site-relaunch-customizing-that-twitter-widget/' rel='bookmark' title='Permanent Link: Site Relaunch &#8211; customizing that Twitter Widget'>Site Relaunch &#8211; customizing that Twitter Widget</a></li>
<li><a href='http://blog.showmedo.com/kyrans-thought-for-the-day/taming-flowplayer-pt-1/' rel='bookmark' title='Permanent Link: Taming Flowplayer Pt. 1'>Taming Flowplayer Pt. 1</a></li>
<li><a href='http://blog.showmedo.com/news/welcome-reddit-and-dzone/' rel='bookmark' title='Permanent Link: Welcome Reddit and DZone'>Welcome Reddit and DZone</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>One of the nice things about the web and coding in general is the occasional little distraction thrown up in the space of toolsets, coding-practice and the like. Today those eddies in cyberspace have brought fonts to the fore, after a while in which I really hadn&#8217;t given it too much thought. But the fact is, for someone hacking code all day a good font, while maybe not as critical as a good editor (VIM btw), is important. In the same way as buying a good bed is important, you&#8217;ll have been staring at this font for a good few life years, when time comes to cash in your programming chips.  So is worth some consideration.</p>
<p>I generally go for a good, reliable mono-space default which is less likely to go horribly wrong (VIM sometime gets confused with widths) and is cross-platform and easy. <a href="http://en.wikipedia.org/wiki/Andale_Mono">Andale Mono </a>tends to do the job, without feeling particularly classy. Anyway, the <a href="http://en.wikipedia.org/wiki/Consolas">Consolas</a> font crops up a lot in various programming contexts, e.g. Slashdot, Reddit, Stackoverflow.</p>
<p>So my curiosity has finally been piqued and I&#8217;m going to give it a try.  I certainly don&#8217;t have the balls to try a proportional font, even if readability is improved by 18% or so.  <a href="http://developers.slashdot.org/story/10/01/17/0715219/Programming-With-Proportional-Fonts?art_pos=8">Here</a> is today&#8217;s Slashdot thread, that undoubtedly gets to the heart of the issue.  And a nice post from Hive-Logic about the <a href="http://hivelogic.com/articles/top-10-programming-fonts">top ten programming fonts</a>, which suggests I should give <a href="http://www.levien.com/type/myfonts/inconsolata.html">Inconsolata</a> a go. Which I probably will.  The accompanying <a href="http://www.reddit.com/r/programming/comments/aqmvy/top_10_programming_fonts/">Reddit thread</a>, that undoubtedly gets to the heart of the issue.</p>
<p>I&#8217;ll buzz back with an opinion when I&#8217;ve had time to absorb the changes. Exciting times&#8230;</p>
<p>Oh, and for linux bods such as myself, <a href="http://www.romej.com/archives/571/consolas-font-in-linux-for-code-editing">here&#8217;s a little hack</a> to get them into VIM.</p>


<p>Related posts:<ol><li><a href='http://blog.showmedo.com/showmedo-front-page/site-relaunch-customizing-that-twitter-widget/' rel='bookmark' title='Permanent Link: Site Relaunch &#8211; customizing that Twitter Widget'>Site Relaunch &#8211; customizing that Twitter Widget</a></li>
<li><a href='http://blog.showmedo.com/kyrans-thought-for-the-day/taming-flowplayer-pt-1/' rel='bookmark' title='Permanent Link: Taming Flowplayer Pt. 1'>Taming Flowplayer Pt. 1</a></li>
<li><a href='http://blog.showmedo.com/news/welcome-reddit-and-dzone/' rel='bookmark' title='Permanent Link: Welcome Reddit and DZone'>Welcome Reddit and DZone</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.showmedo.com/kyrans-thought-for-the-day/the-font-of-knowledge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Taming Flowplayer Pt. 1</title>
		<link>http://blog.showmedo.com/kyrans-thought-for-the-day/taming-flowplayer-pt-1/</link>
		<comments>http://blog.showmedo.com/kyrans-thought-for-the-day/taming-flowplayer-pt-1/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 07:43:14 +0000</pubDate>
		<dc:creator>wizzy</dc:creator>
				<category><![CDATA[Building a Website]]></category>
		<category><![CDATA[Kyran's thought for the day]]></category>
		<category><![CDATA[Python tips and tricks]]></category>

		<guid isPermaLink="false">http://blog.showmedo.com/?p=620</guid>
		<description><![CDATA[<p>Getting Flowplayer up and running on the site was not quite as smooth as the nice web-site and clean API suggested. I&#8217;ll be documenting the whole gory process in the &#8216;Building a Website (with Python, jquery etc..)&#8217; series, but in the meantime I&#8217;ll mention the hideous hackery needed to get over the final hurdle that [...]


Related posts:<ol><li><a href='http://blog.showmedo.com/showmedo-front-page/using-python-strings-and-dictionaries-to-create-video-embedding-templates/' rel='bookmark' title='Permanent Link: Using Python  strings and dictionaries to create video embedding templates'>Using Python  strings and dictionaries to create video embedding templates</a></li>
<li><a href='http://blog.showmedo.com/news/new-flash-player-being-debuted/' rel='bookmark' title='Permanent Link: New flash-player being debuted'>New flash-player being debuted</a></li>
<li><a href='http://blog.showmedo.com/python-showmedos/testing-flowplayer-embedding-script/' rel='bookmark' title='Permanent Link: Testing Flowplayer embedding script'>Testing Flowplayer embedding script</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Getting Flowplayer up and running on the site was not quite as smooth as the nice <a href="http://flowplayer.org">web-site</a> and clean API suggested. I&#8217;ll be documenting the whole gory process in the &#8216;Building a Website (with Python, jquery etc..)&#8217; series, but in the meantime I&#8217;ll mention the hideous hackery needed to get over the final hurdle that is Internet Explorer 7.</p>
<p>Somewhere along the line I was looking to pass a web-address, as part of an html overlay, into the flash-player. This has the standard form:</p>
<p><code>"http://showmedo.com/videotutorials/video?name=1470110&amp;fromSeriesID=147"</code></p>
<p>Now if one tries to pass that string into a flashplayer, all hell will break loose. Some of those symbols are going to be interpreted as controls rather than nice, neutral characters. For this reason they need to be &#8216;escaped&#8217;, and <a href="http://turbogears.org">Turbogears</a> provides a nice little function &#8220;quote_plus&#8221;, via Python&#8217;s urllib, to do just this. The result is this rather scary looking string:</p>
<p><code>"http%3A%2F%2Fshowmedo.com</code>%2Fvideotutorials%2Fvideo%3Fname%3D1470110%26fromSeriesID%3D147&#8243;</p>
<p>This string makes it through the flash-player in all the browsers we&#8217;re interested in at Showmedo and produces a clickable flash-overlay which, strangely enough, takes one through to the page in question. Er, except (and twas ever thus), IE7 (not 8 &lt;sigh&gt;), where, when all the escape-artistry has taken place, we find ourselves directed to this non-existent page:</p>
<p><code>"http://showmedo.com/http://showmedo.com/videotutorials/video?name=1470110&amp;fromSeriesID=147"</code></p>
<p>which is a very poorly URL indeed.</p>
<p>Now I&#8217;m guessing that somewhere at the heart of this is the issue of absolute and relative web-addresses.  The second &#8216;http://&#8230;&#8217; should be interpreted as an absolute address, but those unicode escape-characters have confused the system, making it treat the URL as relative, thus adding another root-url.</p>
<p>If I had time to explore this horror I would probably spend it doing something else, but in these time-starved times I just did a little bit of playing around and added a hack-function which undoes the &#8216;:&#8217; and &#8216;/&#8217; escapes of &#8220;quote_plus&#8221;, producing this:</p>
<p><code>"http://showmedo.com</code>/videotutorials/video%3Fname%3D1470110%26fromSeriesID%3D147&#8243;</p>
<p>Which makes it through the browser minefield, but, as seems so often the case with this messed up web-development world, at the cost of some serious inelegance.</p>


<p>Related posts:<ol><li><a href='http://blog.showmedo.com/showmedo-front-page/using-python-strings-and-dictionaries-to-create-video-embedding-templates/' rel='bookmark' title='Permanent Link: Using Python  strings and dictionaries to create video embedding templates'>Using Python  strings and dictionaries to create video embedding templates</a></li>
<li><a href='http://blog.showmedo.com/news/new-flash-player-being-debuted/' rel='bookmark' title='Permanent Link: New flash-player being debuted'>New flash-player being debuted</a></li>
<li><a href='http://blog.showmedo.com/python-showmedos/testing-flowplayer-embedding-script/' rel='bookmark' title='Permanent Link: Testing Flowplayer embedding script'>Testing Flowplayer embedding script</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.showmedo.com/kyrans-thought-for-the-day/taming-flowplayer-pt-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

