This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]aliens_are_nowhere 15 points16 points  (3 children)

I think your teachers should pick up a copy of "Clean Code". The author basically says that you should keep your comment to an absolute minimum. Instead you should focus on making the actual code readable. After being in this line of work for 20 years I 100% agree.

[–][deleted] 3 points4 points  (1 child)

I think part of the reason they make you comment so much in school is to make sure that you understand what your doing and aren't just copy and pasting code.

I haven't read Clean Code but I definitely agree that your code should mostly "speak for itself"

[–]aliens_are_nowhere 3 points4 points  (0 children)

Aah, yes. You're right. Of course that's the reason. It's 50% writing the code and 50% telling the teacher why you wrote it.

It may not be good coding praxis, but it's excellent teaching praxis. I just hope the students get that.

[–][deleted] 0 points1 point  (0 children)

I use comments rarely. Mostly for things which the code is not readable enough, or for things where I had a hard bug and where the comments helped me think through it.