[erlang-questions] "Erlang as a First Language" -- crazy? or just stupid?
Mon Dec 28 00:01:35 CET 2009
2009/12/24 Toby Thain <>
>> Mostly, I learned C without a computer to run it on. Just a copy of K&R.
Same here ^_^ (albeit with a different book).
I still don't use source level debuggers, 24 years later.
In his "Writing Solid Code", Steve Maguire recommends running all new code
through a source level debugger to check things are going the way you think
they should. After reading that book, even if I'm able to understand code by
staring at it, I routinely run my code through a source level debugger. This
habit has allowed me to deeply understand some intricacies of C/C++ (I again
stress that C/C++ have lots of pitfalls compared to Erlang).
I maintain that a source level debugger - just like other program analysis
tools - allows you to inspect a live program thus understand it at deeper
levels, therefore it is an invaluable aid in learning/teaching. Some people
maintain that source level debuggers are close to useless, however, as soon
as a program starts misbehaving, you could see them cluttering it with
printing statements to inspect its activity, that is: doing what a source
level debugger would do much better. If, however, you really can do fine and
fast without debuggers - I've never seen such a programmer - then by all
means go for it.
> And if you learn by, and become accustomed to, source level debugging,
> would you not atrophy skills such as auditing code by eye and reasoning
> about it statically, and become tool reliant?
Maybe. Can you still make math without a calculator? That depends on whether
you have kept honed such skills. When a program misbehaves, I usually stare
at its code first.
More information about the erlang-questions