Iteration 1 in the project was the first time when I programmed with the knowledge of how a program was developed in real life. There were still some things that our team should improve in the next iterations but in general, I'm satisfied with the process and the result of our program.
Our team didn't have an early start. At first, I was worried a little bit about that because I didn't want to start writing code before having a plan with my teammate about how we were going to divide the work or what kind of data structures we were going to use. However, our first meeting went well, and I knew that we would be able to finish it before the due date. In our first meeting, we checked the requirements of iteration 1 again before deciding what we were going to do. In this iteration, we had to build a scanner that took a sample program from another language as an input and recognized the tokens in that sample. We had two tasks. The first one was writing test cases in the file scanner_tests.h. The second one was implementing scan method of Scanner class so that it would take a string as an input and return a linked list of tokens. Beside those two main tasks, we also had to state our formatting style and create the eve of destruction test file, which we tried to do first because they were simple tasks.
As we learned in class, test cases should be written first. At first, we created some simple test cases, for integer and float constants, because we worked with them in the last labs. After writing those test cases, we knew what the Scanner's scan method was going to do so we began implementing the scan method. For efficiency, my teammate wrote the test cases for other tokens, a tedious and time-consuming task, while I was trying to implement the scan method. This was not easy because this was my first time to program in C++. However, in the labs we were provided word count function, which counted the numbers of words, integer constants, float constants from an input string. Because it had a lot of similarities with scan method, I decided to write my code based on it. I started small, just with intConst and floatConst, because I wanted it to pass those simple tests before adding more functionality. I think that is a good thing to do in the future because we will be able to debug a small program much easier than a large program. After a while, we both finished our tasks. We were able to compile the scanner.cpp, and it passed the simple test cases. It went better than I thought.
After creating simple test cases and having a scan method passed all of them we reviewed the code for scan method together and tried to improve it. There was one significant difference between word count function and scan method. While we only had to recognize words, integer numbers and float numbers in word count, there were much more tokens in scan method. To resolve that problem, my teammate had an idea of creating a new data structure to store the tokenTypes and the regex patterns together so that we didn't have to repeat the process of making regex patterns too many times. After that, we decided what each of us was going to do next so that we wouldn't have to meet many times while we could still contribute to this iteration together.
I think that the first meeting is necessary because we often have a lot of things to discuss before beginning an iteration. That will be what I want to continue in next iteration. Through that meeting, I also know that there are some benefits that I can get from working in a team. He had the idea that helped us to do less boring work and he is also a good vi editor so I guess that I can learn something from him in the future. The way we divided the work also looks good to me. Because iteration 1 was just a small program, we worked together in both writing tests and writing code. In that way both of us had some experience in testing and coding. The work was also divided equally so it was much better than working alone.
After the first meeting, we continued the iteration 1 through svn and contacted by email a few times. Although the first meeting went smoothly, we did have some trouble after that. The first thing was about using the group repository. Because we only used our individual repository before so sometimes, we messed up things a little bit. For example, in the first time I worked on the project at home, I forgot to update the group working copy before trying to modify the files so I wasted my time on writing the part that we already did in my teammate computer. Next time, I will be more careful about it. Creating the regular expression for a string was not an easy task. At first, I thought that we only needed to match anything beginning with a double quote and ending with a double quote, but things were more complicated than that. We had to make sure that there was no other double quote inside two double quote and if it existed, then there had to be a backslash before it. Although I saw some similarities between string regular expression and comment block regular expression, it still took me more than one hour to figure out how to do it right. I think the problem here was that I didn't have a good definition of what a string was, so I had to write its regular expression again each time something came up in my mind. We also didn't do really well in testing. When we looked at the test cases provided, there were only tests for matching the tokens, so we almost forgot to test the token's lexeme. Luckily, we already wrote a separate method to check single tokens so that adding tests for lexeme didn't cause us much trouble. Next time, we will try to spend more time to creates test cases that will test the program thoroughly. Those are a few things that I think that our team should pay more attention to next time.
In conclusion, I think that our team did well in iteration 1 but we could still do it better. We didn't have many challenges in this iteration because we already had some code provided in the lab to begin with, but next iterations could be different. In next iteration, we will try to avoid the mistakes that we made in the first one and keep doing things that helped us to do well. We are going to have a meeting after the requirements of iteration 2 are posted to discuss how the work will be divided and what kind of structures we will use. We will start from some simple functionality then test them with simple test cases before adding new functionality. We will also spend more time on creating test cases so that all of our functionalities will be tested carefully. I hope that we will be able to improve our skills learned in class through each iteration.
3081 project - Iteration 1
No TrackBacks
TrackBack URL: http://blog.lib.umn.edu/cgi-bin/mt-tb.cgi/181788

Leave a comment