Custom Blocks & Abstraction
Summary
This chapter centers on Scratch's Make a Block feature as an introduction to procedural abstraction, covering block definitions, naming, calling, and the single-responsibility principle for well-designed blocks. Students build reusable procedures such as a Draw Square block and a Draw Polygon block, compose them into a small block library, and practice refactoring existing scripts into custom blocks. It builds on the computational thinking ideas from Chapter 1, the scripting foundation from Chapter 3, and the drawing work from Chapter 6. After completing this chapter, students will be able to design, name, and reuse their own custom blocks instead of repeating code.
Concepts Covered
This chapter covers the following 18 concepts from the learning graph:
- Custom Block
- Make A Block Feature
- Block Definition
- Block Name
- Procedural Abstraction
- Function Concept
- Procedure Concept
- Reusable Procedure
- Calling A Block
- Block Body
- Single Responsibility
- Well-Designed Block
- Draw Square Block
- Draw Polygon Block
- Block Library
- Composing Blocks
- Nested Custom Blocks
- Refactoring A Script
Prerequisites
This chapter builds on concepts from:
- Chapter 1: Computational Thinking Foundations
- Chapter 3: Sequencing & Scripts
- Chapter 6: Turtle-Graphics Drawing
TODO: Generate Chapter Content