<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Mr. Sneakernet&#039;s Blog</title>
	<atom:link href="http://mrsneakernet.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mrsneakernet.wordpress.com</link>
	<description>The Blog of a Teenage C++ programmer</description>
	<lastBuildDate>Sun, 08 Nov 2009 16:28:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='mrsneakernet.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Mr. Sneakernet&#039;s Blog</title>
		<link>http://mrsneakernet.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mrsneakernet.wordpress.com/osd.xml" title="Mr. Sneakernet&#039;s Blog" />
	<atom:link rel='hub' href='http://mrsneakernet.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Recursion Explored</title>
		<link>http://mrsneakernet.wordpress.com/2009/11/08/recursion-explored/</link>
		<comments>http://mrsneakernet.wordpress.com/2009/11/08/recursion-explored/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 16:28:42 +0000</pubDate>
		<dc:creator>Miguel G. Fernandez</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[loop]]></category>
		<category><![CDATA[recursion]]></category>

		<guid isPermaLink="false">http://mrsneakernet.wordpress.com/?p=49</guid>
		<description><![CDATA[I read up on recursion a little this morning, and I realized that it is in essence, the fundamentals of all C++ loops for example supposed we have: void funcINeedToRepeatALot() { for(int x; x &#62; 3; x++) { cout &#60;&#60; "Sam\t"; } } and we need to repeat it a lot without a using a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrsneakernet.wordpress.com&amp;blog=9425822&amp;post=49&amp;subd=mrsneakernet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I read up on recursion a little this morning, and I realized that it is in essence, the fundamentals of all C++ loops <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>for example supposed we have:</p>
<pre style='color:#000000;background:#f1f0f0;'><span style='color:#400000;font-weight:bold;'>void</span> funcINeedToRepeatALot<span style='color:#806030;'>(</span><span style='color:#806030;'>)</span>
<span style='color:#806030;'>{</span>
    <span style='color:#400000;font-weight:bold;'>for</span><span style='color:#806030;'>(</span><span style='color:#400000;font-weight:bold;'>int</span> x<span style='color:#806030;'>;</span> x <span style='color:#806030;'>&gt;</span> <span style='color:#c00000;'>3</span><span style='color:#806030;'>;</span> x<span style='color:#806030;'>+</span><span style='color:#806030;'>+</span><span style='color:#806030;'>)</span> <span style='color:#806030;'>{</span>
        <span style='color:#800040;'>cout</span> <span style='color:#806030;'>&lt;</span><span style='color:#806030;'>&lt;</span> <span style='color:#800000;'>"</span><span style='color:#e60000;'>Sam</span><span style='color:#0f6900;'>\t</span><span style='color:#800000;'>"</span><span style='color:#806030;'>;</span>
    <span style='color:#806030;'>}</span>

<span style='color:#806030;'>}</span>
</pre>
<p>and we need to repeat it a lot without a using a loop (&#8216;cuz of overhead), you could always make a function that calls itself<br />
so, supposing that:</p>
<pre style='color:#000000;background:#f1f0f0;'><span style='color:#400000;font-weight:bold;'>bool</span> aFuncThatIsSometimeTrueAndSometimesFalse<span style='color:#806030;'>(</span><span style='color:#806030;'>)</span>
<span style='color:#806030;'>{</span>
    <span style='color:#400000;font-weight:bold;'>static</span> <span style='color:#400000;font-weight:bold;'>unsigned</span> <span style='color:#400000;font-weight:bold;'>short</span> var <span style='color:#806030;'>=</span> <span style='color:#c00000;'>0</span><span style='color:#806030;'>;</span>
    <span style='color:#806030;'>+</span><span style='color:#806030;'>+</span>var<span style='color:#806030;'>;</span>

    <span style='color:#400000;font-weight:bold;'>if</span><span style='color:#806030;'>(</span>var <span style='color:#806030;'>&lt;</span> <span style='color:#c00000;'>5</span> <span style='color:#806030;'>)</span>
        <span style='color:#400000;font-weight:bold;'>return</span> <span style='color:#400000;font-weight:bold;'>false</span><span style='color:#806030;'>;</span>
    <span style='color:#400000;font-weight:bold;'>else</span> <span style='color:#400000;font-weight:bold;'>return</span> <span style='color:#400000;font-weight:bold;'>true</span><span style='color:#806030;'>;</span>
<span style='color:#806030;'>}</span>
</pre>
<p>we could creat a recursion like this:</p>
<pre style='color:#000000;background:#f1f0f0;'><span style='color:#400000;font-weight:bold;'>void</span> loop<span style='color:#806030;'>(</span><span style='color:#400000;font-weight:bold;'>bool</span> <span style='color:#806030;'>(</span><span style='color:#806030;'>*</span>conditionFunc<span style='color:#806030;'>)</span><span style='color:#806030;'>(</span><span style='color:#400000;font-weight:bold;'>void</span><span style='color:#806030;'>)</span><span style='color:#806030;'>,</span> <span style='color:#400000;font-weight:bold;'>void</span> <span style='color:#806030;'>(</span><span style='color:#806030;'>*</span>actionFunc<span style='color:#806030;'>)</span><span style='color:#806030;'>(</span><span style='color:#400000;font-weight:bold;'>void</span><span style='color:#806030;'>)</span><span style='color:#806030;'>)</span>
<span style='color:#806030;'>{</span>
    <span style='color:#400000;font-weight:bold;'>if</span><span style='color:#806030;'>(</span>conditionFunc<span style='color:#806030;'>)</span>
        <span style='color:#806030;'>(</span><span style='color:#806030;'>*</span>actionFunc<span style='color:#806030;'>)</span><span style='color:#806030;'>(</span><span style='color:#806030;'>)</span><span style='color:#806030;'>;</span>
    <span style='color:#400000;font-weight:bold;'>else</span> loop<span style='color:#806030;'>(</span>conditionFunc<span style='color:#806030;'>,</span> actionFunc<span style='color:#806030;'>)</span><span style='color:#806030;'>;</span>

<span style='color:#806030;'>}</span>
</pre>
<p>and then you can call it on your own, with:</p>
<pre style='color:#000000;background:#f1f0f0;'>loop<span style='color:#806030;'>(</span><span style='color:#806030;'>&amp;</span>aFuncThatIsSometimeTrueAndSometimesFalse<span style='color:#806030;'>,</span> <span style='color:#806030;'>&amp;</span>funcINeedToRepeatALot<span style='color:#806030;'>)</span><span style='color:#806030;'>;</span>
</pre>
<p>so now, you&#8217;ve built your own extenstion to your compiler. if you&#8217;re really into all this crap, you could actually modify your compiler&#8217;s source, add this manually and recompile your compiler and extend the C++ language</p>
<p>hope you like it <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrsneakernet.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrsneakernet.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrsneakernet.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrsneakernet.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrsneakernet.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrsneakernet.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrsneakernet.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrsneakernet.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrsneakernet.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrsneakernet.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrsneakernet.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrsneakernet.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrsneakernet.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrsneakernet.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrsneakernet.wordpress.com&amp;blog=9425822&amp;post=49&amp;subd=mrsneakernet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrsneakernet.wordpress.com/2009/11/08/recursion-explored/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f2f4ce6b4d40a0e632338a50f7740fe3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Negavite</media:title>
		</media:content>
	</item>
		<item>
		<title>Making An Uncloseable Window in Java</title>
		<link>http://mrsneakernet.wordpress.com/2009/10/23/making-an-uncloseable-window-in-java/</link>
		<comments>http://mrsneakernet.wordpress.com/2009/10/23/making-an-uncloseable-window-in-java/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 05:30:35 +0000</pubDate>
		<dc:creator>Miguel G. Fernandez</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[AWT]]></category>
		<category><![CDATA[Swing]]></category>
		<category><![CDATA[window]]></category>

		<guid isPermaLink="false">http://mrsneakernet.wordpress.com/?p=47</guid>
		<description><![CDATA[Through Swing and the AWT, one can make easily make a window that won&#8217;t shut when the user tries to exit the application. Use setDefaultCloseOperation(); and pass it JFrame.DO_NOTHING_ON_CLOSE import javax.swing.*; import java.awt.*; class app extends JFrame { app(String title, int height, int width) { super (title); setSize(width, height); setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); setVisible(true); } } class program [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrsneakernet.wordpress.com&amp;blog=9425822&amp;post=47&amp;subd=mrsneakernet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Through Swing and the AWT, one can make easily make a window that won&#8217;t shut when the user tries to exit the application. Use <tt>setDefaultCloseOperation();</tt> and pass it <tt>JFrame.DO_NOTHING_ON_CLOSE</tt></p>
<pre style='color:#000000;background:#ffffff;'><span style='color:#000084;font-weight:bold;'>import</span><span style='color:#000084;'> javax</span><span style='color:#000084;'>.</span><span style='color:#000084;'>swing</span><span style='color:#000084;'>.</span><span style='color:#000084;font-weight:bold;'>*</span><span style='color:#000084;'>;</span>
<span style='color:#000084;font-weight:bold;'>import</span><span style='color:#000084;'> java</span><span style='color:#000084;'>.</span><span style='color:#000084;'>awt</span><span style='color:#000084;'>.</span><span style='color:#000084;font-weight:bold;'>*</span><span style='color:#000084;'>;</span>

<span style='color:#000084;font-weight:bold;'>class</span> app <span style='color:#000084;font-weight:bold;'>extends</span> JFrame {
    app(<span style='color:#000084;font-weight:bold;'>String</span> title, <span style='color:#000084;font-weight:bold;'>int</span> height, <span style='color:#000084;font-weight:bold;'>int</span> width)
    {
        <span style='color:#000084;font-weight:bold;'>super</span> (title);
        setSize(width, height);
        setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
        setVisible(<span style='color:#000084;font-weight:bold;'>true</span>);
    }

}
<span style='color:#000084;font-weight:bold;'>class</span> program {
    <span style='color:#000084;font-weight:bold;'>public</span> <span style='color:#000084;font-weight:bold;'>static</span> <span style='color:#000084;font-weight:bold;'>void</span> main(<span style='color:#000084;font-weight:bold;'>String</span>[] args) {
        app myApp = <span style='color:#000084;font-weight:bold;'>new</span> app(<span style='color:#0000ff;'>"Hello"</span>, 350, 750);
    }
}
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrsneakernet.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrsneakernet.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrsneakernet.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrsneakernet.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrsneakernet.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrsneakernet.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrsneakernet.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrsneakernet.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrsneakernet.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrsneakernet.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrsneakernet.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrsneakernet.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrsneakernet.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrsneakernet.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrsneakernet.wordpress.com&amp;blog=9425822&amp;post=47&amp;subd=mrsneakernet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrsneakernet.wordpress.com/2009/10/23/making-an-uncloseable-window-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f2f4ce6b4d40a0e632338a50f7740fe3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Negavite</media:title>
		</media:content>
	</item>
		<item>
		<title>C++ Done Right &#8211; Lesson 1: Hello World and the Basic C++ Program</title>
		<link>http://mrsneakernet.wordpress.com/2009/10/15/c-done-right-lesson-1-hello-world-and-the-basic-c-program/</link>
		<comments>http://mrsneakernet.wordpress.com/2009/10/15/c-done-right-lesson-1-hello-world-and-the-basic-c-program/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 15:04:37 +0000</pubDate>
		<dc:creator>Miguel G. Fernandez</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://mrsneakernet.wordpress.com/?p=32</guid>
		<description><![CDATA[If you successfully compiled the program in the last lesson, get ready to begin learning the fundamentals of the C++ language. If you didn&#8217;t get it to compile, don&#8217;t move on; go back and look for help. Hello World in C++ As we saw in the last lesson, this is &#8220;Hello World&#8221; in C++: #include [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrsneakernet.wordpress.com&amp;blog=9425822&amp;post=32&amp;subd=mrsneakernet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you successfully compiled the program in the last lesson, get ready to begin learning the fundamentals of the C++ language. If you didn&#8217;t get it to compile, don&#8217;t move on; go back and look for help.</p>
<h2>Hello World in C++</h2>
<p>As we saw in the last lesson, this is &#8220;Hello World&#8221; in C++:</p>
<pre style="color:#000000;background:#f1f0f0;"><span style="color:#004a43;">#</span><span style="color:#004a43;">include </span><span style="color:#800000;">&lt;</span><span style="color:#40015a;">iostream</span><span style="color:#800000;">&gt;</span>

<span style="color:#400000;font-weight:bold;">using</span> <span style="color:#400000;font-weight:bold;">namespace</span> <span style="color:#00dddd;">std</span><span style="color:#806030;">;</span>

<span style="color:#400000;font-weight:bold;">int</span> <span style="color:#800000;font-weight:bold;">main</span><span style="color:#806030;">(</span><span style="color:#806030;">)</span>
<span style="color:#806030;">{</span>
    <span style="color:#800040;">cout</span> <span style="color:#806030;">&lt;</span><span style="color:#806030;">&lt;</span> <span style="color:#800000;">"</span><span style="color:#e60000;">Hello world!</span><span style="color:#800000;">"</span> <span style="color:#806030;">&lt;</span><span style="color:#806030;">&lt;</span> endl<span style="color:#806030;">;</span>
    <span style="color:#400000;font-weight:bold;">return</span> <span style="color:#c00000;">0</span><span style="color:#806030;">;</span>
<span style="color:#806030;">}</span>
</pre>
<p>So we can understand all of this, we&#8217;ll break it up into small bits and explain piece by piece. First, take a look at this line:</p>
<pre style="color:#000000;background:#f1f0f0;"><span style="color:#004a43;">#</span><span style="color:#004a43;">include </span><span style="color:#800000;">&lt;</span><span style="color:#40015a;">iostream</span><span style="color:#800000;">&gt;</span>
</pre>
<p>This is commonly known as an include. What it does is it finds the file specified (in this case iostream) and when the program is compiled, it appends it to the &#8220;.CPP&#8221; file that called it. It&#8217;s like you took iostream and typed it right into your code!</p>
<p>You&#8217;ll also notice the &#8220;&lt;&#8221; and the &#8220;&gt;&#8221;. This is to tell include that it should look in a normal location for the file specified. If it is surrounded with &#8221; and &#8220;, then it looks in the current directory.</p>
<p>Nest, we have:</p>
<pre style='color:#000000;background:#f1f0f0;'><span style='color:#400000;font-weight:bold;'>using</span> <span style='color:#400000;font-weight:bold;'>namespace</span> <span style='color:#00dddd;'>std</span><span style='color:#806030;'>;</span>
</pre>
<p>This line may not make a lot of sense right now, but it&#8217;s rather important. When you included iostream, you included a bunch of code. Well, a lot of that code is grouped together because it&#8217;s related. These groups are called namespaces. This line basically tells the compile your using one of these namespaces, in this case std.</p>
<p><em>Ok, quick terminology detour. A function is a piece of code that&#8217;s purpose is to execute a chuck of code you tell it. We&#8217;ll be looking at functions later, but it&#8217;s good to know what they are. </em></p>
<pre style='color:#000000;background:#f1f0f0;'><span style='color:#400000;font-weight:bold;'>int</span> <span style='color:#800000;font-weight:bold;'>main</span><span style='color:#806030;'>(</span><span style='color:#806030;'>)</span>
</pre>
<p>This line makes a function called main. This function is a special function. The compiler uses it as the &#8220;main&#8221; function in your program, and it&#8217;s job is to find and exectute all the code in your application. </p>
<pre style='color:#000000;background:#f1f0f0;'><span style='color:#800040;'>cout</span> <span style='color:#806030;'>&lt;</span><span style='color:#806030;'>&lt;</span> <span style='color:#800000;'>"</span><span style='color:#e60000;'>Hello World</span><span style='color:#800000;'>"</span><span style='color:#806030;'>;</span>
</pre>
<p>This line obviously prints out &#8220;Hello World&#8221;. cout is the standard way to print output.</p>
<pre style='color:#000000;background:#f1f0f0;'><span style='color:#400000;font-weight:bold;'>return</span> <span style='color:#c00000;'>0</span><span style='color:#806030;'>;</span>
</pre>
<p>This basically tells it that it should return nothing to the OS. Just about every single program will end with this</p>
<h2>Conclusion</h2>
<p>In this lesson we looked at the basic C++ program. Sorry if it&#8217;s not to well explained, it&#8217;s rather late here! In the next lesson we will be looking at variables</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrsneakernet.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrsneakernet.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrsneakernet.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrsneakernet.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrsneakernet.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrsneakernet.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrsneakernet.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrsneakernet.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrsneakernet.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrsneakernet.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrsneakernet.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrsneakernet.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrsneakernet.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrsneakernet.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrsneakernet.wordpress.com&amp;blog=9425822&amp;post=32&amp;subd=mrsneakernet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrsneakernet.wordpress.com/2009/10/15/c-done-right-lesson-1-hello-world-and-the-basic-c-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f2f4ce6b4d40a0e632338a50f7740fe3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Negavite</media:title>
		</media:content>
	</item>
		<item>
		<title>C++ Done Right &#8211; Introduction and Compiling You First Program</title>
		<link>http://mrsneakernet.wordpress.com/2009/10/15/c-done-right-introduction-and-compiling-you-first-program/</link>
		<comments>http://mrsneakernet.wordpress.com/2009/10/15/c-done-right-introduction-and-compiling-you-first-program/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 04:17:35 +0000</pubDate>
		<dc:creator>Miguel G. Fernandez</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://mrsneakernet.wordpress.com/?p=23</guid>
		<description><![CDATA[Welcome to C++ Done Right! Follow this tutorial with a little patience and you&#8217;ll be a happy confident C++ programmer in no time at all. It is a complete work in progress and is rather unstable if you will. Some sections are kinda short, others don&#8217;t exist yet. Lessons are prone to constant updates, and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrsneakernet.wordpress.com&amp;blog=9425822&amp;post=23&amp;subd=mrsneakernet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Welcome to C++ Done Right! Follow this tutorial with a little patience and you&#8217;ll be a happy confident C++ programmer in no time at all. It is a complete work in progress and is rather unstable if you will. Some sections are kinda short, others don&#8217;t exist yet. Lessons are prone to constant updates, and may have small typos and errors.</p>
<h2>Who&#8217;s this tutorial for?</h2>
<p>This tutorial is generally aimed at:</p>
<p>- Programmers from a language other than C++ that already know some programming concepts but want to learn C++<br />
- People that have never programmed before, and want to get started with C++<br />
- C++ programmers that want to refresh their memories, or need an explanatory reference</p>
<h2>What&#8217;s covered in this tutorial?</h2>
<p>The C++ language of course! To be more specific, we&#8217;ll be looking at:<br />
- Variables<br />
- Mathematics<br />
- Functions<br />
- Conditional Statements<br />
- Loops<br />
- Arrays<br />
- Pointers<br />
- References<br />
- Classes<br />
- Vectors<br />
- Templates</p>
<p>These are concepts we look at, but some concepts have been broken into multiple lessons as to not overwhelm anybody.</p>
<h2>Understanding Compilation and Interpretation</h2>
<p>Before we start building our first program, we need to understand two terms. The first is <b>compile</b>, and the second is<b>interpret</b>.</p>
<p>Compiling is when a program is translated from a high level easy to understand source code, to assembly and later binary code. It is then saved in an executable format and can be used when ever you need. Make sense? The first part of the tutorial explains it quite well:<br />
<a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/tools-compiling.html">http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/tools-compiling.html</a></p>
<p>Interpreting code is in a sense the same as compiling, but the code isn&#8217;t saved in a executable file. Instead, every time you use the code,<br />
it is translated.</p>
<p><font size="2">If you ever hear about JIT compilation, understand this is a mixture of both compiling and interpreting. </font></p>
<p>Generally compiled programs are faster, but interpreted programs can be executed sooner. </p>
<h2>Compiling in C++</h2>
<p>To compile, you&#8217;ll need a compiler, and in this tutorial we&#8217;ll be using the Visual C++ (VC++) compiler from Microsoft. A free version is available from:<br />
<a href="http://www.microsoft.com/express/vc/">http://www.microsoft.com/express/vc/</a></p>
<p>Now, since most of the people taking this tutorial are new to programming, we&#8217;ll be using an Integrated Development Environment(IDE). An IDE is an application that tries to put development tool and editing tools all in one place. It usually works with the compiler and debugger and comes with tons of stuff for your advantage.</p>
<p>Visual C++ is both a compiler and IDE, so install it.</p>
<h2>Compiling Your First Program</h2>
<p>Here, we are gonna compile a program. I won&#8217;t explain it, we&#8217;ll be doing that in the next lesson. Generally when programming you&#8217;re gonna wanna make a Project. A project is a way for the IDE to group all your different files in a single directory, and know where to out put the executable.</p>
<p>Open VC++, anf goto &#8216;File&#8217; &gt; &#8216;New&#8217; &gt; &#8216;Project&#8217;. Choose &#8216;Win32 Application&#8217;, and make it an &#8216;Empty&#8217; project. Now from the &#8216;Projects&#8217; menu, select &#8216;Add New Item&#8217;. Make a new .CPP file and add the following code:</p>
<pre style='color:#000000;background:#f1f0f0;'><span style='color:#004a43;'>#</span><span style='color:#004a43;'>include </span><span style='color:#800000;'>&lt;</span><span style='color:#40015a;'>iostream</span><span style='color:#800000;'>&gt;</span>

<span style='color:#400000;font-weight:bold;'>using</span> <span style='color:#400000;font-weight:bold;'>namespace</span> <span style='color:#00dddd;'>std</span><span style='color:#806030;'>;</span>

<span style='color:#400000;font-weight:bold;'>int</span> <span style='color:#800000;font-weight:bold;'>main</span><span style='color:#806030;'>(</span><span style='color:#806030;'>)</span>
<span style='color:#806030;'>{</span>
    <span style='color:#800040;'>cout</span> <span style='color:#806030;'>&lt;</span><span style='color:#806030;'>&lt;</span> <span style='color:#800000;'>"</span><span style='color:#e60000;'>Hello world!</span><span style='color:#800000;'>"</span> <span style='color:#806030;'>&lt;</span><span style='color:#806030;'>&lt;</span> endl<span style='color:#806030;'>;</span>
    <span style='color:#400000;font-weight:bold;'>return</span> <span style='color:#c00000;'>0</span><span style='color:#806030;'>;</span>
<span style='color:#806030;'>}</span>
</pre>
<p>Press F7 to compile, or F5 to run in the debugger. If all went well you compiled your first program in C++!</p>
<h2>Conclusion</h2>
<p>In this lesson we installed a compiler and IDE as well as compiles a program. Next time we&#8217;ll take our real first steps into the language by deciphering the little snippet you just put together.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrsneakernet.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrsneakernet.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrsneakernet.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrsneakernet.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrsneakernet.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrsneakernet.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrsneakernet.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrsneakernet.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrsneakernet.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrsneakernet.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrsneakernet.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrsneakernet.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrsneakernet.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrsneakernet.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrsneakernet.wordpress.com&amp;blog=9425822&amp;post=23&amp;subd=mrsneakernet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrsneakernet.wordpress.com/2009/10/15/c-done-right-introduction-and-compiling-you-first-program/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f2f4ce6b4d40a0e632338a50f7740fe3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Negavite</media:title>
		</media:content>
	</item>
		<item>
		<title>Friday&#8217;s Book: Hacking: The Art of Exploitation, 2nd Edition (Paperback)</title>
		<link>http://mrsneakernet.wordpress.com/2009/09/11/fridays-book-hacking-the-art-of-exploitation-2nd-edition-paperback/</link>
		<comments>http://mrsneakernet.wordpress.com/2009/09/11/fridays-book-hacking-the-art-of-exploitation-2nd-edition-paperback/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 19:03:11 +0000</pubDate>
		<dc:creator>Miguel G. Fernandez</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[friday]]></category>
		<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://mrsneakernet.wordpress.com/?p=9</guid>
		<description><![CDATA[Ok everybody, I&#8217;ve decided to start a new thing on here; every Friday, I&#8217;ll feature a book that I like, and review it a little. This week, we have Hacking: The Art of Exploitation, 2nd Edition (Paperback) From Amazon.com: Hacking is the art of creative problem solving, whether that means finding an unconventional solution to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrsneakernet.wordpress.com&amp;blog=9425822&amp;post=9&amp;subd=mrsneakernet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ok everybody, I&#8217;ve decided to start a new thing on here; every Friday, I&#8217;ll feature a book that I like, and review it a little.</p>
<p>This week, we have <em>Hacking: The Art of Exploitation, 2nd Edition (Paperback)</em></p>
<p><em><strong>From Amazon.com:</strong><br />
<img src="http://ecx.images-amazon.com/images/I/51rqNSV141L._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA240_SH20_OU01_.jpg" alt="" align="left" /> <em>Hacking is the art of creative problem solving, whether that means finding an unconventional solution to a difficult problem or exploiting holes in sloppy programming. Many people call themselves hackers, but few have the strong technical foundation needed to really push the envelope.</em></em></p>
<p><em><em>Rather than merely showing how to run existing exploits, author Jon Erickson explains how arcane hacking techniques actually work. To share the art and science of hacking in a way that is accessible to everyone, Hacking: The Art of Exploitation, 2nd Edition introduces the fundamentals of C programming from a hacker&#8217;s perspective.</em></em></p>
<p>Now, I haven&#8217;t actually read all of this book, but I browsed it for quite a while at my local Barnes &amp; Nobles, and I must I&#8217;m impressed. </p>
<p>This book is targeted at two things in general:<br />
- Teaching how hacking is done, the art not the technique<br />
- Hacking software in general (Hacking, not cracking).</p>
<p>So basically, if you wanna break that parental controls system, this is the book for you!!!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrsneakernet.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrsneakernet.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrsneakernet.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrsneakernet.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrsneakernet.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrsneakernet.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrsneakernet.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrsneakernet.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrsneakernet.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrsneakernet.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrsneakernet.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrsneakernet.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrsneakernet.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrsneakernet.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrsneakernet.wordpress.com&amp;blog=9425822&amp;post=9&amp;subd=mrsneakernet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrsneakernet.wordpress.com/2009/09/11/fridays-book-hacking-the-art-of-exploitation-2nd-edition-paperback/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f2f4ce6b4d40a0e632338a50f7740fe3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Negavite</media:title>
		</media:content>

		<media:content url="http://ecx.images-amazon.com/images/I/51rqNSV141L._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA240_SH20_OU01_.jpg" medium="image" />
	</item>
		<item>
		<title>Are Macs Completley Secure Against Viruses???</title>
		<link>http://mrsneakernet.wordpress.com/2009/09/10/are-macs-completley-secure-against-viruses/</link>
		<comments>http://mrsneakernet.wordpress.com/2009/09/10/are-macs-completley-secure-against-viruses/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 22:37:37 +0000</pubDate>
		<dc:creator>Miguel G. Fernandez</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Viruses]]></category>

		<guid isPermaLink="false">http://mrsneakernet.wordpress.com/?p=3</guid>
		<description><![CDATA[The simple answer, is no. I looked into it a little, read me a good ammount of articles, and I formed my hypothesis. I&#8217;ll keep this short, and to simple points. Basically, Macs break down like this: Macs are impervious to viruses targeted at Windows and Linux since programs for that Operating System are written [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrsneakernet.wordpress.com&amp;blog=9425822&amp;post=3&amp;subd=mrsneakernet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The simple answer, is no. I looked into it a little, read me a good ammount of articles, and I formed my hypothesis. I&#8217;ll keep this short, and to simple points. Basically, Macs break down like this:</p>
<ul>
<li> Macs are impervious to viruses targeted at Windows and Linux since programs for that Operating System are written with a system specific API. (Java may be an exception to all of this)
<li> Macs are still vulnerable to viruses that are written specifically for that OS. It&#8217;s not like they can&#8217;t have viruses. They can and do get infected
<li> Macs generally have more security than a Windows system because they are Unix based. This means there is only one root, and most users have limitations in what they can do. In Windows, unless the Administrator sets up the the system properley, most users run at the equivalent of an Admin. The security features of Mac are only a bump in the road for virus writers and hackers</ul>
<p>Now, I bet you are wondering how I formed this idea (I know you are!!!).  Anyways, here are links to some great articles on the subject:</p>
<p><a href="http://elliottback.com/wp/macs-dont-have-viruses/">http://elliottback.com/wp/macs-dont-have-viruses/</a><br />
<a href="http://www.smallblue-greenworld.co.uk/pages/macintosh.html">http://www.smallblue-greenworld.co.uk/pages/macintosh.html</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrsneakernet.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrsneakernet.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrsneakernet.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrsneakernet.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrsneakernet.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrsneakernet.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrsneakernet.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrsneakernet.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrsneakernet.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrsneakernet.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrsneakernet.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrsneakernet.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrsneakernet.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrsneakernet.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrsneakernet.wordpress.com&amp;blog=9425822&amp;post=3&amp;subd=mrsneakernet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrsneakernet.wordpress.com/2009/09/10/are-macs-completley-secure-against-viruses/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f2f4ce6b4d40a0e632338a50f7740fe3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Negavite</media:title>
		</media:content>
	</item>
	</channel>
</rss>
