On 04/05/2012 03:33 PM, Robert Dewar wrote:
Wouldn't it be better in a "moderately basic programming course" to
provide standard canned scripts that set things up nicely for students
including the switches they need? Indeed for such a course wouldn't it
be better to use an appropriate IDE, so they could concentrate on the
task at hand and not fiddling with commands. Yes, I think it is very
important for students to learn what is going on, but you can't do
everything at once in a basic course.
And even in the context you give, surely it is not too much to expect
a TA to remember important advice like this?
They use an IDE, which is either Code-Blocks or Dev-C++, which run on
Windows, but these IDEs don't turn -Wall on by default. As for the advice
to use -Wall, there is so much to advise and so little time, and the
sheer
mass of information confuses students. I'd have GCC emit more warnings
by default rather than explain what -Wall is (and have half of them forget
that by the time they get to the computer).
After seeing the disaster of their first home assignment, students would
be more attentive to the advise regarding -Wall. It is much more effective
to wait for the submission of the first assignment and explain -Wall
afterwards. On the other hand, it had been far more effective had GCC
turned it on by default!
In my code I use -Wextra and find it very helpful, but I would not recommend
it to others since it requires to have a very strict coding style. I
find it very
effective that it warns when a symbol in an inner context overshadows a
symbol in an outer context, or warns on unused parameters, On the other
hand, it gets annoying at times. Nevertheless, it caught enough bugs to make
it worth the trouble.
Michael