Implementing Iteration 1 of the translator program seemed like a daunting task at first. And although we were able to complete our scanner and pass the necessary tests, the development process was strenuous and unexpectedly long, proving my initial presumption correct. The problems we encountered stemmed mostly from the lack of a definite plan for our code and the annoyance of the debugging phase. On my part, I am new to C++ (we hardly learned C in 2021, so the specifics of C++ are definitely foreign to me), and getting subversion to work correctly with my home machine has at times been arduous. I have chosen to look at four areas of program development in which we could have performed better in Iteration 1.
Devise a Plan/Understand the Instructions:
The two biggest problems we had in developing our program were first of all determining the prompt's specific instructions and then, once we had figured out exactly what was needed to do, how best to implement our design thoughts. We struggled with figuring out what was required of us, specifically concerning the smaller components of Iteration 1 (Makefile, bash script, etc.) but also more generally with the overall requirements. A large part of any project is the need to clarify objectives that are ambiguous. This project was no different, and I plan to ask questions much earlier on in the process for Iteration 2. Once we had determined what we needed to do, we formed some basic program design plan, but overall the process was pretty haphazard. With an assignment as small as just one iteration of the translator program, I know that plans can and probably should change. However, some sort of plan must be in place before any major programming can go on. It can be fluid, but some piece of written (or typed) material to help you keep track of where you are going would be very helpful.
Division of Labor:
As my partner pointed out to me as an example (from 2021), a good way to look at working on this project in parts (separately) rather than as a whole (together) is analogous to pipelining machine instructions instead of executing them sequentially. Although working together was nice while we could share knowledge and troubleshoot/debug together, we were limited as to how much we could accomplish in a given amount of time. It is critical with a project of this size and requiring this much time and coding, that a plan to equitably divide the project is determined early on.
Although this topic is directly related to forming a plan, I believe this specific issue factored greatly into our program development. Before we settled on storing our tokens in a linked-list format, we experimented with other methods, such as an array and structures with pointers, as well as testing tokens that not stored in any kind of data structure. The code used to access a token can vary greatly depending on which data structure is used. Adding to, deleting from, accessing, counting, and various other methods change with the format. Settling on a specific format also allows a group to work more easily on separate parts at the same time, safe in assuming that they can always access and work with the data.
Allot Enough Time (Especially For Debugging):
We were able to complete our scanner (mostly) before the deadline, but the debugging process was long, strenuous, and became pretty frantic as we were rushing to finish it. I believe that a large amount of debugging is never avoidable. The most obvious method to counter this time-intensive phase of development would be to get the majority of the programming work done early on, thereby leaving plenty of time to both debug and ask questions as to why one's implementation is not working. Things can always go wrong in the later stages of development. We were pretty well off heading into the home stretch, but if some part of our code turned out to be fundamentally wrong, we really would have needed some extra time.
After all that we have done in lab and in lecture, this assignment still held surprises and a few frustrations. The overall experience was not pleasurable (though what homework has ever been fun?), but I believe if we change how we approach the points mentioned above, Iteration 2 will go much more smoothly and with much less pain.