<?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>20papercups :: Michael Marner&#039;s Website &#187; Tutorials</title>
	<atom:link href="http://www.20papercups.net/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.20papercups.net</link>
	<description>The (awesome) website of Michael Marner</description>
	<lastBuildDate>Tue, 15 Nov 2011 01:09:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Git Tutorial 4 &#8211; Rebase vs. Merge</title>
		<link>http://www.20papercups.net/tutorials/git-tutorial-4-rebase-vs-merge/</link>
		<comments>http://www.20papercups.net/tutorials/git-tutorial-4-rebase-vs-merge/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 22:29:51 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Git Video Tutorials]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[pull]]></category>
		<category><![CDATA[rebase]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.20papercups.net/?p=349</guid>
		<description><![CDATA[After over a year, here&#8217;s the next instalment of my Git tutorial! In this video we look at the difference between rebasing and pulling from remote repositories. Sorry it took so long! &#160; &#160;]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.20papercups.net/wp-content/uploads/2011/03/git-logo.png"><img src="http://www.20papercups.net/wp-content/uploads/2011/03/git-logo-150x150.png" alt="" title="git-logo" width="150" height="150" class="alignleft size-thumbnail wp-image-354" /></a>After over a year, here&#8217;s the next instalment of my Git tutorial! In this video we look at the difference between rebasing and pulling from remote repositories. Sorry it took so long!<br />
<span id="more-349"></span><br />
&nbsp;<br />
<iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/Ss7oAh0Vi_8" frameborder="0" allowfullscreen></iframe><br />
&nbsp;</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-9376349336558898";
google_ad_slot = "0815367707";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.20papercups.net/tutorials/git-tutorial-4-rebase-vs-merge/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Shameless Plug: Swiftless&#8217; Game Programming Tutorials</title>
		<link>http://www.20papercups.net/random-news/shameless-plug-swiftless-game-programming-tutorials/</link>
		<comments>http://www.20papercups.net/random-news/shameless-plug-swiftless-game-programming-tutorials/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 08:29:12 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Random News]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.20papercups.net/?p=292</guid>
		<description><![CDATA[Time for another shameless plug. This time it is for Swiftless, a guy who I work with in the Wearable Computer Lab. His website has some pretty awesome tutorials on game programming, OpenGL, Shaders, game related maths and heaps more. Check it out! http://www.swiftless.com]]></description>
			<content:encoded><![CDATA[<p>Time for another shameless plug. This time it is for Swiftless<a href="http://www.20papercups.net/wp-content/uploads/2008/12/fonzie.jpeg"><img class="alignleft size-full wp-image-12" title="fonzie" src="http://www.20papercups.net/wp-content/uploads/2008/12/fonzie.jpeg" alt="" width="120" height="120" /></a>, a guy who I work with in the Wearable Computer Lab. His website has some pretty awesome tutorials on game programming, OpenGL, Shaders, game related maths and heaps more. Check it out!</p>
<p><a href="http://www.swiftless.com/"><img class="alignnone" title="Swiftless" src="http://www.swiftless.com/swiftlessbutton.jpg" alt="Swiftless" width="88" height="31" /></a><br />
<a href="http://www.swiftless.com">http://www.swiftless.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.20papercups.net/random-news/shameless-plug-swiftless-game-programming-tutorials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial: The Age Gauge &amp; the easy way to get data into Flash</title>
		<link>http://www.20papercups.net/tutorials/tutorial-age-gauge/</link>
		<comments>http://www.20papercups.net/tutorials/tutorial-age-gauge/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 11:37:44 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flashvars]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[www]]></category>

		<guid isPermaLink="false">http://www.20papercups.net/?p=203</guid>
		<description><![CDATA[If you work with websites, sooner or later you will find yourself interacting with Flash. While Flash usually gives me the urge to run for the hills, sometimes it really is the correct tool for the job. If you do have to work with Flash, chances are you will need to get data into it. [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_205" class="wp-caption alignleft" style="width: 184px"><img class="size-full wp-image-205" title="Age Gauge" src="http://www.20papercups.net/wp-content/uploads/2009/06/Screenshot-Come-Out-2009-Mozilla-Firefox.png" alt="Age Gauge on Comeout.on.net" width="174" height="59" /><p class="wp-caption-text">Age Gauge on Comeout.on.net</p></div>
<p>If you work with websites, sooner or later you will find yourself interacting with Flash. While Flash usually gives me the urge to run for the hills, sometimes it really is the correct tool for the job. If you do have to work with Flash, chances are you will need to get data into it. This post documents how I created the Age Gauge for the <a href="http://comeout.on.net" target="_blank">Come Out Festival</a>&#8216;s 2009 website.<span id="more-203"></span></p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-9376349336558898";
google_ad_slot = "0815367707";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>Before we begin, a disclaimer: I hate working with Flash. If you are in a position where you are about to do something in Flash, the correct approach is to first make sure there is no other way to do what you want. Since I primarily work on Linux, I especially hate Flash. However, sometimes it is the best way to solve a problem.</p>
<p>Normally, if you&#8217;re using Flash for anything other than simple animation, you will need a way to pass data from your website/database/server to the Flash file. There are many ways to go about this. The Web 2.0 guys will tell you that once the Flash animation has started, it should retrieve an XML file from the server, using Flash&#8217;s built in XML parsing functionality to extract the data. A slightly more old school variation on this approach is to create a server side script that creates output looking just like URL encoded variables ($_GET in PHP). The Flash file loads the URL and the variables are automatically available as global variables. However, sometimes you just need to keep things simple. But first, some background&#8230;</p>
<h3>What is this Age Gauge anyway?</h3>
<p>Come Out is an arts festival for young people. The festival organisers needed the new website to show the target ages for all of the shows, so that 17 year old year 12s didn&#8217;t end up at a show aimed at kindergarten kids. The guys at <a href="http://www.loudwhisper.com.au" target="_blank">Loud Whisper</a> being all awesome and designy, came up with what you see above. They gave this to me and said &#8220;make it work&#8221;.</p>
<p>Now I was left with a predicament, how would I make it work? There are 171 possible combinations of ages, so making some static images is probably not the best way to go.</p>
<p>My immediate reaction was to look at the <a href="http://au.php.net/manual/en/book.image.php" target="_blank">GD image library</a> for PHP and see if I could make something work. I have made bar graphs using GD before. However, the big problem here was that it had to look like the design. The round ends were are a particular problem here. Next I thought about Javascript. To be honest, with enough CSS trickery you could probably make it work. However, I am not quite Web 2.0 enough, and getting it to be cross-browser compatible would be a bit of a pain.</p>
<p>This leaves one extra option: Implement the thing in Flash.</p>
<h3>Setting up the FLA file</h3>
<p>The fact that I don&#8217;t like Flash actually worked in my favour. I wanted to get this over and done with as quickly as possible. So, I have ignored pretty much all the cool ActionScript 3 features, and using external .as files for scripts. For something this quick and simple, it just isn&#8217;t needed.</p>
<p>So we end up with something that looks like what you see below:</p>
<div id="attachment_206" class="wp-caption aligncenter" style="width: 550px"><img class="size-full wp-image-206" title="Age Gauge Layers" src="http://www.20papercups.net/wp-content/uploads/2009/06/flash.png" alt="The Age Gauge in Flash" width="540" height="431" /><p class="wp-caption-text">The Age Gauge in Flash</p></div>
<p style="text-align: left;">All of the layers can be ignored except for <em>red</em>. Red contains the red bar that moves and changes size. Because we need to change the red bar using ActionScript, we&#8217;ve given the red movie clip an instance name called <em>slider</em>. Where the slider is actually positioned doesn&#8217;t matter too much, because we&#8217;re going to be moving it once the movie loads anyway!</p>
<h3 style="text-align: left;">ActionScript me baby!</h3>
<p>Before we can do anything, we need to figure out the correct position for the slider, and the correct increment for a single year. The way I did this was to simply move the slider using the arrow keys on the keyboard until I had something that looked right. We then put these into script:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">var startAge<span style="color: #008080;">;</span>
var endAge<span style="color: #008080;">;</span>
&nbsp;
<span style="color: #ff0000; font-style: italic;">/**
 * This is the smallest value for the start age
 */</span>
var MIN_POSITION <span style="color: #000080;">=</span> <span style="color:#800080;">2.9</span><span style="color: #008080;">;</span>
&nbsp;
<span style="color: #ff0000; font-style: italic;">/**
 * The width of a single year.
 * So, if there were 2 years between the start and end age,
 * The width of the rectangle would be step*2
 */</span>
var STEP <span style="color: #000080;">=</span> <span style="color:#800080;">9.29</span></pre></div></div>

<p>So, with an age of 0, the slider should have it&#8217;s position.x at 2.9. For every year, we had 9.29 onto this position. Sounds easy so far right? Next we have to actually do the moving and resizing based on the starting and ending age:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #666666;">// set the position of the slider, but first</span>
<span style="color: #666666;">// we don't want things to break with a negative age</span>
<span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>startAge <span style="color: #000040;">&amp;</span>lt<span style="color: #008080;">;</span><span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>
 startAge <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>
 slider._x <span style="color: #000080;">=</span> MIN_POSITION<span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span>
<span style="color: #0000ff;">else</span> <span style="color: #008000;">&#123;</span>
 <span style="color: #666666;">// here we take the position, and add the step value multiplied by the start age</span>
 slider._x <span style="color: #000080;">=</span> MIN_POSITION <span style="color: #000040;">+</span> <span style="color: #008000;">&#40;</span>startAge <span style="color: #000040;">*</span> STEP<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #666666;">// now we just set the width to be however many years are between the start and end ages</span>
slider._width <span style="color: #000080;">=</span> STEP<span style="color: #000040;">*</span><span style="color: #008000;">&#40;</span>endAge<span style="color: #000040;">-</span>startAge<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></pre></div></div>

<p>That is all of the code to make this work. We don&#8217;t even need to be too precise with the starting position and step, because the mask hides it if we are slightly off. This is one of the benefits of using Flash, and made the Age Gauge very easy to implement.</p>
<h3>Getting the data into Flash</h3>
<p>The next step is to actually make this work. The script above uses uninitialised variables. This will cause things to break, which would be bad. We need to get data into the swf file so that startAge and endAge have values. As I mentioned way back at the start, there are a few ways this can be done. The one I didn&#8217;t mention is to simply use flashvars in the HTML of the page. This gives the Flash file data without having to bother with opening remote URLs for use with XML parsing or loadVars(). <strong>This is not the best way for all problems!</strong> However, all we are trying to do here is get two numbers in, so what&#8217;s the big deal?</p>
<p>Creating the HTML is pretty straight forward. I should mention though that I use swfobject for loading Flash through Javascript. It gets around some issues, such as IE7 not playing Flash on page load. Anyway, the HTML looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot;&gt;
swfobject.embedSWF(&quot;AgeGauge.swf&quot;, 
                   &quot;AgeGauge&quot;,
                   &quot;168&quot;, 
                   &quot;61&quot;, 
                   &quot;9.0.0&quot;,
                   false,
		   {startAge: &quot;6&quot;, endAge: &quot;13&quot;}
                  );
&lt;/script&gt;</pre></div></div>

<p>The code above uses swf object to load the Age Gauge, passing flashvars to the file when it loads. In this example, we are using a start age of 16, and end age of 13. If you aren&#8217;t using flashvars, then you&#8217;d do something more like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;object id=&quot;AgeGauge&quot; data=&quot;AgeGauge.swf&quot; type=&quot;application/x-shockwave-flash&quot;  height=&quot;61&quot; width=&quot;168&quot;&gt;
   &lt;param value=&quot;startAge=6&amp;amp;amp;endAge=13&quot; name=&quot;flashvars&quot;&gt;
&lt;/object&gt;</pre></div></div>

<p>The point is the same. Really, all swfobject does is generate this HTML for you when the page loads. Note that the flashvars param has the actual startAge and endAge variables formatted like $_GET data, in the same format as loadVars() expects.</p>
<h3>Conclusion</h3>
<p>And that&#8217;s all there is to it really. Remember that using flashvars is a very simple way of getting data from your website into Flash. For more complicated things, parsing an XML file would be a much more flexible way to go. The moral of the story is to use the right tool for the job. Whether we are talking about the choice of Flash, GD, or Javascript, or choosing between the methods of getting data into Flash.  Hope this was at least a little useful!</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-9376349336558898";
google_ad_slot = "0815367707";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.20papercups.net/tutorials/tutorial-age-gauge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git Tutorial 03 &#8211; Pushing &amp; Pulling</title>
		<link>http://www.20papercups.net/tutorials/git-vtm03-pushing-pulling/</link>
		<comments>http://www.20papercups.net/tutorials/git-vtm03-pushing-pulling/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 09:06:51 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Git Video Tutorials]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.20papercups.net/?p=174</guid>
		<description><![CDATA[In the last video, we just looked at adding files and commiting changes. This is great, but remember that in Git, commits are local. In this video we look at how we can set up remote repositories that we can push data to, either to use as backups, or for sharing with others. Note that [...]]]></description>
			<content:encoded><![CDATA[<p>In the last video, we just looked at adding files and commiting changes. This is great, but remember that in Git, commits are local. In this video we look at how we can set up remote repositories that we can push data to, either to use as backups, or for sharing with others.<span id="more-174"></span></p>
<p style="text-align: center;"><img src="http://www.20papercups.net/wp-content/plugins/flash-video-player/default_video_player.gif" /></p>
<p style="text-align: left;">Note that this video is 640&#215;480, so hit the full screen button to get more readable detail.</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-9376349336558898";
google_ad_slot = "0815367707";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p style="text-align: left;"><strong>Notes</strong></p>
<p style="text-align: left;">I cannot believe I messed up the remote path that many times! I am sorry about that. Of course, the side effect is you learnt how to both add and remove remotes. So yeah&#8230; I did that on purpose.</p>
<p style="text-align: left;">At this point, we can create a project or join an existing one. We can add files and commit changes. We can push our changes to remotes, and fetch changes that other people have made. This is all great. However, we haven&#8217;t touched on one of Git&#8217;s most powerful features. I am of course talking about branching and merging. This will be the priority for the next video.</p>
<p style="text-align: left;">Again, any feedback is much appreciated.</p>
<p style="text-align: left;">
]]></content:encoded>
			<wfw:commentRss>http://www.20papercups.net/tutorials/git-vtm03-pushing-pulling/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Git Tutorial 02 &#8211; The basics</title>
		<link>http://www.20papercups.net/tutorials/git-vtm02-the-basics/</link>
		<comments>http://www.20papercups.net/tutorials/git-vtm02-the-basics/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 08:59:45 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Git Video Tutorials]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[vtm]]></category>

		<guid isPermaLink="false">http://www.20papercups.net/?p=172</guid>
		<description><![CDATA[This video hits up the terminal and starts using git. We start by creating a git repository, which is super easy with Git. Then, we look at adding files to the repository, and commiting changes. Note that this video is 640&#215;480, so hit the full screen button to get more readable detail. Notes In this [...]]]></description>
			<content:encoded><![CDATA[<p>This video hits up the terminal and starts using git. We start by creating a git repository, which is super easy with Git. Then, we look at adding files to the repository, and commiting changes. <span id="more-172"></span></p>
<p style="text-align: center;"><img src="http://www.20papercups.net/wp-content/plugins/flash-video-player/default_video_player.gif" /></p>
<p style="text-align: left;">Note that this video is 640&#215;480, so hit the full screen button to get more readable detail.</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-9376349336558898";
google_ad_slot = "0815367707";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p style="text-align: left;"><strong>Notes</strong></p>
<p style="text-align: left;">In this video, I specifically create a project using:</p>
<pre>git init</pre>
<p>. If you are working on your own projects, this is how you will work. However, a lot of the time you will be starting work on an already existing project. In this case, you don&#8217;t create a new repo using git init, instead you <em>clone</em> an already existing repository. The basic is this:</p>
<pre>git clone path/to/repository</pre>
<p>I will cover this in a later video, but I think it is important enough to mention here.</p>
<p>Another thing that I could have covered in more detail is the staging area. There is actually a lot more that you can do with it than I mentioned in this video. However, that will come later. For the first 3 videos (at least) I want to just get the basics down.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.20papercups.net/tutorials/git-vtm02-the-basics/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Git Tutorial 01 &#8211; What is Git</title>
		<link>http://www.20papercups.net/tutorials/git-vtm01-what-is-git/</link>
		<comments>http://www.20papercups.net/tutorials/git-vtm01-what-is-git/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 08:52:01 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Git Video Tutorials]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[vtm]]></category>

		<guid isPermaLink="false">http://www.20papercups.net/?p=169</guid>
		<description><![CDATA[In this video I give a brief introduction to the Git Version Control System. Note that this video is 640&#215;480, so hit the full screen button to get more readable detail. Notes Git is a distributed version control system, originally written by Linus Torvalds for Linux Kernel development. It is Free and Open Source software. [...]]]></description>
			<content:encoded><![CDATA[<p>In this video I give a brief introduction to the Git Version Control System. <span id="more-169"></span></p>
<p style="text-align: center;"><img src="http://www.20papercups.net/wp-content/plugins/flash-video-player/default_video_player.gif" /></p>
<p style="text-align: left;">Note that this video is 640&#215;480, so hit the full screen button to get more readable detail.</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-9376349336558898";
google_ad_slot = "0815367707";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p style="text-align: left;"><strong>Notes</strong></p>
<p>Git is a distributed version control system, originally written by Linus Torvalds for Linux Kernel development. It is Free and Open Source software. You can get it for Linux, Mac and Windows (either native or cygwin). There are also plugins for Eclipse, etc, so you don&#8217;t have to work from a terminal like me.</p>
<p style="text-align: left;">This video just tries to convey what makes working with a distributed version control system different and better. Nothing too strenuous just yet. If you are a Git guru, I am aware that I am glossing over some details in this video. This is intentional, and I hope to cover some of these details in later videos, or at least in the accompanying text. Still, I welcome any and all feedback and suggestions.</p>
<p style="text-align: left;">Also, I apologise in advanced for my terrible tablet handwriting skills.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.20papercups.net/tutorials/git-vtm01-what-is-git/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>C++ Video &#8211; 3DBuzz Suppliment</title>
		<link>http://www.20papercups.net/tutorials/c-video-3dbuzz-suppliment/</link>
		<comments>http://www.20papercups.net/tutorials/c-video-3dbuzz-suppliment/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 01:25:16 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[3dbuzz]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.20papercups.net/?p=113</guid>
		<description><![CDATA[This is a very short video explaining a problem that comes up time and time again on 3dbuzz.com. Essentially, why the code for their Hello World example doesn&#8217;t compile. If you have done any C++ coding before, you can safely ignore this video. Note that this video is 1024&#215;768, so hit the full screen button [...]]]></description>
			<content:encoded><![CDATA[<p>This is a very short video explaining a problem that comes up time and time again on <a href="http://www.3dbuzz.com" target="_blank">3dbuzz.com</a>. Essentially, why the code for their Hello World example doesn&#8217;t compile. If you have done any C++ coding before, you can safely ignore this video.<span id="more-113"></span></p>
<p style="text-align: center;"><img src="http://www.20papercups.net/wp-content/plugins/flash-video-player/default_video_player.gif" /></p>
<p style="text-align: left;">Note that this video is 1024&#215;768, so hit the full screen button to get more readable detail.</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-9376349336558898";
google_ad_slot = "0815367707";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p style="text-align: left;"><strong>Notes:</strong></p>
<p style="text-align: left;">The 3DBuzz C++ videos include the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">main<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000066;">cout</span> <span style="color: #339933;">&lt;&lt;</span> <span style="color: #ff0000;">&quot;Hello World&quot;</span> <span style="color: #339933;">&lt;&lt;</span> endl<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This code fails to compile on newer versions of Visual C++ and GCC. All that needs to be done is to specify that main will return an int, and then actually return one:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">int</span> main<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000066;">cout</span> <span style="color: #339933;">&lt;&lt;</span> <span style="color: #ff0000;">&quot;Hello World&quot;</span> <span style="color: #339933;">&lt;&lt;</span> endl<span style="color: #339933;">;</span>
   <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Of course, whether this actually needed a video is debatable!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.20papercups.net/tutorials/c-video-3dbuzz-suppliment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

