From: Oscar F. <of...@wa...> - 2002-07-23 03:33:27
|
"Wu Yongwei" <ad...@ne...> writes: > Hey, don't mislead newbies. .... > A debugger is a wonderful thing if you ever need to do some serious > programming Exactly: serious programming. But it's fequent use is an indication that the programmer is not very serious... (A different thing is when you need to fix bugs introduced by others). > and is easier than manually inserting printfs or couts. Yes, it's easier. On Real World scenarios, 'printf' wins. Ever tried to use a debugger with a multi-threaded app? > Just contrary to what you said, a debugger helps people understand > how a program works. If a beginner needs a debugger for understanding how the program works, his learning system is flawed. Programming is about writing specifications previously thought or known. If you face yourself often using a debugger for understanding what your code does, better look for a different job. > I also think your "editor" advice is bad for newbies. They will just get > frustrated. Why? Type code, save, go to the command-line, compile, run, have fun. Of course, a decent editor allows launching the compiler with a keypress or a menu option and parses the compiler error messages in a way that allows jumping to the signaled text position quickly. > IDEs are just for newbies and GUI programming. I generally do > not use an IDE because the above statement is not fit for me. A learner is > different. Precisely, a learner should know what's going on. He should know about the edit->compile->link->run process. The IDE hides that. From time to time I see some veteran MSVC++ or BCB programmer who doesn't know how to build a simple multifile application from the command line. Without the IDE they are lost. Pathetic. OTOH, I use Emacs. It launches the compiler or MAKE and parses the output nicely. You can run gdb on it. It's the best IDE I know. > Do you never use a debugger? On complex projects, when I can't see what's wrong looking at the sources. If, after detecting the mistake with the debugger, it's not a third-party bug, it's time for a long meditation about how to do for not repeating the mistake. -- Oscar |