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
Discover more from Coursity
Subscribe to get the latest posts sent to your email.