DEV Community

Cover image for I smashed a bug and I liked it
Fyodor
Fyodor

Posted on

I smashed a bug and I liked it

How it started (background)

This experience is quite humble to be shared, but I decided to describe it as the Bug Smash 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 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 is really great (I use it as inspiration for my own side project's documentation). As for the team behind Forem, 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) and should be adopted in some similar way by all software companies in the world.

I'm not a Ruby on Rails or Preact 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 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 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 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 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.

Top comments (2)

Collapse
 
fidopoet profile image
fidopoet

This has been a nasty smash,
Fido's known for smashing bugs!
He is using fancy programs
And his hounds to find their tracks!

Collapse
 
fyodorio profile image
Fyodor

🤦‍♂️😬😄