<?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>equivocal ramblings &#187; Coding</title>
	<atom:link href="http://kevinfrancis.net/journal/category/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://kevinfrancis.net/journal</link>
	<description>the occasional journal of kevin francis</description>
	<lastBuildDate>Sat, 15 May 2010 14:25:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SVNKit + Subclipse Problems</title>
		<link>http://kevinfrancis.net/journal/2009/05/svnkit-subclipse-problems/</link>
		<comments>http://kevinfrancis.net/journal/2009/05/svnkit-subclipse-problems/#comments</comments>
		<pubDate>Thu, 21 May 2009 17:35:47 +0000</pubDate>
		<dc:creator>Kevin Francis</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Lazy Web]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://kevinfrancis.net/journal/?p=199</guid>
		<description><![CDATA[If you&#8217;re experiencing difficulty getting Subclipse working with SVNKit, install the very latest. One of the dependencies pulled in will list an SVNKit beta. Install that one and it&#8217;ll suddenly show up as a provider.

This is true as of Eclipse Ganymede and Subclipse 1.6.2 (installed with CollabNet Desktop). Just thought to save someone else several [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re experiencing difficulty getting Subclipse working with SVNKit, install the very latest. One of the dependencies pulled in will list an SVNKit beta. Install <em>that</em> one and it&#8217;ll suddenly show up as a provider.</p>

<p>This is true as of Eclipse Ganymede and Subclipse 1.6.2 (installed with CollabNet Desktop). Just thought to save someone else several hours of their life :)</p>
]]></content:encoded>
			<wfw:commentRss>http://kevinfrancis.net/journal/2009/05/svnkit-subclipse-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On CodeIgniter</title>
		<link>http://kevinfrancis.net/journal/2007/04/on-codeigniter/</link>
		<comments>http://kevinfrancis.net/journal/2007/04/on-codeigniter/#comments</comments>
		<pubDate>Wed, 25 Apr 2007 13:43:40 +0000</pubDate>
		<dc:creator>Kevin Francis</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://inactiva.org/journal/2007/04/25/codeigniter-open-source-php-web-application-framework/</guid>
		<description><![CDATA[As taken from the CodeIgniter website:


  CodeIgniter is a powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications. If you&#8217;re a developer who lives in the real world of shared hosting accounts and clients with deadlines, and if you&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>As taken from the <a href="http://codeigniter.com/">CodeIgniter website</a>:</p>

<blockquote>
  <p>CodeIgniter is a powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications. If you&#8217;re a developer who lives in the real world of shared hosting accounts and clients with deadlines, and if you&#8217;re tired of ponderously large and thoroughly undocumented frameworks</p>
</blockquote>

<p>I must say that after looking through the documentation, watching the introductory screencasts and then experimenting with it myself, it really does live up to it&#8217;s claim of real-world thoughtfulness. CodeIgniter flexible and clear when it comes to the MVC pattern, and all through the tutorials I never once felt that I didn&#8217;t quite understand what was going on. Even reading the documentation, it&#8217;s all amazingly well explained.</p>

<p>I&#8217;ve so far not felt mystified by something in the framework, and haven&#8217;t yet had to ask any questions on the forums of IRC channels &#8212; something I&#8217;ve had to do numerous times with <a href="http://cakephp.org/">CakePHP</a>, a similar open-source project. This of course isn&#8217;t to say that Cake is bad, but good documentation is king when it comes to programming.</p>

<p>Overall, the first impression you get when you run CodeIgniter is that of confidence. This is of course the benefit of having a commercial entity backing a project &#8212; little things like the documentation that typically don&#8217;t get done with a non-commercial project get taken care of.</p>

<p>Best of all? CodeIgniter comes with a <a href="http://codeigniter.com/user_guide/license.html">license</a> that qualifies as &#8216;Open Source&#8217;.</p>

<p>Lookout CakePHP, you may have the major portion of mindshare right now, but CodeIgniter is a serious contender.</p>
]]></content:encoded>
			<wfw:commentRss>http://kevinfrancis.net/journal/2007/04/on-codeigniter/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FizzBuzz in PHP</title>
		<link>http://kevinfrancis.net/journal/2007/04/fizzbuzz-in-php/</link>
		<comments>http://kevinfrancis.net/journal/2007/04/fizzbuzz-in-php/#comments</comments>
		<pubDate>Thu, 12 Apr 2007 04:29:19 +0000</pubDate>
		<dc:creator>Kevin Francis</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://inactiva.org/journal/2007/04/12/fizzbuzz-in-php/</guid>
		<description><![CDATA[I was reading Why Can&#8217;t Programmers&#8230; Program today and while I find questions like these annoying at interviews because PHP isn&#8217;t really used for that sort of thing, I set myself and my colleagues the task of writing out answers.

The question:


  Print out the numbers 1 to 100. Where the number is a multiple [...]]]></description>
			<content:encoded><![CDATA[<p>I was reading <a href="http://www.codinghorror.com/blog/archives/000781.html">Why Can&#8217;t Programmers&#8230; Program</a> today and while I find questions like these annoying at interviews because PHP isn&#8217;t really used for that sort of thing, I set myself and my colleagues the task of writing out answers.</p>

<p>The question:</p>

<blockquote>
  <p>Print out the numbers 1 to 100. Where the number is a multiple of 3, print &#8216;Fizz&#8217;, otherwise if it is a multiple of 5 print &#8216;Buzz&#8217;. If the number is a multiple of 3 <em>and</em> 5, print &#8216;FizzBuzz&#8217;.</p>
</blockquote>

<p>Here are our answers, and mind you, they&#8217;re all in PHP.</p>

<p>Lim is our budding project coordinator turned programmer. He&#8217;s just started getting into PHP, and here&#8217;s what Lim came up with:</p>

<pre><code>for ($count=1; $count&lt;=100; $count++)
{
    if ($count%3 == 0 &amp;&amp; $count%5 ==0){
        print "FizzBuzz&lt;br /&gt;";
    }
    elseif ($count%3 == 0){
        print "Fizz&lt;br /&gt;";
    }
    elseif ($count%5 == 0){
        print "Buzz&lt;br /&gt;";
    }
    else {
        print $count."&lt;br /&gt;";
    }
}
</code></pre>

<p>An almost perfect textbook style answer.</p>

<p>Here&#8217;s what Foong came up with:</p>

<pre><code>for($i=1;$i&lt;=100;$i++)
{
    $result=$i/3;
    $result2=$i/5;

    if(!preg_match("[\.]" , $result)&amp;&amp;!preg_match("[\.]" , $result2))
    {
        echo "FizzBuzz&lt;br /&gt;";
    }
    elseif(!preg_match("[\.]" , $result))
    {
        echo "Fizz&lt;br /&gt;";
    }
    elseif(!preg_match("[\.]" , $result2))
    {
        echo "Buzz&lt;br /&gt;";
    }
    else
    {
        echo $i."&lt;br /&gt;";
    }
}
</code></pre>

<p>Certainly an example of &#8230; unique thinking. Foong&#8217;s had more than a year of experience programming in PHP, for the record.</p>

<p>Here&#8217;s what I came up with:</p>

<pre><code>foreach(range(1,100) as $i)
    echo $i % 3 == 0 ? ( $i % 5 == 0 ? "FizzBuzz\r\n" : "Fizz\r\n" ) : ( $i % 5 == 0 ? "Buzz\r\n" : $i."\r\n" );
</code></pre>

<p><strong>Update:</strong> I&#8217;ve made a change to the code, Ken Brush a.k.a. shiruken noticed I&#8217;d missed something out :(</p>

<p>I love the conditional operator @_@</p>

<p>Also, no, I would never use code like this in production, or even casual coding. I just wanted to beat my colleagues on line-count :P</p>

<p>And now, the &#8216;proper&#8217; textbook solution for all the Googlers:</p>

<pre><code>for ($i = 1; $i &lt;= 100; $i++)
{
    if($i % 3 == 0 &amp;&amp; $i % 5 ==0){
        print "FizzBuzz&lt;br /&gt;";
    }
    else if($i % 3 == 0){
        print "Fizz&lt;br /&gt;";
    }
    else if($i % 5 == 0){
        print "Buzz&lt;br /&gt;";
    }
    else {
        print $i."&lt;br /&gt;";
    }
}
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://kevinfrancis.net/journal/2007/04/fizzbuzz-in-php/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
