This week was mainly spent finishing up the flow of the program. I first started with modifying the data file importer to accommodate the requested changes and continued with the addition of the CRUD functionalities of the admin page. I then started work on the MC page to handle the entire event. This mainly involved handling the logic on the flow of the program and how the various roles interact with each other. Then followed some automation of the process of judging, UI improvements to indicate an ongoing performance, and upon the suggestion of Dr. Shawn, some Javascript to auto poll the server for updates to make life easier for users.
One notable thing though was how Witty handles database entry pointers under the hood. This caught me when I thought I encountered a bug when fetching data from the database. This can be reproduced below:
- Session 1 fetches an entry in the form of a pointer (let’s call this pointer A) from the database.
- Session 2 then modifies that exact same entry.
- Session 1 then fetches the same entry in the form of a pointer (let’s call this pointer B) from the database.
When reading data from pointer B, it will not reflect the latest modifications that was made in session 2. You will need to remove both pointer A and B and then only create pointer C before pointer C can reflect the changes made in session 2. In short, one will have to deconstruct all pointers referencing to a database entry before the next pointer that references to that entry can reflect its latest version.
I then ended the week with mainly documenting on how to setup the system, along with some simple features.
0 Comments