Developer and Debug
This is a developer’s view of the debug. Test failure is an indication that something is not behaving as per the developer’s understanding. All programs…
This is a developer’s view of the debug.
Test failure is an indication that something is not behaving as per the developer’s understanding. All programs work perfectly fine in the developer’s head but fail to function in real world prior to verification.
Debugging is a process of finding out difference between the world inside the developer’s head and real world. Developer’s world is perfect. It’s world free of exceptions. Developer has full control over time and events. Developer loves it.
Contrast it with real world filled with exceptions, no control over events or time. Things fall apart. That’s why debugging is so difficult for developers. Note that, it’s not that developer has intentionally created this nice world. It takes time for developer to build the understanding of the real world. Programs cannot wait for full understanding and hence they will fail in real world.
First mind block for developer is they find it difficult to believe their program is not working. Even when it is failing in real world they look at it from the point of how it would work in their world inside their head. Developers find it hard to imagine what can cause it to not work? First step for developer is to unlearn looking at it from how it can work to start looking at it from how it can fail.
Developers can live in their world during development but they need come back to real world for debugging. After every debugging they should keep refining the world inside their head with new findings.