|I agree that using the tools properly is key, but I feel that productivity ultimately is the programmer and not the tools. If the programmer is lazy they aren't going to be productive no matter what tools you give them. |
This just doesn't jive with me. Tools matter.
A car mechanic (even a lazy one) will be more productive with power tools than with manual tools. Effortlessly pressing a button to drive in a bolt vs. manually ratcheting a bolt into place makes the difference of a job taking 5 minutes vs a job taking an hour.
Programming is no different. If you have to do everything manually, it would take forever.
We use tools like makefiles to automate builds. We use tools like intellisense and syntax highlighting to clarify code. We use tools like debuggers to fix logic errors.
All of it aids in productivity.
To claim that tools do not make programmers more productive is just simply not true. I suspect you make that claim because you do not know how to effectively use the tools in question.
|and narrow it down through printf/cout tests |
Breakpoints + Watch is just about in every way superior to cout tests.
Process with cout tests:
1) Stop the program if it's already running
2) Change the code to log whatever variables you think you need to see
4) Rerun the program and recreate the bug
--- if you need to see more variables Repeat steps 1-4
5) Fix bug in code
6) Go back and remove all added cout statements.
Process with breakpoints & watch:
1) Set a breakpoint on the line of code where you want to examine execution
2) Recreate the bug in the program
3) Add whatever variable you want to see to the Watch
--- if you need to see more variables, repeat step 3
4) Fix bug in code
One is clearly more efficient than the other. Especially if you forget to remove a cout log. Or if you keep thinking of more and more variables you want to examine (when adding one requires a rebuild.. and if a rebuild takes a full minute... you could easily be wasting 5 minutes doing absolutely nothing)
Not to mention breakpoints + StepInto/StepOver let you step through and examine the program at every single line of code
. Dumping to cout only lets you examine the program wherever you decide to put the log statements.
|IDEs only bypass the commands, and only give you the most common commands by default. If you want to run other tests you have to either go in and add them every time you realize you need a new (assuming your IDE allows you to edit them) or you can open the terminal and punch in the commands you think of without having to stop to tweak your IDE to add the new shortcuts. |
Can you give me an example of a debugging feature that is not available by default in whatever IDE you're referring to?