What I Learned
Begin by Planning Out what You want to Do
One of the really useful techniques I learned in a Treehouse course was the practice of beginning a project with comments that plan out what you want to do before you start programming. The tutorial for this project did a wonderful job of reinforcing this and I think there’s great carryover to elearning development, as well. So, for example, instead of diving right into code, we started off with some high-level concepts:
//Build a grid //Create tetronimos //Allow for manipulation
From there, you can begin to build the functionality that meets those concepts. That’s something that I want to continue to practice doing, especially in my programs.
Build Small Pieces and Test
Think of Efficiency Last
So, one of the things that doesn’t carry over so well into elearning is the concept of refactoring your code after you review it. The refactoring process encourages you to look over what you’ve written, look for repeated code and, either abstract it into a reusable function or try and make it more efficient. It’s important that this comes after building and testing small pieces so that you don’t get caught up in trying to make things efficient to the detriment of actually getting things done, especially as a new developer who probably doesn’t know all the tips and tricks of the trade yet. That’s been really freeing for me, to realize that I should first try and complete a challenge using what I know before going back and seeing if I can make it better. However, when developing an elearning project, you have to think about being efficient pretty early on.
Challenges to Complete
So I’ve built the bones. Over the next week or two, I’d like to try several things:
- Create different colors for each tetronimo
- Create a Game Over state that allows you to restart the game once the dead blocks reach the top
- Update the CSS to make the game more attractive, add an intro page with instructions
- Speed up the drop over time