Module 7 · Functions, Scope and Storage Classes
The Interview Angle: Side Effects, Pure Functions and Testability
ProReading
Zara is in her first technical interview. She has just written is_leap, and it looks right. Then the interviewer asks: "How would you test it?"
Pro lesson
This one goes deeper
It is included with this track and with Learn Pro. Every question on the Skill Test can be answered from the free lessons, so this is depth and never a gate on the certificate.
What is inside The Interview Angle: Side Effects, Pure Functions and Testability
- A side effect is anything besides the answer
- Pure functions: same input, same answer, nothing else
- One function, one job
- Your first test table: assert
- What makes a function hard to test
- The questions interviewers ask