<?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>CompSci.ca/blog &#187; Programming</title>
	<atom:link href="http://compsci.ca/blog/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://compsci.ca/blog</link>
	<description>Programming, Education, Computer Science</description>
	<lastBuildDate>Mon, 21 Feb 2011 06:36:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The most important programming language</title>
		<link>http://compsci.ca/blog/the-most-important-programming-language/</link>
		<comments>http://compsci.ca/blog/the-most-important-programming-language/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 13:30:17 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://compsci.ca/blog/the-most-important-programming-language/</guid>
		<description><![CDATA[One of the common questions that comes up among students new to Computer Science and Programming is along the lines of <strong>"what is the best programming language?"</strong>. And the the brief answer to that is simple:
<br/>
<strong style="font-size:1.2em;">You're doing it wrong.</strong>


Related posts:<ol><li><a href='http://compsci.ca/blog/looking-back-at-working-with-php/' rel='bookmark' title='Permanent Link: Looking back at working with PHP'>Looking back at working with PHP</a></li><li><a href='http://compsci.ca/blog/you-dont-know-that-programming-language/' rel='bookmark' title='Permanent Link: You don&#8217;t know that programming language'>You don&#8217;t know that programming language</a></li><li><a href='http://compsci.ca/blog/ruby-best-introductory-programming-language/' rel='bookmark' title='Permanent Link: Ruby &#8211; best introductory programming language'>Ruby &#8211; best introductory programming language</a></li></ol>]]></description>
			<content:encoded><![CDATA[<div style="float:right;width:248;margin:5px;">
<img src='http://compsci.ca/blog/wp-content/uploads/2008/08/software_architect.jpg' alt='software architect' /><br />
<cite>Original image by <a href="http://flickr.com/photos/ezu/297634534/" title="Flickr: The perfect software ar">Ezu</a></cite>
</div>
<p>
One of the common questions that comes up among students new to Computer Science and Programming is along the lines of <strong>&#8220;what is the best programming language?&#8221;</strong>. And the the brief answer to that is simple:
</p>
<p>
<strong style="font-size:1.2em;">You&#8217;re doing it wrong.</strong>
</p>
<p>
This requires some elaboration. When one asks <em>&#8220;what is the best programming language to learn?&#8221;</em> or <em>&#8220;what is the best programming language to build video games with?&#8221;</em>, it seems that the intent is to get some experience with one specific technology, and stop there. That is a failure of an approach.
</p>
<p>
A programming language is a tool. Tools have specific purposes. Tools change. New tools, technologies, and techniques becomes available. It doesn&#8217;t make much sense to specialize in wielding a hammer over a screwdriver, if one lacks the core skill of following assembly instructions. However unlike this construction analogy, technological tools change <em>rapidly</em>.
</p>
<p>
<em>&#8220;Java will guarantee a corporate job&#8221;</em>; <em>&#8220;PHP is required for web development&#8221;</em>; <em>&#8220;Ruby is growing at 400% per year&#8221;</em>. A lot of people claim to have a solid idea of where the industry will be and are quick to offer advice, but this can&#8217;t possibly be the case. All of those languages &#8212; Java, PHP, Ruby, have first appeared in 1995. This means that all the hype that you are supposed to <a href="http://compsci.ca/blog/you-dont-know-that-programming-language/" title="You don’t know that programming language">&#8220;know&#8221;</a> right now, didn&#8217;t even exist just 13 years ago. So if you plan on sticking to your <a href="http://compsci.ca/blog/if-a-programming-language-was-a-boat/" title="If a programming language was a boat…">favourite high school programming language</a>, chances are that by the time you graduate from a University, you&#8217;ll show up at the playfield with a wrong type of bat, so to speak.
</p>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/08/higurashi_golf_baseball.jpg' alt='Higurashi: bringing a golf club to a baseball game' /><br />
<em>Higurashi no Naku Koro ni (episode 9)</em></p>
<p>
But then the question still stays: <em>&#8220;what should one learn next?&#8221;</em>. <strong>Algorithms</strong>, <strong>data structures</strong>, <strong>complexity</strong>, <strong>math</strong>&#8230; Learn the core abstracts, ideas, and skills that are language independent, and that transfer from one syntax to another. <strong>Learn the ability to learn.</strong> When a new opportunity with new technology comes along, you should be able to get over the learning curve fairly quickly.
</p>
<p>
So your <em>&#8220;best language&#8221;</em>; your <em>&#8220;most important programming language to learn next&#8221;</em> is the one that will help you do the above. As a tool. <strong>As a palette with which to express and explore your ideas.</strong> It might be one with the cleanest syntax, or the most documentation, or one that you are already familiar with the most.
</p>
<p>
It wouldn&#8217;t make sense to pick up a yet-another-programming-language just to be able to do what you already can, only with a somewhat different syntax. It&#8217;s <em>useless</em> to write the same basic sort in 12 different languages, if all of them are too slow to finish in a reasonable time. Worse yet if you don&#8217;t understand why this is so.
</p>
<p>
So lets drop this obsession with learning to say &#8220;hello world&#8221; (or some more complicated version of essentially the same) in every programming language one can name. Lets also drop the idea of finding <em>&#8220;one language to rule them all; and retire&#8221;</em>. Once we put the <em>Science</em> back in <em>Computer Science</em>, <strong>it wouldn&#8217;t matter which language you&#8217;ll end up using</strong>.</p>


<p>Related posts:<ol><li><a href='http://compsci.ca/blog/looking-back-at-working-with-php/' rel='bookmark' title='Permanent Link: Looking back at working with PHP'>Looking back at working with PHP</a></li><li><a href='http://compsci.ca/blog/you-dont-know-that-programming-language/' rel='bookmark' title='Permanent Link: You don&#8217;t know that programming language'>You don&#8217;t know that programming language</a></li><li><a href='http://compsci.ca/blog/ruby-best-introductory-programming-language/' rel='bookmark' title='Permanent Link: Ruby &#8211; best introductory programming language'>Ruby &#8211; best introductory programming language</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://compsci.ca/blog/the-most-important-programming-language/feed/</wfw:commentRss>
		<slash:comments>64</slash:comments>
		</item>
		<item>
		<title>You don&#8217;t know that programming language</title>
		<link>http://compsci.ca/blog/you-dont-know-that-programming-language/</link>
		<comments>http://compsci.ca/blog/you-dont-know-that-programming-language/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 01:36:28 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Career]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://compsci.ca/blog/you-dont-know-that-programming-language/</guid>
		<description><![CDATA[

Original image by cote


Or maybe you do? How about your favourite programming language? What does it take to say that one &#8220;knows&#8221; it?


michaelp asks:

When exactly do you &#8220;know&#8221; a language?


There&#8217;s a gradient of choices to pick from.


You know of the language &#8212; &#8220;I hear they call it Java.&#8221;
You&#8217;ve memorized the &#8220;hello world&#8221; program &#8212; &#60;?php [...]


Related posts:<ol><li><a href='http://compsci.ca/blog/looking-back-at-working-with-php/' rel='bookmark' title='Permanent Link: Looking back at working with PHP'>Looking back at working with PHP</a></li><li><a href='http://compsci.ca/blog/ruby-best-introductory-programming-language/' rel='bookmark' title='Permanent Link: Ruby &#8211; best introductory programming language'>Ruby &#8211; best introductory programming language</a></li><li><a href='http://compsci.ca/blog/the-most-important-programming-language/' rel='bookmark' title='Permanent Link: The most important programming language'>The most important programming language</a></li></ol>]]></description>
			<content:encoded><![CDATA[<div style="float:right;width:248px;margin:5px;">
<img src='http://compsci.ca/blog/wp-content/uploads/2008/06/stacks_of_programming_books.jpg' alt='a variety of programming language books' /><br />
<cite>Original image by <a href="http://flickr.com/photos/cote/94256599/" title="Flickr: Books for Sale">cote</a></cite>
</div>
<p>
Or maybe you do? How about your favourite programming language? What does it take to say that one <em>&#8220;knows&#8221;</em> it?
</p>
<p>
<a href="http://compsci.ca/v3/viewtopic.php?p=164648" title="When do you 'know' a language?"><strong>michaelp</strong> asks</a>:
</p>
<blockquote><p style="font-size:1.1em;"><strong>When exactly do you &#8220;know&#8221; a language?</strong></p>
</blockquote>
<p>
There&#8217;s a gradient of choices to pick from.
</p>
<ol>
<li><strong>You know of the language</strong> &#8212; <em>&#8220;I hear they call it Java.&#8221;</em></li>
<li><strong>You&#8217;ve memorized the &#8220;hello world&#8221; program</strong> &#8212; <em>&lt;?php echo &#8216;Hello World&#8217;; ?&gt;</em></li>
<li><strong>You know something unique about the language</strong> &#8212; <em>&#8220;Ruby has closures, but Java does not.&#8221;</em></li>
<li><strong>You have all of the documentation memorized</strong> &#8212; because looking things up is much too slow.</li>
<li>And just to get to the other extreme, <strong>you wrote a compiler for the language&#8230; in itself</strong>. (That&#8217;s actually not rare, and is termed <a href="http://compsci.ca/v3/viewtopic.php?t=17959" title="Languages written in their own language">bootstrapping</a>.)</li>
</ol>
<p>
So what does it take for a programming language to make it onto a resume? Apparently not much, if you are a student. <strong><em>&#8220;Know&#8221;</em> is more like <em>&#8220;know of&#8221;</em>.</strong> Though perhaps that is fair enough. A lot of skills are transferable, and it&#8217;s quite easy to pick up on new languages with similar paradigms. <a href="http://compsci.ca/blog/looking-back-at-working-with-php/" title="looking back at working with php">I&#8217;ve done this myself before</a>:
</p>
<blockquote><p>Even though I had no experience with PHP or Oracle, I was fairly familiar with Ruby and MySQL. My job offer relied on the claim that such web development is logistically similar, having substituted Ruby documentation for PHP.</p>
</blockquote>
<p>
<a href="http://hackerdan.com/" title="Daniel Servos’s Development Blog">Dan</a> agrees.
</p>
<blockquote><p>I don&#8217;t think &#8220;knowing&#8221; a language is any where close to as important as knowing the concepts of computer science and software engineering. Once you have a good grasp of the basic and more advanced concepts, changing languages is trival and becomes easier with the more experience you have.</p>
</blockquote>
<p>
So perhaps it would be more honest to focus on what really matters &#8212; algorithms, design patterns, etc. Memorizing the syntax / API will let one type out that bubble sort faster, though that arguably demonstrates the <em>lack of knowledge</em> that matters.
</p>
<p>
I recall the first drafts of my resume, as I&#8217;ve started out in co-op at University. I&#8217;d list a dozen different programming languages that I <strong>knew of</strong>. Now I would probably list <em>none</em>. That is not to say that I have unlearned things over the years but, on the contrary, that it&#8217;s true that <strong>the more you know, the more you realize of how little you know in the grander scheme of things</strong>.
</p>
<p>
So, with a few exceptions, <strong>I don&#8217;t think one gets to <em>&#8220;know&#8221;</em> a programming language. I also think that this shouldn&#8217;t matter.</strong></p>


<p>Related posts:<ol><li><a href='http://compsci.ca/blog/looking-back-at-working-with-php/' rel='bookmark' title='Permanent Link: Looking back at working with PHP'>Looking back at working with PHP</a></li><li><a href='http://compsci.ca/blog/ruby-best-introductory-programming-language/' rel='bookmark' title='Permanent Link: Ruby &#8211; best introductory programming language'>Ruby &#8211; best introductory programming language</a></li><li><a href='http://compsci.ca/blog/the-most-important-programming-language/' rel='bookmark' title='Permanent Link: The most important programming language'>The most important programming language</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://compsci.ca/blog/you-dont-know-that-programming-language/feed/</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
		<item>
		<title>Web 2.point.Mac: Developing software on Apple computers</title>
		<link>http://compsci.ca/blog/web-2pointmac-developing-software-on-apple-computers/</link>
		<comments>http://compsci.ca/blog/web-2pointmac-developing-software-on-apple-computers/#comments</comments>
		<pubDate>Thu, 08 May 2008 02:13:56 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://compsci.ca/blog/web-2pointmac-developing-software-on-apple-computers/</guid>
		<description><![CDATA[

There seem to be some misconceptions about Apple computers. Some of the common questions that come up, at least when thinking about for-University laptops, are along the lines of &#8220;Will I be able to write programs on a MacBook?&#8221; and &#8220;I thought Macs were just for arts&#8230;&#8221;. I will try to challenge that view.


Note: This [...]


Related posts:<ol><li><a href='http://compsci.ca/blog/the-silliest-reason-to-get-a-macbook/' rel='bookmark' title='Permanent Link: The silliest reason to get a MacBook'>The silliest reason to get a MacBook</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/05/web_2_point_mac.png' alt='Web 2.Mac icon' align="right" /></p>
<p>
There seem to be some misconceptions about Apple computers. Some of the common questions that come up, at least when thinking about <em>for-University</em> laptops, are along the lines of <em>&#8220;Will I be able to write programs on a MacBook?&#8221;</em> and <em>&#8220;I thought Macs were just for arts&#8230;&#8221;</em>. <strong>I will try to challenge that view.</strong>
</p>
<p style="font-size:0.8em;line-height:1.1em;">
Note: <strong>This is not a OS X vs. Windows vs. Linux argument.</strong> There are plenty of those just about everywhere else. If you really feel like repeating any of the arguments that have already been mentioned many times before &#8212; <a href="http://compsci.ca/v3/viewtopic.php?t=17392" title="compsci.ca: Mac vs. PC">try the forums</a> instead.
</p>
<p>
The use of Apple computers among the software developers is actually quite common. And with a plethora office snapshots available on Flickr, this calls for a visual case study!
</p>
<h2><a href="http://www.adobe.com/" title="Adobe.com">Adobe</a></h2>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/05/adobe_office_mac.jpg' alt='Adobe Office' /><br />
<cite>Original photo by: <a href="http://flickr.com/photos/tsk/2048316858/" title="Flickr: Office Panorama">tskdesign</a>.</cite> That&#8217;s totally a Mac. See the original image for higher quality. Though having made Photoshop, <em>the</em> Apple application, there isn&#8217;t much surprise here.</p>
<h2><a href="http://digg.com/" title="Digg.com">Digg</a></h2>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/05/digg_kevin_rose_macbook.jpg' alt='Digg’s Kevin Rose with his Macbook' /><br />
<cite>Original photo by: <a href="http://flickr.com/photos/michellelawson/2282834098/" title="Flickr: Alex Albrecht and Kevin Rose">Mrs L</a>.</cite> Digg&#8217;s Kevin Rose loves his MacBook. There&#8217;s more of this at just about every Diggnation episode.</p>
<h2><a href="http://www.facebook.com/" title="Facebook.com">Facebook</a></h2>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/05/facebook_office_mac.jpg' alt='Facebook office with macs' /><br />
<cite>Original photo by: <a href="http://flickr.com/photos/zachklein/360744107/" title="Flickr: Working from the Facebook office in Palo Alto, CA">Zach Klein</a>.</cite> This Facebook office comes with a couple of Apple workstations.</p>
<h2><a href="http://www.flickr.com/" title="Flickr.com">Flickr</a></h2>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/05/flickr_office_mac.jpg' alt='Flickr office with macs' /><br />
<cite>Original photo by: <a href="http://flickr.com/photos/roozbeh-a-brojeni/2121242252/" title="Flickr: Look at the Flickr Office!!!">roozbeh-a-brojeni</a>.</cite> Searching for Flickr on Flickr is so meta&#8230;</p>
<h2><a href="http://www.gigpark.com/" title="GigPark.com">GigPark</a></h2>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/05/gigpark_office_mac.jpg' alt='GigPark office: also with iPhone' /><br />
<cite>Original photo by: <a href="http://flickr.com/photos/gigpark/2474303315/" title="Flickr: Gianni">GigPark @ Flickr</a>.</cite> GigPark is all Mac <em>and</em> iPhone. Those aren&#8217;t even available in Canada yet! (Also, is that Facebook.com on the screen? Slacker.)</p>
<h2><a href="http://www.google.com/" title="Google.com">Google</a></h2>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/05/google_office_mac_boat.jpg' alt='Google office with a boat for a couch' /><br />
<cite>Original photo by: <a href="http://flickr.com/photos/25227298@N03/2383273076/" title="Flickr: Google_Office_Zurich_38">Anil Chopra</a>.</cite> I don&#8217;t understand this, but one of Google&#8217;s offices has <a href="http://compsci.ca/blog/if-a-programming-language-was-a-boat/" title="If a programming language was a boat…">a boat</a> for a couch. There&#8217;s also a MacBook.</p>
<h2><a href="http://www.linkedin.com/" title="LinkedIn.com">LinkedIn</a></h2>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/05/linkedin_office_mac.jpg' alt='LinkedIn office with a mac' /><br />
<cite>Original photo by: <a href="http://www.flickr.com/photos/8633528@N06/2447742488/" title="Flickr: Jim Meyer and Jerry Luk at LinkedIn's new office space in Mountain View">LinkedIn Blog @ Flickr</a>.</cite> <del>Look, it&#8217;s iMac.</del> From <a href="http://www.flickr.com/photos/8633528@N06/2195920830/" title="Flickr: LinkedIn Office">another angle</a> it&#8217;s actually a Cinema display attached to a MacBook Pro.</p>
<h2><a href="http://www.microsoft.com/" title="Microsoft.com">Microsoft</a></h2>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/05/microsoft_office_macbook.jpg' alt='Microsoft Office with a Macbook Pro on premises' /><br />
<cite>Original photo by: <a href="http://www.flickr.com/photos/jeffwilcox/1611097154/" title="Flickr: New work office (a work in progress)">jeffwilcox</a>.</cite> That&#8217;s right, a MacBook Pro on Microsoft&#8217;s campus. Actually those are not nearly as uncommon as one might think, as Microsoft develops plenty of software that runs on Macs as well.</p>
<h2><a href="http://www.mozilla.com/" title="Mozilla.com">Mozilla</a></h2>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/05/mozilla_office_mac.jpg' alt='Mozilla’s new Toronto office' /><br />
<cite>Original photo by: <a href="http://www.flickr.com/photos/stuartp/1714357016/" title="Flickr: Mozilla Toronto">stuartp</a>.</cite> Mozilla&#8217;s new Toronto office is all Mac (and a cardboard box for a coffee table).</p>
<h2><a href="http://twitter.com/" title="Twitter.com">Twitter</a></h2>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/05/twitter_office_mac.jpg' alt='Twitter office is full of macs' /><br />
<cite>Original photo by: <a href="http://www.flickr.com/photos/kohtz/535632337/" title="Flickr: twitter office">kohtzy</a>.</cite> I suspect that just about all of the computers at Twitter are Macs. Though other than the few marked in the image, event at high resolution cited, I can&#8217;t say definitively.</p>
<p>
So there you have it &#8212; a bunch of Apple computers used by real developers at real software companies (likely using <a href="http://compsci.ca/blog/its-a-real-programming-language/" title="it’s a real programming language">real programming languages</a>). There are, obviously, a lot more tech companies, but I&#8217;d leave them to the comments section.
</p>
<p> <a href="http://pos-wizard.com/2008/08/paygo-saas-pos-software-review/">PayGO review</a> , a Mac point of sale application. Reviews of many point of sale products. http://pos-wizard.com/point-of-sale-software-reviews/</p>


<p>Related posts:<ol><li><a href='http://compsci.ca/blog/the-silliest-reason-to-get-a-macbook/' rel='bookmark' title='Permanent Link: The silliest reason to get a MacBook'>The silliest reason to get a MacBook</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://compsci.ca/blog/web-2pointmac-developing-software-on-apple-computers/feed/</wfw:commentRss>
		<slash:comments>49</slash:comments>
		</item>
		<item>
		<title>If a programming language was a boat&#8230;</title>
		<link>http://compsci.ca/blog/if-a-programming-language-was-a-boat/</link>
		<comments>http://compsci.ca/blog/if-a-programming-language-was-a-boat/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 05:30:09 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://compsci.ca/blog/if-a-programming-language-was-a-boat/</guid>
		<description><![CDATA[
This one is inspired by a recent forum post, that still leaves me in amazement.


Hi, Im wondering how i can create a boat in turing and if someone can post a example.



This makes no sense, since one doesn&#8217;t normally make water vehicles in Turing, the programming language. Though this got me thinking &#8212; if a [...]


Related posts:<ol><li><a href='http://compsci.ca/blog/the-most-important-programming-language/' rel='bookmark' title='Permanent Link: The most important programming language'>The most important programming language</a></li><li><a href='http://compsci.ca/blog/this-is-sparta-ruby/' rel='bookmark' title='Permanent Link: This is -Sparta- Ruby!!!'>This is -Sparta- Ruby!!!</a></li><li><a href='http://compsci.ca/blog/you-dont-know-that-programming-language/' rel='bookmark' title='Permanent Link: You don&#8217;t know that programming language'>You don&#8217;t know that programming language</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>
This one is inspired by a <a href="http://compsci.ca/v3/viewtopic.php?t=17667" title="compsci.ca forums: Turing Boat">recent forum post</a>, that still leaves me in amazement.
</p>
<blockquote><p>
Hi, Im wondering how i can create a boat in turing and if someone can post a example.
</p>
</blockquote>
<p>
This makes no sense, since one doesn&#8217;t normally make water vehicles in <a href="http://compsci.ca/blog/download-turing-411/" title="download turing 4.1.1">Turing</a>, the <em>programming language</em>. Though this got me thinking &#8212; if a programming language was a boat, what would it be?
</p>
<h2>Turing</h2>
<p>
Turing would definitely be a <strong>kayak</strong> (thank you for comments). It&#8217;s small. It&#8217;s human powered. It&#8217;s often used as a beginner &#8220;boat&#8221;. And it&#8217;s also very Canadian.
</p>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/04/turing_programming_canoe.jpg' alt='Turing programming language as a canoe' /><br />
<cite>Original photo by <a href="http://flickr.com/photos/naokomc/156828402/" title="Flickr: Kayaks">naokomc</a></cite></p>
<h2>Java</h2>
<p>
Java is a <strong>cargo ship</strong>. It&#8217;s very bulky. It&#8217;s very enterprise~y. Though it can also carry a lot of weight. Will carry a project, but not very fun to drive.
</p>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/04/java_programming_cargo.jpg' alt='Java programming language as a cargo ship' /><br />
<cite>Original photo by <a href="http://flickr.com/photos/cfarivar/173365756/" title="Flickr: Cargo Ship, Port of Oakland">cfarivar</a></p>
<h2>Perl</h2>
<p>
Perl is a <strong>tugboat</strong>. Powerful enough to tug <em>Java</em> around, in 80 characters or less.
</p>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/04/perl_programming_tugboat.jpg' alt='Perl programming language as a tugboat' /><br />
<cite>Original photo by <a href="http://flickr.com/photos/xeeliz/144610833/" title="Flickr: Tug boat races">xeeliz</a></p>
<h2>Ruby</h2>
<p>
Ruby is difficult to describe. It&#8217;s sleek, sexy, and very fun to drive. Here&#8217;s a picture. Very trendy.
</p>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/04/ruby_programming_speed_boat.jpg' alt='Ruby programming language as a speed boat' /><br />
<cite>Original photo by <a href="http://flickr.com/photos/igoryariv/2369991365/" title="Flickr: Speedster WAKE">Tony Falcon</a></p>
<h2>PHP</h2>
<p>
PHP is a <strong>bamboo raft</strong>. A series of hacks held together by string. Still keeps afloat though.
</p>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/04/php_programming_raft.jpg' alt='PHP programming language as a raft' /><br />
<cite>Original photo by <a href="http://flickr.com/photos/iamagenious/388303912/" title="Flickr: a final good bye to our bamboo raft.">permanently scatterbrained</a></p>
<h2>C</h2>
<p>
C is a <strong>nuclear submarine</strong>. The instructions are probably in a foreign language, but <em>all</em> of the hardware itself is optimized for performance.
</p>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/04/c_programming_submarine.jpg' alt='C programming language as a nuclear submarine' /><br />
<cite>Original photo by <a href="http://flickr.com/photos/mateus27_24-25/2167985589/" title="Flickr: AUSTRALIAN_SUBMARINE_01">Ryan C. McGinley</a></p>
<h2>HTML</h2>
<p>
HTML <a href="http://compsci.ca/blog/its-a-real-programming-language/" title="It's a real programming language">isn&#8217;t really a <del>programming language</del></a> boat.
</p>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/04/html_not_a_boat.jpg' alt='HTML is not a boat' /><br />
<cite>Original photo by <a href="http://flickr.com/photos/ascendeddaniel/517242460/" title="Flickr: Underwater Bicycle Racing">ascendeddaniel</a></p>
<p>
There&#8217;s a lot more to this, and it&#8217;s all up for discussion. How would your favourite programming language fare in open waters?</p>


<p>Related posts:<ol><li><a href='http://compsci.ca/blog/the-most-important-programming-language/' rel='bookmark' title='Permanent Link: The most important programming language'>The most important programming language</a></li><li><a href='http://compsci.ca/blog/this-is-sparta-ruby/' rel='bookmark' title='Permanent Link: This is -Sparta- Ruby!!!'>This is -Sparta- Ruby!!!</a></li><li><a href='http://compsci.ca/blog/you-dont-know-that-programming-language/' rel='bookmark' title='Permanent Link: You don&#8217;t know that programming language'>You don&#8217;t know that programming language</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://compsci.ca/blog/if-a-programming-language-was-a-boat/feed/</wfw:commentRss>
		<slash:comments>277</slash:comments>
		</item>
		<item>
		<title>(not) Cargo cult programming, source control, communication, and lack of it all</title>
		<link>http://compsci.ca/blog/not-cargo-cult-programming-source-control-communication-and-lack-of-it-all/</link>
		<comments>http://compsci.ca/blog/not-cargo-cult-programming-source-control-communication-and-lack-of-it-all/#comments</comments>
		<pubDate>Thu, 20 Mar 2008 05:39:24 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://compsci.ca/blog/not-cargo-cult-programming-source-control-communication-and-lack-of-it-all/</guid>
		<description><![CDATA[
Sometimes group projects go wrong. Terribly, terribly wrong. Consider a multi-group project with a shared code-base, for a car racing game. Coded in C.



&#8220;This is even worse than before. They put multiple versions of their same code, in the same branch. And demos they found online.&#8221;


Cargo cult programming is a style of computer programming that [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>
Sometimes group projects go wrong. Terribly, terribly wrong. Consider a multi-group project with a shared code-base, for a car racing game. <em>Coded in C</em>.
</p>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/03/cargo_cult_programming_chat.png' alt='Chat with Dan on his group project ruined by incompetent members' /></p>
<p>
<em>&#8220;This is even worse than before. They put multiple versions of their same code, in the same branch. And demos they found online.&#8221;</em>
</p>
<blockquote><p>
<a href="http://en.wikipedia.org/wiki/Cargo_cult_programming" title="Wikipedia: cargo cult programming"><strong>Cargo cult programming</strong></a> is a style of computer programming that is characterized by the ritual inclusion of code or program structures that serve no real purpose.
</p>
</blockquote>
<p>
I have seen some students try to paste in blocks of code, seemingly at random, out of desperation, frustration, confusion&#8230; though doing that in a <em>completely different language</em> is new. <strong>Epic fail!</strong>
</p>
<p>
The <em>thousand monkeys on thousand typewriters</em> mentality fails as the number of monkeys approaches one. Software rarely gets better from having more code thrown in (actually it often <a href="http://compsci.ca/blog/software-design-simple-is-beautiful/" title="Software design: Simple is beautiful">gets worse</a>). And lack of <a href="http://compsci.ca/blog/developing-at-the-speed-of-thought/" title="Developing at the speed of thought">thought</a> <em>poisons</em> the code-base for all of the team members, with content that should simply <a href="http://compsci.ca/blog/delete-bugs-and-broken-code/" title="Delete bugs and broken code">be deleted</a>. This quickly turns into a mess of a project.
</p>
<blockquote><p>We&#8217;ve got to get more <a href="http://compsci.ca/blog/poems-in-linux-documentation/" title="Poems in Linux documentation -- monkey is not running">monkeys</a>!</p>
</blockquote>
<p>
So for everybody&#8217;s sanity (and better grades!), lets refrain from throwing random code into group projects. I think a good rule to have is a requirement for <a href="http://compsci.ca/blog/on-the-use-of-comments-in-code/" title="On the use of comments in code">some comments</a> (it&#8217;s ok if they are short), both next to the new code, and in the source control commit messages. If anything, then simply as a proof, to everybody, that you know what you are doing. Lets be honest, if one isn&#8217;t sure what&#8217;s happening with their own code, others will have even less of an idea trying to figure it out.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://compsci.ca/blog/not-cargo-cult-programming-source-control-communication-and-lack-of-it-all/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>hard code</title>
		<link>http://compsci.ca/blog/hard-code/</link>
		<comments>http://compsci.ca/blog/hard-code/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 22:26:06 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Contests]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://compsci.ca/blog/hard-code/</guid>
		<description><![CDATA[
Hard coding is the practice of embedding a pre-calculated result into a program. Input is disregarded, there are no calculations or logic flow, just unchanging (thus &#8220;hard&#8221;) output. This shouldn&#8217;t count as programming. And even though hard code is appropriate sometimes (such as stubs in test suites), it is most often encountered in a matter [...]


Related posts:<ol><li><a href='http://compsci.ca/blog/ways-to-spot-plagiarized-code/' rel='bookmark' title='Permanent Link: Ways to spot plagiarized code'>Ways to spot plagiarized code</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>
<strong>Hard coding</strong> is the practice of embedding a pre-calculated result into a program. Input is disregarded, there are no calculations or logic flow, just unchanging (thus <em>&#8220;hard&#8221;</em>) output. This <a href="http://compsci.ca/blog/its-a-real-programming-language/" title="It's a real programming language">shouldn&#8217;t count as <em>programming</em></a>. And even though hard code is appropriate sometimes (such as stubs in test suites), it is most often encountered in a matter of avoiding doing real work.
</p>
<p>
This makes me recall one of my all-time favourite <a href="http://compsci.ca/blog/computer-programming-related-webcomics/" title="Computer Programming related Webcomics">programming webcomics</a> from MacHall:
</p>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/02/machall_hard_code.jpg' alt="you miserable monkey men who tried to hardcode the results are beneath my mention" /></p>
<p>
As a person controlling your (<a href="http://dwite.ca/" title="DWITE programming contest">DWITE</a>) grades, I too have some advice:
</p>
<ol>
<li><strong>Sidestepping the assignment negates its purpose</strong>. You fail to learn a concept or <em>demonstrate your ability</em>.</li>
<li>In an academic setting, you <a href="http://compsci.ca/blog/ways-to-spot-plagiarized-code/" title="Ways to spot plagiarized code"><strong>simply fail</strong></a>.</li>
<li><strong>You are almost there</strong>. Even the hard code values come from somewhere, perhaps from <a href="http://compsci.ca/blog/super-paper-programming/" title="Super paper programming">figuring things out on paper</a> &#8212; put the same logic into the program.</li>
</ol>
<p>
Though I think I&#8217;ll let MacHall offer the final advice on writing hard code&#8230;
</p>
<p><img src='http://compsci.ca/blog/wp-content/uploads/2008/02/machall_hard_code_advice.jpg' alt="work harder or there'll be hell to pay" /></p>
<p>
That is all.</p>


<p>Related posts:<ol><li><a href='http://compsci.ca/blog/ways-to-spot-plagiarized-code/' rel='bookmark' title='Permanent Link: Ways to spot plagiarized code'>Ways to spot plagiarized code</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://compsci.ca/blog/hard-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Compiler compliant, or figuring out error messages in code</title>
		<link>http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/</link>
		<comments>http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/#comments</comments>
		<pubDate>Mon, 28 Jan 2008 06:03:26 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/</guid>
		<description><![CDATA[
&#8220;Informative, yet strangely mocking&#8221;. That is how compiler errors often appear to be. Sometimes they are straight forward, though often not as much&#8230;



Debugging software is an art of its own, without which it could be quite frustrating to explore the field of computer programming. The unchartered areas of computer code often come with ambiguous errors [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>
<em>&#8220;Informative, yet strangely mocking&#8221;</em>. That is how compiler errors often appear to be. Sometimes they are straight forward, though often not as much&#8230;
</p>
<p><a href='http://www.frozenreality.co.uk/comic/bunny/index.php?id=1081' title='FrozenReality Bunny: neener neener'><img src='http://compsci.ca/blog/wp-content/uploads/2008/01/compiler_error.jpg' alt='bunny comic compiler error' /></a></p>
<p>
Debugging software is an art of its own, without which it could be quite frustrating to explore the field of computer programming. The unchartered areas of computer code often come with ambiguous errors and bugs, and it seems that many students try to stay away from the unknown. There&#8217;s this fear of being told, by a computer, that you are wrong &#8212; though that may stem from the general tendency of schools to <a href="http://compsci.ca/blog/teaching-creativity-do-schools-today-kill-creativity/" title="Teaching creativity: Do schools today kill creativity?">suppress creativity</a>.
</p>
<p>
And that&#8217;s a closed loop &#8212; <em>fear of errors discourage trying new things; isolation from errors limits experience of understanding bugs; limited experience spawns fear of dealing with errors</em>. It&#8217;s a tough loop to break out of, especially if the educational system re-enforces the idea of not making mistakes. Though mistakes are there to learn from, <strong>and we must break out of this loop</strong>. Otherwise we give up creativity. We give up ability to deal with errors. We give up the sense of exploration and ability to understand and push a system to its limits. This is too much to pass up on.
</p>
<p><a href='http://xkcd.com/371/' title='XKCD compiler compliant'><img src='http://compsci.ca/blog/wp-content/uploads/2008/01/xkcd_compiler_complaint.png' alt='XKCD compiler compliant' /></a></p>
<p>
There are many way of dealing with bugs and errors, and most come down to just one thing, <strong>understand <em>exactly</em> what you are doing</strong>. This is where the Computer Science part kicks in &#8212; set up an experiment that isolates the faulty code. This is kind of like <a href="http://compsci.ca/blog/delete-bugs-and-broken-code/" title="Delete bugs and broken code">deleting faulty code</a>, but in reverse. Figure out what part of the code causes a problem. Figure out the problem. <em>Really</em> figure out the problem. It&#8217;s a learning process, and over time it&#8217;s easy to get a feel for what causes cryptic error messages, without the need to jump through the hoops to find that code. Though it takes practice.
</p>
<p>
I am not suggesting to break your own code on purpose (that&#8217;s just not the same), but don&#8217;t be afraid to have your code broken. It&#8217;s best to get in this habit early, as programming comes with a lot of errorous code: accidental mistakes and typos, having to deal with someone else&#8217;s code, or simply pesky University exam questions.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Benefits of programming outside</title>
		<link>http://compsci.ca/blog/benefits-of-programming-outside/</link>
		<comments>http://compsci.ca/blog/benefits-of-programming-outside/#comments</comments>
		<pubDate>Wed, 02 Jan 2008 04:02:47 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://compsci.ca/blog/benefits-of-programming-outside/</guid>
		<description><![CDATA[
image (c) Steven Duerinckx &#8211; www.darkink.be


Developing quality software requires a lot of mental effort. The concept could be difficult to grasp for people outside the field, those who associate work with physical labour &#8212; movement, assembly, typing up reports. Though when it comes to writing software, a bulk of effort goes into thought. So much [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<div style="float:right;width:250px;"><a href='http://flickr.com/photos/darklife/1557654307/' title='Flickr: 42/365 : Crème Bruleé'><img src='http://compsci.ca/blog/wp-content/uploads/2008/01/laptop_outside.jpg' alt='laptop outside' /></a><br />
image (c) Steven Duerinckx &#8211; <a href="http://www.darkink.be/" title="Dark Ink">www.darkink.be</a>
</div>
<p>
Developing quality software requires a lot of mental effort. The concept could be difficult to grasp for people outside the field, those who associate work with physical labour &#8212; movement, assembly, typing up reports. Though when it comes to writing software, a bulk of effort goes into <a href="http://compsci.ca/blog/developing-at-the-speed-of-thought/" title="Developing at the speed of thought">thought</a>. So much in the same way how one needs to take a break after lifting heavy boxes, it&#8217;s also a good idea to give one&#8217;s mind a break after a mental workout.
</p>
<p>
<strong>Personally, I like to go outside for short walks.</strong>
</p>
<p>
While distracting yourself with <a href="http://programming.reddit.com/" title="programming.reddit : what's new online">reddit</a> takes one&#8217;s mind off actual work just the same, there are a number of additional benefits to going outside:
</p>
<ol>
<li><strong>Get some fresh air</strong> &#8212; the brain is very sensitive to the levels of oxygen. Assuming that the quality of air is actually better outside, it is very refreshing to recharge with a fresh supply.</li>
<li><strong>Reduce eye stress</strong> &#8212; walking away from your screen reduces the stress on your eyes. Preventing the buildup of stress on the eyes is very important for their <a href="http://compsci.ca/blog/eating-well-to-maintain-good-eyesight/" title="Eating well to maintain good eyesight">maintenance</a>.</li>
<li><strong>Refresh the mind</strong> &#8212; when stuck at a problem, going outside puts things into a new perspective, one away from all the lines of code. Sometimes I come up with new ideas to try, but more often I just let my mind drift and sort itself out, in a zen line state.</li>
</ol>
<p>
During one of my work terms, even as a student, I have gotten a few senior developers to regularly join me for <a href="http://compsci.ca/blog/death-by-coffee-whats-your-programming-drink/" title="Death by Coffee - what’s your Programming Drink?">coffee breaks</a> across the street from the office. It was a much needed opportunity for the mind to take a break from the programming and refresh itself in the afternoon, so the idea quickly caught on. As an added bonus, we were keeping up with each other&#8217;s progress much better than the weekly meetings ever could facilitate.
</p>
<p>
What do others do to keep their mind from burning out after long programming sessions? Leave a comment!</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://compsci.ca/blog/benefits-of-programming-outside/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Programming is like LEGO</title>
		<link>http://compsci.ca/blog/programming-is-like-lego/</link>
		<comments>http://compsci.ca/blog/programming-is-like-lego/#comments</comments>
		<pubDate>Thu, 27 Dec 2007 07:20:25 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://compsci.ca/blog/programming-is-like-lego/</guid>
		<description><![CDATA[
I&#8217;ve noticed some students asking a rather silly question:

what commands will i need?



What makes this question silly is that it is asked in &#8220;what is the minimum set of a programming language keywords required to complete a task?&#8221; type of sense. It usually has to do with some game project, and the student is looking [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>
I&#8217;ve noticed some students asking a rather silly question:
</p>
<blockquote><p>what commands will i need?</p>
</blockquote>
<p><a href='http://flickr.com/photos/travelinlibrarian/2110809604/' title='Flickr: A bag of Legos'><img src='http://compsci.ca/blog/wp-content/uploads/2007/12/bag_of_lego.jpg' alt='bag of lego blocks' align="right" /></a></p>
<p>
What makes this question silly is that it is asked in <em>&#8220;what is the minimum set of a programming language <strong>keywords</strong> required to complete a task?&#8221;</em> type of sense. It usually has to do with some <a href="http://compsci.ca/blog/12-computer-science-game-project-ideas/" title="Video game project ideas">game project</a>, and the student is looking for some <em>&#8220;fix it all&#8221;</em> type of answers. There isn&#8217;t one.
</p>
<p>
The thing is, <em><strong>computer programming is like LEGO</strong></em>. Having a list of a bunch of different commands is like having a bag of blocks &#8212; useless on its own, but with a potential to build something. Advanced commands are like specialty pieces, they can be used to achieve a higher level of detail, but often must be used in a creative way. Though the important point here, is that similar models can often be put together, just out of the basic pieces.
</p>
<p><a href='http://flickr.com/photos/10755528@N08/943352198/' title='Flickr: Halo Banshee 2'><img src='http://compsci.ca/blog/wp-content/uploads/2007/12/lego_banshee_1.jpg' alt='detailed lego banshee model' align="left" /></a> <a href='http://flickr.com/photos/dean_hofmeyer/224858679/' title='Flickr: Shee 1'><img src='http://compsci.ca/blog/wp-content/uploads/2007/12/lego_bunshee_2.jpg' alt='lower detail lego bunshee model' /></a></p>
<div style="clear:both;"></div>
<p>
Basic variables, input/output, if statement, and a loop should be enough to do just about everything. Obviously this doesn&#8217;t guarantee efficiency, or speed of development, or maintainability. Some students don&#8217;t question this though, and blissfully type up <a href="http://compsci.ca/blog/developing-at-the-speed-of-thought/" title="Developing at the speed of thought">5000 lines of repeated code</a>.
</p>
<p>
Alright, so a special block would have been useful, but the question is still backwards. A bag of new commands is always followed up with a <em>&#8220;what do I do with any of this?&#8221;</em> question, leaving the student more confused than before. One can&#8217;t just shake a bag of blocks and expect an assembled model to fall out. During the assembly, one needs to know what kind of a block needs to be attached next, and then find that block. Similarly one needs to figure out what task needs to be performed, before searching for a command that performs that task.
</p>
<p>
So the question is not <em>&#8220;what commands will i need?&#8221;</em>. It should be <em>&#8220;what command performs this particular action?&#8221;</em>. One is better off knowing what they are building, rather than shaking a bag of parts without a plan.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://compsci.ca/blog/programming-is-like-lego/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ways to spot plagiarized code</title>
		<link>http://compsci.ca/blog/ways-to-spot-plagiarized-code/</link>
		<comments>http://compsci.ca/blog/ways-to-spot-plagiarized-code/#comments</comments>
		<pubDate>Mon, 12 Nov 2007 14:30:29 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://compsci.ca/blog/many-ways-to-spot-plagiarized-code/</guid>
		<description><![CDATA[
Copying code for Computer Science assignments continues to be a recurring problem, even though it&#8217;s very easy to get caught. To demonstrate this point in practise, a real world example has recently surfaced on the forums &#8212; &#8220;i need help!please fix my battleship game!!!i dont know what to do!!&#8221;[sic].


I previously mentioned that programming has a [...]


Related posts:<ol><li><a href='http://compsci.ca/blog/source-control-plagirism-in-education/' rel='bookmark' title='Permanent Link: Source Control (plagirism) in Education'>Source Control (plagirism) in Education</a></li><li><a href='http://compsci.ca/blog/regular-expression-google-code-search/' rel='bookmark' title='Permanent Link: Regular Expression Google Code Search'>Regular Expression Google Code Search</a></li><li><a href='http://compsci.ca/blog/on-the-use-of-comments-in-code/' rel='bookmark' title='Permanent Link: On the use of comments in code'>On the use of comments in code</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>
<a href="http://compsci.ca/blog/plagiarizing-code-for-computer-programming-assignments/" title="Plagiarizing code for computer programming assignments">Copying code</a> for Computer Science assignments continues to be a recurring problem, even though it&#8217;s <a href="http://compsci.ca/blog/source-control-plagirism-in-education/" title="Source Control (plagiarism) in Education">very easy to get caught</a>. To demonstrate this point in practise, a real world example has recently surfaced on the forums &#8212; <a href="http://compsci.ca/v3/viewtopic.php?t=16467" title="Plagiarized code example">&#8220;i need help!please fix my battleship game!!!i dont know what to do!!&#8221;</a>[sic].
</p>
<p>
I previously mentioned that programming has a <em>handwriting like</em> signature that could be analyzed. This could be matched to the previously submitted programs, but even better &#8212; when a program is mashed together out of copied parts, the <em>inconsistencies</em> really show through. It is those inconsistencies in the coding style that easily give away the plagiarism offence.
</p>
<p>
<img id="image424" src="http://compsci.ca/blog/wp-content/uploads/2007/11/plagiarism_function_names.png" alt="different signatures in function names" align="left" /><strong>Function naming conventions</strong>. There are different styles to naming functions. Descriptive words, capitalization, use of underscores, use of parameters. Good use of helper methods in some places, but repetition of code in others also signals an inconsistency of function use.
</p>
<p>
<img id="image425" src="http://compsci.ca/blog/wp-content/uploads/2007/11/plagiarism_variable_names.png" alt="different signatures in variable names" align="left" /><strong>Variable naming conventions</strong>. Notice the degeneration of variable naming quality. From <em>PicBackGround</em> to <em>picback</em> &#8212; there&#8217;s a loss of CamelCase format and descriptiveness, while both variables are used for the same purpose. <em>game</em>/<em>gam</em> &#8212; inconsistency in spelling. The use of really obscure variables, such as <em>d</em> is quite a bit off from very descriptive variables, such as the first <em>PicBackGround</em>. Declaration of variables that are never used in the program should also prompt questions.
</p>
<p>
<img id="image426" src="http://compsci.ca/blog/wp-content/uploads/2007/11/plagiarism_comments_in_code.png" alt="different signatures in comments of code" align="left" /><strong>Comments describe more than code</strong>. Same as before, there are obvious formatting styles to comments. Capitalization of words, indentation, use of comment characters. The distribution of comments is also telling &#8212; some sections of code could be lacking necessary comments, while others would have more than needed amount of description. The vocabulary, spelling, and grammar used in the comments is also very reflective of the author. <em>&#8220;user is playing&#8221;</em> vs. <em>&#8220;the player lose&#8221;</em> should raise flags.
</p>
<p>
<img id="image427" src="http://compsci.ca/blog/wp-content/uploads/2007/11/plagiarism_strings_in_code.png" alt="different signatures in strings of code" align="left" /><strong>String literals</strong>, similar to comments found in code, bring the plagiarism fight back into the realm of the English class. All of the words used in a program, form a sort of an <em>essay</em>. Vocabulary, spelling, grammar, punctuation &#8212; it all assesses the author, on a level independent of code, logic, and algorithms.
</p>
<p>
<strong>And more!</strong> Outside the scope of this example, there&#8217;s also Math, preferences toward some functions over others, structure of logic, algorithms, and other technical details. The point here is simple &#8212; <em>don&#8217;t plagiarize code, it&#8217;s too easy to get caught</em>.</p>


<p>Related posts:<ol><li><a href='http://compsci.ca/blog/source-control-plagirism-in-education/' rel='bookmark' title='Permanent Link: Source Control (plagirism) in Education'>Source Control (plagirism) in Education</a></li><li><a href='http://compsci.ca/blog/regular-expression-google-code-search/' rel='bookmark' title='Permanent Link: Regular Expression Google Code Search'>Regular Expression Google Code Search</a></li><li><a href='http://compsci.ca/blog/on-the-use-of-comments-in-code/' rel='bookmark' title='Permanent Link: On the use of comments in code'>On the use of comments in code</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://compsci.ca/blog/ways-to-spot-plagiarized-code/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>


