A Daunting Experience Of Bugs

A Daunting Experience Of Bugs

"The road gets bumpy most times, cliche but push through regardless"

Ouch! my codes got stung by bugs

The first step is always to write out your code accurately and ensure your codes are correct. I recently signed up for a free AWS boot camp organized by Andrew brown. Every week we have assignments and the week 1 assignment was challenging for me. Being a novice in tech is a tad bit challenging, but you’ll never remain so, with each passing day you progress. As a beginner in software and cloud, I deal with bugs in code almost every time I code from Html, CSS, to Python. Documenting week 1 assignment as a bug encounter was an experience I wouldn’t hoard. I have dealt with challenges, but this was more difficult, they were steps and guide to the task but for deliberate purposes, He omits some codes to test our debugging skills and this was the part where the clouds were dark for me. The primary goal of this boot camp is to work closely with google as a research tool.

We were asked to work closely with Gitpod, install a docker image, and run the backend of the app in a container. At first, I didn’t do it accurately I ran a different command and it didn’t work.

App Containerization was a bit complex for me, the aim is to run an app called Crudder in a container (Backend & Frontend). I debugged and felt frustrated for five hours almost about giving up. I dropped a message on the discord explaining my plight and then I was asked to edit the first line of app.py file. After the issue was rectified, I ran the cd backend-flask/ command, and thepython3 -m flask run –host=0.0.0.0 –port=4567 command.

Successfully it worked! I also ran a code for the frontend too, I made both ports public to access, and view in a browser.

The outcome of both ports worked perfectly! I felt happy, initially when I ran this particular command docker run - -rm -p 4567:4567 -it backend-flask I input a semicolon 4567;4567 instead of a colon 4567:4567 this broke the code and kept returning error messages. I dropped a problem on the discord server, the issue was spotted out. Having an accountable community is very essential for work. I ran the command cd .. back to my main directory and continued my tasks and guides. I installed docker images on the course of this journey.

It was also required of me to clone and implement commands in my frontend for the Crudder app, going about this required a detailed eye. I followed every guideline and it worked. I created a docker-compose file for both the frontend and backend. Below is a response to the backend of the app.

However the frontend wasn’t responding. It was blank yet the container was running, I debugged for almost three days! I reached out for assistance but they weren’t forthcoming. I changed the codes in the openapi-3.0.yml file still no progress at this stage I gave up because I thought it was never having a solution. I decided to give it a last trial by inspecting the page on chrome and realized I broke a code on the App.js file.

Immediately I searched and pasted the correct code then Boom it worked! I learned a lot from containerizing an app. It exposed me on how apps are created and the essential part of containerization. Below is the frontend port running and responding this time.

I felt happy and confident in the fact that I could solve this problem by myself. I also learnt problems will always have solutions. It is essential not to let debugging get the worst part of your emotions because it could be very frustrating. Most of the time when I didn’t understand what I was doing and when I encountered a bug, I pause for a while, return and properly look at the code with an editor's eye, rack my brain and figure it out.