How I Debug things

I like insights and this covers a good one

Mike's Tech Blog

One day, while I was writing some C#, a coworker commented on a line I wrote:

var foo = getFoo();

“Don’t use var!” he exclaimed. “Use a concrete type. Otherwise, how would I know what foo is?”

I was willing to accommodate him, so I updated the selection:

Object foo = getFoo();

He was not amused, however, if the only way I’m using foo is:

Object foo = getFoo();

Then what is the problem? My code will compile, after all.

Two different modes of thought

His basic issue came down to trying to debug my use of foo. Let’s say foo.toString() wasn’t doing what it supposed to, here is how he would look at the code before testing it:

  1. Determine the specific instance of foo by inspecting getFoo
  2. From this, project what state foo would be in at runtime (variables, fields, and whatnot)
  3. Trace out how the…

View original post 397 more words

Real time 3D programming

This is an amazing real time programming language that I came across some time ago. It’s been a while since a post but assured that soon I will have made up content after I’ve everything I want sorted on the site itself. For now, revel at the awesome that is Tao3D

Also just a reminder to follow on wordpress, twitter, facebook or old fashioned RSS. All the links can be found on the side menu and the facebook page has just been started so will be empty so please, show some love, thanks

There is a great temptation among people starting to learn programming to use the computer far too early….

There is a great temptation among people starting to learn programming to use the computer far too early…. Occasionally this works, but the resultant program is usually very badly constructed and hard to understand. — How to Think Like a Programmer: Problem Solving for the Bewildered [Paul Vickers], opening of chapter 2, A strategy for problem solving

This quote is the grounds of it all. This is formed from the idea that made me want to take the route into computer science that I’m taking, problem solving. I’ve seen many potentially good programmers quit or waste too much time learning things the wrong way. I know it takes a lot of time but doing it right can cut that time down.


One of the biggest problems I see is not understanding the problem and how to solve it. This is how my blog will work. Looking at problem solving techniques, how to break a problem down, how to program to prevent problems from being coded into a program and how to understand problems and how to solve them, not just in programming, but in maths, logic and anywhere else lines can be drawn between these subjects