When I think back at the start of this project I shake my head at the amount of confusion I had with what the test cases meant in terms of the scanner for a week or so and it wasn't until about three days ago that I fully understood how the Iteration needed to find and match tokens. Iteration 1 was not as complicated as I thought when first starting out. Looking back a few weeks ago I would look at the scanner.h file and the test cases and not have a clue at what was going on or where to begin for the scanner code. After working out all the aspects of the first iteration I definitely learned a lot about why test cases are great first hand and about how it feels creating a much larger program than in previous classes.
The first issue I had with this project is the fact that I haven't created a program for a class since 1902 last spring, so I was a little rusty when it came to the thought process involved with figuring out a plan for how the code should look and what problems needed to be addressed. It took me awhile before I got into the mindset required for programming as well as an understanding of how the scanner tests worked. Another issue with the project was the chunk of code in scanner.h that was meant to be removed and the fact that there was a TokenMaker constructor. That constructor was what threw me off for awhile when thinking about a solution to the problem. The TokenMaker made a few things in the test cases and partial solution seems a lot more complicated to me. What I also didn't help me was the fact I completely neglected the previous labs other than making regular expressions. It completely slipped my mind that labs are usually set up to help with later assignments.
The parts of the first Iteration that started to go well was writing test cases and using them to figure out how something has to be done or what issues the scanner has. When I was working on the project I was short on a few test cases and had almost no regular expression tests. After struggling with some issues involving the scanner I thought that I should be productive and started making test cases since the assignment said we had to make them. While I was making them by copying some that were given and I started to think about what some of the syntax in the tests meant which actually made the way constructors in c++ are accessed made sense. Looking at the sample files also helped explain what the regular expressions needed to identify for each token. Piazza was also a useful tool even without needing a question answered. There were definitely a few problems that got addressed in the forum especially dealing with what regular expressions needed to identify. Finally, after the entire iteration seemed to be finished the code would not run because of a misplaced numMatchedChars variable. Going through the code using cout worked out well because it shed enough light on the situation to figure out where the problems of the code may be.
Working in pairs was helpful and not that difficult when using svn. Having another person to be able to confirm ideas about what the Iteration should have been doing worked out well. Dividing up what to do made the amount of work a lot less especially when planning who does what through emails or during the lab times. The other thing that was even better was just having another set of eyes looking at the code to catch things that maybe I could not. The fresh set of eyes and a different perspective provided a lot of insight on the project (A few questions to TA's helped as well) and allowed for more progress after getting stuck.
As far as the next iteration goes there are a few things that will make things a lot less difficult. First, and most importantly, when starting the next part of the project begin working on it right after it's assigned and not a week or so later. My flaw for the first iteration was having to finish it in two weeks and feel rushed the entire time. For the next iteration I will probably use more tools, like printing out values in loops, to figure out what is wrong when the code doesn't work and to try and remember the things I have learned in previous labs and classes. Another change I could do is if what I'm thinking needs to be done makes the problem a lot more difficult then it needs to be I should stop and rethink about the problem at hand. Lastly, I should probably write more tests than I think are needed to test the code for more issues that may arise.
With the first iteration finished I plan to continue with writing test cases beforehand for the future to catch any problems and to make sure helping functions do what they are supposed to. Asking more questions is probably a better idea for the future with either Piazza or the help emails. The main thing the first part of the project was not starting as early as a should have, which I could probably say about a lot of things in my other classes and past classes. Along with starting early there is the added bonus of how the code works becomes clearer after the initial lost feeling when first looking at a new piece of code or problem. Reading all the test cases, comments and sample files is another practice I will most likely stick to in the future.