Don’t “Trust” GitHub Code Just Because It’s Got Lots Of Stars

Rmag Breaking News

I was reviewing data structures and algorithms for interview prep. So I went on GitHub and find this organization TheAlgorithms and its repo collecting data structures and algorithms in many different languages. It was a treasure for sure, but I also find some code that looks really terrible to even a amateur like me: bad function naming, confusing class organization and some other heavy code smells. Although it was some good material for a foundation to modify with and it could be regarded as some OK refactoring practices, it was a bit annoying to refactor the code that was kinda supposed to be polished.

The message of this story is that you should not take code from GitHub as good, finished, polished code, especially when the code is from (below are my hypothesis):

“Hot” repos that got a lot of stars, not necessarily because it is widely used but because it is a “resource collection” and people just “wishlist” it by starring (e.g. the “awesome” series of repos).
Non-production code base or code base for educational purposes

Leave a Reply

Your email address will not be published. Required fields are marked *