<?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>cifo.com</title>
	<atom:link href="http://cifo.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://cifo.com/blog</link>
	<description>Software development</description>
	<lastBuildDate>Sat, 11 Jul 2009 16:22:34 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Bug in Wordpress?</title>
		<link>http://cifo.com/blog/?p=78</link>
		<comments>http://cifo.com/blog/?p=78#comments</comments>
		<pubDate>Sat, 11 Jul 2009 04:19:18 +0000</pubDate>
		<dc:creator>florin</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://cifo.com/blog/?p=78</guid>
		<description><![CDATA[I just noticed that, when editing a post that uses SyntaxHighlighter (that has the tag &#60;pre&#62;) in Visual mode, attribute name="code" gets lost. The attribute needs to be inserted again in HTML mode. Annoying, to say the least, if not downright scary.
This is how the &#60;pre&#62; tag should look like:
&#60;pre name="code" class="c-sharp"&#62;
... some code here ...

&#60;/pre&#62;
If [...]]]></description>
			<content:encoded><![CDATA[<p>I just noticed that, when editing a post that uses SyntaxHighlighter (that has the tag <code>&lt;pre&gt;</code>) in Visual mode, attribute <code>name="code"</code> gets lost. The attribute needs to be inserted again in HTML mode. Annoying, to say the least, if not downright scary.</p>
<p>This is how the <code>&lt;pre&gt;</code> tag should look like:<br />
<code>&lt;pre name="code" class="c-sharp"&gt;</code></p>
<p><code>... some code here ...</p>
<p></code></p>
<p><code>&lt;/pre&gt;</code></p>
<p>If your source code disappears after you edited it, check, in HTML mode, the attribute <code>name</code>. It is very probable that it was lost in Visual mode.</p>
]]></content:encoded>
			<wfw:commentRss>http://cifo.com/blog/?feed=rss2&amp;p=78</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Interesting links for today</title>
		<link>http://cifo.com/blog/?p=72</link>
		<comments>http://cifo.com/blog/?p=72#comments</comments>
		<pubDate>Sat, 11 Jul 2009 03:56:43 +0000</pubDate>
		<dc:creator>florin</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[links]]></category>

		<guid isPermaLink="false">http://cifo.com/blog/?p=72</guid>
		<description><![CDATA[VisualVM
Put or Post
How to write unmaintainable code
Store a tree in a relational database
HTTPS internals

How spellcheckers work
]]></description>
			<content:encoded><![CDATA[<p><a href="http://java.dzone.com/articles/best-kept-secret-jdk-visualvm">VisualVM</a></p>
<p><a href="http://jcalcote.wordpress.com/2008/10/16/put-or-post-the-rest-of-the-story/">Put or Post</a></p>
<p><a href="http://freeworld.thc.org/root/phun/unmaintain.html?repost=forPosterity">How to write unmaintainable code</a></p>
<p><a href="http://www.reddit.com/comments/8q2pz/ask_reddit_how_do_you_store_a_tree_in_a/">Store a tree in a relational database</a></p>
<p><a href="http://www.moserware.com/2009/06/first-few-milliseconds-of-https.html">HTTPS internals</a></p>
<p><a href="http://upload.wikimedia.org/wikipedia/commons/e/e4/Web_development_timeline.png"><img class="alignnone size-full wp-image-73" title="Web_development_timeline" src="http://cifo.com/blog/wp-content/uploads/2009/07/Web_development_timeline.png" alt="Web_development_timeline" width="385" height="320" /></a></p>
<p><a href="http://www.pcplus.co.uk/node/3062">How spellcheckers work</a></p>
]]></content:encoded>
			<wfw:commentRss>http://cifo.com/blog/?feed=rss2&amp;p=72</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Displaying formatted source code</title>
		<link>http://cifo.com/blog/?p=10</link>
		<comments>http://cifo.com/blog/?p=10#comments</comments>
		<pubDate>Mon, 29 Jun 2009 01:59:00 +0000</pubDate>
		<dc:creator>florin</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://cifo.com/blog/?p=10</guid>
		<description><![CDATA[Before going onto bigger and better things, let&#8217;s start with something I thought will be trivial: displaying nicely formatted source code in WordPress blogs.
Obviously, I read and followed the instructions on the support page, where it says
 
Wrap your code in these tags:
[sourcecode language='css']
your code here
[/sourcecode]
Well, I did that, and the result did not look [...]]]></description>
			<content:encoded><![CDATA[<p>Before going onto bigger and better things, let&#8217;s start with something I thought will be trivial: displaying nicely formatted source code in WordPress blogs.<br />
Obviously, I read and followed the instructions on the <a href="http://support.wordpress.com/code">support page</a>, where it says</p>
<p><em> </em></p>
<p><em>Wrap your code in these tags:</em></p>
<p><em>[<span>sourcecode<span> language='css']</span></span></em></p>
<p><em>your code here</em></p>
<p><em>[<span>/sourcecode</span>]</em></p>
<p>Well, I did that, and the result did not look as shown on that page. At this point I had to start investigating. After saving the HTML page, I tried to figure out what makes the source code be nicely formatted. It turned out that the following lines are responsible:</p>
<pre name="code" class="html"><!-- SyntaxHighlighter Stuff -->
<script src="http://s1.wordpress.com/wp-content/plugins/highlight/shCore.js?1" type="text/javascript"><!--mce:0--></script>

<script src="http://s1.wordpress.com/wp-content/plugins/highlight/shBrushCss.js" type="text/javascript"><!--mce:1--></script>

<script type="text/javascript"><!--mce:2--></script></pre>
<p>These lines reference one stylesheet file and several JavaScript files. They were missing from the displayed HTML, so I tried to insert them into the posting itself. Remarkably, the <code>&lt;script&gt;</code> tag was left intact, but the <code>&lt;link&gt;</code> tag was removed. I had to somehow instruct WordPress to insert this specific <code>&lt;link&gt;</code> tag. And here is where &#8220;plugins&#8221; come handy because this is what they are designed to do: to insert specific files, both CSS and JavaScript in the HTML pages generated by WordPress.</p>
<blockquote><p><a href="http://cifo.com/blog/wp-content/uploads/2009/06/highlighter.zip">Download here</a> a sample HTML file that uses the highlighter JavaScript files independently of WordPress.</p></blockquote>
<p>Searching for <strong>syntax highlighter</strong> in the plugins repository returns a few results. I installed what I thought will be the closest: <strong>Google Syntax Highlighter for WordPress</strong> and <strong>SyntaxHighlighter Evolved</strong>. It is important to mention that the latter seems to be derived from the former. The &#8220;evolved&#8221; version uses the<br />
<code><span>[</span>sourcecode<span>]</span></code> tag (which gets converted to <code>&lt;pre&gt;</code>), whereas the &#8220;original&#8221; uses the <code>&lt;pre&gt;</code> tag.</p>
<p>This is how <strong>Google Syntax Highlighter for WordPress</strong> shows the code:</p>
<pre name="code" class="css">#button {

font-weight: bold;

border: 2px solid #fff;

}</pre>
<p>and this is how <strong>SyntaxHighlighter Evolved</strong> does it:</p>
<pre class="brush: css;">
#button {

font-weight: bold;

border: 2px solid #fff;

}
</pre>
<p>Between the two highlighting plugins I personally prefer the &#8220;original&#8221; <strong>Google Syntax Highlighter for WordPress version 1.5</strong>. Some other bloggers report the same preference (and also ask about how to downgrade from the &#8220;evolved&#8221; plugin). Maybe they will find this interesting: both plugins could co-exist (be active), as shown above; by using one tag or the other, one can choose the way the source code is displayed.</p>
<p>What the above mentioned <a href="http://support.wordpress.com/code/">WordPress tutorial</a> omits to mention is that the <code><span>[</span>sourcecode<span>]</span></code> tag works ONLY after the <strong>SyntaxHighlighter Evolved</strong> plugin is installed. Well, it wasn&#8217;t really time wasted, since I learned something that may also help others.</p>
<p>References:</p>
<ul>
<li><a href="http://code.google.com/p/syntaxhighlighter/wiki/Usage">SyntaxHighlighter</a></li>
<li><a href="http://en.blog.wordpress.com/2007/09/03/posting-source-code/">Posting source code</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://cifo.com/blog/?feed=rss2&amp;p=10</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://cifo.com/blog/?p=1</link>
		<comments>http://cifo.com/blog/?p=1#comments</comments>
		<pubDate>Fri, 22 May 2009 11:04:29 +0000</pubDate>
		<dc:creator>florin</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://cifo.com/blog/?p=1</guid>
		<description><![CDATA[We created this blog to showcase projects we worked on, to discuss interesting topics, to exchange ideas.
As software professionals, we believe in readability and maintainability of the code, and in accountability in its development, from design to deployment, to support. We fully agree with the message of this article, that the software strength resides in [...]]]></description>
			<content:encoded><![CDATA[<p>We created this blog to showcase projects we worked on, to discuss interesting topics, to exchange ideas.</p>
<p>As software professionals, we believe in readability and maintainability of the code, and in accountability in its development, from design to deployment, to support. We fully agree with the message of <a href="http://www.fastcompany.com/node/28121/print">this article</a>, that the software strength resides in the process of creating it. Although we understand that a bug-free software may be a dream, we strive to bring that dream to reality. We value elegant solutions, simplicity of design, yet we are comfortable with complex requirements and sophisticated scenarios.</p>
<p>So welcome to this blog. Check it out often, contribute, express your opinions, be active!</p>
]]></content:encoded>
			<wfw:commentRss>http://cifo.com/blog/?feed=rss2&amp;p=1</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
