This week I completed the first portion from Assignment 2. Although, it felt substantially less frustrating than past computer science assignments, it brought with it new, less familiar difficulties. The assignment focused primarily on designing a collection of classes to represent regular expression trees. Due to the fact that the entire purpose of the assignment was for us to design our own representation of the regular expression trees, the instructions were quite vague.
Therefore, the assignment required much more higher level, abstract thinking, and less debugging and nitpicking. Initially I struggled in choosing whether or not to include a parameter that allowed the client to choose the root for the regular expression in the specialized classes. For example, an 'asterisk regex' will always have an asterisk as it's root, so why not just omit that parameter entirely? However, I ultimately decided to include it because it seemed easier to maintain, in case of an update or change. Whereas, if I had hard-coded the value it might create unforeseen difficulties later on.
I also focused much more on style, doc-strings, and creating clearer error messages in this assignment. In previous assignments, I was so focused on getting the program to work the way I wanted it to that I often slacked off in that arena, but this time, given the simplicity of the task itself, it felt crucial that clients of my code understood exactly what it did and why, and that everything was clear.
Overall, I really enjoyed this assignment because it gave me an opportunity to work on certain skills needed to succeed in computer science that I have not been practicing as much as I should be.