











{"author":"Faiq Najib Al-Aziz","body":"\nThere was a moment where I stopped typing, leaned back in my chair, and realized: _\"This isn't about refactoring anymore.\"_\n\nI was debugging a bug in a GPS tracker system that had been running for years[^1]. The bug was simple, vehicle position reports weren't updating on the dashboard. But to fix it, I had to trace through four different files, two business logic layers tangled together, and one query written without an index. An hour later, the fix was two lines. Two lines.\n\nIt wasn't the bug that made me reconsider. It was **the time it took to find those two lines**. It felt like looking for a needle in a haystack, only to find it was in my own pocket the whole time hehe~\n\n_So anyway_, this isn't about a particular language or technical solution. I want to capture the **thinking process** behind a tech stack migration decision: when it makes sense, when it doesn't, and how to weigh the business side too. Technical discussions often turn into Language A vs Language B debates, even when that isn't the source of the problem.\n\n## What the System Looked Like\n\nThe GPS tracker project I was handling wasn't ~~exactly~~ small. The numbers were roughly:\n\n- **370+ API endpoints** serving various needs, from real-time tracking to report generation\n- **33 database entities** with complex relationships\n- **~194,000 lines of code** written over several years by multiple developers[^2]\n\nBut the numbers weren't really the problem. The line count looks big, but what actually gave me headaches were the **symptoms**:\n\n### 1. Features That Should Be Fast, Became Slow\n\nFeatures that used to ship in two days now took two weeks. Not because the developers were slow, but because every change had unexpected ripple effects. One new field in one entity could propagate to five different files.\n\nFrom a business perspective, this meant **the speed of delivering value to users was declining**. Features clients asked for took longer to arrive, and the competitive window was shrinking.\n\n### 2. Bugs That Only Appeared in Production\n\n_If it works locally but errors in production, where do I even start looking?_ (A question that's kept me up late scrolling Stack Overflow more times than I'd like to admit hahaha)\n\nThis is a classic symptom of a tightly coupled system. Code that runs in one environment doesn't behave the same in another because of unexpected side effects. Debugging wasn't about logic, it was about _why_ the production context differed from expectations. Once I even had to remote into the production server at 2 AM just to check one environment variable that turned out to... simply not be set yet. Facepalm.\n\nFrom a business perspective, this meant **no certainty**. A client could get a wrong report in the morning, and nobody would know why until noon.\n\n### 3. New Developer Onboarding Took Longer\n\nBack then, a new developer could start contributing within a week. At that point, it took almost a month before they were comfortable coding without fear of breaking something. Not because they lacked skill, but because the codebase required a lot of **context** to understand. I still remember the expression on one new developer's face when they first opened the codebase. It was... well, like someone who just woke up and was immediately asked to run a marathon hehe~\n\nFrom a business perspective, this meant **the cost of adding team capacity was increasing**. Every new developer needed more time before becoming productive.\n\n### 4. Fear With Every Deploy\n\nEvery time we were about to deploy, there was this feeling of \"hope nothing breaks this time.\" Not because there was no testing, but because the existing tests didn't cover all edge cases. And in a tightly coupled system, one small change could have a domino effect. Like pulling one thread from a sweater and watching everything else unravel. Friday afternoon deploys? _God forbid_, don't even think about it hahaha.\n\nFrom a business perspective, this meant **the team became conservative**. Features that were actually safe to ship got delayed because of fear of side effects. Innovation slowed down not because of a lack of ideas, but because of fear of breaking things.\n\n## The Questions I Asked Myself\n\nAfter seeing those symptoms, I started asking myself: **could the problem be solved without migrating?**\n\n### \"Is the Problem in the Tool or in How We Use It?\"\n\nThis is the first and most important question. If the problem is in how we write code, for example, no layering, no testing, no code review, then migrating tech stacks won't solve anything. We'd just be moving the problem to a new tool.\n\nIn this GPS tracker case, the answer was: **both**. The way code was written did need improvement, but the language and framework being used also had limitations that made writing clean code harder than it should be. A dynamically typed language[^3] without runtime enforcement meant type-related bugs surfaced in production, not during development. And type-related bugs in production... ugh, every error notification made my heart skip a beat hehe.\n\n### \"If We Just Refactor, Would That Be Enough?\"\n\nThe second question: if we invested time in cleaning up the architecture on the existing tech stack, would the results be worth it?\n\nIn this case, my rough estimate was that refactoring 370+ endpoints with proper architecture in PHP would take almost as long as migrating to a new stack. The difference: after refactoring in PHP, we'd still be stuck with some fundamental limitations (type safety, concurrency, deployment complexity). Migration would give us new capabilities.\n\nBut this was **my case**, right. It doesn't mean refactoring is always the wrong choice. If the system is smaller, or if the stack's limitations aren't too constraining, refactoring is a far wiser choice. Don't read this and immediately start migrating your whole system without thinking it through. You don't want to end up like one horror story I once heard: two years of migration work, only to end up reverting to the old system hahaha.\n\n### \"What's the Cost of Doing Nothing?\"\n\nThis is the question that often gets missed. We often calculate the cost of migration, time, money, risk, but rarely calculate **the cost of standing still**.\n\nIn the GPS tracker case:\n\n- Features shipping slower = clients might switch to competitors\n- Bugs appearing in production = client trust decreases\n- Longer onboarding = effective recruitment costs increase\n- Fear during deploys = innovation slows down\n\nIf the total cost of inaction over one year **exceeds** the estimated cost of migration, from a business perspective, the decision is pretty clear.\n\n### \"Can Our Team Handle the Migration?\"\n\nTech stack migration requires new skills. The team needs to learn a stack they might not be familiar with. There's ramp-up time. Mistakes will happen.\n\nThe question isn't \"can we?\" but \"do we have the **room** to do it?\" If the team is already overwhelmed with deadlines and bug fixes, migration will only add burden. But if there's a window, whether between projects, or when capacity is sufficient, that's the right time to start.\n\nIn my case, we didn't migrate everything at once. We started with one module, one endpoint at a time, while still running business as usual. _Slow and steady wins the race_, as my colleague put it hehe. The technical details are in [my separate migration notes](/en/writing/2026/legacy-php-to-go-migration/).\n\n### \"How Do We Know the Migration Succeeded?\"\n\nIf we don't have a definition of \"success,\" we can't know when to stop. For me, the success criteria were:\n\n1. **New features can be shipped faster** than before\n2. **Production bugs decrease measurably**\n3. **New developers can onboard faster**\n4. **Deploys are no longer feared**\n\nIf after migration, these numbers improve, then the migration succeeded. If not, then we need to reevaluate.\n\n## A Thinking Framework: It's Not About the Language, It's About Momentum\n\nThose questions led me to a simple framework: **three conditions** that have to be met before migration makes sense.\n\n### 1. The Problem Is Structural, Not a Skill Gap\n\nIf the problem is just \"we don't know how to use this tool well\", then the solution is learning, not switching. Migration only makes sense when **the system architecture itself** is the bottleneck, not the team's capability.\n\n### 2. The Cost of Inaction Is Measured and Real\n\nNot a feeling of \"it seems like it's getting slower\", but **data**. Measure how long features took before and now, the monthly trend of production bugs, and how many weeks onboarding a new developer takes. If the data isn't there, collect it first. Don't migrate based on assumptions.\n\n### 3. The Team Has the Capacity to Execute\n\nMigration requires time, energy, and focus. If the team is in peak season, or if there's no budget for the learning curve, it's better to wait. A migration forced at the wrong time can be more damaging than a legacy codebase.\n\n---\n\nIf all three are met, **migration makes sense**. If even one isn't, better to refactor or wait until the conditions are right.\n\n## The Decision and What Happened\n\nI decided to migrate. Not a decision made overnight, but a process of several weeks after gathering data and discussing with the team. There was a moment where I wavered, honestly, _\"Do we really need to migrate? Can't we just refactor?\"_ But after looking at the data, the decision was made.\n\nThe result? _Alhamdulillah_. Features that used to take two weeks could now be shipped in days. Production bugs decreased. New developer onboarding was faster. And most importantly: deploys were no longer feared. Now even Friday afternoon deploys are... well, still a little nerve-wracking, but nowhere near as bad as before hahaha.\n\nI cover the per-module approach, patterns, and technical lessons in a [separate write-up](/en/writing/2026/legacy-php-to-go-migration/).\n\n## Lessons Learned\n\n### 1. Collect Data First, Decide Later\n\nDon't migrate because \"it feels like we need to\" or because a new tech stack is trending[^4]. Collect the data: how long new features take to ship, how often bugs appear, and how long onboarding takes. Evidence makes the decision easier to explain to stakeholders. Telling your boss _\"we should migrate because Go is cool\"_ won't work. But _\"features that used to take 2 days now take 2 weeks, here's the data\"_? Now that's a conversation hehe.\n\n### 2. Migration Is a Business Decision, Not Just a Technical One\n\nMigration discussions often get stuck on \"language A is better than language B.\" But the question that should be asked is: \"does the current tech stack still allow us to deliver value at the speed we need?\" If the answer is no, then it's time to talk migration. Because the end goal is to build something useful for users, not to win arguments on developer forums hahaha.\n\n### 3. Refactoring vs Migration Isn't Binary\n\nIt's not a choice between \"refactor everything\" or \"migrate everything.\" Sometimes the answer is refactor first, then migrate incrementally. Sometimes refactoring alone is enough. Context and system scale determine the answer; technical decisions are rarely black and white hehe~\n\n### 4. Also Calculate the Cost of Doing Nothing\n\nWe often focus on \"how much does migration cost\" and forget to ask \"how much does it cost if we don't migrate?\" Sometimes, the cost of standing still is far more expensive in the long run. Like the saying goes, better to visit the dentist early than to tough it out until it's serious. Is that actually a saying? Well, you get the point hahaha.\n\n## Closing Thoughts\n\nA tech stack migration decision is personal: it depends on context, team, timeline, and other things. No framework fits every situation, so this isn't a recipe either. My one takeaway: ask the right questions, gather the data, and don't migrate just because of hype.\n\nI hope these notes are useful if you're weighing a migration. If you'd like to chat about a similar dilemma, [get in touch](/en/contact/) or check out my [services](/en/services/).\n\n[^1]: A GPS tracker system that had been running for several years, with various feature additions and patches layered on top over time.\n\n[^2]: Many developers had come and gone over the years, each with their own coding style. So the result was... well, a mixed bag hehe.\n\n[^3]: Not saying dynamically typed languages are bad, of course. It's just that for certain cases, static typing really helps a lot.\n\n[^4]: Tech FOMO (_Fear of Missing Out_) is real. But don't let technical decisions be driven by fear of being left behind on the latest trend.\n\n---\n\n_Tags: [notes](/en/tags/notes/) · [architecture](/en/tags/architecture/) · [migration](/en/tags/migration/)_\n","body_clean":"There was a moment where I stopped typing, leaned back in my chair, and realized: \u0026ldquo;This isn\u0026rsquo;t about refactoring anymore.\u0026rdquo;\nI was debugging a bug in a GPS tracker system that had been running for years1. The bug was simple, vehicle position reports weren\u0026rsquo;t updating on the dashboard. But to fix it, I had to trace through four different files, two business logic layers tangled together, and one query written without an index. An hour later, the fix was two lines. Two lines.\nIt wasn\u0026rsquo;t the bug that made me reconsider. It was the time it took to find those two lines. It felt like looking for a needle in a haystack, only to find it was in my own pocket the whole time hehe~\nSo anyway, this isn\u0026rsquo;t about a particular language or technical solution. I want to capture the thinking process behind a tech stack migration decision: when it makes sense, when it doesn\u0026rsquo;t, and how to weigh the business side too. Technical discussions often turn into Language A vs Language B debates, even when that isn\u0026rsquo;t the source of the problem.\nWhat the System Looked Like #The GPS tracker project I was handling wasn\u0026rsquo;t exactly small. The numbers were roughly:\n370+ API endpoints serving various needs, from real-time tracking to report generation 33 database entities with complex relationships ~194,000 lines of code written over several years by multiple developers2 But the numbers weren\u0026rsquo;t really the problem. The line count looks big, but what actually gave me headaches were the symptoms:\n1. Features That Should Be Fast, Became Slow #Features that used to ship in two days now took two weeks. Not because the developers were slow, but because every change had unexpected ripple effects. One new field in one entity could propagate to five different files.\nFrom a business perspective, this meant the speed of delivering value to users was declining. Features clients asked for took longer to arrive, and the competitive window was shrinking.\n2. Bugs That Only Appeared in Production #If it works locally but errors in production, where do I even start looking? (A question that\u0026rsquo;s kept me up late scrolling Stack Overflow more times than I\u0026rsquo;d like to admit hahaha)\nThis is a classic symptom of a tightly coupled system. Code that runs in one environment doesn\u0026rsquo;t behave the same in another because of unexpected side effects. Debugging wasn\u0026rsquo;t about logic, it was about why the production context differed from expectations. Once I even had to remote into the production server at 2 AM just to check one environment variable that turned out to\u0026hellip; simply not be set yet. Facepalm.\nFrom a business perspective, this meant no certainty. A client could get a wrong report in the morning, and nobody would know why until noon.\n3. New Developer Onboarding Took Longer #Back then, a new developer could start contributing within a week. At that point, it took almost a month before they were comfortable coding without fear of breaking something. Not because they lacked skill, but because the codebase required a lot of context to understand. I still remember the expression on one new developer\u0026rsquo;s face when they first opened the codebase. It was\u0026hellip; well, like someone who just woke up and was immediately asked to run a marathon hehe~\nFrom a business perspective, this meant the cost of adding team capacity was increasing. Every new developer needed more time before becoming productive.\n4. Fear With Every Deploy #Every time we were about to deploy, there was this feeling of \u0026ldquo;hope nothing breaks this time.\u0026rdquo; Not because there was no testing, but because the existing tests didn\u0026rsquo;t cover all edge cases. And in a tightly coupled system, one small change could have a domino effect. Like pulling one thread from a sweater and watching everything else unravel. Friday afternoon deploys? God forbid, don\u0026rsquo;t even think about it hahaha.\nFrom a business perspective, this meant the team became conservative. Features that were actually safe to ship got delayed because of fear of side effects. Innovation slowed down not because of a lack of ideas, but because of fear of breaking things.\nThe Questions I Asked Myself #After seeing those symptoms, I started asking myself: could the problem be solved without migrating?\n\u0026ldquo;Is the Problem in the Tool or in How We Use It?\u0026rdquo; #This is the first and most important question. If the problem is in how we write code, for example, no layering, no testing, no code review, then migrating tech stacks won\u0026rsquo;t solve anything. We\u0026rsquo;d just be moving the problem to a new tool.\nIn this GPS tracker case, the answer was: both. The way code was written did need improvement, but the language and framework being used also had limitations that made writing clean code harder than it should be. A dynamically typed language3 without runtime enforcement meant type-related bugs surfaced in production, not during development. And type-related bugs in production\u0026hellip; ugh, every error notification made my heart skip a beat hehe.\n\u0026ldquo;If We Just Refactor, Would That Be Enough?\u0026rdquo; #The second question: if we invested time in cleaning up the architecture on the existing tech stack, would the results be worth it?\nIn this case, my rough estimate was that refactoring 370+ endpoints with proper architecture in PHP would take almost as long as migrating to a new stack. The difference: after refactoring in PHP, we\u0026rsquo;d still be stuck with some fundamental limitations (type safety, concurrency, deployment complexity). Migration would give us new capabilities.\nBut this was my case, right. It doesn\u0026rsquo;t mean refactoring is always the wrong choice. If the system is smaller, or if the stack\u0026rsquo;s limitations aren\u0026rsquo;t too constraining, refactoring is a far wiser choice. Don\u0026rsquo;t read this and immediately start migrating your whole system without thinking it through. You don\u0026rsquo;t want to end up like one horror story I once heard: two years of migration work, only to end up reverting to the old system hahaha.\n\u0026ldquo;What\u0026rsquo;s the Cost of Doing Nothing?\u0026rdquo; #This is the question that often gets missed. We often calculate the cost of migration, time, money, risk, but rarely calculate the cost of standing still.\nIn the GPS tracker case:\nFeatures shipping slower = clients might switch to competitors Bugs appearing in production = client trust decreases Longer onboarding = effective recruitment costs increase Fear during deploys = innovation slows down If the total cost of inaction over one year exceeds the estimated cost of migration, from a business perspective, the decision is pretty clear.\n\u0026ldquo;Can Our Team Handle the Migration?\u0026rdquo; #Tech stack migration requires new skills. The team needs to learn a stack they might not be familiar with. There\u0026rsquo;s ramp-up time. Mistakes will happen.\nThe question isn\u0026rsquo;t \u0026ldquo;can we?\u0026rdquo; but \u0026ldquo;do we have the room to do it?\u0026rdquo; If the team is already overwhelmed with deadlines and bug fixes, migration will only add burden. But if there\u0026rsquo;s a window, whether between projects, or when capacity is sufficient, that\u0026rsquo;s the right time to start.\nIn my case, we didn\u0026rsquo;t migrate everything at once. We started with one module, one endpoint at a time, while still running business as usual. Slow and steady wins the race, as my colleague put it hehe. The technical details are in my separate migration notes.\n\u0026ldquo;How Do We Know the Migration Succeeded?\u0026rdquo; #If we don\u0026rsquo;t have a definition of \u0026ldquo;success,\u0026rdquo; we can\u0026rsquo;t know when to stop. For me, the success criteria were:\nNew features can be shipped faster than before Production bugs decrease measurably New developers can onboard faster Deploys are no longer feared If after migration, these numbers improve, then the migration succeeded. If not, then we need to reevaluate.\nA Thinking Framework: It\u0026rsquo;s Not About the Language, It\u0026rsquo;s About Momentum #Those questions led me to a simple framework: three conditions that have to be met before migration makes sense.\n1. The Problem Is Structural, Not a Skill Gap #If the problem is just \u0026ldquo;we don\u0026rsquo;t know how to use this tool well\u0026rdquo;, then the solution is learning, not switching. Migration only makes sense when the system architecture itself is the bottleneck, not the team\u0026rsquo;s capability.\n2. The Cost of Inaction Is Measured and Real #Not a feeling of \u0026ldquo;it seems like it\u0026rsquo;s getting slower\u0026rdquo;, but data. Measure how long features took before and now, the monthly trend of production bugs, and how many weeks onboarding a new developer takes. If the data isn\u0026rsquo;t there, collect it first. Don\u0026rsquo;t migrate based on assumptions.\n3. The Team Has the Capacity to Execute #Migration requires time, energy, and focus. If the team is in peak season, or if there\u0026rsquo;s no budget for the learning curve, it\u0026rsquo;s better to wait. A migration forced at the wrong time can be more damaging than a legacy codebase.\nIf all three are met, migration makes sense. If even one isn\u0026rsquo;t, better to refactor or wait until the conditions are right.\nThe Decision and What Happened #I decided to migrate. Not a decision made overnight, but a process of several weeks after gathering data and discussing with the team. There was a moment where I wavered, honestly, \u0026ldquo;Do we really need to migrate? Can\u0026rsquo;t we just refactor?\u0026rdquo; But after looking at the data, the decision was made.\nThe result? Alhamdulillah. Features that used to take two weeks could now be shipped in days. Production bugs decreased. New developer onboarding was faster. And most importantly: deploys were no longer feared. Now even Friday afternoon deploys are\u0026hellip; well, still a little nerve-wracking, but nowhere near as bad as before hahaha.\nI cover the per-module approach, patterns, and technical lessons in a separate write-up.\nLessons Learned #1. Collect Data First, Decide Later #Don\u0026rsquo;t migrate because \u0026ldquo;it feels like we need to\u0026rdquo; or because a new tech stack is trending4. Collect the data: how long new features take to ship, how often bugs appear, and how long onboarding takes. Evidence makes the decision easier to explain to stakeholders. Telling your boss \u0026ldquo;we should migrate because Go is cool\u0026rdquo; won\u0026rsquo;t work. But \u0026ldquo;features that used to take 2 days now take 2 weeks, here\u0026rsquo;s the data\u0026rdquo;? Now that\u0026rsquo;s a conversation hehe.\n2. Migration Is a Business Decision, Not Just a Technical One #Migration discussions often get stuck on \u0026ldquo;language A is better than language B.\u0026rdquo; But the question that should be asked is: \u0026ldquo;does the current tech stack still allow us to deliver value at the speed we need?\u0026rdquo; If the answer is no, then it\u0026rsquo;s time to talk migration. Because the end goal is to build something useful for users, not to win arguments on developer forums hahaha.\n3. Refactoring vs Migration Isn\u0026rsquo;t Binary #It\u0026rsquo;s not a choice between \u0026ldquo;refactor everything\u0026rdquo; or \u0026ldquo;migrate everything.\u0026rdquo; Sometimes the answer is refactor first, then migrate incrementally. Sometimes refactoring alone is enough. Context and system scale determine the answer; technical decisions are rarely black and white hehe~\n4. Also Calculate the Cost of Doing Nothing #We often focus on \u0026ldquo;how much does migration cost\u0026rdquo; and forget to ask \u0026ldquo;how much does it cost if we don\u0026rsquo;t migrate?\u0026rdquo; Sometimes, the cost of standing still is far more expensive in the long run. Like the saying goes, better to visit the dentist early than to tough it out until it\u0026rsquo;s serious. Is that actually a saying? Well, you get the point hahaha.\nClosing Thoughts #A tech stack migration decision is personal: it depends on context, team, timeline, and other things. No framework fits every situation, so this isn\u0026rsquo;t a recipe either. My one takeaway: ask the right questions, gather the data, and don\u0026rsquo;t migrate just because of hype.\nI hope these notes are useful if you\u0026rsquo;re weighing a migration. If you\u0026rsquo;d like to chat about a similar dilemma, get in touch or check out my services.\nTags: notes · architecture · migration\nA GPS tracker system that had been running for several years, with various feature additions and patches layered on top over time.\u0026#160;\u0026#x21a9;\u0026#xfe0e;\nMany developers had come and gone over the years, each with their own coding style. So the result was\u0026hellip; well, a mixed bag hehe.\u0026#160;\u0026#x21a9;\u0026#xfe0e;\nNot saying dynamically typed languages are bad, of course. It\u0026rsquo;s just that for certain cases, static typing really helps a lot.\u0026#160;\u0026#x21a9;\u0026#xfe0e;\nTech FOMO (Fear of Missing Out) is real. But don\u0026rsquo;t let technical decisions be driven by fear of being left behind on the latest trend.\u0026#160;\u0026#x21a9;\u0026#xfe0e;\n","canonical":"https://najib.id/en/writing/2026/tech-stack-migration-decision/","description":"My notes on when an old tech stack needs migrating, when refactoring is enough, and how to read the signals from the business side.","language":"en","lastmod":"2026-11-11T23:31:00Z","publishedAt":"2026-04-10T00:00:00Z","readingTime":10,"section":"writing","series":null,"tags":["notes","architecture","migration"],"title":"Decision Journal: When It's Time to Migrate Your Tech Stack","type":"writing","url":"https://najib.id/en/writing/2026/tech-stack-migration-decision/","wordCount":2051}
