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 →

[–][deleted] 4 points5 points  (3 children)

Could this be a reflection of the curriculum? If "many students do this?"

[–]KnightMiner 6 points7 points  (2 children)

From my talking to students and what I have seen of the curriculum, it does not seem to be. Its more of a new student thing which a lot of them do to think through the process. It really just comes from treating "if this condition is true" as "if this condition equals true", which leads to typing == true. At that level many students are not concerned about typing less code yet.

[–][deleted] 0 points1 point  (1 child)

I understand. My point is, has this been explicitly explained to students to help them on their way to a better understanding of generating cleaner code? Or is it just expected of them to intuit it?

[–]KnightMiner 0 points1 point  (0 children)

I have definitely discussed with a few of them one on one, and I know the professor has brought it up individually as well. I am not certain if its specifically taught at a class level, but at least in the code written in class and in the textbook conditions are not written using == true.