The WRONG way to learn a new language...
If you want to learn Ruby, do yourself a favor and research some of the syntax first.
As many of you may know, October 1st kicks off the yearly celebration of Hacktoberfest. It’s a time of learning, contributing, and free t-shirts that brings the whole programming community together.
To look for some good repositories to contribute to, I started scrolling through my pages of stars on GitHub. That way I would be working with something I have used, so I’ll have better insight into what the project needs and how it works.
I stumbled upon this neat one called Repository Hunter that I hadn’t looked at in months, and immediately saw some bugs that could use fixing:
The absolutely positioned sidebar elements have some nasty side effects on untested screen sizes. Having worked extensively with responsive design in the past, I thought I could just hop right in and make a simple tweak.
But let’s be real, has the fix ever just been a simple tweak?
One of the gems the project depended on was curb, which is notoriously spastic on Windows. I didn’t want to switch over to my Linux box or develop in a VM, so I decided to do what any sane developer would: rewrite the third party lib that used curb to no longer require it, when I’ve never even read Ruby code before.
I eventually got the library working without curb, and the convoluted process is all documented in the official PR on GitHub Stats, which was required by GitHub Charts, which was required by the project I actually wanted to work with.
It only cost me 2 days of frustration and a little bit of my sanity. After all that, I was able to actually get back to working on the project I set out to change.
Except in the meantime I found another project, Lettercrap, that looked like it could use some love. So I took a detour and gave it some love, just to find out that the repository doesn’t count towards Hacktoberfest.
Anyways, I required my fork of the gem in the project and encountered an error: undefined method 'svg' for #<GitHubChart::…
It took me several hours of confusion before I realized I had switched the gem version from the old 1.1.0 to v3.1.1, so there was probably a definition mismatch. Looking through the branch comparison revealed the method was changed from from .svg
to .render(:svg)
. After I made the change, I was again greeted by the website’s screen:
The layout is more screwed up than the current online version, but now the actual fixing should just be a matter of grunt work. In my experience, nearly any bug can be squashed once it is discovered and cornered.
I hope this helped portray the frustrations encountered in the daily life of a developer well. I’ll leave you with a relevant meme, a personal favorite of mine that I’ve been holding on to for a long time:
See you again later this week, once I can finish up one or two of the other editions I’ve been editing for several days. Subscribe to get it in your inbox on each release!