Designing and writing software can become very complicated very quickly. One of my goals this summer and this fall has been to develop some good coding and design habits. I’ve been using javascript/html/css coding in my projects as a kind of testing ground for creating larger projects. This approach has been invaluable to me as I’ve been able to experience firsthand what works and what doesn’t in trying to implement version control, reusable code, and maintainability of a code base. Here are some of the things I’m learning:
1. Git and Github: I’m kind of stumbling through this, but little by little, starting to get the hang of not only setting up a repo, but learning how to branch, push, pull, merge, and do other command-line type things. I’ve started to get involved in the VexFlow project, and have actually submitted my first pull request! I plan to keep working on this until many of the git / github operations become second nature.
2. An ounce of prevention: when I took the Team Software Project class at MTU, the professor emphasized often just how difficult good software design, creation, implementation, testing, and maintenance can be, and how important spending plenty of time in the initial planning, design, and documentation stages is. I’m experiencing that first-hand. For example, I already know of several changes that I should make to the earliest games I created this summer. I’ve spent a good amount of time re-factoring one of the games; each time I create a new one, I try to reuse code from the previous game – this is allowing me to build a base of re-usable code modules. But my plan going forward will be to try to plan more of the re-usable modules up front, and try to spend even more time researching, thinking through, and documenting all the details before I actually write the code.
3. Collaboration. This point really goes with #1 above, but I really think being involved in collaborative projects like VexFlow will be invaluable. I’ve already learned a considerable amount just by reading through the comments, pull requests, and group discussions. I hope to learn even more as more experienced coders look at my code and give suggestions.
4. Efficiency. Ahhee – it is so easy to get distracted and find excuses to procrastinate when coding. It is hard work, and can be very draining mentally. So in order to be productive and keep the momentum going, I’m trying to improve my efficiency. Part of this has to do with tools and workflow at the computer, but it also has to do with carefully planning my schedule, making the most of the time I have available, and, as mentioned above, taking the time to do the correct planning and documentation – avoiding the temptation to just jump in and hack something together.