<?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/"
	>

<channel>
	<title>Code Sample World</title>
	<atom:link href="http://codesampleworld.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://codesampleworld.com</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Wed, 10 Jun 2009 09:38:57 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>5 Ways You can Learn Programming Faster</title>
		<link>http://codesampleworld.com/2009/06/10/5-ways-you-can-learn-programming-faster/</link>
		<comments>http://codesampleworld.com/2009/06/10/5-ways-you-can-learn-programming-faster/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 09:38:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[code project]]></category>

		<guid isPermaLink="false">http://codesampleworld.com/2009/06/10/5-ways-you-can-learn-programming-faster/</guid>
		<description><![CDATA[
5 Ways You can Learn Programming Faster
by Alex Allain
Learning to program isn&#8217;t something you can do in an afternoon, but it doesn&#8217;t
have to be a life&#8217;s work, either.  There are
lots of things you can do to make it easier on yourself when you are learning
to program.  You already know about 
The 5 Most [...]]]></description>
			<content:encoded><![CDATA[<div>
<h1>5 Ways You can Learn Programming Faster</h1>
<p>by <a href="http://www.cprogramming.com/about.html">Alex Allain</a></p>
<p>Learning to program isn&#8217;t something you can do in an afternoon, but it doesn&#8217;t<br />
have to be a life&#8217;s work, either.  There are<br />
lots of things you can do to make it easier on yourself when you are learning<br />
to program.  You already know about <a href="http://cprogramming.com/beginner_programming_mistakes.html"><br />
The 5 Most Common Problems New Programmers Face&#8211;And How You Can Solve<br />
Them</a>.   Now, discover how to get the most out of your learning.</p>
<p>  One common theme across many of these tips is: </p>
<p><b>don&#8217;t go too<br />
fast; get it right before moving on</b>.</p>
<p>When I was teaching C, there were always a few students who came into the class<br />
knowing a bit about programming.  Inevitably, some of these students did great<br />
in the first few weeks only to fall further and further behind as the course<br />
went on. Why?  They went too fast through the introductory part of the course,<br />
thinking they knew it all&#8211;but they rarely did.  They knew some of the<br />
material, but not enough to have a strong grasp of the fundamentals.  </p>
<p><center></p>
<p>  </center></p>
<p>At the same time, you must not stop making progress&#8211;you can go too slow as<br />
well as too fast.  Don&#8217;t avoid a topic after you&#8217;ve mastered everything leading<br />
up to it.  By facing more challenging ideas, you&#8217;ll help cement your grasp of<br />
the basics.</p>
<h2>1. Look at the Example Code</h2>
<p>Reading is usually about the words on the page, but learning to program is<br />
about code.  When you&#8217;re first learning to program, you should make sure to<br />
look at, and try to understand, every example.  When I first learned to<br />
program, I would sometimes read the code examples before the text, and try to<br />
figure out what they did.  It doesn&#8217;t always work, but it did force me to look<br />
at the example very carefully, and it often helped make the writeups clearer.</p>
<p>If you want to see what sample code looks like, you can read this site&#8217;s <a href="http://www.cprogramming.com/tutorial/lesson1.html">introductory<br />
        programming tutorial</a>.  This tutorial spends a great deal of time<br />
talking about the sample code to help you work through exactly what the code<br />
does.</p>
<h2>2. Don&#8217;t Just Read Example Code&#8211;Run It</h2>
<p>But when you&#8217;re reading a programming tutorial (or <a href="http://www.cprogramming.com/books.html">book</a>), it&#8217;s easy to look at the<br />
sample code and say &#8220;I get it, I get it, that makes sense&#8221;.  Of course, you<br />
might get it, but you might not get it, and you just don&#8217;t know it.  There&#8217;s<br />
only one way to find out&#8211;do something with that code.</p>
<p>If you haven&#8217;t already, get a <a href="http://feeds.rapidfeeds.com/www.cprogramming.com/code_blocks" />compiler like Code::Blocks</a> set up.</p>
<p>Then <b>type the sample code into a compiler</b>&#8211;if you type it, instead of<br />
copying and pasting it, you will really force yourself to go through everything<br />
that is there.  Typing the code will force you to pay attention to the details<br />
of the syntax of the language&#8211;things like those funny semicolons that seem to go after every line. </p>
<p>Then compile it and run it.  Make sure it does what you think it does. </p>
<p><b>Then change it</b>.  Software is the most easily<br />
changed machinery on the planet.  You can experiment easily, try new things,<br />
see what happens; the changes will happen almost immediately,  and there is no<br />
risk of death or mayhem.  The easiest way to learn new language features is to<br />
take some code that works one way, and change it.</p>
<h2>3. Write your Own Code as Soon as Possible</h2>
<p>Once you understand something about the language&#8211;or even if you&#8217;re still<br />
getting your head around it&#8211;start writing sample programs that use it.  </p>
<p>Sometimes it&#8217;s hard to find good ideas for what programs to write.  That&#8217;s OK, you don&#8217;t have to come up with every idea at the beginning.</p>
<p>  You<br />
can find some <a href="http://www.cprogramming.com/challenge.html">programming<br />
challenges</a> on this site.</p>
<p>You can also reimplement the examples from the book or tutorial you are<br />
reading.  Try to do so without looking back at the sample code; it won&#8217;t be as<br />
easy as it seems.  This technique can work especially well if you tweak the sample code.</p>
<p>If you can&#8217;t think of a small program to write, but you have in mind a larger<br />
program you want to implement, like a game, you could start building small<br />
pieces that you can later use for a game.  Whether you use them later or not,<br />
you will get the same useful experience.</p>
<h2>4. Learn to Use a Debugger</h2>
<p>I already talked about the importance of debugging in <a href="http://cprogramming.com/beginner_programming_mistakes.html">The 5 Most<br />
Common Problems New Programmers Face&#8211;And How You Can Solve Them</a>.  But it<br />
bears repeating; the sooner you learn good debugging techniques, easier it will<br />
be to learn to program.  </p>
<p>The first step in doing so is to learn how to use a<br />
tool called a <a href="http://www.cprogramming.com/debuggers.html">debugger</a>,<br />
which allows you to step through your code.</p>
<p>A debugger will allow you<br />
to step line by line through a piece of code.  It will let you see the values<br />
of variables, and whether the code inside an if statement is executed. </p>
<p>A debugger can help you quickly answer questions about what your code is doing.</p>
<pre>
int main()
{
        int x;
        int y;
        if( x &gt; 4 )  // &lt;-- what is the value of x here?
        {
                y = 5;   // &lt;-- did this line of code execute?
        }
}
</pre>
<p>A final word about debuggers: the first time you learn about a debugger, it<br />
will take you longer to fix the problems with your code.  After the tenth or so<br />
bug, it will really start to pay off.  And believe me, you will have way more<br />
than ten bugs in your programming career.  </p>
<p>I often saw students unwilling to use a debugger.  These students really made<br />
life hard on themselves, taking ages to find very simple bugs.  The sooner you<br />
learn to use a debugger, the sooner it will pay off.</p>
<h2>5. Seek out More Sources</h2>
<p>If you don&#8217;t understand something, there&#8217;s a good possiblity the way it was<br />
explained just didn&#8217;t click.   </p>
<p>First, look for alternative explanations.  The internet is filled with<br />
information about programming, and some explanations work better for different<br />
people; you might need pictures, someone else might not.  There are also lots<br />
of good <a href="http://www.cprogramming.com/books.html">books</a> with detailed explanations.</p>
<p>But if that doesn&#8217;t work, the easiest way to figure out where your<br />
misunderstanding lies is to ask someone else.  But try to go beyond saying, &#8220;I<br />
don&#8217;t understand.  Please explain.&#8221;  You&#8217;re likely to get a link back to the<br />
same text you didn&#8217;t understand.  Instead, rephrase your understanding of the<br />
text in your words.  The more your question reveals about what you are<br />
thinking, the easier it will be for a knowledgeable expert to answer it.<br />
Programmers sometimes have a reputation for being grumpy about answering<br />
questions, but I think the reason is that they want to <b>make progress</b> in<br />
a conversation, and that requires both sides to put in effort.  If you ask a<br />
smart, detailed question that shows you are thinking, you will generally get<br />
good results.</p>
<p>There are plenty of places you can go to ask questions.  You can always <a href="mailto:webmaster@cprogramming.com">email me</a>, or post on our <a href="http://www.cprogramming.com/board.html">message board</a>, or <a href="http://www.cprogramming.com/expert.html">ask an expert</a>.</p>
<p>In the coming days, I&#8217;ll be writing more about how to learn to program<br />
effectively.  Stay tuned, by subscribing to our <a href="http://feeds2.feedburner.com/Cprogrammingcom" onclick="pageTracker._trackEvent('Links', 'RSS', 'feed', '');">RSS<br />
        feed</a>,<br />
signing up for <a href="http://feedburner.google.com/fb/a/mailverify?uri=Cprogrammingcom&amp;loc=en_US" onclick="pageTracker._trackEvent('Links', 'RSS', 'email', '');">email<br />
        notifications</a>, or following <a href="http://twitter.com/alexallain">@alexallain</a> on twitter.</p>
<p><a href="http://www.addthis.com/bookmark.php?v=20"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/2f3bb_lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0" /></a><!-- AddThis Button END --></p>
<p>                                            <a href="http://feeds2.feedburner.com/Cprogrammingcom" rel="alternate" type="application/rss+xml"><image<br />
                                            src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png"<br />
                                            alt="subscribe to a feed"></a></p>
<p><a href="http://feeds2.feedburner.com/Cprogrammingcom&quot;">Subscribe to<br />
Cprogramming.com</a></p>
<hr />
        <b>Related Articles</b></p>
<p>        <a href="http://cprogramming.com/beginner_programming_mistakes.html">The<br />
        5 Most Common Problems New Programmers Face&#8211;And How You Can Solve<br />
        Them</a></p>
<p>        <a href="http://www.cprogramming.com/tutorial/common.html">Common<br />
        Programming Mistakes&#8211;And How to Solve Them</a></p>
<p>        <a href="http://www.cprogramming.com/tutorial/incremental_testing.html">How<br />
        to Avoid Getting Lost When Writing Programs, or, The Power of<br />
        Incremental Development</a></p>
<p>        <a href="http://www.cprogramming.com/tutorial/thinking.html">How to<br />
        Think About Programming, A Beginner&#8217;s Guide</a></p>
<p align="center"> &#8212;&#8211; </p>
<p><a href="http://feedburner.google.com/fb/a/mailverify?uri=Cprogrammingcom&amp;loc=en_US">Subscribe<br />
to cprogramming.com by Email</a></p>
<p>            Interested in <a href="http://www.cprogramming.com/advertising.html">advertising </p>
<p>            with us</a>?</p>
<p>            Please read our <a href="http://www.cprogramming.com/privacy.html">privacy </p>
<p>            policy</a>.</p>
<p>            <a href="http://www.cprogramming.com/use.html">Copyright</a> © 1997-2009 </p>
<p>            Cprogramming.com. All rights reserved.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://codesampleworld.com/2009/06/10/5-ways-you-can-learn-programming-faster/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The 5 Most Common Problems New Programmers Face&#8211;And How You Can Solve Them</title>
		<link>http://codesampleworld.com/2009/06/10/the-5-most-common-problems-new-programmers-face-and-how-you-can-solve-them/</link>
		<comments>http://codesampleworld.com/2009/06/10/the-5-most-common-problems-new-programmers-face-and-how-you-can-solve-them/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 09:38:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[code project]]></category>

		<guid isPermaLink="false">http://codesampleworld.com/2009/06/10/the-5-most-common-problems-new-programmers-face-and-how-you-can-solve-them/</guid>
		<description><![CDATA[
The 5 Most Common Problems New Programmers Face&#8211;And How You Can Solve
Them
by Alex Allain
When you&#8217;re just starting out with programming, it&#8217;s easy to run into problems
that make you wonder how anyone has ever managed to write a computer program.
But the fact is, just about everyone else who&#8217;s learned to code has had that
experience and wondered [...]]]></description>
			<content:encoded><![CDATA[<div>
<h1>The 5 Most Common Problems New Programmers Face&#8211;And How You Can Solve<br />
Them</h1>
<p>by <a href="http://www.cprogramming.com/about.html">Alex Allain</a></p>
<p>When you&#8217;re just starting out with programming, it&#8217;s easy to run into problems<br />
that make you wonder how anyone has ever managed to write a computer program.<br />
But the fact is, just about everyone else who&#8217;s learned to code has had that<br />
experience and wondered the same thing, when they were starting out.  I&#8217;ve helped teach several introductory programming classes, and there are some<br />
problems that trip up nearly every student&#8211;everything from getting started to<br />
dealing with program design.</p>
<p>I&#8217;ll prepare you to get past these challenges&#8211;none of them are insurmountable.</p>
<p><center></p>
<p>  </center></p>
<h2>Getting set up</h2>
<p>Learning to program is hard enough, but it&#8217;s easy to get tripped up before you even begin.  First you need to chose a programming language (I recommend C++), then You need a <a href="http://www.cprogramming.com/compilers.html">compiler</a> and a <a href="http://www.cprogramming.com/tutorial.html">programming tutorial</a> that covers the language you chose and that works with the compiler that you set up.  This is all very complicated, and all before you even start to get to the fun parts.</p>
<p>If you&#8217;re still struggling with getting the initial setup, then check out our page <a href="http://cprogramming.com/code_blocks" />on setting up a compiler and development environment (Code::Blocks and MINGW)</a> which walks you through setting up a compiler with a lot of screenshots, and gets you up to the point of having an actual running program.</p>
<h2>Thinking Like a Programmer</h2>
<p>Have you seen the State Farm commercials where the car wash company returns the cars to customers with the soap suds still on the car?  The company washes the car, but it didn&#8217;t rinse it.  This is a perfect metaphor for computer programs.  Computers, like that car wash company, are very very literal.  They do exactly, and only, what you tell them to do; they do not understand implicit intentions.  The level of detail required can be daunting at first because it requires thinking through every single step of the process, making sure that no steps are missing.</p>
<p>This can make programming seem to be a tough slog at first, but don&#8217;t despair.  Not everything must be specified&#8211;only what is not something the computer can alreay do.  The header files and libraries that come with your compiler (for example, the iostream header file that allows you to interact with the user) provide a lot of pre-existing functionality.  You can use websites like <a href="http://www.cppreference.com">http://www.cppreference.com</a> or our own <a href="http://www.cprogramming.com/function.html">function reference</a> to find information on these pre-existing libraries of functionality.  By using these, you can focus on precisely specifying only what is unique about your program.  And even once you do that, you will begin to see patterns that can be turned into functions that wrap up a bunch of steps into a single function that you can call from everywhere.  Suddenly complex problems will begin to look simple.  It&#8217;s the difference between:</p>
<pre>
Walk forward ten feet
Move your hand to the wall
Move your hand to the right until you hit an obstacle
...
Press upward on indentation
</pre>
<p>and</p>
<pre>
Walk to door
Find light switch
Turn on light
</pre>
<p>The magic thing about programming is that you can box up a complex behavior into a simple subroutine (often, into a <a href="http://www.cprogramming.com/tutorial/lesson4.html">function</a>) that you can reuse.  Sometimes it&#8217;s hard to get the subroutine done up just right at first, but once you&#8217;ve got it, you no longer need to worry about it.</p>
<p>You can go here to read more about <a href="http://www.cprogramming.com/tutorial/thinking.html">how to think about programming</a>, written for beginners.</p>
<h2>Compiler Error Messages</h2>
<p>This may seem like a small thing, but because most beginners aren&#8217;t familiar with the strictness of the format of the program (the syntax), beginners tend to run into lots of complaints generated by the compiler.  Compiler errors are notoriously cryptic and verbose, and by no means were written with newbies in mind.</p>
<p>That said, there are a few basic principles you can use to navigate the thicket of messages.  First, often times a single error causes the compiler to get so confused that it generates dozens of messages&#8211;always start with the first error message.  Second, the line number is a lie.  Well, maybe not a lie, but you can&#8217;t trust it completely.  The compiler complains when it first realizes there is a problem, not at the point where the problem actually occurred.  However, the line number does indicate the last possible line where the error could have occurred&#8211;the real error may be earlier, but it will never be later.</p>
<p>Finally, have hope!  You&#8217;ll eventually get really really good at figuring out what the compiler actually means. There will be a few error messages that today seem completely cryptic, even once you know what the real problem was, that in a few months time you will know like an old (if confused) friend.</p>
<p>I&#8217;ve actually written more about this in the past; if you want more detailed help, check out my article on <a href="http://www.cprogramming.com/tutorial/compiler_linker_errors.html">deciphering compiler and linker errors</a>.</p>
<h2>Debugging</h2>
<p><a href="http://www.cprogramming.com/debuggers.html">Debugging</a> is a critical skill, but most people aren&#8217;t born with a mastery of it.  Debugging is hard for a few reasons; first, it&#8217;s frustrating.  You just wrote a bunch of code, and it doesn&#8217;t work even though you&#8217;re pretty sure it should.  Damn!  Second, it can be tedious; debugging often requires a lot of effort to narrow in on the problem, and until you have some practice, it can be hard to efficiently narrow it down.  One type of problem, <a href="http://www.cprogramming.com/debugging/segfaults.html">segmentation faults</a>, are a particularly good example of this&#8211;many programmers try to narrow in on the problem by adding in print statements to show how far the program gets before crashing, even though the debugger can tell them exactly where the problem occurred.  Which actually leads to the last problem&#8211;debuggers are yet another confused, difficult to set up tool, just like the compiler.  If all you want is your program to work, the last thing you want to do is go set up ANOTHER tool just to find out why.</p>
<p>To learn more about debugging techniques, check out this article on <a href="http://www.cprogramming.com/debugging/debugging_strategy.html">debugging strategies</a>.</p>
<h2>Designing a Program</h2>
<p>When you&#8217;re just starting to program, design is a real challenge.  Knowing how<br />
to think about programming is one piece, but the other piece is knowing how to<br />
put programs together in a way that makes it easy to modify them later.  Ideas<br />
like &#8220;<a href="http://www.cprogramming.com/tutorial/comments.html">commenting<br />
your code</a>&#8220;, &#8220;<a href="http://www.cprogramming.com/tutorial/lesson12.html">encapulation and data<br />
hiding</a>&#8221; and &#8220;<a href="http://www.cprogramming.com/tutorial/lesson19.html">inheritance</a>&#8221; don&#8217;t<br />
really mean anything when you haven&#8217;t felt the pain of not having them.  The<br />
problem is that program design is all about making things easier for your<br />
future self&#8211;sort of like eating your vegetables.  Bad designs make your<br />
program inflexible to future changes, or impossible to understand after you&#8217;ve<br />
written.  Frequently, bad design exposes too many details of how something is<br />
implemented, so that every part of the program has to know all the details of<br />
each other section of the program.</p>
<p>One great example is writing a checkers game.  You need some way to represent<br />
the board&#8211;so you pick one.  A fixed-sized global <a href="http://www.cprogramming.com/tutorial/lesson8.html">array</a>: int<br />
checkers_board[8][8].  Your accesses to the board all go directly through the<br />
array: checkers_board[x][y] =  &#8230;.;  Is there anything wrong with this<br />
approach?  You betcha.  Notice that I wrote your accesses to the <b>board</b><br />
all go directly through the <b>array</b>.  The board is the conceptual<br />
entity&#8211;the thing you care about.  The array happens to be, at this particular<br />
moment, how you implement the board.  Again, two things: the thing you<br />
represent, and the way you represent it.  By making all accesses to the board<br />
use the array directly, you entangle the two concepts.  What happens when you decide to change the way you represent the board?  You have an awful lot of code to change.  But what&#8217;s the solution?  </p>
<p>If you create a function that performs the types of basic operations you perform on the checkers board (perhaps a get_piece_on_square() method and a set_piece_to_square() method), every access to the board can go throug this <b>interface</b>.  If you change the implementation, the interface is the same.  And that&#8217;s what people mean when they talk about &#8220;encapsulation&#8221; and &#8220;data hiding&#8221;.  Many aspects of program design, such as inheritance, are there to allow you to hide the details of an implementation (the array) of a particular interface or concept (the board).</p>
<p>Now go eat your spinach!</p>
<p>A good follow-up to learn more about these issues is to read about <a href="http://www.cprogramming.com/tutorial/programming-style-readability.html">programming design and style</a>.</p>
<p>For a more advanced article on this topic, you can go here and read about <a href="http://www.cprogramming.com/tutorial/class_design.html">object oriented class design</a>.  </p>
<p>Another way to make your program more easily modified in the future is to <a href="http://www.cprogramming.com/tutorial/comments.html">clearly comment</a> it.</p>
<p>I&#8217;ll be writing more on learning to program in the next few days, so stay tuned using our <a href="http://feeds2.feedburner.com/Cprogrammingcom&quot;" onclick="pageTracker._trackEvent('Links', 'RSS', 'feed', '');"><br />
RSS feed</a>,<br />
<a href="http://feedburner.google.com/fb/a/mailverify?uri=Cprogrammingcom&amp;loc=en_US" onclick="pageTracker._trackEvent('Links', 'RSS', 'email', '');">subscribing<br />
to cprogramming.com by email</a>, or following <a href="http://twitter.com/alexallain" onclick="pageTracker._trackEvent('Links',<br />
'twitter', 'alexallain', '');">@alexallain</a> on twitter. </p>
<p></p>
<p><a href="http://www.addthis.com/bookmark.php?v=20"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/84cea_lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0" /></a><!-- AddThis Button END --></p>
<p>                                            <a href="http://feeds2.feedburner.com/Cprogrammingcom" rel="alternate" type="application/rss+xml"><image<br />
                                            src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png"<br />
                                            alt="subscribe to a feed"></a></p>
<p><a href="http://feeds2.feedburner.com/Cprogrammingcom&quot;">Subscribe to<br />
Cprogramming.com</a></p>
<hr />
        <b>Related Articles</b></p>
<p>        <a href="http://www.cprogramming.com/how_to_learn_to_program.html">5<br />
        Ways You can Learn Programming Faster</a></p>
<p>        <a href="http://www.cprogramming.com/tutorial/common.html">Common<br />
        Program Mistakes&#8211;And How to Solve Them</a></p>
<p>        <a href="http://www.cprogramming.com/tutorial/incremental_testing.html">How<br />
        to Avoid Getting Lost When Writing Programs, or, The Power of<br />
        Incremental Development</a></p>
<p>        <a href="http://www.cprogramming.com/tutorial/thinking.html">How to<br />
        Think About Programming, A Beginner&#8217;s Guide</a></p>
<p align="center"> &#8212;&#8211; </p>
<p><a href="http://feedburner.google.com/fb/a/mailverify?uri=Cprogrammingcom&amp;loc=en_US">Subscribe<br />
to cprogramming.com by Email</a></p>
<p>            Interested in <a href="http://www.cprogramming.com/advertising.html">advertising </p>
<p>            with us</a>?</p>
<p>            Please read our <a href="http://www.cprogramming.com/privacy.html">privacy </p>
<p>            policy</a>.</p>
<p>            <a href="http://www.cprogramming.com/use.html">Copyright</a> © 1997-2009 </p>
<p>            Cprogramming.com. All rights reserved.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://codesampleworld.com/2009/06/10/the-5-most-common-problems-new-programmers-face-and-how-you-can-solve-them/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How can Cprogramming.com Better Help You?</title>
		<link>http://codesampleworld.com/2009/06/10/how-can-cprogrammingcom-better-help-you/</link>
		<comments>http://codesampleworld.com/2009/06/10/how-can-cprogrammingcom-better-help-you/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 09:38:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[code project]]></category>

		<guid isPermaLink="false">http://codesampleworld.com/2009/06/10/how-can-cprogrammingcom-better-help-you/</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[
]]></content:encoded>
			<wfw:commentRss>http://codesampleworld.com/2009/06/10/how-can-cprogrammingcom-better-help-you/feed/</wfw:commentRss>
		</item>
		<item>
		<title>5 Awesome (and time saving) Features of the Visual Studio Debugger</title>
		<link>http://codesampleworld.com/2009/06/10/5-awesome-and-time-saving-features-of-the-visual-studio-debugger/</link>
		<comments>http://codesampleworld.com/2009/06/10/5-awesome-and-time-saving-features-of-the-visual-studio-debugger/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 09:38:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[code project]]></category>

		<guid isPermaLink="false">http://codesampleworld.com/2009/06/10/5-awesome-and-time-saving-features-of-the-visual-studio-debugger/</guid>
		<description><![CDATA[
5 Awesome Visual Studio Debugger Features
By: Alex Allain
So you know all the basic debugger features: breakpoints, stepping through the
code, viewing
the values of variables.  But there&#8217;s a lot more your debugger
can do to make it quicker to step through code, easier to test alternate
solutions, and even avoid rerunning the program.
Here, you&#8217;ll learn about some of [...]]]></description>
			<content:encoded><![CDATA[<div>
<h1>5 Awesome Visual Studio Debugger Features</h1>
<p>By: <a href="http://www.cprogramming.com/about.html">Alex Allain</a></p>
<p>So you know all the basic debugger features: <a href="http://www.cprogramming.com/tutorial/visual_studio_breakpoints.html">breakpoints</a>, stepping through the<br />
code, <a href="http://www.cprogramming.com/tutorial/visual_studio_debugging_setup.html">viewing<br />
the values of variables</a>.  But there&#8217;s a lot more your debugger<br />
can do to make it quicker to step through code, easier to test alternate<br />
solutions, and even avoid rerunning the program.</p>
<p>Here, you&#8217;ll learn about some of <a href="http://www.cprogramming.com/visual.html">Visual Studio</a>&#8217;s more advanced debugger<br />
features, such as <b>stepping out of a function</b>, taking advantage of the <b>autos<br />
window</b>, using <b>run to the cursor</b> to set temporary breakpoints, <b>modifying<br />
a variable&#8217;s value</b> to test potential fixes, and using <b>Set Next<br />
Statement</b> to turn back the clock and re-execute code.</p>
<p><center></p>
<p>  </center></p>
<h2>Sample (Buggy) Code</h2>
<p>Each of the following examples use this code, which contains several bugs:</p>
<pre>
#include &lt;vector&gt;
#include &lt;iostream&gt;

class Data
{
public:
	Data ()
	{
		_values.push_back( 1 );
		_values.push_back( 2 );
	}
	int getSum()
	{
		int total;
		for ( std::vector&lt;int&gt;::iterator itr = _values.begin(), end = _values.end(); itr != end; ++itr )
		{
			total += *itr;
		}
		return total;
	}
	int getCount() { return _values.size(); }
private:
	std::vector&lt;int&gt; _values;
};

double compute_average( int sum, int count )
{
	return sum / count;
}

int main()
{
	Data d;

	std::cout &lt;&lt; compute_average( d.getSum(), d.getCount() ) &lt;&lt; std::endl;
}
</pre>
<h2>1. Step Out of the Current Function</h2>
<p>So you&#8217;ve written a function call, like so:</p>
<pre>
int main()
{
	Data d;

	std::cout &lt;&lt; compute_average( d.getSum(), d.getCount() ) &lt;&lt; std::endl;
}
</pre>
<p>And the compute_average function is not returning the correct value.  If you<br />
were to use a debugger, and you wanted to step into compute_average, you could,<br />
of course, put a breakpoint inside compute_average, but what if it were called<br />
from several places?  Visual Studio has a very convenient feature of its<br />
debugger, that will allow you to step into compute_average very quickly.</p>
<p>Set a breakpoint on that line:</p>
<p><center><br />
<img src="http://feeds.rapidfeeds.com/Images/debug_step_out_1.png" /><br />
</center></p>
<p>Once the debugger hits it, then step into the function.  getSum and getCount<br />
will both be called before compute_average.  Normally, you&#8217;d keep hitting next<br />
to get out of getSum and getCount, but with Visual Studio, you can quickly hit<br />
Shift-F11 to step out of the current function and return to the next call.</p>
<p><center><br />
<img src="http://feeds.rapidfeeds.com/Images/debug_step_out_2.png" /><br />
</center></p>
<p>Once you step out of the current function, you&#8217;re taken back to the original<br />
breakpoint.  But now you can step in again, to got to the next function.<br />
Repeat until you&#8217;ve drilled down into the function you want.</p>
<h3>When to Use This Trick</h3>
<p>Obviously, there are times when it makes more sense to just set a breakpoint in<br />
your target function.  But when doing so would require ignoring hundreds of calls to that function to find the one you want,<br />
it might not be worth it.  Using<br />
step out provides a quick way of getting into a function without having to find<br />
the function and set a temporary break point (or use run to cursor).</p>
<h2>2. Use the Auto Window to See Result of Functions</h2>
<p>One of the most frustrating parts of debugging is when you have a function call<br />
whose result isn&#8217;t stored anywhere, and you really want to know what it<br />
returned.</p>
<p>Somtimes, programmers write code like this, just to work around the issue:</p>
<pre>
int computed_avg;

computed_avg = compute_average( d.getSum(), d.getCount() );

std::cout &lt;&lt; computed_avg &lt;&lt; std::endl;
</pre>
<p>(Obviously, in this case, the program prints out the value, so all is not lost.<br />
This is rarely true in the general case.)</p>
<p>Fortunately, the autos window has good courtesy to display the result of a<br />
function evaluation: </p>
<p><center><br />
<img src="http://feeds.rapidfeeds.com/Images/debug_autos.png" /><br />
</center></p>
<h3>When to Use this Trick</h3>
<p>Whenever you want to see a return value!  Note that you the autos window will eventually erase the return value as you execute code, so be sure to check your return value immediately.</p>
<h4>Did you know&#8230;</h4>
<p>Most return values are also stored in the EAX register&#8211;you can look in EAX to find the return value, if you need it.</p>
<h2>3. Run to Cursor</h2>
<p>Run to cursor is a great way of avoiding the<br />
step-step-step-step-step-oh-no-I-stepped-over-it problem, where you know where<br />
you want to be, getting to it requires stepping multiple times, and you get<br />
impatient.</p>
<p>In effect, run-to-cursor is just a shortcut for setting a breakpoint that is<br />
immediately cleared once it&#8217;s hit; nevertheless, it&#8217;s a very convenient<br />
feature.  It is most useful when you have a piece of code that is called<br />
frequently from different places, and you only care about one code path.  Then<br />
you can place a breakpoint at the start of that path and use run-to-cursor to<br />
get to the point you really care about. </p>
<p>Going back to our sample program, we can use run-to-cursor rather than the<br />
step-out trick, to get into compute_average.  (Of course, we could just put a<br />
breakpoint in compute_average; for the purpose of making this example sensible,<br />
please imagine 15-20 calls to compute_average that all work correctly, taking<br />
place before the broken call.)</p>
<p><center><br />
<img src="http://feeds.rapidfeeds.com/Images/run_to_cursor.png" /><br />
</center></p>
<h3>When to Use this Trick</h3>
<p>Any time you want a throwaway breakpoint or want to avoid single-stepping through a lot of code.  Be careful, though, that you run to a part of the code that will actually be executed.  Watch out for early returns from a function within a loop, for instance.</p>
<h2>4. Modify Any Variable</h2>
<p>Now that we&#8217;re in the compute_average function, and we know that the value<br />
being returned is <i>waayyy</i> too big, we can check the arguments to the<br />
function.  It turns out that sum is very large.  We&#8217;ll deal with that in a bit.<br />
First, let&#8217;s test and make sure that the function works if we do get the right<br />
value. </p>
<p>Obviously, one way of doing this would be to pass in a new value.  But Visual<br />
Studio conveniently makes it easy to change any value in memory.  In fact,<br />
let&#8217;s do that with the value of sum, and make sure that it returns the correct<br />
value.</p>
<p>All you need to do is click on in the Value column of the auto or watch window<br />
and change the value.  (You can also do this when the variable&#8217;s value pops up<br />
while hovering over a variable in the source code.)</p>
<p><center><br />
<img src="http://feeds.rapidfeeds.com/Images/pre_modify_variable.png" /><br />
</center></p>
<p>and voila:</p>
<p><center><br />
<img src="http://feeds.rapidfeeds.com/Images/modify_variable.png" /><br />
</center></p>
<p>Continuing execution of the program demonstrates that, in fact, we still get<br />
the wrong answer&#8211;this time, it returns the value 1.  This suggests that<br />
truncation is taking place due to integer division.  </p>
<p>Before recompiling, we can add in a cast to solve this problem:</p>
<pre>
return (double) sum / count;
</pre>
<h3>When to Use this Trick</h3>
<p>This trick is powerful, and is particularly helpful when you have found one bug, but want to prove that the rest of your code will work.  This is particularly handy when your debugging session requires a great deal of setup&#8211;for instance, you have to perform a lot of UI to get the right inputs or your code takes a long time to build.  (An alternative would be to consider writing a <a href="http://www.cprogramming.com/tutorial/test-driven-development.html">unit test</a> that demonstrates the bug and doesn&#8217;t require so much setup.)</p>
<p>On the other hand, you can&#8217;t rely on this trick when you are inside a loop or a function that is called frequently&#8211;it&#8217;s just too much of a pain to have to manually set variables all the time.</p>
<h2>5. Set Next Statement</h2>
<p>Set Next Statement is a real power tool.  If you&#8217;re debugging, and you&#8217;ve<br />
accidentally (or not so accidentally) stepped past the point where something<br />
interesting happens, you can sometimes &#8220;unwind&#8221; execution.  What this really<br />
means is that, maintaining the current state of the world, you can tell Visual<br />
Studio to go back and start executing from a previous instruction.</p>
<p>You can also use set next statement to jump over code that you believe is<br />
buggy, or to jump past a conditional test on an if statement to execute a path<br />
of code that you want to debug without having to make the condition true.</p>
<p>Setting the next statement can be dangerous and lead to instability if the<br />
stack or registers aren&#8217;t in a valid state for the line being executed.  And<br />
because it won&#8217;t restore the state of the world, if your code depends on that<br />
state, changing the next statement might not be useful.  On the other hand, if<br />
you want to make a call that you&#8217;re pretty confident won&#8217;t behave differently,<br />
it can be a great way of avoiding recreating a specific failure just because<br />
you accidentally stepped too far.</p>
<p>For instance, take the following debugging state, where you&#8217;re about to return<br />
the value total from getSum:</p>
<p><center><br />
<img src="http://feeds.rapidfeeds.com/Images/pre_set_next_statement.png" /><br />
</center></p>
<p>If you had accidentally run too far, it might be very convenient to be able to<br />
simply say, ok, let&#8217;s start that again:</p>
<p><center><br />
<img src="http://feeds.rapidfeeds.com/Images/set_next_statement_menu.png" /><br />
</center></p>
<p>and then you can go back through executing the loop, perhaps setting the value<br />
of total to 0, since you notice that it wasn&#8217;t initialized, and then checking<br />
to see if the program gives the correct sum (in which case, you can be pretty<br />
confident that the lack of initialization was the problem).</p>
<p><center><br />
<img src="http://feeds.rapidfeeds.com/Images/set_next_statement.png" /><br />
</center></p>
<h3>When to Use this Trick</h3>
<p>Many of the same considerations that apply to resetting variable values also apply here.  However, you should also be aware that the further ahead or back in a function you set the next statement, the more likely the debugger will not be able to compensate and your program will crash.  I usually use this trick to skip over very small chunks of code, or to go back only to a single previous function call.</p>
<p>                                            <a href="http://feeds2.feedburner.com/Cprogrammingcom" rel="alternate" type="application/rss+xml"><image<br />
                                            src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png"<br />
                                            alt="subscribe to a feed"></a><br />
<a href="http://feeds2.feedburner.com/Cprogrammingcom&quot;">Subscribe to<br />
Cprogramming.com</a></p>
<p><a href="http://www.addthis.com/bookmark.php?v=20"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/6456f_lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0" /></a><!-- AddThis Button END --></p>
<p><b>Related articles</b></p>
<p><a href="http://www.cprogramming.com/debugging/visual-studio-msvc-debugging-NoStepInto.html">Skip Stepping Into Functions<br />
with Visual Studio&#8217;s NoStepInto Option</a>.</p>
<p><a href="http://www.cprogramming.com/tutorial/debugging_concepts.html">Debugging with Visual Studio Part 1: Debugging Concepts</a></p>
<p><a href="http://www.cprogramming.com/tutorial/visual_studio_debugging_setup.html">Debugging<br />
with Visual Studio Part 2: Setting up the Debugger</a></p>
<p><a href="http://www.cprogramming.com/tutorial/visual_studio_breakpoints.html">Debugging<br />
with Visual Studio Part 3: Using Breakpoints Effectively</a></p>
<p><a href="http://www.cprogramming.com/tutorial/visual_studio_debugging_code_setup.html">Debugging<br />
with Visual Studio Part 4: Setting up Code for the Debugger</a></p>
<p><a href="http://www.cprogramming.com/tutorial/visual_studio_trace_log_messages.html">Debugging<br />
with Visual Studio Part 5: Using Trace and Log Messages</a></p>
<p><a href="http://www.cprogramming.com/tutorial/visual_studio_remote_debugging.html">Debugging with Visual Studio Part 6: Remote Debugging</a></p>
<p align="center"> &#8212;&#8211; </p>
<p><a href="http://feedburner.google.com/fb/a/mailverify?uri=Cprogrammingcom&amp;loc=en_US">Subscribe<br />
to cprogramming.com by Email</a></p>
<p>            Interested in <a href="http://www.cprogramming.com/advertising.html">advertising </p>
<p>            with us</a>?</p>
<p>            Please read our <a href="http://www.cprogramming.com/privacy.html">privacy </p>
<p>            policy</a>.</p>
<p>            <a href="http://www.cprogramming.com/use.html">Copyright</a> © 1997-2009 </p>
<p>            Cprogramming.com. All rights reserved.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://codesampleworld.com/2009/06/10/5-awesome-and-time-saving-features-of-the-visual-studio-debugger/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Debugging with Visual Studio, Part 6: Remote Debugging</title>
		<link>http://codesampleworld.com/2009/06/10/debugging-with-visual-studio-part-6-remote-debugging/</link>
		<comments>http://codesampleworld.com/2009/06/10/debugging-with-visual-studio-part-6-remote-debugging/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 09:38:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[code project]]></category>

		<guid isPermaLink="false">http://codesampleworld.com/2009/06/10/debugging-with-visual-studio-part-6-remote-debugging/</guid>
		<description><![CDATA[Discover how to debug code running on a one machine from your main development box using remote debugging with Visual Studio



   


(full text retrieval failed)
]]></description>
			<content:encoded><![CDATA[<p>Discover how to debug code running on a one machine from your main development box using remote debugging with Visual Studio</p>
<p><a href="http://feedads.g.doubleclick.net/~a/MZFb6FE7Tq6X_wmnI8hbHJReuHw/0/da"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/0a3ae_di" border="0" ismap="true"></img></a><br/><br />
<a href="http://feedads.g.doubleclick.net/~a/MZFb6FE7Tq6X_wmnI8hbHJReuHw/1/da"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/0a3ae_di" border="0" ismap="true"></img></a></p>
<div>
<a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=ZaeReNeF5YE:KHjsaISAnyM:yIl2AUoC8zA"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/0a3ae_Cprogrammingcom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=ZaeReNeF5YE:KHjsaISAnyM:gIN9vFwOqvQ"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/0a3ae_Cprogrammingcom?i=ZaeReNeF5YE:KHjsaISAnyM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=ZaeReNeF5YE:KHjsaISAnyM:V_sGLiPBpWU"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/b9513_Cprogrammingcom?i=ZaeReNeF5YE:KHjsaISAnyM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=ZaeReNeF5YE:KHjsaISAnyM:F7zBnMyn0Lo"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/b9513_Cprogrammingcom?i=ZaeReNeF5YE:KHjsaISAnyM:F7zBnMyn0Lo" border="0"></img></a>
</div>
<p><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/b9513_ZaeReNeF5YE" height="1" width="1" /></p>
<p>(full text retrieval failed)</p>
]]></content:encoded>
			<wfw:commentRss>http://codesampleworld.com/2009/06/10/debugging-with-visual-studio-part-6-remote-debugging/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Debugging with Visual Studio, Part 5: Using Trace and Log Messages</title>
		<link>http://codesampleworld.com/2009/06/10/debugging-with-visual-studio-part-5-using-trace-and-log-messages/</link>
		<comments>http://codesampleworld.com/2009/06/10/debugging-with-visual-studio-part-5-using-trace-and-log-messages/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 09:38:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[code project]]></category>

		<guid isPermaLink="false">http://codesampleworld.com/2009/06/10/debugging-with-visual-studio-part-5-using-trace-and-log-messages/</guid>
		<description><![CDATA[Part 5 in a series on debugging with Visual Studio.  Discover how to use tracing and logging to make debugging easier.



   


(full text retrieval failed)
]]></description>
			<content:encoded><![CDATA[<p>Part 5 in a series on debugging with Visual Studio.  Discover how to use tracing and logging to make debugging easier.</p>
<p><a href="http://feedads.g.doubleclick.net/~a/rWRp1_ox548aezdh2XEiYis9N3s/0/da"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/5e163_di" border="0" ismap="true"></img></a><br/><br />
<a href="http://feedads.g.doubleclick.net/~a/rWRp1_ox548aezdh2XEiYis9N3s/1/da"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/5e163_di" border="0" ismap="true"></img></a></p>
<div>
<a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=cA_cIK4YCLE:pX33KKL3_c8:yIl2AUoC8zA"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/5e163_Cprogrammingcom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=cA_cIK4YCLE:pX33KKL3_c8:gIN9vFwOqvQ"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/5e163_Cprogrammingcom?i=cA_cIK4YCLE:pX33KKL3_c8:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=cA_cIK4YCLE:pX33KKL3_c8:V_sGLiPBpWU"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/96f4a_Cprogrammingcom?i=cA_cIK4YCLE:pX33KKL3_c8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=cA_cIK4YCLE:pX33KKL3_c8:F7zBnMyn0Lo"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/96f4a_Cprogrammingcom?i=cA_cIK4YCLE:pX33KKL3_c8:F7zBnMyn0Lo" border="0"></img></a>
</div>
<p><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/96f4a_cA_cIK4YCLE" height="1" width="1" /></p>
<p>(full text retrieval failed)</p>
]]></content:encoded>
			<wfw:commentRss>http://codesampleworld.com/2009/06/10/debugging-with-visual-studio-part-5-using-trace-and-log-messages/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Debugging C and C++ with Visual Studio 2005/2008, Part 4: Setting up Code for the Debugger</title>
		<link>http://codesampleworld.com/2009/06/10/debugging-c-and-c-with-visual-studio-20052008-part-4-setting-up-code-for-the-debugger/</link>
		<comments>http://codesampleworld.com/2009/06/10/debugging-c-and-c-with-visual-studio-20052008-part-4-setting-up-code-for-the-debugger/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 09:38:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[code project]]></category>

		<guid isPermaLink="false">http://codesampleworld.com/2009/06/10/debugging-c-and-c-with-visual-studio-20052008-part-4-setting-up-code-for-the-debugger/</guid>
		<description><![CDATA[Part 4 in a series on debugging C and C++ in Visual Studio



   


(full text retrieval failed)
]]></description>
			<content:encoded><![CDATA[<p>Part 4 in a series on debugging C and C++ in Visual Studio</p>
<p><a href="http://feedads.g.doubleclick.net/~a/QZHNuH4PVeokLQLfFUTqJK4_GvQ/0/da"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/dcf02_di" border="0" ismap="true"></img></a><br/><br />
<a href="http://feedads.g.doubleclick.net/~a/QZHNuH4PVeokLQLfFUTqJK4_GvQ/1/da"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/dcf02_di" border="0" ismap="true"></img></a></p>
<div>
<a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=EeSod8bJm-0:w6AZSb2NUtU:yIl2AUoC8zA"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/dcf02_Cprogrammingcom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=EeSod8bJm-0:w6AZSb2NUtU:gIN9vFwOqvQ"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/dcf02_Cprogrammingcom?i=EeSod8bJm-0:w6AZSb2NUtU:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=EeSod8bJm-0:w6AZSb2NUtU:V_sGLiPBpWU"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/ba1f5_Cprogrammingcom?i=EeSod8bJm-0:w6AZSb2NUtU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=EeSod8bJm-0:w6AZSb2NUtU:F7zBnMyn0Lo"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/ba1f5_Cprogrammingcom?i=EeSod8bJm-0:w6AZSb2NUtU:F7zBnMyn0Lo" border="0"></img></a>
</div>
<p><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/ba1f5_EeSod8bJm-0" height="1" width="1" /></p>
<p>(full text retrieval failed)</p>
]]></content:encoded>
			<wfw:commentRss>http://codesampleworld.com/2009/06/10/debugging-c-and-c-with-visual-studio-20052008-part-4-setting-up-code-for-the-debugger/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Debugging C++ Using Visual Studio 2005/2008, Part 3: Using Breakpoints Effectively</title>
		<link>http://codesampleworld.com/2009/06/10/debugging-c-using-visual-studio-20052008-part-3-using-breakpoints-effectively/</link>
		<comments>http://codesampleworld.com/2009/06/10/debugging-c-using-visual-studio-20052008-part-3-using-breakpoints-effectively/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 09:38:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[code project]]></category>

		<guid isPermaLink="false">http://codesampleworld.com/2009/06/10/debugging-c-using-visual-studio-20052008-part-3-using-breakpoints-effectively/</guid>
		<description><![CDATA[Part 3 in a series on debugging with Visual Studio



   


(full text retrieval failed)
]]></description>
			<content:encoded><![CDATA[<p>Part 3 in a series on debugging with Visual Studio</p>
<p><a href="http://feedads.g.doubleclick.net/~a/8A-fKWX1AmItdLOgJYmYwGuf980/0/da"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/23ecf_di" border="0" ismap="true"></img></a><br/><br />
<a href="http://feedads.g.doubleclick.net/~a/8A-fKWX1AmItdLOgJYmYwGuf980/1/da"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/23ecf_di" border="0" ismap="true"></img></a></p>
<div>
<a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=NuE0qeh-dag:jeDKZTFZ5OQ:yIl2AUoC8zA"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/23ecf_Cprogrammingcom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=NuE0qeh-dag:jeDKZTFZ5OQ:gIN9vFwOqvQ"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/d8c99_Cprogrammingcom?i=NuE0qeh-dag:jeDKZTFZ5OQ:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=NuE0qeh-dag:jeDKZTFZ5OQ:V_sGLiPBpWU"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/d8c99_Cprogrammingcom?i=NuE0qeh-dag:jeDKZTFZ5OQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=NuE0qeh-dag:jeDKZTFZ5OQ:F7zBnMyn0Lo"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/d8c99_Cprogrammingcom?i=NuE0qeh-dag:jeDKZTFZ5OQ:F7zBnMyn0Lo" border="0"></img></a>
</div>
<p><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/d8c99_NuE0qeh-dag" height="1" width="1" /></p>
<p>(full text retrieval failed)</p>
]]></content:encoded>
			<wfw:commentRss>http://codesampleworld.com/2009/06/10/debugging-c-using-visual-studio-20052008-part-3-using-breakpoints-effectively/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ask an Expert</title>
		<link>http://codesampleworld.com/2009/06/10/ask-an-expert/</link>
		<comments>http://codesampleworld.com/2009/06/10/ask-an-expert/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 09:37:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[code project]]></category>

		<guid isPermaLink="false">http://codesampleworld.com/2009/06/10/ask-an-expert/</guid>
		<description><![CDATA[The Ask an Expert hage has been updated with a link to Cprogramming.com&#8217;s very own expert grid, featuring experts from our message board community and others!



   


(full text retrieval failed)
]]></description>
			<content:encoded><![CDATA[<p>The Ask an Expert hage has been updated with a link to Cprogramming.com&#8217;s very own expert grid, featuring experts from our message board community and others!</p>
<p><a href="http://feedads.g.doubleclick.net/~a/LAgwW0EaxDo-WTNimXVDl2fLBAE/0/da"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/eb1c2_di" border="0" ismap="true"></img></a><br/><br />
<a href="http://feedads.g.doubleclick.net/~a/LAgwW0EaxDo-WTNimXVDl2fLBAE/1/da"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/eb1c2_di" border="0" ismap="true"></img></a></p>
<div>
<a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=Su0c3WLDM2g:GgDAQ7jsowo:yIl2AUoC8zA"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/eb1c2_Cprogrammingcom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=Su0c3WLDM2g:GgDAQ7jsowo:gIN9vFwOqvQ"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/510a1_Cprogrammingcom?i=Su0c3WLDM2g:GgDAQ7jsowo:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=Su0c3WLDM2g:GgDAQ7jsowo:V_sGLiPBpWU"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/510a1_Cprogrammingcom?i=Su0c3WLDM2g:GgDAQ7jsowo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=Su0c3WLDM2g:GgDAQ7jsowo:F7zBnMyn0Lo"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/510a1_Cprogrammingcom?i=Su0c3WLDM2g:GgDAQ7jsowo:F7zBnMyn0Lo" border="0"></img></a>
</div>
<p><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/510a1_Su0c3WLDM2g" height="1" width="1" /></p>
<p>(full text retrieval failed)</p>
]]></content:encoded>
			<wfw:commentRss>http://codesampleworld.com/2009/06/10/ask-an-expert/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Constructors and Destructors in C++</title>
		<link>http://codesampleworld.com/2009/06/10/constructors-and-destructors-in-c/</link>
		<comments>http://codesampleworld.com/2009/06/10/constructors-and-destructors-in-c/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 09:37:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[code project]]></category>

		<guid isPermaLink="false">http://codesampleworld.com/2009/06/10/constructors-and-destructors-in-c/</guid>
		<description><![CDATA[Learn about the subtleties of constructors and destructors in C++



   


(full text retrieval failed)
]]></description>
			<content:encoded><![CDATA[<p>Learn about the subtleties of constructors and destructors in C++</p>
<p><a href="http://feedads.g.doubleclick.net/~a/p7Rjyos8yHh08T4UZsAWLaxnCAE/0/da"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/7b700_di" border="0" ismap="true"></img></a><br/><br />
<a href="http://feedads.g.doubleclick.net/~a/p7Rjyos8yHh08T4UZsAWLaxnCAE/1/da"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/1dc56_di" border="0" ismap="true"></img></a></p>
<div>
<a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=AlB8sqD6Le4:x1-55YuSILQ:yIl2AUoC8zA"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/1dc56_Cprogrammingcom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=AlB8sqD6Le4:x1-55YuSILQ:gIN9vFwOqvQ"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/1dc56_Cprogrammingcom?i=AlB8sqD6Le4:x1-55YuSILQ:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=AlB8sqD6Le4:x1-55YuSILQ:V_sGLiPBpWU"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/1dc56_Cprogrammingcom?i=AlB8sqD6Le4:x1-55YuSILQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds2.feedburner.com/~ff/Cprogrammingcom?a=AlB8sqD6Le4:x1-55YuSILQ:F7zBnMyn0Lo"><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/1dc56_Cprogrammingcom?i=AlB8sqD6Le4:x1-55YuSILQ:F7zBnMyn0Lo" border="0"></img></a>
</div>
<p><img src="http://codesampleworld.com/wp-content/plugins/wp-o-matic/cache/1dc56_AlB8sqD6Le4" height="1" width="1" /></p>
<p>(full text retrieval failed)</p>
]]></content:encoded>
			<wfw:commentRss>http://codesampleworld.com/2009/06/10/constructors-and-destructors-in-c/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Advanced Report Viewer</title>
		<link>http://codesampleworld.com/2009/04/09/advanced-report-viewer-2/</link>
		<comments>http://codesampleworld.com/2009/04/09/advanced-report-viewer-2/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 10:33:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[ondotnet]]></category>

		<guid isPermaLink="false">http://codesampleworld.com/2009/04/09/advanced-report-viewer-2/</guid>
		<description><![CDATA[The article shows how to extend ReportViewer control that comes with Visual Studio 2008. The most important extension is adding export to MS Word.
]]></description>
			<content:encoded><![CDATA[<p>The article shows how to extend ReportViewer control that comes with Visual Studio 2008. The most important extension is adding export to MS Word.</p>
]]></content:encoded>
			<wfw:commentRss>http://codesampleworld.com/2009/04/09/advanced-report-viewer-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Deploying Custom Tool on a developer machine using a Setup Project</title>
		<link>http://codesampleworld.com/2009/04/09/deploying-custom-tool-on-a-developer-machine-using-a-setup-project/</link>
		<comments>http://codesampleworld.com/2009/04/09/deploying-custom-tool-on-a-developer-machine-using-a-setup-project/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 10:33:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[ondotnet]]></category>

		<guid isPermaLink="false">http://codesampleworld.com/2009/04/09/deploying-custom-tool-on-a-developer-machine-using-a-setup-project/</guid>
		<description><![CDATA[Making a custom tool work on the developers machine require several actions like placing keys in the registry and registering your DLL Library using the regasm command. This post will discuss the automation of this procedures using a setup project.
]]></description>
			<content:encoded><![CDATA[<p>Making a custom tool work on the developers machine require several actions like placing keys in the registry and registering your DLL Library using the regasm command. This post will discuss the automation of this procedures using a setup project.</p>
]]></content:encoded>
			<wfw:commentRss>http://codesampleworld.com/2009/04/09/deploying-custom-tool-on-a-developer-machine-using-a-setup-project/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hide / Minimize dialog on startup</title>
		<link>http://codesampleworld.com/2009/04/09/hide-minimize-dialog-on-startup-2/</link>
		<comments>http://codesampleworld.com/2009/04/09/hide-minimize-dialog-on-startup-2/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 10:33:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[ondotnet]]></category>

		<guid isPermaLink="false">http://codesampleworld.com/2009/04/09/hide-minimize-dialog-on-startup-2/</guid>
		<description><![CDATA[Have you ever tried to minimize a dialog during the startup of a dialog based application? The problem is in a dialog based application, we will not get the control after the dialog is completely created. Even a call to ShowWindow() from the OnInitDialog() function, will not work. So what will we do
]]></description>
			<content:encoded><![CDATA[<p>Have you ever tried to minimize a dialog during the startup of a dialog based application? The problem is in a dialog based application, we will not get the control after the dialog is completely created. Even a call to ShowWindow() from the OnInitDialog() function, will not work. So what will we do</p>
]]></content:encoded>
			<wfw:commentRss>http://codesampleworld.com/2009/04/09/hide-minimize-dialog-on-startup-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Find which dll / exe created a window.</title>
		<link>http://codesampleworld.com/2009/04/09/find-which-dll-exe-created-a-window-2/</link>
		<comments>http://codesampleworld.com/2009/04/09/find-which-dll-exe-created-a-window-2/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 10:33:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[ondotnet]]></category>

		<guid isPermaLink="false">http://codesampleworld.com/2009/04/09/find-which-dll-exe-created-a-window-2/</guid>
		<description><![CDATA[The GetWindowModuleFileName() functions can be used to find which exe or dll have created a window. But the problem with this function is that, it will not work across process.When ever we create a window, we have to pass the an HINSTANCE into it. And later we can use GetWindowLong to get that HINST
]]></description>
			<content:encoded><![CDATA[<p>The GetWindowModuleFileName() functions can be used to find which exe or dll have created a window. But the problem with this function is that, it will not work across process.When ever we create a window, we have to pass the an HINSTANCE into it. And later we can use GetWindowLong to get that HINST</p>
]]></content:encoded>
			<wfw:commentRss>http://codesampleworld.com/2009/04/09/find-which-dll-exe-created-a-window-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Combinations in C++, Part 2</title>
		<link>http://codesampleworld.com/2009/04/09/combinations-in-c-part-2-2/</link>
		<comments>http://codesampleworld.com/2009/04/09/combinations-in-c-part-2-2/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 10:33:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[ondotnet]]></category>

		<guid isPermaLink="false">http://codesampleworld.com/2009/04/09/combinations-in-c-part-2-2/</guid>
		<description><![CDATA[Introduce 4 new algorithms on finding combinations
]]></description>
			<content:encoded><![CDATA[<p>Introduce 4 new algorithms on finding combinations</p>
]]></content:encoded>
			<wfw:commentRss>http://codesampleworld.com/2009/04/09/combinations-in-c-part-2-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using Expression Encoder 2 Silverlight 2 Templates in your project</title>
		<link>http://codesampleworld.com/2009/04/09/using-expression-encoder-2-silverlight-2-templates-in-your-project-2/</link>
		<comments>http://codesampleworld.com/2009/04/09/using-expression-encoder-2-silverlight-2-templates-in-your-project-2/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 10:33:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[ondotnet]]></category>

		<guid isPermaLink="false">http://codesampleworld.com/2009/04/09/using-expression-encoder-2-silverlight-2-templates-in-your-project-2/</guid>
		<description><![CDATA[How to use Expression Encoder 2 Silverlight 2 Templates in your project.
]]></description>
			<content:encoded><![CDATA[<p>How to use Expression Encoder 2 Silverlight 2 Templates in your project.</p>
]]></content:encoded>
			<wfw:commentRss>http://codesampleworld.com/2009/04/09/using-expression-encoder-2-silverlight-2-templates-in-your-project-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Create an XSD Schema….without knowing a darn thing about XSD.</title>
		<link>http://codesampleworld.com/2009/04/09/create-an-xsd-schema%e2%80%a6without-knowing-a-darn-thing-about-xsd-2/</link>
		<comments>http://codesampleworld.com/2009/04/09/create-an-xsd-schema%e2%80%a6without-knowing-a-darn-thing-about-xsd-2/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 10:33:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[ondotnet]]></category>

		<guid isPermaLink="false">http://codesampleworld.com/2009/04/09/create-an-xsd-schema%e2%80%a6without-knowing-a-darn-thing-about-xsd-2/</guid>
		<description><![CDATA[Back in the old days, when dinosaurs roamed the earth, developers wanting to exchange data between applications used binary formatted data, hardcoded text field lengths, or delimited text files. Much parsing and error checking was involved. It was tedious. With XML files a lot of that work can be d
]]></description>
			<content:encoded><![CDATA[<p>Back in the old days, when dinosaurs roamed the earth, developers wanting to exchange data between applications used binary formatted data, hardcoded text field lengths, or delimited text files. Much parsing and error checking was involved. It was tedious. With XML files a lot of that work can be d</p>
]]></content:encoded>
			<wfw:commentRss>http://codesampleworld.com/2009/04/09/create-an-xsd-schema%e2%80%a6without-knowing-a-darn-thing-about-xsd-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Convert MAC Address string into Bytes</title>
		<link>http://codesampleworld.com/2009/04/09/convert-mac-address-string-into-bytes-2/</link>
		<comments>http://codesampleworld.com/2009/04/09/convert-mac-address-string-into-bytes-2/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 10:33:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[ondotnet]]></category>

		<guid isPermaLink="false">http://codesampleworld.com/2009/04/09/convert-mac-address-string-into-bytes-2/</guid>
		<description><![CDATA[The code snip converts MAC Address String Format into Bytes
]]></description>
			<content:encoded><![CDATA[<p>The code snip converts MAC Address String Format into Bytes</p>
]]></content:encoded>
			<wfw:commentRss>http://codesampleworld.com/2009/04/09/convert-mac-address-string-into-bytes-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Working with Delegates in Visual Form Files</title>
		<link>http://codesampleworld.com/2009/04/09/working-with-delegates-in-visual-form-files-2/</link>
		<comments>http://codesampleworld.com/2009/04/09/working-with-delegates-in-visual-form-files-2/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 10:33:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[ondotnet]]></category>

		<guid isPermaLink="false">http://codesampleworld.com/2009/04/09/working-with-delegates-in-visual-form-files-2/</guid>
		<description><![CDATA[How to work with delegates in Visual Form Files.
]]></description>
			<content:encoded><![CDATA[<p>How to work with delegates in Visual Form Files.</p>
]]></content:encoded>
			<wfw:commentRss>http://codesampleworld.com/2009/04/09/working-with-delegates-in-visual-form-files-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Visual Form File format</title>
		<link>http://codesampleworld.com/2009/04/09/visual-form-file-format-2/</link>
		<comments>http://codesampleworld.com/2009/04/09/visual-form-file-format-2/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 10:33:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[ondotnet]]></category>

		<guid isPermaLink="false">http://codesampleworld.com/2009/04/09/visual-form-file-format-2/</guid>
		<description><![CDATA[XAML this, XAML that, blah, blah, blah. I get so sick of hearing about how great XAML is, as if this were the most mind altering, earth shaking technology to hit the streets in years. Bah Humbug!We&#8217;ve had something like this for years in the VCF! And the predecessor to XAML dates back even further [...]]]></description>
			<content:encoded><![CDATA[<p>XAML this, XAML that, blah, blah, blah. I get so sick of hearing about how great XAML is, as if this were the most mind altering, earth shaking technology to hit the streets in years. Bah Humbug!We&#8217;ve had something like this for years in the VCF! And the predecessor to XAML dates back even further t</p>
]]></content:encoded>
			<wfw:commentRss>http://codesampleworld.com/2009/04/09/visual-form-file-format-2/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
