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

Show parent comments

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.