START A BIT > Blog A Bit > This page
We are in good progress with Learning Package LP2402: 4 Weeks Package with Wire Game 2G this week. After getting a fast prototype of wire game v2 last week, we now naturally let the students "realized" that the program looked quite long and hard to read, with many duplications. We introduced the "Function" concept, and again practiced the Group Programming to refactor the code together, so now we get much nicer structure. We also analyzed the wire-touching bouncy issue with the wire game in invert-mode, and introduce a small delay after each failure detection in order to ease the issue, this case also helped them to understand that in the real development of product, it happened that the perfect code doesn't work exactly right with the hardware, we need to consider so many reality things, and be serious to the real world, do more testing and analysis.
A student was reproducing the prototype code
A student was refactoring the code
We were testing the result
Group programming ongoing, we all sat at the back side of the classroom, and rotated to work on a small step, everyone was engaged in the group work
Codes before refactoring
Refactored using Functions