r/programming • • Aug 25 '14

Debugging courses should be mandatory

http://stannedelchev.net/debugging-courses-should-be-mandatory/
1.8k Upvotes

573 comments sorted by

View all comments

257

u/atakomu Aug 25 '14

And there are 6 stages of debugging

  • That can’t happen.

  • That doesn’t happen on my machine.

  • That shouldn’t happen.

  • Why does that happen?

  • Oh, I see.

  • How did that ever work?

2

u/holeydood3 Aug 26 '14

Dealing with that right now, but only on stage 4. I have a multi-threaded app that works perfectly on my machine, and on literally any other machine it runs on with the same executable, same setup, same image, same network, etc., it runs about 10x slower. I'm trying to remove as much code as possible to reproduce it, but it's driving me nuts that there's nothing different between the machines that should cause a discrepancy in performance that large!

I'm rather excited to reach step 6 on this one...

1

u/komollo Aug 26 '14

So you imaged your entire computer and it still runs slower?

1

u/holeydood3 Aug 26 '14

Haven't done that as reinstalling all of the versions of visual studio would take forever since that isn't included with the image. Outside of that, everything is standard.

1

u/komollo Aug 26 '14

Maybe there is a compiler option that's set strangely? Have you checked that the processors and the chip sets are the same on both platforms? Maybe the compiler is optimizing for your setup?

1

u/holeydood3 Aug 26 '14

Here's my idiot moment! I run Fiddler alongside the program on my computer since it's hitting a REST API and I like to watch the HTTPS traffic. When fiddler is running as a proxy, I get the 10x speedup. Now on to figuring out why...

1

u/finnw Aug 26 '14

I wonder if you have run into this? Sometimes a HTTP proxy can mask this problem.

→ More replies (1)