Week 11, last week I managed to use Wtemplate function inside the template file linking with the information that I needed. I am really excited about this because previously I had problem linking the information into the another function due to some c++ structure and syntax issue. To be more specific, the function I am using right now is “handleUnresolvedVariable()” which can be found in the member function documentation of Wt::Wtemplate Class Reference. I have customized the function so that the arguments given to this function will be used as the variables name of the place holders. After some testing, I tried to finish up my codes using the information needed and thankfully, it is working now!

Now, I am able to generate a PDF report using a template file containing the function which will determine the number of rows depending on the number of participants in each categories. Not only function, inside the template file also contains conditional blocks in which the codes inside the blocks will only be rendered if the condition is true. This is very useful because I do not have to have multiple template files to handle different kind of condition that might happen. So, that’s it! I have completed all the tasks given to me. I did mention before that there is another task which I am suppose to do, which is to verify the confirmation email has been sent out or not. However, Dr Shawn told me that the task is out of my level and I could not finish that in time. Hence, he wanted me to focus on all my other tasks, making sure all of them are working properly.

After getting the generation of PDF report working, I went back to look at the codes that I have written and added some comments in it. Hopefully those comments would be useful for the future intern to have a better understanding on what I am trying to do. While I was writing those comments, I tried to clean up the codes by removing those unnecessary lines so that it looks cleaner. I remember Dr Shawn once told us that, programming is like an art, sometimes you could cry by looking at a very beautiful set of codes, just like people cry when they listen a a beautiful and meaningful song. What he meant by beautiful is the structure and cleanliness of the codes. Of course, all the codes look pretty similar to me right now, but I get the idea of what Dr Shawn was trying to tell us. I hope that someday I would be able to write a beautiful set of codes.

So, I have cleaned up the codes and added comments to it, then I moved on to start writing the documentation in our git repository. The main purpose of the documentation is to provide a reference to the future interns. Therefore, I tried to write is as clear as possible so that future interns will not have a hard time to understand what is going on when they take over the project.

Dr Shawn came on Saturday and I told him the issue about the numbering system for the prize. There are some minor changes in the numbering system and it causes some problems to me while generating the PDF report. I proposed to him a new numbering system which I think is suitable and he agreed on it. He wanted me to write some sqlite codes to make sure that those previous database files use the new numbering system. Then, if time allows, he wanted me to make the changes in the application itself so that the future rounds of the competition will be using the new numbering system for the prize column. After that, I showed Dr Shawn the documentation that I have written for the generation of PDF report. He did not satisfy with it because it was still difficult for a new intern to understand. He wanted me to know the target audience and then write the documentation in the way that, someone new to the project could easily what to do by just reading the documentation.

That’s all for this week, I didn’t do much coding this week, just making sure everything is working well and trying to clean up the codes. Next week would be my last week in Aeste, so in my next week blog, I will talk about my experience working here as an intern, the things that I have learned from the tasks, colleagues and Dr Shawn and also how this internship changed me as a person.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.