Comp Sci Project Showcase
by Cody Schober

Blog Entry #28

May 1st, 2016


After bunkering down for the whole weekend, and slamming out some much needed progress on my final projects, I have finished the bookmarks feature of my Comp Sci project, and have thus completed the programming portion of the project. Interestingly enough, the end result for bookmarks almost utilizes a JSON approach. Despite my best efforts over the past few days, I could not get the program to read and write to an internal database, both when it was a JSON file and when it was a normal TXT file with the JSON database within it. So, for the sake of getting the project done, and being able to focus on addressing any potential kinks and getting the presentation finished, I took a different approach.

In the blog view activity, I created a "block" (stored in a string variable) in the following format:

{project, url, author, year}

Each entry is separated by an endline, and it is written to the file upon selecting the floating action bar icon. That is, as long as the user hasn't already added the bookmark before. The whole bookmarks internal file is read in first, and it is analyzed to determine if the url does not already exist in the file. If it doesn't, then the new entry is appended, and the old file is overwritten with the new information. In the bookmarks activity, this information is extracted from the file, loaded into ProjectModel objects, and then the normal process for displaying entries similar to those in the results activity is undergone.

Alongside finishing the bookmarks feature, I have done two other vital things: I finished the projects database, and I tested the app on the android phone given to me. Much to my happiness, the size of the database presents zero issues to the app being able to load the whole thing, if requested by the user, and I am quickly and effortlessly able to switch between different activities, web views, and the likes without issue.