Archive for September, 2012

Visual Studio Conditional Breakpoints Pitfalls

Posted in csharp, Visual Studio with tags , on September 8, 2012 by vlipwig

Conditional Breakpoints in Visual Studio are great. They allow you to restrict when the breakpoint will hit based on the evaluation of a Boolean expression. You can choose to hit the breakpoint when the condition is true or when the result of the condition has changed.
But there are a couple of things you should be aware of:

  • that the source language determines the expression operators. This means that if you are debugging in Visual Basic, the “<>” operator means “not equal” while in C# or C++/CLI, you would use “!=”.
  • if you choose a wrong expression operator you get no warning or error. Assume you use “=” (assign) instead of “==” (equal) and you will see that suddenly the variable you are examine will always have the same value.

So do yourself a favor and double check the conditions of your breakpoints.

More infos about conditional Breakpoints:

http://msdn.microsoft.com/en-us/library/7sye83ce.aspx

http://support.microsoft.com/kb/308469

“Think Like a Programmer” by V. Anton Spraul; No Starch Press

Posted in Book Review on September 7, 2012 by vlipwig

V. Anton Spraul is an experienced computer science teacher and has taught introductory programming and computer science for more than 15 years.

The goal of this book is to teach you the creative Part of programming. It’s target audience are clearly beginners who “struggle to write programs, even though you think you understand programming languages.”
You should be familiar with at least one Programming language (it doesn’t have to be c++).

The book starts with some general problem solving techniques (e. g. always have a plan, divide and conquer) and explains them on some general puzzles.
In later chapters Problems will be solved with specific programming concepts like Arrays, pointers, dynamic memory and recursion.

You might be disappointed because Spraul doesn’t give any answers to the exercises but as Spraul states at the beginning of the book you should see them as opportunities to apply the concepts described in the chapters.

The exercises are coded in c++ but the book is not specifically about c++.  Most chapters start with a short review of the used concepts in c++.

More infos can be found here