Insist on Correctness

Learn the difference between pure functions and functions with side effects, along with the testing strategy of both functions.

We'll cover the following

In toy programs, it’s easy to tell the difference between correct and incorrect. Does factorial(n) return the correct number? That’s easy to check; one number goes in, and another number comes out. But, there are potentially many inputs in extensive programs, such as state or function parameters, and many outputs or other side effects. That’s not so easy to check.

Get hands-on with 1200+ tech skills courses.