I smashed a bug and I liked it
Tags: devbugsmash
Published: 2021-09-20 19:28:06

---
title: I smashed a bug and I liked it  
published: true
description: My humble experience in contributing to Forem codebase
tags: devbugsmash
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/upy6xlr8x85y6fbjf3j1.png
---

### How it started (background)

This experience is quite humble to be shared, but I decided to describe it as [the Bug Smash](https://dev.to/devteam/bug-smash-is-back-join-the-challenge-g41) is wrapping up, and it's an excellent chance to reflect on it.

As an engineer, I always liked to get deeper into how things are made. In this regard, open-source projects are the real opportunity for developers to learn and grow. That's why I really sympathize with open-source maintainers and contributors, follow their experiences and always try to join the army myself if I have a chance.

I like how the DEV platform ([Forem](https://www.forem.com/) behind the scenes now) grows and evolves. I'm a daily user of it, and I genuinely believe there's no better place for developers to share and get industry-specific knowledge these days. But in addition to the content and the community aspects, there's another huge and exciting part — the product itself and the open-sourced development of its codebase. In my opinion, it's done very well, and [the Forem's documentation](https://developers.forem.com/) is really great (I use it as inspiration for my own side project's documentation). As for [the team behind Forem](https://dev.to/devteam), these folks are the role models, and the team culture is so great (just take a look at a couple of conversations in their [issue tracker](https://github.com/forem/forem/issues)) and should be adopted in some similar way by all software companies in the world.

I'm not a [Ruby on Rails](https://rubyonrails.org/) or [Preact](https://preactjs.com/) person. But after reading the Forem docs, I got interested in both ecosystems. And the best way to dive deeper into the language or the framework is to write something in it. So I decided to roll out the Forem platform build locally and try to make something with it. I started from the second step ("What?") to incentivize the first one ("How?") for myself better.

### About the bug (foreground)

So I desperately wanted to do something useful for Forem. But at the same time, I wasn't feeling dangerous enough to start with something too complicated in the new technology. I had skimmed through DEV's UI and tried to find what I could contribute to in a useful and not very complex (for the first contribution) way.

I had found that a listing modal which opens when you click a listing title in the listings list doesn't close when you click a navigation link in its footer. I had created [the issue](https://github.com/forem/forem/issues/14459) and discussed it with Forem's front-end team members. The scope was defined, and I was glad to confirm that I'm ready to work on a fix.

### Easier said than done (how I smashed it)

It had taken me a while to get into the codebase and set up all the necessary local infrastructure to compile the local build. But I had managed to do it (surprisingly fast, though I made it in chunks, by nights, after my main job).

The most complex part for me was understanding how the server-side rendering works in conjunction with the Preact part, but the code was quite readable and clear, and documentation helped in understanding a lot. By the way, I had made [a small PR](https://github.com/forem/forem/pull/14505) for documentation (it always helps to feel more comfortable in a new place 😉).

So basically, after I made the puzzle of the Forem project work in my head and understood its mechanics, the fix wasn't this hard and took not too much time (everything around us is JavaScript in the end, you know). I tried to make it as simple as possible, as I always prefer, and keep it consistent with the current way of doing things. What helped additionally was [the suggestion](https://github.com/forem/forem/pull/14504#issuecomment-900133105) to add an integration test to the solution.

### Reflection and conclusion

I felt very cool working with new technologies and tools. It motivates me to grow, and I like the experience very much, especially when it's this practical and useful. I feel warmth when I think I made something thousands of developers from all over the world will use. That makes me look for another chance to make a contribution ([Hacktoberfest](https://hacktoberfest.digitalocean.com/) is coming, ya know? 😉). And both the Forem team and the codebase are great and welcoming, so I won't wait for a separate invitation as soon as I have another chance to jump in and code.