r/AskReddit • • Feb 08 '17

Engineers of Reddit: Which 'basic engineering concept' that non-engineers do not understand frustrates you the most?

5.8k Upvotes

4.5k comments sorted by

View all comments

Show parent comments

17

u/laidlow Feb 09 '17

Using the debugger is better than littering code with print statements. It seems daunting at first but it will save you so much time troubleshooting bugs.

10

u/Strasza377 Feb 09 '17

Depends on the problem and what sort of environment you're in imo.

4

u/that_how_it_be Feb 09 '17

Having used both extensively print statements are often a lot simpler / faster, especially in the world of concurrency.

2

u/BenderRodriquez Feb 09 '17

Depends on the bug. Memory errors is usually easier to find in the debugger. Semantic errors ofter require devising unit tests with generous printouts.

1

u/ekfslam Feb 09 '17

Yeah, I'm just too lazy to setup my environment for now.

1

u/[deleted] Feb 09 '17

Meh, each has their place. If I want a memory dump of what different variables are each time it reaches a certain point in a loop, I'll use a print statement. Much easier than stopping each time and then reading it through debugger.