At work, the vast majority of programmers make use of existing code libraries and frameworks to build quality products and experiences for users.
Using battle tested and peer reviewed code is wise choice. However their are times when you can’t use existing solutions, therefore you’ll need to roll your own custom code solution.
In this post, I’ll briefly cover when you don’t need to create your own solution and some scenarios where you’ll need to build your own. Lastly at the end of this post, I’ll share a list of my favorite reverse engineering resources for some of the most popular code frameworks and libraries that I’ve found over the years.
You Probably Don’t need to Reinvent the Wheel
I would venture to say that most of the time on the web, you don’t need to recreate your own web framework, especially for stuff like authentication or cryptography solution among many other things. Chances are if you need to do something someone has already solved the problem and published a solution on the web on GitHub or npm.
When you probably need to reinvent the wheel.
When your working in a technologically constrained environment you often can’t use an “off the self “ code solution. For example, let’s say you’re building a web application for a tv or old smartphones, which have very low compute power and memory available compared to the average modern laptop or smartphone.
Real World Scenario 1
At first while your working on your new project in this new constrained environment, you probably won’t realize you need to roll your own custom solution until you deploy your code and see that either performance of the application is bad or the code simply doesn’t work. Maybe after some debugging of the errors you are getting from your code, you realize that some of the functions or methods that the library is using don’t exist in the runtime of the environment you’re using. Maybe the code works, but its too slow. At first, it may disappointing because you really wanted to take advantage of the code style and abstractions that library had to offer. This scenario actually happened to engineers at Netflix when they tried using React for the UI library. Ultimately they had to reverse engineer and create a stripped down, heavily modified version of React. This involved diving into the React libraries internals and figuring out how it worked.
Real World Scenario 2
Reverse Engineering for Learning Opportunities
A great way to master your tools is to understand how they work under the hood or another way to put it: figuring out and understanding what the tool is and isn’t solving for you.
Often times a library or framework may not have all the features you need, so you may need to make a work around and dig into the libraries source code itself. Fortunately, there’s lots of open source code on the web and resources lots of others have shared for almost any technology you are using. And even if their isn’t a solution, there’s of projects you can grab inspiration from. For example some people have published mini versions of libraries and frameworks distilling down the core ideas to help you better understand how the larger project works:
These are some resource I like: