學習目標(給學生看)
- I can find a bug by running my code and watching.
- I can fix a bug by changing one thing at a time.
- I can test again after every fix.
關鍵字 Vocabulary
bugdebugtesttraceinfinite loop
不插電暖身(10 分鐘)
老師照一張「有錯的舞步卡」跳舞,學生喊停並指出是第幾步錯了、要怎麼改。
常見迷思
- 一次改很多地方 → 規定「一次只改一個方塊,再執行一次」。
- 整段刪掉重寫 → 這一單元鼓勵「修」而不是「重寫」,用 ⭐⭐⭐ 的方塊數當提示。
出場小卡 Exit ticket
畫出一個你今天修好的 bug:原本怎樣?改成怎樣?