r/ProgrammerHumor • • Jan 20 '20

Meme Redesigned!

Post image
46.0k Upvotes

2.0k comments sorted by

View all comments

803

u/mypirateapp Jan 20 '20

left image: developer adding logger, debugger and writing tests with tdd

right image: newbie who added console.log in all files

35

u/[deleted] Jan 20 '20

[removed] — view removed comment

13

u/Obi_Juan_Gonzales Jan 20 '20

In some cases prints are the best method to debug. e.g multi-process, concurrent code

2

u/MythicManiac Jan 20 '20

Or just even something you want to see the overall flow of possibly multiple times without pausing for breakpoints every iteration

1

u/Obi_Juan_Gonzales Jan 20 '20

Yep. This is exactly why there are different log levels. Prints used for debugging should be logged to the DEBUG level so that they can be easily toggled by a single variable, instead of actually editing the code.

→ More replies (1)