Don't cross the streams!

Tags

While grading, I've noticed some people are making life harder for themselves than it needs to be. If you notice your code getting way too messy, say to yourself:

"Self, I wonder if there's an easier way."

This video is about one of those situations.

When you have multiple variables to validate, don't try to create ifs for every combination of the variables. The code is too hard to write.

Instead, deal with each variable separately.

You can download the code from the video.

Attachments