Code Maintenance & Programming Rules

 This guide outlines essential best practices spanning code style, architectural design, debugging, testing, performance, and portability—all aimed at reducing the long-term cognitive load of code maintenance. 🎨 1. Style Code is written for humans to read, and only incidentally for computers to execute. Variable Naming : Use descriptive names for global variables, and short names for local variables. Precision and Consistency : Use active names for functions (e.g., calculateTotal ). Above all, keep your coding style consistent throughout the project. Structure & Expressions : Use a consistent indentation and brace ( {} ) style to show program structure visually. Use the natural form for expressions. Use parentheses to make the semantics unambiguous. Break up overly complex expressions to keep them clear. Side Effects & Macros : Beware of functions with side effects. Avoid function-like macros; if unavoidable, parenthesize the macro body and arguments carefully. Magic Numbe...

2020 雲林縣仁和國小 mBot 夏令營活動紀錄

2020/07/15 ~ 2020/07/17 三天,筆者受邀至雲林縣仁和國小進行 mBot 夏令營的活動,在此紀錄,也感謝仁和國小 余老師的邀請。


2020/07/15 mBot 夏令營 Day 1:
  • mBot元件認識
  • mBot 介紹
  • mBot 三模式
  • 認識Scratch 積木,打地鼠遊戲製作
  • 燈光音樂秀
Day 1 上課講義


Day 1 活動剪影

Day 1 Scratch 打地鼠作品


Day 1 心得:
小朋友的音感實在好。
小朋友很有才。
請繼續發揮自己的想法喔。


2020/07/16 mBot 夏令營 Day 2:
  • 光線感測器
  • 走長方形
  • 推紙杯
  • 軌道設計
  • 巡跡程式設計
  • 最後來個遙控器相撲比賽

Day 2 上課講義

Day 2 活動剪影

Day 2 相撲比賽


心得:
每位小朋友都認真地完成屬於自己的積木程式,也走完巡跡路線,明天一起繼續自我挑戰喔!

2020/07/17 mBot 夏令營 Day 3:巡跡競賽。
  • 1. 直線競速
  • 2. 巡跡賽
  • 3. 創意軌道賽


疑,直線不是容易走嗎?
為什麼有紅色線呢?
是黑色就可以用嗎?
...etc...


Day 3 上課講義

Day 3 活動剪影

Day 3 直線競速


Day 3 循跡賽


Day 3 創意軌道賽


心得:
認真又積極的一群好孩子,有緣再會啦!

心得總結:
一開始有點擔心學童對程式設計會有害怕的情況,於是在開始積木程式教學時,就對學童說:「程式設計沒有標準答案,有想法,先試試,我也會協助你們喔。」在製作 Scratch 打地鼠時,學童就開始很積極地詢問:「怎麼計算分數」、「怎麼計時」等功能,學童在設計打地鼠一直意猶未盡地想繼續修改。而在循跡部分,也請學童自己設計軌道與設計程式,試著走走看,走完後,在一起討論所發現的疑問,例如:「同樣的程式,為什麼每次走的結果都不一樣」、「同樣的程式,在不同車子會有不同的結果」等。課程結束時,學童們也是意猶未盡地想繼續比賽,真是一群認真又積極的好孩子!我們有緣再見喔!

若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。

If you like this post, please click the ads on the blog or buy me a coffee. Thank you very much.

留言

這個網誌中的熱門文章