Using workarounds without creating a mess

Sometimes a workaround is unavoidable, but how can you avoid them from piling up technical debt?

Joel Clermont
Joel Clermont

In a prior tip, I showed multiple workarounds I needed to implement to cope with some messy JSON from a third-party API.

In a perfect world, I'd work with the API vendor and get them to fix the issue on their end. In this case, the vendor was open to fixing it, but it was clear it wasn't going to happen in time for our feature launch.

So instead, I implemented the workaround, but also did a few extra things to make sure I maintained the overall quality of my codebase.

  1. I added a detailed comment to both workarounds explaining why this was being done.
  2. I tested that my workarounds wouldn't break if they fixed the issue without informing me.
  3. I created a new issue to follow up with the vendor post-launch and coordinate a fix.

With all that in place, I felt pretty good about the workaround.

Here to help,


P.S. If you want your Laravel apps to feel more "battle ready", check out this book from Ash Allen, and help support our efforts to publish these tips as well.

Toss a coin in the jar if you found this helpful.
Want a tip like this in your inbox every weekday? Sign up below 👇🏼

Level up your Laravel skills!

Each 2-minute email has real-world advice you can use.