The Best Code Is Code You Do Not Write

Veld Systems||7 min read

There is a metric that engineers never track but should: lines of code not written. Every line of code you write is a line that needs to be tested, maintained, debugged, documented, and eventually replaced. It is a liability on your balance sheet, not an asset. The best engineering teams we have worked with understand this intuitively. They ship more by writing less.

This is not a philosophy of laziness. It is a philosophy of leverage. And it is the single biggest differentiator between teams that ship products and teams that build codebases.

Every Line Is a Liability

Let us put actual numbers on this. Industry data suggests that the average cost to maintain a line of code over its lifetime is $15 to $30. That includes bug fixes, refactoring, security patches, dependency updates, and the cognitive overhead of understanding it when you need to change something nearby.

A feature that required 5,000 lines of custom code has a lifetime maintenance cost of $75,000 to $150,000. If that same feature could have been achieved with a 500 line integration to an existing service, you just saved $67,000 to $135,000 in long term costs. And you shipped it in days instead of months.

This is not theoretical. On every project we deliver through our full stack development practice, we track the ratio of custom code to integrated services. The projects with the best outcomes, fastest delivery, lowest maintenance cost, highest client satisfaction, consistently have the lowest custom code ratios.

The Build vs. Buy Calculation Most Teams Get Wrong

The build vs. buy decision is one of the most important judgment calls in software development, and most teams get it systematically wrong. They over index on the upfront cost of buying and under index on the ongoing cost of building.

Here is how the calculation usually goes: "That SaaS tool costs $500/month. We can build it ourselves." This is true. You can build it yourself. But the honest calculation looks like this.

Building it yourself means: 2 to 4 weeks of engineering time ($20,000 to $60,000), plus ongoing maintenance (8 to 16 hours per month, $2,000 to $5,000), plus bug fixes when edge cases emerge, plus security patches when vulnerabilities are discovered, plus the opportunity cost of what those engineers could have built instead.

Buying it means: $500/month, plus 2 to 4 hours of integration work.

Over two years, building costs $68,000 to $180,000. Buying costs $12,000 plus one afternoon. The math is not close.

Obviously, this calculation does not apply universally. Your core product, the thing that differentiates your business from every competitor, should be custom. The authentication system, the email delivery pipeline, the payment processing, the file storage, these should not. This distinction between core and context is the most important architectural decision you will make.

What to Build Custom

Build custom code for things that are core to your value proposition. If you are building a trading platform, the trading logic is custom. If you are building a marketplace, the matching algorithm is custom. If you are building an AI tool, the AI pipeline is custom.

On Traderly, the custom code was concentrated in the areas that mattered: the AI analysis engine, the trading strategy interface, the real time portfolio tracking. Everything else, authentication, database management, file storage, deployment, was handled by existing services. The result was a product that felt sophisticated but shipped in a fraction of the time a fully custom build would have required.

Here is the test we use: if a competitor could achieve the same result with an off the shelf solution, it is not your differentiator, and you should not be writing custom code for it.

What to Buy or Integrate

Buy solutions for anything that is necessary but not differentiating. This list is longer than most teams realize.

Authentication. Use Supabase Auth, Auth0, Clerk, or Firebase Auth. Do not write your own authentication system. We have audited custom auth implementations that had session fixation vulnerabilities, password reset flows that leaked user data, and token refresh logic that failed silently. Authentication is a solved problem. Solving it again is not engineering. It is hubris.

Payments. Use Stripe. There is no second choice for most startups. The amount of regulatory compliance, fraud detection, and edge case handling baked into Stripe would take a team of 10 engineers years to replicate. For $0.30 plus 2.9% per transaction, you get all of it.

Email. Use Resend, SendGrid, or Postmark. Deliverability alone is a full time job. Let someone else manage the IP reputation, the SPF/DKIM/DMARC configuration, the bounce handling, and the ISP relationships.

