|
|
|
|
|
by vegannet
2490 days ago
|
|
I think it very much depends on the work you’re doing. My co-workers depend on debuggers which are a crutch that allow them to _feel_ like they have control over our spaghetti code — “it’s fine, I can step through!” — but the code I produce (without a debugger but through TDD) is much more resilient. There’s certainly engineering problems that benefit from a debugger but I think for most modern work they’re not essential — and often a crutch. |
|
It's not even just spaghetti but things that are very obtuse too. I often need a debugger whenever I see things in the code like if(variant.sourceId == null) and then below is the large unnamed block of code that also doesn't give any indication of what it implies. Because I have no idea what it implies, I have no idea how the data got into that state, so it's like... What case triggers this code?
I often wind up refactoring that stuff after computing an understanding of it. It usually comes out significanty easier to read and not likely you require a debugger to understand it.
So I that regard I think debuggers enable unnecessarily difficult to understand code to hang around.