When I first heard about this project, I was very excited! Thoughts starting racing through my head of how I would design and code this project. A few things scared me such as my inexperience in C++, along with a little hesitation about the new testing method, but I was sure I could overcome these obstacles by diving right in and starting to work on it. This process did not turn out to be what I expected, but I have learned a lot and recognize that there is also a lot more for me to learn, however painful it might be.
First off I should probably say that one of the biggest hurdles for both my partner and I was that neither of us had programmed in C or C++ prior to this semester. This proved something that was very hard to overcome. What made it harder was that in previous semesters we had programed in Java, using Eclipse, which is just about the safest programming environment I can imagine. For everything we had to implement, I started coming up with solutions in Java in my head, and although the overall problem solving strategy for Java and C++ is very similar, the nuances of achieving the goals you are trying to can be quite different. This made it hard to even think about starting, but the labs and examples did help a bit with this challenge.
The first step in our process, after getting over the denial stage of programming in C++, was designing the program. The exercise in lecture kicked off this discussion, but then we continued it later, deciding the overall structure, the exact methods we would have, what each method should do, and roughly how each would achieve it's goal. After this stage it seemed that we had a pretty firm handle on understanding the program and what we needed to do. We both actually said to each other that it should be quite simple, after noticing the fact that part of it was almost identical from lab and that we had already build a parser in 4061(programming in C). This was of course until we tried actually doing it.
Creating and testing the regex's went pretty well, although it was very tedious. We had a solid starting point since we were able to build off of what we did in lab, so we went on defining the regex's along with the methods to create and match them, and the tests that made sure they failed or succeeded when they should. There were minor bugs, such as syntax errors, but after only a few attempts it compiled and passed all of our tests! We seemed to be off to a promising start, but what came next did not follow suit.
Up next was to building the tests and functions to check if, after recognizing and matching regex's, the tokens could successfully made and added to the linked list. This is where the problems started and we couldn't seem to get over them. When checking to see if creating tokens and adding them to the linked list worked we kept getting segmentation faults and still now we still cannot figure out why.
Another problem, in general, that I noticed emerging was that when things would go wrong, or not work, it was hard for us to differentiate between it going wrong because of the approach that we took to solve it, or because we were implementing it wrong. Many times I think we abandoned good strategies because we, for example, instantiated a variable in the same way that we would in C, and thus got errors and assumed that it was our approach that was flawed. I, personally, like going into situations fully prepared, with the tools necessary to solve the problem, so I really wish I could have taken a C++ course prior to this class so I could focus more on what this class is supposed to be about, program design and development, instead of struggling with C++. Also the fact that we had just finished programming in C did not help. We were learning C throughout doing that project, and actually started getting the hang of it, when we had to switch to C++. I almost think the fact that the languages are so similar made it harder for us since there are some things that are done the same in C & C++, but some are not. This was definitely are big source of confusion, and a lot of time was devoted to trying to sift through what we could and could not do the same.
Overall I recognize that for this assignment to have been effective in the way that it should have, I should have put more time, before starting, into getting familiar with coding in C++. I will say though that learning about and how to implement the cxx testing package went fairly smooth and I can see the usefulness of writing tests in this fashion, even though at this point I am still more comfortable using printf statements. When thinking of what I will do to be better prepared for Iteration 2/continuing to work on Iteration 1, I have concluded that I must put some serious time aside devoted simply to understanding the basic ins and outs of coding in C++, as well as simply starting sooner so that we are not rushing throughout the process. Iteration 1 obviously did not go as smoothly as I would have wished it to, but I did learn a lot about programming in C++, using regex's, parsing a text file, and testing using the cxx framework. I only wish I could have devoted more time to this learning process, which I plan to do for the future.
My partner and I made a conscious decision at the start that the way we would code would be physically together (sitting next to each other). This was for two reasons. One was because we both decided that talking about our program together, face to face, would be the most effective form of communication so we would both stay on the same page. Another was that svn proved very finicky (we had some troubles in the labs), and at least while we were trying to get our footing with C++, we didn't want another thing that we could mess up. We were planning on committing at regular intervals, and then switching accounts, but we always got caught up in coding and never remembered to do this. We did however take turns coding by handing off the computer every so often. Besides that minor glitch, the communication between us throughout this project went very well. Occasionally we would have differing opinions, but we were both respectful of each other, and worked through any differences we had.
As far as what I would change in the future as far as working with my partner, I think we should just set an alarm, and once it goes off, no matter what we are in the middle of, we will save, commit, switch accounts, and the other person will update and continue coding. I don't think this will necessarily affect the way our code turns out, but it will force us to get more comfortable with svn.