Text Based Programming
Summary
Materials
- Day 18 PowerPoint deck
- Levels of Programming Languages handout
- Levels of Programming Languages handout in Word
- JavaScript Commands
- JavaScript Commands in Word
- Code Tracing & Rewrite in JavaScript handout
- Code Tracing & Rewrite in JavaScript handout in Word
Instructional Activities and Classroom Assessments
- Abstraction: Block-based vs. Text-based Program Languages (5 minutes)
- Introduction to JavaScript (15 minutes)
- Debrief (5 minutes)
- Code Tracing and Rewrite in JavaScript (25 minutes)
Learning Objectives
- DAT-1: The way a computer represents data internally is different from the way the data are interpreted and displayed for the user. Programs are used to translate data into a representation more easily understood by people.
Essential Knowledge
- DAT-1.A.5: Abstraction is the process of reducing complexity by focusing on the main idea. By hiding details irrelevant to the question at hand and bringing together related and useful details, abstraction reduces complexity and allows one to focus on the idea.
1. Abstraction: Block-based vs. Text-based Program Languages (5 minutes)
- Explain abstraction.
- Share levels of abstraction example with machine code vs. text code vs. block code.
- Discuss the difference between block-based and text-based programming languages.
2. Introduction to JavaScript (15 minutes)
- Discuss text-based programming options in MakeCode Arcade.
- Guide students through the process of creating the Lemon Leak game in JavaScript.
3. Debrief (5 minutes)
- Ask students to share their thoughts about the following questions:
- What did you notice as you worked in JavaScript?
- What was different than working in blocks?
- What happened as you typed?
- Did you have any misspellings? What happened?
- Confirm what students likely found - typos interfere with the functionality of the program.
- Students will, therefore, need to learn to rely on the problems alert and red squiggly line cues as a guide for finding errors.
4. Code Tracing and Rewrite in JavaScript (25 minutes)
- Direct students to the Code Tracing and Rewrite in JavaScript document.
- Task them with completing section A and B on the page.