r/learnpython • • May 06 '21

What are some programming tools that every beginner programmer should know about?

Example, today I learned about Git and GitHub and it felt incredible.

480 Upvotes

190 comments sorted by

View all comments

204

u/mutual_coherence May 06 '21

The debugger in their IDE.

58

u/TaranisPT May 06 '21

As someone still fairly new to coding, this has been such a blessing for me. Knowing what makes the program crashes instead of just messing around with what you think crashes it is really helpful.

165

u/greasycilantro May 06 '21

And yet I still use the good ole "let's put a print statement here and see what happens" method lmao

37

u/shinitakunai May 06 '21

On some languages like python that is most of the times enough (not always). For other languages debuggers are more mandatory.

9

u/O_X_E_Y May 06 '21

Yeah in C I've found that the program will just give an exit code and do nothing when I don't use a debugger unfortunately :p

6

u/BenjaminGeiger benjamingeiger May 06 '21

Try fprintf(stderr, ...) instead.

stdout tends to have output buffering enabled, so if the code crashes before the buffer gets flushed, then the contents of the buffer can be lost. stderr gets dumped to console immediately.

2

u/O_X_E_Y May 06 '21

Hmm interesting, I'm very much a beginner there still and not familiar with all the intrinsics, so things like this definitely help!

2

u/BenjaminGeiger benjamingeiger May 06 '21

In fairness, I haven't really used C much since early grad school. I just remember running into that precise issue.