---
title: "Code is the easy part, or how we refactored half the business to fix a janky script"
url: https://daily.dev/posts/code-is-the-easy-part-or-how-we-refactored-half-the-business-to-fix-a-janky-script-ehd9lakxw
source_url: https://swizec.com/blog/code-is-the-easy-part-or-how-we-refactored-half-the-business-to-fix-a-janky-script
type: article
source: "swizec.com"
published: 2026-06-17T21:24:02.979Z
updated: 2026-06-17T21:25:09.746Z
tags: ["architecture"]
reading_time: 14
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Code is the easy part, or how we refactored half the business to fix a janky script

**[swizec.com](https://daily.dev/sources/swizec)** · 14 min read · 0 upvotes · 0 comments

## Summary

A startup engineering war story about refactoring a broken billing system at Plasmidsaurus as the company scaled from $20M to near $100M ARR. The core insight: the real problem wasn't the janky Python invoicing script but a misaligned data model. The fix required introducing 'billing entities' as a new abstraction, migrating from QuickBooks to Rillet, building self-service tools for users and finance, and rewriting the invoicing script with proper tests. The process took 6 months, involved 6+ people, required extensive user interviews and watching people work, and was shipped incrementally to avoid breaking a live system processing thousands of orders daily. Result: month-end invoicing dropped from a week-long ordeal to 2 days.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://swizec.com/blog/code-is-the-easy-part-or-how-we-refactored-half-the-business-to-fix-a-janky-script>

## Similar posts on daily.dev

- [Stripe Just Wants a Number](https://daily.dev/posts/stripe-just-wants-a-number-ujpbmth9e) · Lobsters · 1 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture)

[View this post on daily.dev](https://daily.dev/posts/code-is-the-easy-part-or-how-we-refactored-half-the-business-to-fix-a-janky-script-ehd9lakxw)
