danudey
yesterday at 9:22 PM
This is only mildly offtopic, but I wonder if the following is true:
Software developers who...
1. Experienced actual instruction on software development;
2. Learned to write software in C/C++/FORTRAN/Pascal/whatever; or
3. Spent a lot of time in more niche situations like system programming, embedded programming, enterprise systems, etc.
...are familiar with using debuggers as part of their workflow to inspect internal state and diagnose. In contrast, developers who...
1. Were entirely self-taught;
2. Grew up on interpreted languages (JS, Python, PHP, Perl, etc); and
3. Generally tend to write smaller, self-contained projects
...tend to just add debug logging and re-run the program.
I definitely have used debuggers in the past, but as someone who almost exclusively has written in interpreted languages (or languages where the write-compile-run loop is fast, e.g. Golang), my habit is to add debug logging to more places to validate internal state as the program runs, rather than attaching a debugger and inspecting specific things manually.
Either way, I think it's two separate approaches and I think in different circumstances there are definitely benefits to one or the other. In most of my Python scripts it's faster to add a `print(f"variable is {variable}")` than it would be to attach a debugger; also for a small script that's only going to run a few times, or run very occasionally, writing unit tests is often overkill because often the entire script is effectively a unit.
latchkey
yesterday at 11:47 PM
I don’t know if you’re trying to make assumptions about me or you, but I am those 3 things.
It is definitely different approaches and both can achieve the same goals, but having started with your approach and then learned IDE’s, debugging and writing tests, I can from my own experience say that tests and debuggers are the way to go when it comes to building long term stable applications, especially in shared environments.
As for speed to attach a debugger? Lol, it is one button click in a proper IDE and the speed and utility of figuring out the solution is faster. What I am hearing from you is that you’re unwilling to put the time into learning/using the tools. Or maybe you’re just stuck in your own headspace, many developers get that way, it is why we have editor wars and whatnot.