in reply to Documenting code

I would personally skip the color. While it certainly helps when writing code (the code color makes it easier to see the code structure at a glance, combined stuff like indentation, of course), I think that when teaching Perl, this will just clutter things up.

It depends on the level of the people you will be teaching, but beginning programmers tend not to differentiate between language statements (such as print) and programmer provided things (such as variables and function names). Putting these elements in different colors will not add to the clarity, I think, but add confusion.

In short, I think that coloring code for teaching purposes might not be ideal, especially if your public is not advanced enough yet to understand why various parts get colored similarily.

Then again, once your public knows why 'print' and 'while' are red, whereas '$variable' and 'function_name' are green, and for sufficiently large code, color does add clarity. Just don't do it too early and don't overdo it.

CU
Robartes- who's married to a teacher :)

Replies are listed 'Best First'.
Re: Re: Documenting code
by Nkuvu (Priest) on Mar 13, 2003 at 21:56 UTC
    I can see your point, but I originally envisioned this as being taught something like "I have set the built in functions to be displayed in red text" from day one.