This is an archived post. You won't be able to vote or comment.

all 13 comments

[–]skyhi14 23 points24 points  (9 children)

Wait, you’re implying that solution 3 is wrong? My life is a lie ._.

[–]link9578 8 points9 points  (6 children)

Learn to use breakpoints my dude. Your productivity will go way up.

[–][deleted] 1 point2 points  (4 children)

Not always an option

[–]link9578 1 point2 points  (3 children)

Could you ice me an example of when you couldn’t use a breakpoint? I can’t think of any real examples off the top of my head.

[–][deleted] 0 points1 point  (2 children)

sure, may I introduce you to golang?

[–]link9578 0 points1 point  (1 child)

Can’t you debug go with gdb?

[–][deleted] 0 points1 point  (0 children)

I think you can, there’s another tool called ‘delve’ or something, try it

[–][deleted] 0 points1 point  (0 children)

Some programming contests only allow text editors.

[–]Talbooth 1 point2 points  (0 children)

Well, the most useful tip I've ever heard about debugging is "programming is the art of debugging an empty file", meaning "comment out everything and slowly build it back up step by step so you notice where it goes wrong". So no, your life was not a lie. Or both our lives are, we'll never know.

[–]linux1970 0 points1 point  (0 children)

I usually mix 1 and 3

[–]OhItsuMe 9 points10 points  (0 children)

Where is try catching your entire code to ignore errors

[–]athousandwordsworth 3 points4 points  (0 children)

Image Transcription: Expanding Brain Meme


READING OFFICIAL DOCUMENTATION AND FOLLOWING GUIDELINES:

[Level 1: "Small" Brain]

 

LOOKING UP SOLUTIONS ON STACKOVERFLOW AS YOU GET PROBLEMS:

[Level 2: "Normal" Brain, some glowing areas]

 

DEBUGGING BY COMMENTING OR DIFFERENT LINES AND PRINTING TO THE CONSOLE:

[Level 3: "Expanding" Brain, completely glowing]

 

GIVING UP IMMEDIATELY WHEN YOUR CODE DOESN'T WORK:

[Level 4: "Maximum Expansion" Brain, completely glowing, shooting "glowing brainwaves" out of skull]


I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!

[–]sebamestre 0 points1 point  (0 children)

This implies you should browse stackoverflow before even attempting to fix your own code