DEV Community

andrey a
andrey a

Posted on

Working with vague error messages

Imagine that instead of current style of programming errors, such as:

  File "error.py", line 33
    whille x%2 == 0:
           ^
SyntaxError: invalid syntax

You'd be getting something like Error: invalid syntax or division by zero somewhere in the code, between lines 360 and 1500

How would it change you style of programming and debugging?

That is a question that people doing molecular biology have to face way too often. We run some PCR gels, or cloning, or DNA extraction, or whatever, and see that there is "no results" where some expected. Did we miss some reagent? Did the sample was wrong? Or did we made a wrong assumption in our protocol? That is similar to issues when working with vague debugger.

If the code fails to compile, it can be because somewhere int a=0; int b = 10/a is the culprit. Or perhaps we are working with Date method that has been severely modified elsewhere to a point where it doesn't meet default specification or common sense.

Top comments (0)