Before coming to Purdue the concept of a hackathon was a daunting one to me, but little did I know that attending one would be one of the best programming experiences I would ever have. I mean, I had worked with other people before and was comfortable with what I knew, but coming up with an idea and successfully hashing it out in a little amount of time with people that I was unfamiliar with sounded a bit crazy to me. Nevertheless I was determined to sign up and make the most of this new experience.
Once I had arrived to the opening ceremony, I sat around for a while surveying the room and looking for anyone that looked even vaguely familiar that I could team up with. Before long Arun, one of the students in my lab section that I had talked to a few times, walked in and sat next to me. I thought that we could make a great team as I knew that he had experience in web development, so we quickly teamed up. Soon after the ceremony, we met another guy named Jarett who also knew a good deal about web development, so we all got together and decided that we would make a web application during the twenty-four hours of the hackathon.
The beginning was slow with us throwing ideas back and forth. We tried to find something fun, but at the same time difficult enough for us to be able to learn something. We had come up with a few good ideas, but we eventually settled on the idea of making a program inspired by Conway’s Game of Life. We wanted to stick to rules similar to the original, but with one major spin; we wanted to make the game board use hexagons instead of the usual squares.
After settling on an idea that we were all happy with, we immediately began researching and planning for how we were going to make everything actually work. Using hexagons provided a big technical problem for us because representing a grid of hexagons in code instead of a grid of squares isn’t very straightforward. Arun with some help from Jarett spearheaded the task and came up with a solution using some Javascript wizardry. I, on the other hand, took on the task of trying to represent everything happening in the code through a grid on the webpage. As it turns out, making a hexagonal grid graphically is also not so straightforward. After searching the web for some time, I ran across a bit of code that built a hexagonal grid through using a canvas element on a webpage. I had to heavily modify and add to the code to support all the different features that we wanted, but in the end it worked out better than I would have ever thought it would. After Arun had finished his code, Jarett mainly worked on writing game rules and all the logic and functions that would be needed to simulate the game correctly. We all worked a bit in each of the areas of the program.
As is normal with programming just about anything, we came across quite a few problems as we were developing certain features. Bugs would pop up from time to time, or someone would just get absolutely stuck on a certain problem. Problems were not met with anger or frustration, but rather, we just simply helped each other solve them no matter what they were. A few times the whole team had to go into full on debug mode just to smash some critical bugs, but when the solution was found, we all rejoiced and were filled with a new sense of determination to keep going. The greatest moment during the whole hackathon was when we finally got the program to work correctly for the first time. We had made the graph, wrote the code, and set the rules, but it still was not working properly. The wrong hexagons would be displayed on the graph, and the code at least did something but not what we expected it to do. After a good while of everyone troubleshooting and looking over the code, Jarett found that we were just sending the wrong parameters to the main code. The program suddenly worked as expected once Jarett had fixed the parameters. Our team was so excited to see it actually working! The moment just felt so magical to me for lack of better words.
In the end, I was incredibly proud of my team and the work that we had accomplished. Jarett and Arun turned out to be some of the best people that I have worked with, and I am incredibly glad to have worked with them. We took on a task that I was initially wondering if we could complete on time, but we finished the base program earlier than expected. I even got four hours of sleep that night, which may not sound like much, but comparatively to what others got, that was pretty good. I was initially a bit apprehensive about joining a hackathon, but I loved it and would certainly be open to joining another in the future.
The project that we made was a web application based off of Conway's Game of Life that uses hexagons rather than squares. Feel free to check out the Github repository or the final product. Mess around with different patterns and just see what happens!