How Quake III Helped Me Debug Strawberry Filled Kiełbasa

Written by tomaszs | Published 2022/05/18
Tech Story Tags: debugging | getsentry | monitoring | web-development | coding | javascript | html | hackernoon-top-story

TLDRPolish IT worker created website for ready to eat kiełbasa, pierogi and soups. He wanted to earn his first money and wanted to be able to use his computer skills to profit. He spent days and nights trying to figure out how to collect orders through the internet. Eventually with some wizardry he was able to set up the website. But there was one problem. Products were in different forms. There were soups. Different products, different units, different packages and addons. And it didn't work properly.via the TL;DR App

A DM17 and rail gun was all I really needed in the year 2000. I spent hundreds of hours running, jumping and aiming in a fast-paced real-time shooter that the world hadn’t seen before. Enjoying John Carmack’s finest form of computer entertainment that was even better than GTA 2 back in the day.

At the same time, I wanted to earn my first money. I wished to be able to buy books about coding 3D games like Quake. There was no internet in the sense we know it now. There was only one online forum about the demoscene, where people shared mind-blowing 3D animations but didn't really share how to do such stuff. It was the time the Polish 3D game industry was forming. Something contributed to the foundation of some amazing companies like CD Studio Red with monumental The Witcher and Cyberpunk creations.

Libraries didn't offer anything more than books about microprocessors and assemblers. Buying coding books was my only chance to move forward with my game development passion. They were expensive so I had to earn money as a teen.

It was not easy in a post-communist, medium-sized city in the centre of Poland. A country that was drained by years of Russian occupation, with high unemployment rates and being behind the world in almost every aspect.

Opportunities

My only chance was to use my computer skills to profit. After evaluating my options I concluded that the closest way I can find is harvesting strawberries on a nearby farm.

When I was just about to go for another trip to a tasty but not profitable job I noticed in a newspaper (old internet) a listing that someone is looking for an IT guy who can create a website.

I knew about creating a website as much as about harvesting strawberries so it became obvious I had to contact the company behind the listing.

It occurred it was a local, ready to eat meal manufacturer. I took a bus and travelled to the suburbs with my strawberry money to meet the owner, a middle-aged woman. After the introduction, she explained to me that she wants to receive orders through the internet. While I didn't know much about creating websites I knew what was the state of the so-called WWW at that time. I knew it was impossible with early versions of Javascript to accomplish it. No one was doing it. She must have been crazy.

So there I was. Sitting on a bus heading home with an advance payment for my new book and 30 days to the deadline.

I spent days and nights trying to figure out how to collect orders through the internet. I was smashing duck after duck with no answers. Eventually, with some wizardry I didn't understand and a duct tape I was able to set up the website. But there was one problem.

Products were in different forms. There were pierogi and kiełbasa. There were soups. Different products, different units, different packages and addons. I had to code it in a pure, very early version of JavaScript. The code was a mess. And it didn't work properly.

For example when a user chose a kiełbasa, suddenly his unit changed to milliliters, and an option to choose strawberry filling was offered.

At that time browsers didn't offer developer tools. There was no way to set up tools like Sentry to investigate what was happening.

It was only you, happily having no clue what you are doing and Javascript that happily assumed you know what you are doing. And we were there looking at each other happily enjoying the concept of people ordering strawberry stuffed kiełbasa.

I have spent all my money and had seven days to meet the visionary woman. Expecting to go back to strawberry fields to return prepayment I did what everyone would do. I started Quake III to have some fun before my ultimate failure.

/cg_fov universe

I opened the console and typed /cg_fov to adjust my field of view for more frags. Surprisingly at that very moment, I felt like I typed /cg_fov universe. A thought struck my mind that was crazy and beautiful at the same time. What if I could add a console to the app? What… what if I could call commands in the browser that output values of variables on each step of processing the code? I could see where the errors occur and why kiełbasa is recognized as pierogi!

I have closed Quake and started to code. It took me six long days to figure everything out and set up the console. It was an input field with a button. The button passed the command to the Javascript code. Then the code executed it and appended the result to a div element on the website. One day before the deadline I was ready to try it out. I called a command /show_log and immediately the page became filled with all the data and steps the algorithm made to assume kiełbasa is pierogi.

After testing for several hours I finally managed to fix all bugs in the code. It was working flawlessly. And the console allowed me to prove it!

I went back to the company with the final project proud of my creation. The company owner hated the colors of the app and I had to work another month to take care of that.

But eventually, she accepted the project. It was, as far as I know, the first company accepting orders for ready-made meals through a condition-based online form. I was able to buy another book about 3D game coding and got into web development.

So, this is the story of how Quake helped me debug my app. It is also a story that sometimes it is worth taking opportunities even if you are not ready for them. For me, it was the start of my successful coding career.


Written by tomaszs | Follow me, if you want to become 10x Developer. I am sharing tips based on 20 years of coding
Published by HackerNoon on 2022/05/18