Search. If you need full text search, use Algolia, Typesense, or Meilisearch. PostgreSQL full text search handles basic cases, but once you need typo tolerance, faceting, and sub 50ms response times across millions of records, a dedicated search service pays for itself immediately.

Monitoring and error tracking. Use Sentry, Datadog, or LogRocket. Roll your own logging pipeline, and you will spend more time debugging your monitoring system than debugging your product.

The common thread: none of these are things users choose your product for. Nobody signs up for your SaaS because you have a particularly elegant password reset flow. They sign up for what your product does. Every hour spent reinventing solved problems is an hour stolen from building the thing that matters.

What to Skip Entirely

This is the category that requires the most discipline, and it is where the best teams separate themselves. Some features should not be built at all. Not bought. Not integrated. Skipped.

Admin dashboards before you need them. For the first 100 users, you can manage everything through database queries and a spreadsheet. An admin dashboard is a product in itself, and building it before you have paying users is premature.

Permission systems beyond basic roles. Start with "admin" and "user." That covers 95% of use cases for an early stage product. You do not need attribute based access control, tenant isolation, or custom permission trees until you are well past product market fit.

Analytics pipelines. Use a hosted analytics service. Google Analytics, Mixpanel, PostHog, whatever fits your needs. Do not build a custom event tracking pipeline, a data warehouse, and a reporting dashboard. You will spend months on infrastructure that gives you worse insights than a $0/month free tier of any analytics tool.

Notification systems. Use Knock, Novu, or a simple queue with a managed email service. A custom notification system with delivery tracking, preference management, batching, and multi channel support is a six month project masquerading as a "small feature."

We think about this often when doing consulting work with early stage teams. The features they plan to build in phase one often include three or four items that should not exist at all, at least not yet. Cutting them does not reduce the product's value. It focuses it.

The Discipline of Deletion

Writing code requires skill. Deleting code requires courage. And deciding not to write code in the first place requires wisdom.

The best engineers we have worked with share a trait: they are deeply skeptical of new code. When someone proposes a feature, their first question is not "how do we build this?" It is "do we need to build this?" And if the answer is yes, the follow up is "can we achieve this without writing code?"

This is not laziness. This is technical debt prevention in its purest form. Every line of code you avoid writing is a line that will never have a bug, never need a security patch, never confuse a future engineer, and never slow down your deployment pipeline.

We apply this principle aggressively in our own work. When evaluating whether to build custom software or use an existing SaaS solution, we always start from the assumption that less custom code is better, and then look for reasons to override that assumption. The reasons exist, but they are rarer than most teams think.

Measuring What Matters

If you want to adopt this philosophy, start measuring differently.

Stop celebrating how much code was written. Start celebrating how much value was delivered per line of code. A team that ships a feature in 200 lines by integrating an existing service has outperformed a team that ships the same feature in 5,000 lines of custom code. The first team delivered the same value with 96% less ongoing liability.

Stop measuring velocity by story points or tickets closed. Start measuring it by user outcomes changed. Did a user get a new capability this week? Did a workflow get faster? Did a pain point get resolved? These are the metrics that matter, and they are completely decoupled from how much code was written to achieve them.

The goal of software engineering is not to write software. It is to solve problems. Code is one tool for solving problems. It is an expensive, fragile, high maintenance tool that should be used sparingly and deliberately.

A Practical Framework

When any new feature or capability comes up, run it through this sequence.

First: can we skip it entirely? If removing it does not hurt the core user experience, skip it.

Second: can we solve it with configuration, not code? Many problems can be solved by configuring an existing tool differently.

Third: can we buy or integrate an existing solution? If someone has already built this and is selling it for less than the cost of your engineering time, buy it.

Fourth: can we build the simplest possible version? Not the most elegant. Not the most extensible. The simplest thing that works.

Only when you have exhausted options one through three should you arrive at option four. And when you do, build the minimum.

If you are building a product and want a team that ships value instead of code, get in touch. We will help you build less and deliver more.

Ready to Build?

Let us talk about your project

We take on 3-4 projects at a time. Get an honest assessment within 24 hours.