How the COVID-19 pandemic impacted my daily life

To begin with...


Poster

We all know what happened when we were about to enter 2020. 2019 was an amazing year, yet it brought us to what can be considered as one of the deadliest pandemics in the world; the COVID-19 pandemic.

COVID-19 itself is a disease caused by the SARS-CoV-2 virus. It spreads via droplets that comes from an infected person. Upon being infected, it will take days until people experience common symptoms such as fever, cough, and tiredness. In severe cases, they have trouble of breathing and chest pain. Find out more here.

The Value of Video Conference

When the pandemic started, I was still in my home country, Indonesia. The first identified case in the country was in Jan 3, 2020, a month after the virus was first identified in Wuhan, China. A month after the virus was first identified in my country, I was sent home by my school amid the continually increasing rate of daily active cases.

Almost every outdoor activity was forced to shut down by the government. This gave a major impact in various sections. For one, students still need to pursue education. Teachers began searching for ways to educate their students, and one of them is by using video conference platforms.

Video conference is one of the online technologies I overlooked the most. It allows people to have face-to-face meetings without having to be in a single location. As such, it is a great way for teachers to teach students without having to come to the classroom. It also saves time for both teachers and students as they do not have to come in person to their respective class. Examples of video conference platforms include Google Meet, Zoom, Discord, and Microsoft Teams.

The Microsoft Teams native application running in Mac with Apple Silicon
The Microsoft Teams native application running in Mac with Apple Silicon

Under the hood, video conference uses a technology called Real-Time Communication (RTC). RTC allows two computers to exchange data in real-time. An alternative to RTC for exchanging data in real-time is WebSocket, however RTC has evolved well, is generally more stable, and is supported by modern browsers in the form of WebRTC, which means it is usable by a lot of people.

The Wide Availability of Online-learning Platforms

Video conference is not enough for teachers to facilitate their students. They must find another way as video conference consumes a lot of data, and as such internet speed and stability became a major issue. In addition, they still need to give assignments and hand out study notes for students. This is where online-learning platforms such as Google Classroom, Microsoft Teams, and Canvas take place.

These platforms take the concept of a classroom and turns it into an asynchronous version. Teachers can post assignments with great flexibility, post learning materials, engage in an asynchronous conversation with their students, and more. Overtime, asynchronous learning becomes more widely adopted and used by teachers around the world.

The main user interface of Google Classroom.
The main user interface of Google Classroom.

Personally, I have never used Google Classroom or Microsoft Teams before the pandemic. However, my teachers offered them as an alternative to the offline class I usually take, and now they become one of the essential tools of education. They are easy to use and can be accessed anywhere if an internet connection exists, which is very convenient.

The Importance of Hygiene

Let's be honest, this is something that is built into our mind because of the pandemic. We started to take hygiene more seriously.

Back when daily active cases were still severe, my family went into extreme caution mode. For example, my dad would not allow me to touch anything that has not been sanitized yet, especially after that item was held by another person. He also would not allow me to release my face mask unless I was in a very quiet area. These restrictions built up on me, and now I carry a face mask with me to wherever I go.

The same goes for hand hygiene. Every time I have finished interacting with something in public, my dad would spray my hands with a hand sanitizer so much that it looks like I just washed my hand with water. I still apply this routine at times, and I bring a hand sanitizer with me to wherever I go, but I spray my hands less compared to what my dad did.

A hand sanitizer in front of BK02-09 room at T06 building in UTM.
A hand sanitizer in front of BK02-09 room at T06 building in UTM.
How to use hand sanitizer properly as advised by CDC.
How to use hand sanitizer properly as advised by CDC.

Some traditions such as wearing face masks and physical distancing gradually disappeared as daily active cases decreases. However, hand sanitizers can still be found everywhere. This indicates the impact of the pandemic towards our hygiene.

Development Experience

During the pandemic, I have an experience that not only has shaped my daily life, but also became a huge foundation of my decision to pursue software engineering. Let me tell you about it.

How I got into programming

Before the pandemic started, I was lost on what to pursue after finishing senior high school. I had a hard time finding an interest that would be beneficial and potentially be a career. In the past, I have only learned some very basic HTML knowledge in junior high school.

It was only until the middle of 2019 when a close friend from Vietnam came to ask me if I would like to help him manage a Discord bot. That was when I touched programming for the first time, although not much before the start of 2020 as I was only helping my friend maintain the bot process.

