Photo by Tim Gouw on Unsplash

No Hard-Coding!

Here is a summary of what happened this week. The task that I am working on right now is the generation of reports for the Competition. I have faced a lot of problems while doing this task and I will briefly explain them later. Before that, just to let you all know that, my lecturer from University of Malaya visited me on 8th August. The purpose of the visit is for them to check on what I am doing and Read more

Starting on OTA

In our HID module, MD5 hash function was used for a number of reasons. Previously we were using wolfSSL API to compute the MD5 hash, now I have replaced these function with bearSSL substitutes. Although Harmony has a crypto library providing MD5 hash, but that in fact is just merely a wrapper around the wolfSSL API. We also need to generate RSA keys. The generation of device’s RSA key pair also rely on wolfSSL, but bearSSL do not support the generation Read more

Photo by Alexandre Debiève on Unsplash

Progress of Triggering the Simulation: Part 2

As I have stated last week, Dr Shawn recommended me with two ways to retrieve addresses where LOAD or STORE operation occur and to which module it happens. I will explain the two methods briefly. Method 1: When the simulation starts, get the map of variables and addresses that we set ourselves to make sure addresses are within a specific range. Meanwhile, get the ids of components on the schematic and sort them alphabetically. Plus, the content of the map Read more

Visualizations, Refactoring, and More

Last week, I was spent a lot of time exploring various options for writing the Rest API for returning a JSON string to the browser. I eventually came up with a template class (derived class of Wt::Resource)  to handle ‘queries’ to each table in the database, and made use of the Poco::JSON::Object for setting the key-value pairs of a JSON string. Thankfully, it took me just a few hours to implement this properly. My next task was to create some Read more

Photo by Giorgio Tomassetti on Unsplash

Spring Cleaning Part 2

So I’ve made a few more strides in my spring cleaning adventures this week. I finally managed to get all my cURL test scripts to passed, which was a boost of confidence for me. Also, any other things that I had conveniently hardcoded back then were at least moved to the server’s configuration file, or like for the project file extension (which is “.zip” for a Zip archive), since I was using it everywhere, I put that in a getter Read more

What I Know Is Just A Drop Of Water In The Ocean

So last week I had burst the quota of the maximum amount of emails we could send out a month and the quota hasn’t renew yet. So, this week I am focusing on my next task. What I have to achieve in task number 4 is to generate a final report for the competition. This report is going to be used by the organizers for archival purpose. Basically, the big picture of my task is to figure out a way Read more

Photo by rawpixel on Unsplash
Photo by Nicolas Thomas on Unsplash

Finally download bitstream via SSL connection is done

Continue from last week problem, curl client shows “Empty reply from server” just because I did not send a proper HTTP response which starts with the message status line (something like “HTTP/1.1 200 OK”) thus the client just ignores the packages. Simply br_sslio_write() the status line at the start of the response then it works perfectly fine. Then I start to replicate what were done before with wolfSSL,  grab the HTTP request line and pass the request type to the Cross-Origin Read more

Progress of Triggering the Simulation: Part 1

Triggering the simulation is the task I am working on lately. I will try this time to sum up what I have done to fulfil this task. To recall, we need to read the addresses to which data are stored, and addresses from where data are loaded, then, trigger the corresponding I/O device. In other words, when the line-by-line simulation is running on the editor side, we need to check the addresses when Load/Store operations occur, if the address is Read more

Photo by Carlos Muza on Unsplash

Redoing calculations, into Rest

Last week, I was almost done with implementing the functions to calculate the averaged standard scores and percentile scores. This was my second attempt on this, and I tried to make use to std::unordered_map to improve the time complexity of the calculation. Just when I have completed it, Dr Shawn took a look at my code and spotted an issue that I have yet to consider before. In my implementation of percentile scores calculation, I heavily relied on making complex Read more

Spring Cleaning

So basically all I am doing right now is cleaning up the codebase of P3 as much as I can. There were some instances where refactoring is needed, especially for the caching mechanism part. I’ve mentioned it before, but I just want to emphasize how important tests are when it comes to refactoring. If it wasn’t for them, I would probably be too afraid to modify anything and risk breaking things that work at that point, leaving the code be Read more

Photo by Charles Deluvio 🇵🇭🇨🇦 on Unsplash