- Ship It 🚀
- Do the simple thing first
- Always start with tests at the highest level (as close to index.js as possible). Then work down to lower levels, eventually hitting unit tests.
- Write code that makes testing easier.
- Seat time counts, Sometimes it's impossible to not learn things the hard way
- Prototype first, but at some point spend time upfront on architecture design
- It's not a great idea to just jump into writing code again after the first prototype
- Testing too much holds you back more than it helps
- Strive for loose coupling to avoid propagating changes
- When prototyping don't worry about having tests.
- After the prototype Achitecture matters.
- We have a lot to learn about practical Achitecture.
- Grid ✅
- Canvas ✅
- Bumper Dots - Decided not needed yet
- function for populating actors array with actors at random locations ✅
-
- This nested loops is not that slow
- init all actors to red except 1 infected actor ✅
- write logic for spreading the infection (change color of actors that come into contact with infected actor) ✅
- bonus points for within 6 cells corona style!
- Refactor actor to class ✅
- Moved constants to their own file ✅
- Refactor Infected to class ✅
- Added Medic Class without Observer ✅
- Medics go to closest Infected ✅
- Start Refactor with TDD & tests in general ✅
- Added simulation class ✅
- Added random module ✅
- dependency injection on a module level ✅
- Clear the canvas on redraw ✅
- Refactored the colors constant to be it's own object with frozen color sub objects ✅
- Refactor simulaton to ES5 ✅
- Deep dive on destructuring, scope, closures and mutablilty ✅👍
- Made actor module ✅
- Add an infected actor to infect the other actors ❌
- We started trying to test the infect logic at the unit level instead of the simulation level which lead us to chasing our tails a bit.
- Invented a new guiding principal from this. ✅
- Refactor to almost pure fp ✅
- Add infect function ✅
- Add utils funcitons ✅
- Require constants instead of injecting them ✅
- Add Medic ✅
- Add Heal function ✅
- Removed draw tests because they were excessive ✅
- Makes walls count ✅
- Refactored random.direction to random.moveActor ✅
- Fix the medic stacking
- Max One per square -> Most behavior change
-
actors[1][0] === {color: 'green'}
- Max Stack of two per square
- Only medics can't stack
- Fancy target information sharing data structure
- Use tables if NEEDED
- Finish the prototype
- Don't worry about making it clean
- After we FINISH the protype think about the interface and architecture
- Medics become a roving healing squad of doom, that isn't super effective, is this is another bottom up refactor?
- Try out RITEway
- Refactor to
import ... from ... - In the future constructors returned by factories should be capitalized
- Special event listening system that is observered by other things. eg graphs or counters
- Make it so medics do not share the same target, somehow.
- The medics and the OBSERVER PATTERN???
- look into request animiation frame?
- WebGL?
- Podcast about the observer patern that leads to the workshop
- Probably release this one frees
- students refactor OOP solution into FP solution
- The video of us going through the refactor again
- We give them the starting and ending postition so they can follow along