發表文章

目前顯示的是 8月, 2020的文章

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...

樂高 Lego NXT 迴力車

圖片
此處所用的積木組為:LEGO MINDSTORMS Education NXT Base Set (9797)。 參考影片: 組好之後會如下圖: 筆者試玩影片: LDD檔案: 迴力車_NXT_9797.lxf 若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or  buy me a coffee . Thank you very much.

離線版與區網的 Blockly Games

圖片
筆者最近在帶學生做 線上版的Block Games時 ,有時會遇到一直連不上的問題,所以只好自己找 離線版本的 Blockly Games 。但筆者又想自己弄個區網的版本,於是找了 miniweb 這個網頁伺服器來用,接著再根據 Building Block Games 的說明,建立出多語言版本的區網 Blockly Games 囉 ( 下載區網的 Blockly Games )。底下附上筆者的結果畫面: 若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or  buy me a coffee . Thank you very much.