News for hackers. Stuff that matters.
Re:How far off am I? by RiderOfGiraffes on Thursday August 12, 2010 @06:31AM (#1597723)
OK, now's the time to learn about debugging. Writing clean code to solve small problems from scratch is easy. Debugging existing code, especially well-written code, is hard. This is where you need to use your problem solving skills.

Pretend that you're the computer and walk through the code in small steps, tediously detailed. Make sure you really understand what the code is doing.

What exactly happens when you execute "char *chPtr = new char;" ?

What exactly happens when you execute "delete chPtr;" ?

And why do I say that debugging well-written code is especially hard? Because the names, clarity and simplicity in well-written code seduce you into the same mindset as produced the code that has the bug.

Re:How far off am I? by mipnix on Thursday August 12, 2010 @09:39AM (#1598041)
I could have used you as my professor in my recent data structures class.

I imagine you have myriad responsibilities in the course of your day and I am grateful for the time you are affording me.

I will work on this tonight.