How to eliminate bugs and get your app increasingly stable

Anuj Chhabria
September 5, 2024
3 min read

Hey there! I chose this topic for my first-ever article because it’s something that hits close to home. As a SaaS co-founder and CTO, my team and I have faced our fair share of bugs and issues. The key to overcoming these challenges is persistence and establishing a set of best practices that are circulated internally on platforms like Notion. To our customers, rest assured 😉 and to my fellow coders, I feel your pain!

Here are my two cents on tackling these challenges:

Define & Document

As your SaaS team and product grow, explaining every aspect of your code to new team members becomes increasingly difficult. One way to mitigate this is through clear definitions and documentation. For example, in Classcard, an "event" is a single occurrence of a subject being taught for a specified duration, while a "class" is a group of such events. Documenting these definitions, both within the code and in a centralized internal knowledge base is invaluable.

Establish a Feedback Loop

A concept I learned from "The Lean Startup" by Eric Ries is the importance of a feedback loop. Don’t get caught up in building flashy features that eat into your development time. Instead, create a Minimum Viable Product (MVP) for your feature idea and release it to a select group of customers. Then, refine the feature based on their feedback. Trust me, feedback will pour in—so prioritize it wisely. I'm always open to discussions on this—feel free to reach out here!

A laptop screen with coding

Branch Your Code

Occasionally, you’ll be working on major "groundbreaking" features that seem easy to implement but are actually quite complex to release. This is where GitHub comes in! It allows you to create private repositories for free, and branches are a lifesaver. Always create a new branch for every feature, enhancement, or bug fix, regardless of size. Only merge to the main branch when you’re certain of the changes. Make it a practice to merge only after thorough testing and validation to avoid pushing out code that customers shouldn’t see.

Embrace Good Old Manual Testing

What is code but a set of instructions for a computer to automate processes? Many coding tasks can actually be planned on paper. Take a book and pen, jot down all potential use cases, and get cracking! Additionally, establish a habit of writing basic unit tests. Use a Continuous Integration (CI) tool like CircleCI to automate these tests when you push to GitHub. After all, you don't want your CRUD functions failing in production.

A boy sitting with a laptop and books on a couch

Use Multiple Environments

Our friends at DigitalOcean offer startups free credits through their Hatch Program, allowing us to test in multiple environments. These include local environments, a QA/UAT server, a staging server (closer to production), and finally, the production server itself.

Never let bugs get you down—they’re just part of the process. Embrace them, learn from them, and don’t be afraid to release your product early and often!

💻
Technology
Anuj Chhabria
Twitter

Up next