How I made my first program
I have forgotten the initial motivation behind my journey into programming, but I remember the reason I started programming. Rather than delving into technical details in this article, I aim to recount the journey of conceptualizing and executing an idea. My hope is that even those averse to coding might discover their enthusiasm by exploring this narrative.
1. Introduction
The app is called EyeCare, completed in 2020. It reminds you to take a break when using the computer for a long time. Does this make you remember about the Covid-19 pandemic?

You are right. Prolonged Covid-19 has made working and studying online gradually become familiar to us. It had a big influence on how our workspaces look nowadays. Back then, my folks, my little sis, and I were glued to the computer every day for hours on end. My eyes were getting crazy tired. I have tried all methods, including using blue light filters, to address the issue, but it was not effective.
While I was digging around, I stumbled upon this science thing about the 20–20–20 rule. The rule involves taking a 20-second break from looking at a screen every 20 minutes. During the break, a person focuses on an object that is at least 20 feet away, which relaxes the eye muscles.
At that time, there was no software for the method either. I used my phone to set an alarm for every 20 minutes while working, as a reminder to take a break. However, I always ignored the alarm to continue to work so it wasn’t very effective. That was when I thought about creating an app to solve that problem. An application that can track the time I spend on the computer and force me to rest by locking the screen every 20 minutes.

Back then, I wasn’t interested in spending the whole day with that damn stupid code with a lot of bugs. But there were two reasons that prompted me to start the project:
· The eye strain issue was bothering me a lot.
· I had a lot of free time since I was studying online at home during the Covid pandemic.
2. Progress
Let me share why I opted for Python to write software, even though many people insisted it wasn’t the best choice. Simply put at that time, I only knew Python. Especially, I found a program called Qt Designer, that helps me drag drop to create the app interface (I found it after 1000 hours searching Google, Reddit, Quora, StackOverflow instead of coding, made me brain damage).
People may or may not know about this. Qt Creator is a paid tool, but with the spirit of poor students overcome difficulties, I found a way to use it for free.

It took all my creativity to draw the application interface. I realized that programmers must not only be good at typing but also good at drawing.
The initial version was buggy, and it was going to stay that way indefinitely if no unexpected problems cropped up. The first version got wiped out thanks to a power outage at my place, losing all my data, including the EyeCare source code :D

I struggled to complete the app for 3 months and lost it all in just 1 day.
There’s no other choice but to code it again. If you enter my room at that time, you will see a skinny boy with tears wandering aimlessly, not showering for a week, frustrated punching the keyboard.
I redesigned the interface, after finished reading a blog about material design. I got all app icons from icon8. As for the app logo, I asked my friend to draw it.
After many exhausting days of work, coupled with the experience gained from the previous attempt, I completed the app in an angry face. The thing is this app has so many bugs that even I struggle to use it.
I still remember the bug that kept me awake for several nights. Just when I was about to give up and go to sleep, suddenly my brain was filled with energy. It was at 1 AM, I found the way to fix it.
The template of PyQt6 looks like this, and I applied the entire template without thinking.

This issue pops up when I tried to save data after closing the app. It’s an easy fix — just kick out sys.exit from sys.exit(app.exec()) since sys.exit forces the program to bail out immediately. But, you know, I’ve been copying and pasting code from Stackoverflow like crazy, and now I’m kinda fuzzy on what the code is really all about.
I had posted a question on Stackoverflow to ask for help, but everyone downvoted my post and then the admin deleted my question. I was going to cry, although later on, when browsing Stackoverflow, I always cursed those who asked silly questions.
Whenever I resolved one bug, a bunch of new ones popped up. I always had to remind myself to keep calm and repeat this sentence: “DO NOT HIT THE SCREEN”.
3. Function
Initially, there were two main functions: forcing a break of 20 seconds after every 20 minutes of computer usage and tracking the computer usage time, displaying the data in a bar chart (later on, I discovered that it wasn’t very useful for the majority of users).


After a period of self-indulgence in using the app, I realized that my parents and my younger sister were also facing similar issues as mine. So, I decided to package it into an exe file for easy installation on other computers. Another Google Search challenging 1000 hours followed before I found pyinstaller and Inno Setup. I unlocked an achievement after many months of coding: mental resilience.
I showed it to my parents, and they gave a big thumbs up to my app. They even placed a cup of coffee next to them, and every time the computer stopped, they would enjoy the coffee.
My younger sister didn’t adapt to it much. Instead of doing something useful like me, she downloaded an Android emulator and played FreeFire. Every time she was in intense combat, EyeCare would lock the screen. Since my sister wasn’t proficient in technology, she didn’t know how to uninstall EyeCare. Eventually, she also mastered the skill of mental resilience like me.
I will not delve into the details of the remaining features, as I designed them to enter this application into programming competitions. My software later won the Young Informatics City Award and the national award. It is the inevitable result of hard fix-buging.

4. Lesson, I learn.
1. USE GITHUB. USE GITHUB. USE GITHUB. What is important must be repeated three times.
2. DO NOT PUNCH YOUR COMPUTER SCREEN
3. Do not abuse Google, instead read the doc to understand the essence.
4. Getting dumped is not as painful as fixing bugs.
I stopped developing the app as I didn’t know about design patterns like MVC, naming variables according to PEP8, or object-oriented programming. My code at this time looks like a mess, extremely hard to understand. In addition, the bigger problem is that I edited the code-generated file from the drag-and-drop application, which caused me to have to code it myself and not be able to drag and drop to edit the interface anymore. But no matter how confusing, EyeCare has been running for three years without bugs, winning many awards. Maybe if someone ask about my code, I will say I use the technic Code Obfuscation.
Following my public sharing of the app on forums, my current app has reached 5000 downloads. I am very proud of myself. I discovered that the EyeCare app is installed in some internet cafes. Perhaps it’s used to troll users like my younger sis, but I don’t care. The perseverance to complete an app has provided me with many lessons and laid the foundation for me to become a member of many programming projects and let me join the Computer Talent programming club later.
The Learn from Home period has allowed me to discover my enthusiasm for programming 😀
Download: https://github.com/anh-dz/EyeCare-Windows/releases/tag/eyecareSource: https://github.com/anh-dz/EyeCare-Windows/
Original Post: https://medium.com/@minkalexvina/how-i-made-my-first-program-9fc4c3ff3f0a