Building AlgoChess—My Experiences

Photo by Jexo on Unsplash

Building AlgoChess—My Experiences

·

4 min read

It was the summer of 2022. On what I can only describe as a whim, I started building a full-stack wagering application. I did not touch grass for months.

Hey, I'm Rithik, creator of AlgoChess! (Click the link. Click it.)

3 months of summer is honestly a lot of time. So I took it upon myself to learn all I could! From plain JavaScript to React JS to Express, I was seriously on that full stack grind. (Trying to make this sound as interesting as possible, but you know, it's just me sitting in front of a computer skipping meals. Bear with me.)

The plan was to create a simple wagering application where 2 people could bet on the outcome of a chess game that they play. Simple enough, right? That is, until you realize you have to safely handle other people's money. Naturally, I turned to crypto. I'd been involved in the Algorand ecosystem for quite a bit then, and was eager to make some form of contribution. There was just one problem: I couldn't understand jack when it came to TEAL.

TEAL is the language in which you code smart contracts in Algorand, and it's got about as much readability as a doctor's prescription note. Of course, there's PyTEAL, but... eh. (Okay, to be fair, I was just lazy to learn something that difficult.)

Eventually, I came across Reach, which proved to be my knight in shining armor. JavaScript-like syntax? An engine that catches careless mistakes? Sign me and my smooth brain up.

That being said, Reach is not a cure-all, and by no means a substitute for actually having to use your head. Working on the AlgoChess contract brought upon me days of frustration, a landslide of documentation to sift through, and file names resembling this: index.rsh (2) copy copy (7)

It was around this time that I caught wind of Reach's Umoja 3 Bounty Hack.

Ah, woe is me, I thought. If only I'd heard of this earlier, I would have worked on something from their project list. Little did I know that I already was! I distinctly remember Ctrl+Fing the word Chess and surprisingly being met with a match.

Alright, now I had something tangible to work towards! As the deadline ticked closer, I found myself confident that I'd make the deadline. Reach has an excellent way of integrating with websites, even having an npm package for the same! Like a spool of yarn being knit into a sweater, I had the satisfaction of seeing my spaghetti code come to life in the form of a decent-looking web app!

Of course, I hit several major roadblocks, and it was during times like these that Reach's community really pulled through for me. Now, I do realize that in the web3 space, the word "community" is something that gets thrown around recklessly, but I feel that it fundamentally has different implications in a place where people are trying to build something, as opposed to one where people are simply looking to profit. Their Discord is an extremely valuable resource, as it is frequented by several Reach admins who are always happy to answer any questions, technical or not. That is, unless you have my luck, and moments after asking something, your question is buried under a mound of text by someone posting a massive code snippet.

AlgoChess eventually went on to win 3rd place overall. And I'm not gonna lie, that's a major W.

Of course, I still have a long way to go. AlgoChess, in the end, is a gimmicky project at best, and is not something people would want to use past one game. This is something I knew from the moment I started building it. What really mattered to me, however, was the experience gained while doing so.

I regret nothing from the journey that was building this project from the ground up. I have earned so much—invaluable experience, a cash prize, and $7/mo in hosting fees forever (damn you Heroku).

To conclude, allow me to drop a quote that I totally did not just come up with:

Reach is to smart contracts what flexbox is to CSS. You can technically work without it, but why would you lmao