Flashcards

Quick study sessions to strengthen memory and retain key concepts.

Flashcard Study

Python: Return Values

Front

Why does OrderOps care about return values?

Because the order-ops workflow must validate rows, compute totals across many items, and avoid one giant procedural script,…

View Card →
Flashcard Study

Python: Return Values

Front

What is the best default for return values?

Choose the simplest shape that keeps the rule explicit, testable, and easy for the next engineer to read.…

View Card →
Flashcard Study

Python: Return Values

Front

How should you explain return values in an interview?

A good return value lets the caller continue the workflow with a clear next piece of information. Clear…

View Card →
Flashcard Study

Python: Return Values

Front

What is the main pitfall around return values?

Mutating external state for everything makes the control flow harder to test and harder to explain. Naming the…

View Card →
Flashcard Study

Python: Return Values

Front

What is the core rule behind return values?

A good return value lets the caller continue the workflow with a clear next piece of information. This…

View Card →
Flashcard Study

Python: Function Extraction

Front

What does good function extraction code look like?

It is explicit about the rule, honest about the data shape, easy to test, and easy to explain…

View Card →
Flashcard Study

Python: Function Extraction

Front

What is the next improvement after the first working version of function extraction?

Clarify one boundary, add one focused test, and remove one avoidable ambiguity. Small improvements that directly reduce risk…

View Card →
Flashcard Study

Python: Function Extraction

Front

What anti-pattern should you watch for with function extraction?

Using the feature to compress code while making the rule harder to test, debug, or explain. Compression is…

View Card →
Flashcard Study

Python: Function Extraction

Front

What does a good verbal answer about function extraction sound like?

Clear, concrete, tradeoff-aware, and tied to one real workflow or bug pattern. Interview answers improve when they sound…

View Card →
Flashcard Study

Python: Function Extraction

Front

What senior-level judgment belongs with function extraction?

State when you would choose this approach, when you would not, and which signal would trigger a different…

View Card →