We all made stupid decisions as developers. In my case, that's banking on the fact that "we can just migrate later". Sure that's a fair choice if you have a relatively small project, but rewriting a whole project with a small team while also maintaining it is going to be a royal pain in the a**
The Story...
Back when the pandemic just started, I applied to a startup with a mission that aligns to my values. My first task was to make a tournament/community platform mvp (minimum viable product) in around 2-3 months. Now that's not a lot of months for sure, but it's just an mvp so we chose the stack (Firebase + React) that will make us move fast and decided to just rewrite after the seed round.
Fast-forward into the future, the seed round was a success, and we implemented more features here and there. As the platform grew, we started to feel the limitations of being vendor locked into Firebase, so we decided to migrate into a stack that is more reasonable and easier to move. Our rewrite looks something similar to this:
- Firestore -> PostgreSQL hosted on AWS RDS, using Prisma as ORM
- Cloud Functions -> AWS Lambdas on an AWS API Gateway provisioned by AWS Cloudformation
- Firebase Auth -> Firebase Auth...
- Firebase Storage -> AWS S3
- Firebase Hosting -> Vercel
It took us 7 months of pain and agony, we were rewriting the code base while maintaining it at the same time. Fortunately, we were able to release it without a major disaster. But at what cost?... maybe a little bit of my sanity. The rewrite was hell and i do not wish to do it ever again. It certainly feels like it took several years of my lifespan
So what's the lesson here?
Do not commit to the idea of "just rewrite it later". Choose the right stack from the start, do progressive refactors and only rewrite when absolutely needed.
In the end... it wasn't all worth it because the company pivoted so hard and all engineers and designers were promoted to customer. I consider our team as friends and they're all gone now. I am a bit lucky because I have certain unrelated skills that the company still needs. This move from the company made me feel like a schizo that just took meds.
Self plug
The story ends there, but if you want to know more about me...
Hi gamers! I'm Jasper, a senior software engineer with more than 5 years of dev experience. I primarily code in TypeScript🤮, I know a bit of Rust, and I type on a Lily58
, a column staggered split keyboard.