Originally, the Discord bot uses JavaScript. It was eventually rewritten to TypeScript 2 years ago. It uses Node.js as the runtime environment and MongoDB as the database.

The Discord bot also has a website to display the information from the data that was processed in the background by the bot, built using the React framework and TypeScript. The backend server for the website is written in TypeScript and the Express web application framework.

The Discord bot and website were hosted in a PaaS (Platform-as-a-Service) provider called Heroku. In the middle of 2019, Heroku has a free tier that provides users with a single CPU thread and 512 MB of RAM, and we used that tier to host both applications.

Before the pandemic started, I really love to go outside to try out new things. However, ever since the pandemic strucks the world, I was unable to do it. Tons of active cases surround my area. It was very dangerous to go outside. Therefore, I needed to find another way to try out new things, and thought why not try to work on the previously mentioned projects? Maybe I will find my interest there.

Scaling the server

As more features are added to the bot and as users of the bot continue to grow, the need to upgrade the server becomes inevitable. In our case, there are a couple of reasons for this.

Limitation of CPU

Having only a single CPU thread prevents us from doing multithreading. As more users use the bot, it will require more processing power to cut the wait time for users when they want to use a feature.

By default, Node.js is singlethreaded. However, it provides a way to perform multithreading. Performing multithreading can help in improving processing time, however it is pointless (and can lead to slower performance) if you are doing it too much or limited to hardware (in this case, the single-thread CPU).

Limitation of RAM

Having only 512 MB of RAM prevents us from expanding features of the bot. Ideally, we would like to cache data whenever possible, especially when they are expensive to compute or need to be requested over the internet. However, we need more RAM as we cache more data, and 512 MB was not enough for us.

Having more RAM would also allow us to opt into an in-memory database such as Redis. This will drastically speed up the processing time of features that require a database query.

A video from Fireship explaining Redis briefly.

Limitation of disk storage

Because our RAM is greatly limited, we wanted to search for options of on-disk databases. However, we realized that Heroku does not provide a convenient way for on-disk databases.

While on-disk databases are slower compared to in-memory databases, they provide more flexibility on devices with limited resources. This article by Mohammad Roothitavaf explains the difference between in-memory and on-disk databases very well.

Financial-based migration decision

After further thoughts, we decided to migrate to DigitalOcean, another PaaS provider. The main reason for doing so is the pricing and flexibility between Heroku and DigitalOcean. To summarize the pricing:

  • Heroku offers a server with 2-4 times the compute power compared to the previous server and 1 GB of RAM for 50 USD per month.
  • DigitalOcean offers a server with 1-2 times the compute power compared to the previous server and 1 GB of RAM for 6 USD per month.

While we need a better CPU for faster processing time as said previously, we were students, making our budget greatly limited. As such, we opted into DigitalOcean. Not only does it fit our budget, we also get a complete remote machine running on Linux (we selected Ubuntu as the Linux distribution), which means we can do more than just hosting a Discord bot with it (i.e. hosting a website). The remote machine can also be accessed from any device using the Secure Shell (SSH) protocol.

The remote machine has 20 GB of storage. While not much, this is more than enough for us to migrate to an on-disk database, though we have not done it. One database management tool that we have considered is PocketBase, an open-source backend that provides realtime database and file storage. It embeds SQLite into its executable, making it familiar to MySQL. One limitation of PocketBase is it can only be scaled vertically, which means more CPU power and RAM is needed if we want to handle more traffic.

A visualization of vertical scaling vs horizontal scaling.
A visualization of vertical scaling vs horizontal scaling. In vertical scaling, the computer is upgraded by adding more CPU power and RAM to handle more traffic. In horizontal scaling, more nodes are added to handle more traffic.
The main user interface of PocketBase
The main user interface of PocketBase.
A video from Fireship explaining PocketBase briefly.

My decision to pursue software engineering

It has been 2.5 years since then. I still develop and maintain the Discord bot and the website as of the time this is written, and one thing that I noticed was the passion I have towards these projects, provided that users do not have to spend a single dime to use any of the features I provided. At last, I have found an interest that would be beneficial to me, and I would like to extend my capabilities further by pursuing a software engineering degree.

Comments

Popular posts from this blog

Let's talk about blogs!