"Don't want a function doing two different things"

In the Section 2, Lecture 22 discussion, when the professor was discussing the side effect with the GetGuessAndPrintBack() method, he stated, “You don’t want a function doing two different things.”

For future programming reference, should this be a hard and fast rule I follow? Keep each method to one task?

Privacy & Terms