Notes on codes, projects and everything
Trekkr is by far the largest program I have ever done as a student. Trekkr is my final year project which is co-developed with Regina. It took us about half a year in carrying out research, learning some new concepts and developing the system. The final product is still not even near to perfect but major functionalities are already done.
We carried out extensive research in determining which architecture to apply. We learned in college about 3-tier design but we wanted to find another architecture to compare with the 3-tier design as we do not really like about it. Then we heard a lot about MVC and did some research and learning about it. The reason we didn’t use popular frameworks was we wanted to learn more through developing the website.
After evaluating the two architectures and we found out that these two architectures can be combined, hence we came out with a design which is explained in this article.
*Quoted from my own final documentation.
This is one of the most important modules in the system where users are able to interact with each other the most. This is the module where user posts information to a specific location to complement the profile of the location. To start, the user would have to upload an image to the system and create the location profile as instructed, once the profile is created, other users may be able to contribute content or define tags to the profile.
However, this module doesn’t allow a piece of content to be edited directly, what the system does is create a duplicate entry for the content that is to be edited and let the user to edit from the duplicate copy. This is because each piece of content is bounded to a rating by other users, the system could not guarantee that after modification the content is still deserves the rating. Besides that, by implementing the edit system in this manner, now all users are able to edit each other’s entry without worrying about the impact to the original copy in terms of rating. As long as a piece of content is being written well and being promoted by members, then it will be promoted to the front-page.
The site administrator would not play an important role in this module as the power is distributed to the users. The users are expected to maintain the quality of the location profile, this is the reason why the users are allowed to rate a single location profile for multiple times.
Besides that, there is an internal promotion of content in each location profile. As many users may be able to contribute content, to users who just want to have a quick view to a place, this may cause them to confuse. Therefore two distinct views are created, which are the normal and the draft view. The normal view will display the most popular, or the content with the highest rating in each sub-section. However, if the user wishes to know more, he or she may go to the draft view to view all content contributed by all other users. Guests, or users without an account in the system, would be restricted to only the normal view of the location profile.
The travelogue module is a module to enable users to post their travelogues. The version submitted in this project allows the user to attach a photo. Besides posting, the system also enables the original author of a travelogue to be able to edit the content. For other users, editing others’ travelogue will result in an error screen informing that they are not allowed to edit the travelogue entry. However, if a user posted a travelogue that contains inappropriate content, then the travelogue may be deleted by the site administrator. Tags are used to describe the content of the travelogue, for example, if the user posts a story about his journey to Malacca, then he or she may tag the entry as “Malaysia, Malacca, A’Farmosa” etc.
The searching module is a module to search for a travelogue entry or a location profile using tags. A tag, as mentioned earlier, is a metadata to describe a piece of information used in web 2.0 applications. Therefore the developer finds it reasonable to search the tag in order to get to the desired information. The searching interface will be either through a web form provided by the system or just through a specific format of website address. This is to provide flexibility to user without having them to load the web form whenever they want to search for information.
The demo site can be accessed here.
This update took me quite a bit more time than I initially expected. Anyway, I have done some refactoring work to the original code, and thought it would be nice to document the changes. Overall, most of the changes involved the refactoring of function names. I am not sure if this would stick, but I am quite satisfied for now.
Recently I switched my search code to Annoy because the input dataset is huge (7.5mil records with 20k dictionary count). It wasn’t without issues though, however I would probably talk about it next time. In order to figure out what each parameters meant, I spent some time watching through the talk given by the author @fulhack.
Should have done this earlier, I was just being lazy to go through all the steps to publish it properly. So here it is, the full source is published to bitbucket. Feel free to fork the project if you are interested. I have not attach a licence to it but it will most probably be BSD licence. I have also uploaded the latest 0.0.2 release to bitbucket and would update the download link posted previously soon.
Just survived a job interview, so I should probably celebrate this despite the outcome. Well, considering I was off the job market for a couple of years, I probably has all the reason to be nervous. Anyway, like most
geeky serious job interview, there are a test given by the company to the attendees.