<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>appsCanadian.ca</title>
	
	<link>http://www.appscanadian.ca</link>
	<description>The "Teach Yourself Software Development" Experiment</description>
	<lastBuildDate>Fri, 04 Jun 2010 08:08:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/appsCanadian" /><feedburner:info uri="appscanadian" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
		<title>What is a computer program?</title>
		<link>http://www.appscanadian.ca/archives/what-is-a-computer-program/</link>
		<comments>http://www.appscanadian.ca/archives/what-is-a-computer-program/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 08:00:58 +0000</pubDate>
		<dc:creator>appsCanadian</dc:creator>
				<category><![CDATA[Programming Basics]]></category>

		<guid isPermaLink="false">http://www.appscanadian.ca/?p=93</guid>
		<description><![CDATA[In my first post, I mentioned that one of my goals for this blog was to learn by teaching. I suppose this is a lot like the concept of Rubber Duck Debugging where the act of explaining your code to someone, even an inanimate object like a rubber duck, forces you to think everything through [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://www.appscanadian.ca/archives/appscanadian-2-0/">first post</a>, I mentioned that one of my goals for this blog was to learn by teaching. I suppose this is a lot like the concept of <a href="http://en.wikipedia.org/wiki/Rubber_duck_debugging">Rubber Duck Debugging</a> where the act of explaining your code to someone, even an inanimate object like a rubber duck, forces you to think everything through in meticulous detail so that gaps in your own knowledge become apparent. It&#8217;s an interesting idea, and one that I&#8217;ve had a lot of success with in the past. Unfortunately, since I didn&#8217;t actually have a rubber duck on my desk (though I did have plush fish, which would have worked just as well), I tended to talk to my technical lead. Though I&#8217;m sure I bugged him more than my fair share, he probably got pretty used to me wandering over, ranting for two or three minutes, calling myself an idiot when the light finally flicked on, and disappearing back to my desk.</p>
<p>Anyway, in the spirit of rubber duck debugging I present to you my <a href="http://www.appscanadian.ca/archives/category/programming-basics/">Programming Basics</a> series. This will be a short series &#8211; just enough to get the basic building blocks into place to build out a real, though fairly trivial, project I&#8217;ve been meaning to create. From there, we&#8217;ll move into the actual project, explaining new concepts and updating (also known as <a href="http://en.wikipedia.org/wiki/Code_refactoring">refactoring</a>) our code as we go.</p>
<hr />
So, what exactly is a computer program?</p>
<p>Well, the type of programming you&#8217;re doing and the language (and type of language) you&#8217;re using plays a big part in defining this, but it really comes down to one main idea: <strong>programming is about processing and manipulating raw data and turning it into useful information</strong>.</p>
<p>The project I mentioned wanting to build is a type of drinks recipe site, sort of like <a href="http://www.webtender.com/">The Webtender</a>. The programming of this website fits the definition I gave above. The aim of the site is to take user-contributed drink recipes, variations, votes and comments (the &#8220;<strong>raw data</strong>&#8220;) and use it to allow people to look up their favorite drinks, find new ones they might like, and suggest things to make when they&#8217;re trying to throw a party with just a few different types of alcohol to use (the &#8220;<strong>useful information</strong>&#8220;). Admittedly, this isn&#8217;t as useful or complex as crunching numbers to find a cure for cancer, but it still fits the definition.</p>
<p>From a practical perspective, a person writes a program by giving the computer a set of instructions to use in order to get the data from its raw state to something useful. These statements are written in one of many programming languages (such as C#, Java, Python, or PHP). These languages have their own unique grammar (or &#8220;syntax&#8221;) which are generally unlike spoken languages, such as English. Also unlike English, where minor grammatical errors (for example, saying &#8220;<em>John and me</em> are going to the park&#8221; rather than &#8220;<em>John and I</em> are going to the park&#8221;) can go unnoticed, even the slightest mistake in a programming language will result in an error message which will cause your program to fail to run.</p>
<p>For now, until we get into working with PHP a few blog posts down the line, we will just assume that our programs can be written in English. This is actually a fairly common technique used by professional programmers when trying to plan the code they are about to write. When we write computer instructions in English for planning purposes, we don&#8217;t have to worry about the computer not understanding what we mean. The English code is for our own use to describe what we want to do, so as long as these instructions make sense to us, and we know how to later covert it into a real programming language, they suit their purpose just fine. This sort of English-language code is referred to as &#8220;<a href="http://en.wikipedia.org/wiki/Pseudocode">pseudocode</a>.&#8221;</p>
<p>If you were to write a basic program to ask a user for their name and then print a warning message if they aren&#8217;t who they should be, the pseudocode might look a bit like this:</p>
<p><code><br />
Ask user for their name<br />
If the user's name is Steve, print "Hello Steve!"<br />
If the user's name isn't Steve, print "This is Steve's computer, you're not supposed to be here!"<br />
</code></p>
<p>These sorts of statements are the basic building blocks of computer programs; they give the computer a list of steps to execute, one after the other, until the job is done.</p>
<p>In the real world, however, programs are rarely so straightforward. Most programs need to adapt to the data they are given, and to react in different ways depending on the data they are working with. In fact, in the pseudocode example above you can already see that, even in trivial examples, the computer often has to make a choice about what to do. A user&#8217;s name can never simultaneously be <em>and not be</em> &#8220;Steve&#8221; (unless of course the cat belongs to <a href="en.wikipedia.org/wiki/Schrödinger's_cat">Erwin Schrödinger</a>), so the computer will never print both statements listed in the program, even though the print instruction exists twice in the program code.</p>
<p>In the next post, I will describe how to code such choices into your program, as well as how to use other techniques to control when certain statements are executed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.appscanadian.ca/archives/what-is-a-computer-program/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>appsCanadian 2.0</title>
		<link>http://www.appscanadian.ca/archives/appscanadian-2-0/</link>
		<comments>http://www.appscanadian.ca/archives/appscanadian-2-0/#comments</comments>
		<pubDate>Fri, 28 May 2010 06:15:51 +0000</pubDate>
		<dc:creator>appsCanadian</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.appscanadian.ca/?p=88</guid>
		<description><![CDATA[Welcome to appsCanadian.ca, Version 2.0! Two years ago, I received a very nice refund on my taxes and used it to buy a number of &#8220;classic&#8221; books on programming. I then started a blog here on appsCanadian.ca to try to document my progress as I attempted to use these books to become a better programmer. [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to appsCanadian.ca, Version 2.0!</p>
<p>Two years ago, I received a very nice refund on my taxes and used it to buy a number of &#8220;classic&#8221; books on programming. I then started a blog here on appsCanadian.ca to try to document my progress as I attempted to use these books to become a better programmer. I thought that making my efforts public would entice me to stay on track, but it turned out to have a very different result.</p>
<p>Some of the books I had purchased, such as <em><a href="http://www.amazon.com/dp/0072970545/?tag=appscanadia03-20">Introduction to Algorithms</a></em> (known to many programmers as CLR or CLRS), I found to be considerably more intimidating than expected. Skimming a number of pages in CLRS, I discovered that my math skills were probably not as advanced they needed to be. There were other books, such as <em><a href="http://www.amazon.com/dp/0735619670/?tag=appscanadia03-20">Code Complete</a></em>, which painted with some rather broad strokes that I had difficulty convincing myself that I would be able to properly blog about my progress.</p>
<p>I&#8217;ve decided that appsCanadian.ca, Version 1.0, was a particularly large failure, and so I&#8217;ve deleted it. I have backups of everything related to that incarnation of the site, so there may come a time when I create some sort of read-only copy of the old site, or reintroduce old articles, but for now I&#8217;m attempting to start fresh.</p>
<p>I&#8217;m honestly not 100% of what this blog will become, but here are a few ideas I&#8217;ve been tossing around in my head:</p>
<ul>
<li> <strong>Basic programming concepts, and learning a language</strong>: They say the best way for someone to learn something is to teach it, so that will be one important aspect of this site. I&#8217;ll explain the basic elements of programming (variables, conditionals, loops, etc.) and try to gain a deeper understanding of the subject as I go. Throughout this, I will attempt to dive into several languages (C# and PHP being the two which come immediately to mind, largely for employability reasons) and I will try to document my experiences. I&#8217;ve recently discovered the power of flash cards (the learning/memorization tool, not the removable media in your digital camera) so I may create some flash cards for myself and make them available for download.</li>
<li> <strong>SICP</strong>: <em><a href="http://www.amazon.com/dp/0262011530/?tag=appscanadia03-20">The Structure and Interpretation of Computer Programs</a></em> is a wildly popular book throughout computer science. It was written by professors at MIT to be used as the textbook for their eponymous entry-level class. I am going to endeavour to read and discuss each chapter of the book, as well as complete each of the exercises within it. If any readers would like to follow along at home, but don&#8217;t want to pay $70 for the actual book, <a href="http://mitpress.mit.edu/sicp/full-text/book/book.html">MIT Press has published the whole book for free online</a>.</li>
<li> <strong>Math</strong>: As I mentioned above, I don&#8217;t think my math skills are as good as they should be. Don&#8217;t get me wrong, I know my way around everyday math, and some less common math, but I&#8217;m a bit embarrassed by what I don&#8217;t know. For example, I never took calculus or discrete math classes in high school, so I know nothing of either subject. I&#8217;d like that to change, so I&#8217;m going to spend a lot of time at the <a href="http://khanacademy.org/">Khan Academy</a>. The Khan Academy is a website started by a guy named Salman Khan, which contains thousands of YouTube tutorials on math and other subjects. It started when he was tutoring his young cousin in math over the phone and decided that video would be a better option. After he <a href="http://www.youtube.com/khanacademy">uploaded these videos to YouTube</a>, they got very popular, and he expanded his collection to other subjects. I&#8217;m going to watch his videos, starting from the basics, and check my knowledge against his web application until my math skills are (in my mind, at least) at a respectable level.</li>
<li> <strong>Projects</strong>: There are two web projects I would like to undertake. I&#8217;m toying with the idea of documenting everything about one of these projects on this site. I&#8217;ve never seen a project built from absolute scratch online before, but it&#8217;s something I really wish existed, so I may do that on this site.</li>
</ul>
<p>I&#8217;ll say right now that I don&#8217;t have any particular posting schedule in mind. One problem with appsCanadian.ca 1.0 was that I had an idea of how often I should be posting, so I got horribly discouraged when I didn&#8217;t meet my target. I&#8217;ve even read recently that there have been studies which show that talking about a project reduces your chances of completing it. Talking about potentially doing something satisfies certain urges in your brain, making you less likely to feel obliged to actually follow through. For that reason, I&#8217;ll be posting entirely on a &#8220;whenever I feel like it&#8221; sort of schedule.</p>
<p>I hope some of you out there like what you see coming on this blog. If you have any comments, concerns, or suggestions, please do not hesitate to contact me. Please keep in mind, though, that nothing I say should ever be treated as gospel. Like everyone else on this planet, I&#8217;m an idiot and do things really, really wrong really, really often. If you see me being wrong, by all means please correct me, but keep in mind that you almost definitely know more about the subject than I do and I likely just made an honest mistake. This shouldn&#8217;t need to be said, but I feel compelled to make this disclaimer since Jeff Atwood has taken quite the beating in the last year because people mistook him for someone who knows what he&#8217;s doing despite his many comments to the contrary.</p>
<p>Thanks for reading; I hope you enjoy the site.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.appscanadian.ca/archives/appscanadian-2-0/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss><!-- Dynamic page generated in 0.602 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-09-04 01:56:59 -->
