It is undeniable that testing is one of the most important parts of constructing a program, and unit testing is quite important among all kinds of testing. In my opinion, unit testing is the most fundamental test after writing the code, it guarantees that you do not do anything waste of time. Only if each part of the program works well, it is possible they function well after merging them together. It can be a disaster to suddenly realize that basic functions do not give correct outputs and it may be impossible to fix them when all things come together. And I think it is worth putting many efforts into unit testing. It seems to be a waste of time, it actually saves lots of time.
CxxTest is a good tool to finish the task. It provides a platform to do unit testing and make sure everything gets proper outputs before the programmer goes to the next step. When I first come across CxxTest, I got really confused how to use it. After reading some instructions and the examples, I found it quite easy to use. The most important thing during testing is thinking about the test cases. They should cover all the possible cases and some of them should fail, because there are no perfect codes. If every test case successes, it makes no sense because it doesn't help the programmer at all to fix the bugs. I believe that if this is done before really stating writing codes, it helps the programmer to build their program.
For our project, because the output of each file can be very long, it is hard to examine whether it is correct or not. And the unit test gives me a way to know whether I have done everything right, especially when I add something new into the existing code. This is the time that has the highest possibility to introduce some new bugs into the program. So after I add something new into the code, I do the unit test again to make sure no new bugs are imported. This is quite useful.
To sum up, I believe that testing, not only unit testing is essential when building a program and it is worth putting some time and efforts on it.

blog 3 subversion


In 3081W, this is my first time hearing of and using version control software, like Subversion.
So at the very beginning, I am not used to it at all. And it took me some time to get used to it. For example, for the first several labs, especially for the first lab using group repository, I was copying all the folders to the target directory and when I was trying to add the new folder and commit it, I met lots of troubles. It took me at least 3-4 hours to do submit that assignment. I went through all the errors like "file already exists" and other messages. It really drove me crazy when I got another new error and I had to look it up in Google or other websites. I finally got to know the hidden folder .svn. Finally I erased all the things in my repository and re-upload everything. It was really tough in the beginning.
After the struggle in the beginning, I gradually felt the convenience of using subversion. It provides us a useful way to share the code inside the group. Because everybody is busy and has lots of things to do, it is kind of hard to find a time to do the project together. And it is little hard to finish the task within a short time. So thanks to Subversion, it is possible to do the project separately. We can write some of the functions by oneself and merge the code with the help of svn. We can see each other's codes written by one person and download them to one's laptop to read or edit.
I haven't used the function of reviewing the previous versions. But I think that might be very useful. It prevents some mistakes from losing some of the codes or even the whole code.
To sum up, I think it is a good tool to help group members to be like a team. I may use it again in the future.



Working in a group is quite different from working alone.
Of course, there are benefits: two guys are working together on the same project, so there will be diverse ideas on it and we have multiple choices on how to finish the task and we can determine which way is better and more effective.
Meanwhile, some difficulties come to us while doing the project. During the work on iteration 1, there are many challenged that come to me.
Firstly, I found that communication matters a lot in group work. When two or more people are working on a same project, making effective communication is one of the most important things in my opinion. If two guys have different opinions, the work will not be done efficiently. For example, before programming, several things must be clarified, such as the return value of a function and the arguments that a function calls. If these things are not matched, it will be a disaster. If is hard to change either of those after the whole job is done.
Secondly, I found that schedule management bothered us from doing the project effectively. Because we are taking different courses in this semester, and both are very busy, it is kind of hard to find a common time period to do the project together. In this case, it requires us to improve the efficiency within limited time.
In order to overcome these difficulties, we tried in this way. One of us worked out the framework of the program and we discussed about how to fill the functions into the framework together. Then each of us was responsible for writing some of the functions and then we combined them together. In this way, we used the time when we meet together quite effectively and some work could be done individually on one's own laptop. And it worked well. Because we had talked about how to write these functions and how would these functions work, we didn't have a hard time while combining them together.
By the way, I had really tough time while uploading out program to the subversion. I really struggled with svn commands and the hidden folder ".svn" and those errors like "xxx has already existed in this version". I spent like 3 or 4 hours to make it done to submit my programs, which made me really frustrated.
Anyway, it is fun on Iteration 1.


| No Comments

Among all these objectives, i am quite familiar with C++ programming. I have been using C++/C for more than 2 years and i know those things including classes, values and pointers well. I think i can program in C++ at an intermediate level.

However, there are more things i am not familiar with.

For example, i don't use debuggers before. I think debugger is one of the most important tools during programming. When programming a huge project, it is impossible to finish the task without the help of debugger. During this course, i want to learn to use the debuggers which use command line. I believe i can use debugger well after practicing in this course.

Second, I am not familiar with state machines and normal expressions at all. I have not ever learnt them before. But i am taking CSci 4011 which teaches these things this semester. I think it is quite important to know these things because creating math models is one of the most significant part in computer science field. I think i will learn knowledge about it in this course and improve my ability.

Recent Comments

  • sette075: correction: *How much work is refactoring the unit tests IF read more
  • sette075: I hear a lot of people saying that they approve read more
  • mart2514: While I agree with you that unit tests are beneficial read more
  • tongx114: I totally agree with you that testing is one of read more
  • aldaw004: CxxTest is a bit confusing in the beginning, but it read more
  • vangx568: I also think testing is one of the most important read more
  • geexx041: This class wasn't the first time I was introduced to read more
  • ahlqu038: It does take a while to get used to using read more
  • vangx568: I'm sure that there were a lot of other people read more
  • tongx114: I am strongly agree with you. It seems that most read more

Find recent content on the main index or look in the archives to find all content.