5 Replies - 360 Views - Last Post: 07 February 2012 - 05:56 PM Rate Topic: -----

Topic Sponsor:

#1 Bryston  Icon User is offline

  • D.I.C Head

Reputation: 15
  • View blog
  • Posts: 122
  • Joined: 24-January 12

Learning through DeBugging a valid path?

Posted 07 February 2012 - 02:00 PM

One of my training texts suggests that the reader try to debug other peoples buggy programs. I find the idea intriguing so I am asking whether the pros think it's worth the time.

I'm a beginner and am just getting into Chapter 7 of C++ Without Fear but if any other beginners want to share their work with me to see whether I can fix it....

Always looking for new ways to learn!
Is This A Good Question/Topic? 0
  • +

Replies To: Learning through DeBugging a valid path?

#2 LaughingBelly  Icon User is offline

  • D.I.C Head

Reputation: 37
  • View blog
  • Posts: 88
  • Joined: 11-April 11

Re: Learning through DeBugging a valid path?

Posted 07 February 2012 - 02:11 PM

Sure, debugging is an essential skill for any programmer. It is a pity that a lot of questions here would have been solved without this much effort if only the programmer put in some effort to debug thier program.

Debugging others programs works to an extent as long as you actually understand their problem and can solve it yourself. If you are going to do this, you dont need anyone to submit anything to you - just keep visiting the forum and try to answer the questions here. You are sure to find a question that requires some debugging every day.

Most of the people that answer questions on these forums do debugging by just visual inspection for the most part, but you can plug the code in your debugger and debug that way till you get comfortable spotting defects by just visual inspection for simple programs. This improves your comfort level writing code and handle the more complex debugging scenarios with the right tools.
Was This Post Helpful? 1
  • +
  • -

#3 nuclearfroggy  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 54
  • View blog
  • Posts: 136
  • Joined: 04-August 08

Re: Learning through DeBugging a valid path?

Posted 07 February 2012 - 02:15 PM

I'm guessing you've noticed on this forum the majority of posts include code that isn't working... why not take code from existing threads and try and fix it?
Was This Post Helpful? 1
  • +
  • -

#4 Bryston  Icon User is offline

  • D.I.C Head

Reputation: 15
  • View blog
  • Posts: 122
  • Joined: 24-January 12

Re: Learning through DeBugging a valid path?

Posted 07 February 2012 - 02:28 PM

View Postnuclearfroggy, on 07 February 2012 - 02:15 PM, said:

I'm guessing you've noticed on this forum the majority of posts include code that isn't working... why not take code from existing threads and try and fix it?


I only get online for a few hours a week. While I am online I do plow through the posts while I am downloading (currently grabbing code::blocks and Visual C++ Express so I can dump DevC++). Small snippets I can sometimes spot a problem in, but it is hard without a context if you know what I mean. Most of what gets posted here is poorly commented (reflected by the responses asking 'what is it supposed to do?' etc...) or incomplete, like a homework assignment.

I was hoping to have something to download and take home with me. Preferably complete programs, with comments and all the good stuff that source code is supposed to have but for whatever reason doesn't work. Of course they would have to be programs using basic concepts, I am just getting started.

This weekend while I'm in town I will be looking for a C++ Users Group or something similar, it would be invaluable to sit down with someone and go through things in real time.
Was This Post Helpful? 0
  • +
  • -

#5 vividexstance  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 301
  • View blog
  • Posts: 1,039
  • Joined: 31-December 10

Re: Learning through DeBugging a valid path?

Posted 07 February 2012 - 03:36 PM

Why not just try to do some type of a project or just exercises from a programming book and then debug them when they don't work?
Was This Post Helpful? 0
  • +
  • -

#6 Oler1s  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 1282
  • View blog
  • Posts: 3,659
  • Joined: 04-June 09

Re: Learning through DeBugging a valid path?

Posted 07 February 2012 - 05:56 PM

You can't learn to program by watching others. You can't learn to debug by watching others. Here's an imperfect analogy. It's like learning to be a good detective by having an experienced detective tell you all the clues they are working with. But that doesn't help.

You get better by doing. You cannot be told what to do.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1