Skip to main content
Fixed spelling for "debugging", added "programming-practices" tag
Link

Multiple error debugingdebugging

relevant tags, grammar, typos
Source Link
scriptin
  • 4.4k
  • 23
  • 32

Sometimes I ran into multi errors realywhich are really hard to debug. So my meta question is the following:

  1. You have multiple chunkchunks of code, let's say A -> B -> C -> D
  2. Your code don't crash but the result isn't what you expected
  3. You clearly don't know from where the error comes, so you tried to change all chunks one by one to find the bug. First A to a but crash the code so you undo your changes
  4. Then you try the same with B, C and D
  5. Each time you change the chunks it breaks your code
  6. When the stars are aligned, you changed two chunks at the same time (e.g. B and C) and it works...

So my question is  : how can we avoid those situations  ?

With my little 5 years of programming experience I encounter only the case where I have to change two different part of code. (justeJust imagine if you have to fix more than 2 chunk of code to see the true result appear.)

I have never seen someone talked about this subject, but maybe I don't have the right words, so any suggestions to help me to gather more information about this subject isare welcome.

Sometimes I ran into multi errors realy hard to debug. So my meta question is the following:

  1. You have multiple chunk of code, let's say A -> B -> C -> D
  2. Your code don't crash but the result isn't what you expected
  3. You clearly don't know from where the error comes, so you tried to change all chunks one by one to find the bug. First A to a but crash the code so you undo your changes
  4. Then you try the same with B, C and D
  5. Each time you change the chunks it breaks your code
  6. When the stars are aligned, you changed two chunks at the same time (e.g. B and C) and it works...

So my question is  : how can we avoid those situations  ?

With my little 5 years of programming experience I encounter only the case where I have to change two different part of code. (juste imagine if you have to fix more than 2 chunk of code to see the true result appear)

I have never seen someone talked about this subject but maybe I don't have the right words, so any suggestions to help me to gather more information about this subject is welcome.

Sometimes I ran into errors which are really hard to debug. So my meta question is the following:

  1. You have multiple chunks of code, let's say A -> B -> C -> D
  2. Your code don't crash but the result isn't what you expected
  3. You clearly don't know from where the error comes, so you tried to change all chunks one by one to find the bug. First A to a but crash the code so you undo your changes
  4. Then you try the same with B, C and D
  5. Each time you change the chunks it breaks your code
  6. When the stars are aligned, you changed two chunks at the same time (e.g. B and C) and it works...

So my question is: how can we avoid those situations?

With my little 5 years of programming experience I encounter only the case where I have to change two different part of code. (Just imagine if you have to fix more than 2 chunk of code to see the true result appear.)

I have never seen someone talked about this subject, but maybe I don't have the right words, so any suggestions to help me to gather more information about this subject are welcome.

Source Link

Multiple error debuging

Sometimes I ran into multi errors realy hard to debug. So my meta question is the following:

  1. You have multiple chunk of code, let's say A -> B -> C -> D
  2. Your code don't crash but the result isn't what you expected
  3. You clearly don't know from where the error comes, so you tried to change all chunks one by one to find the bug. First A to a but crash the code so you undo your changes
  4. Then you try the same with B, C and D
  5. Each time you change the chunks it breaks your code
  6. When the stars are aligned, you changed two chunks at the same time (e.g. B and C) and it works...

So my question is : how can we avoid those situations ?

With my little 5 years of programming experience I encounter only the case where I have to change two different part of code. (juste imagine if you have to fix more than 2 chunk of code to see the true result appear)

I have never seen someone talked about this subject but maybe I don't have the right words, so any suggestions to help me to gather more information about this subject is welcome.