<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Quick on Madprof&#39;s workshop</title>
    <link>http://www.madprof.net/tags/quick/</link>
    <description>Recent content in Quick on Madprof&#39;s workshop</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Tue, 27 Mar 2012 00:00:00 +0000</lastBuildDate>
    <atom:link href="http://www.madprof.net/tags/quick/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>python string concatination speed</title>
      <link>http://www.madprof.net/posts/python-string-concatination-speed_1/</link>
      <pubDate>Tue, 27 Mar 2012 00:00:00 +0000</pubDate>
       <guid isPermaLink="false">http://www.madprof.net/posts/python-string-concatination-speed_1/</guid> 
      <description>&lt;p&gt;I made a quick python script to convert OpenLP song (lyric) databases into the presentation format used by ProPresenter.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/danthedeckie/OpenLP-To-ProPresenter5-Converter&#34;&gt;https://github.com/danthedeckie/OpenLP-To-ProPresenter5-Converter&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;is the link.  I put it together in a few hours, it should have been quicker, but I&amp;rsquo;m still re-acquainting myself with python.&lt;/p&gt;
&lt;p&gt;It is a nice language.&lt;/p&gt;
&lt;p&gt;One thing I did today, while cleaning up a bit, was wonder about something I remember from doing python years ago - string concatenation.  Joining two strings (texts) together.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;quot;Hello&amp;quot; + &amp;quot;World&amp;quot; -&amp;gt; &amp;quot;HelloWorld&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I remembered something about it being slow, and python recommending using&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&#39;&#39;.join((&amp;quot;Hello&amp;quot;, &amp;quot;World&amp;quot;))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;which seems to me one of the most blatently ugly obscure gotchas I&amp;rsquo;ve come across in a long while.&lt;/p&gt;
&lt;p&gt;Anyway, I refactored my code into that style - converting databases and song lyrics and writing XML stuff is pretty much all Text formatting and concatination.&lt;/p&gt;
&lt;p&gt;It made no discernable difference.  So I went back to normal easier to read &lt;code&gt;x += y&lt;/code&gt;, and &lt;code&gt;x = y + z&lt;/code&gt; type of code.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
