Can anyone teach me how to debug a program?

  • Context:
  • Thread starter Thread starter Israr Ahmad
  • Start date Start date
  • Tags Tags
    Debugging Program
Click For Summary

Discussion Overview

The discussion revolves around the topic of debugging programs, exploring what types of programs can be debugged and the various methods available for debugging. Participants share their experiences and suggestions related to learning programming and debugging techniques.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested
  • Homework-related

Main Points Raised

  • Some participants note that all programs can be debugged using various methods depending on the programming language and tools available.
  • There is a suggestion to refine the initial question regarding debugging to include specific programming languages or types of software.
  • Several participants recommend starting with languages like C++, Java, Python, or BASIC, depending on the user's goals and prior experience.
  • One participant emphasizes the importance of understanding what a bug is and provides a simple example of debugging a function that returns the square of a number.
  • Another participant shares their personal approach to debugging, which includes reproducing bugs, reading code, logging, and using a debugger.
  • There is a discussion about the differences between C++ and Java, particularly regarding object-oriented programming and multiple inheritance.
  • Some participants express uncertainty about the best practices for debugging and share their experiences with complex programs and bug tracking.

Areas of Agreement / Disagreement

Participants generally agree that all programs can be debugged, but there are multiple competing views on the best methods and languages to use for debugging. The discussion remains unresolved regarding the most effective approaches and the best starting points for beginners.

Contextual Notes

Participants mention various programming languages and tools without reaching a consensus on which is best for beginners. There are also references to specific debugging techniques that may depend on the context of the program being debugged.

  • #31
newjerseyrunner said:
valgrind

Apt name for a multi-threading debugging tool.

BoB
 
Technology news on Phys.org
  • #32
I've learned to program in fortran, I don't know any language, but now when I see a code in C I can understand much of it. Fortran is really intuitive, there are a very few things you have to learn, and then you go. Today is very easy to learn just by looking for tutorials on the internet. The best way to learn is just by programming your self. It can be an arduous work, depending on what you want to do. But this forum is also a great place for interacting with people that can guide you in your learning process. As many before have told you, it is important that you know what specifically you want to write a program for.
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 32 ·
2
Replies
32
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 30 ·
2
Replies
30
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 43 ·
2
Replies
43
Views
7K
  • · Replies 11 ·
Replies
11
Views
2K