This week we managed to fix the bugs, just in time for the presentation to our customer and classmates. The calendar update bug I managed to solve using a recursive timeout callback function which called itself every 100 ms, checking to see if the event variable did have events assigned to it yet or not. This resulted in a smooth transition from "Loading" to the list of events in an individual's calendar. I also fixed the Windows issue by changing the way the user is asked to authorize the program. Instead of entering the information at the command line, the authorization is now done by creating an "auth.txt" file and storing the key there. After first authorization, this file can be deleted. This does not solve the problem of Windows not always showing the link with which you authorize, but that is a bug with PowerShell and cmd themselves, and therefore are beyond the scope of this project. A way to circumvent that bug may be found, but will not be tested enough to be reliably concluded as a fix, though it will be included in the README documentation.
Also, on the 1st the README documentation for our module was completed.
This week we tried to fix the bug that we had been dealing with, but to little avail. Jonathan and I met Thursday to attempt to fix the bug, and he found a rough fix for the bug, which was setting the refresh interval low enough so that the calendar would display properly. This made us aware of another bug, however, which was that when using Promises to fetch the calendar, the calendar would never be updated again, due to the nature of promises. We are still actively seeking a way to fix this bug, but are uncertain we will make it in time.
During this week I also decided to pull the code to an Ubuntu machine and see if it had any bugs. After rereading the documentation on the original Magic Mirror GitHub page, I realized that Linux systems were the intended target for this project in the first place, and that it might be productive to see if the code functioned on there. As it turns out, it runs flawlessly for Ubuntu, minus the new non-updating bug we have discovered.
A Windows issue was discovered this week as well, but it may be beyond the scope of our project. Due to how Windows' cmd and PowerShell are implemented, programs are either GUI or command line, and do not function well if they are both. For this project, this means that in almost all circumstances, node's console.log() function has no display on the terminal. This makes debugging very difficult on Windows, and also makes entering the verification the Google calendar needs prohibitively difficult. If one is able to authenticate on Windows, the calendar works nearly every time, but getting authentication to be accepted via command line is not at all reliable.
The group met on Thursday to address GitHub issues as well as address a bug that had been uncovered. On Mac systems, the current code was only working every once in a few tries, and was not displaying the calendar most other times. On Windows, it was working most times, but Windows does not give any debug information due to a deficiency with how PowerShell interacts with Electron, so any hint the bug might be there was obfuscated.
The GitHub issue was that files that were not intended to be uploaded were uploaded, causing issues when anyone tried to pull down the changes that had been pushed by another member. Many methods were attempted to fix the issue, but eventually, in order to fix the problem with GitHub, I decided we should revert the GitHub repository to the last working state and manually apply the changes to our files we had made since then. This ended up working to fix the issue.
During this meeting, we also narrowed down the likely cause of the bug to the assignment "event = quickstart", as JavaScript's asynchronous execution was decided to be causing the events to be accessed and broadcast before quickstart was executed, resulting in blank event lists being dispersed. The group is currently tackling this issue.
The group again did not meet on Thursday. We had a code meeting the day after, but felt adequately prepared for it. The meeting went smoothly, with valuable feedback to do with documentation and testing being given to us by the instructor. A final document outline was created, and will be filled in more the next week. I was not able to contribute much this week, as I had a project in another class due, as well as a wedding I had to attend.
The group did not meet on Thursday this week, and instead used GroupMe to keep in contact. The testing documentation was discussed, and I contributed a few test cases to the document. The issue with GitHub was also corrected.
The group met this week on Thursday and discussed what our implementation plans were going to be. We found a quickstart tutorial on Google's site showing how to access and pull from Google Calendars. We were able to get this function up and running, but need to integrate it with the project. There was also an issue with GitHub, but this should be taken care of shortly.
The first of these weeks the group presented our aforementioned slideshow to the class. We did not meet at our regularly scheduled time Thursday this week, the first week without a meeting since the beginning of our meetings. We agreed to work independently on the project over spring break. We did discuss the project over GroupMe, however. I learned that the last group's code was available to view on GitHub, and did a bit of skimming. This was less helpful than I had imagined, though I believe this to be due to my continued lack of clear understanding of the structure of the program and JavaScript.
The second of these weeks was spring break, and though I made efforts to understand Google API and how to get information from the calendars, I still do not understand how to access such information, and am not sure how to make the calls. I plan to buckle down the coming week and figure these things out, and plan to use the group meeting time on Thursday to ask for help if I am unable to figure it out on my own by then. Though I understand quite well how the code must work in theory, with a main JavaScript file and one to send and receive data, I am not certain how to do so.
This week the group met on Thursday at PresentationU to practice the slideshow that was created earlier in the week. We received helpful feedback, myself in particular, as I now know how much I will need to practice on my part to be prepared for the actual presentation in class. I have continued learning JavaScript, having made it to the Regular Expressions section on w3 schools, and should be to node.js soon. I also looked over the code of the previous group(s) again, and it is starting to make much more sense, though the details of how modules communicate with the main file still elude me. I believe this will not be a problem much longer, however.
This week I continued learning JavaScript, and will soon be able to fully understand the Magic Mirror code. I was also able to install Passport and its extension to renew Oauth tokens, so either this week or next may result in the solving of one of the main goals of the project.
This week was spent learning more sophisticated JavaScript features. More effort was taken to understand the source code, but I need to better understand JavaScript and Node.js before I will be able to understand how modules are to be created and implemented. A potential option for logging in to Google and keeping the Oauth tokens updated, Passport, was discovered. However, installation efforts were unsuccessful, so next week more efforts will be attempted. If this works, it will likely cover two of the requirements for the system.
The opening week was spent doing initial setup. The Magic Mirror GitHub repository was cloned into, and node.js was installed. Time was spent reading through various files in the repository, trying to understand the work that had been done by the previous group. After a while, I figured out how to setup the weather module, but realized that I couldn't understand most of the js files, as I don't know JavaScript. The rest of the time this week was spent learning JavaScript.