Everything you need before the bell rings
Learning Objectives
Students will be able to…
- ✓Design one-job functions.
- ✓Use clear names.
- ✓Keep them short.
- ✓Refactor a function.
What makes a function good to use, read, and reuse?
Good Function, or Poor?
Project this and sort each into Good function design or Poor.
50 minutes, five moves
Tap any phase to open the teacher moves and student actions.
Hook — One Job
A function called doEverything() — is that a good idea?
👩🏫 Teacher Moves
- Pose the question.
- Share ideas.
- Set the goal.
🎒 Student Actions
- Think.
- Share.
- Get ready.
Use — Function Design
Students learn.
👩🏫 Teacher Moves
- Send students to Good Function or Poor?
- Sort each one.
- Note one clear job.
🎒 Student Actions
- Sort.
- Say.
- Note it.
Modify — Design It
Students practice.
👩🏫 Teacher Moves
- Name a function clearly.
- Give it one job.
- Return a value.
🎒 Student Actions
- Name.
- Focus.
- Return.
Create — Create
Students apply.
👩🏫 Teacher Moves
- Refactor a messy function.
- Split it into smaller ones.
- Name each well.
🎒 Student Actions
- Refactor.
- Split.
- Name.
Reflect — Reflect
Students close.
👩🏫 Teacher Moves
- Name a good-function trait.
- Name a poor one.
- Complete the exit ticket.
🎒 Student Actions
- Name one.
- Name one.
- Complete the exit ticket.
Built to the standards you report on
Aligned to the CSTA K-12 Computer Science Standards and the ISTE Standards for Students.
Use modularity and well-designed functions.
Document and name code clearly.
Construct well-structured programs.
Communicate clearly through code.
One lesson, every learner
Multilingual Learners
- Good/poor function cards.
- Frame: "a good function does ___."
- Compare two functions.
Support & Access
- Sort good vs poor only.
- Use 4 traits.
- Use clear examples.
Stretch & Extend
- Refactor a long function.
- Write a docstring.
- Review a peer’s functions.
What to gather
- 📽️Screen / board
- ⚙️Function cards
- 💻Good Function or Poor?
- 📄Messy function snippet
- 📓Notebooks
- 🎫Exit-ticket slips
Key terms — hover for a quick definition
Exit Ticket
Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students.
Reflect: designing good functions.
Have students refactor a messy function into smaller ones. A printable snippet sheet is in the CS library.
Study the key terms
Tap a card to flip it, then rate whether you knew it. Built from this lesson’s vocabulary.
Nice work!
Check your understanding
A quick self-check with instant feedback, drawn from this lesson’s key terms.
Nice work!
Printable worksheet
A print-and-go review sheet with a built-in answer key. Tap “Show answer key” to reveal answers, or print the clean version for students.
Part A · Write the word that matches each meaning
- a name that says what it does
- a hidden change elsewhere
- clean up without changing behavior
- an input to a function
- a single clear purpose
- built from small parts
- send back a value
- a named reusable block
Part B · Show what you learned
- Name a trait of a good function.
- Name a poor one.
- Why design good functions?
Part B: 1) One clear job, descriptive name, short, returns useful values. 2) Does too many things, vague name, or hundreds of lines long. 3) They make code easier to read, reuse, and debug.