Live data from Hacker News

Ask HN: How bad should the code be in a startup?

news.ycombinator.com

111–120 of 183 posts

Re: Ask HN: How bad should the code be in a startup?

#111
post #83

In my experience, "code quality" vs "features" is simply not a real tradeoff. Writing clean code with tests, function documentation, a good level of modularity, automated deployments... etc will save you time in the short term . It's pretty simple: 1. Writing quality code is not substantially slower in the first place, especially when you factor in debugging time. You just have to have the right habits from the get-g…

Can you suggest a way to understand and develop the right habits? Or Any good method to improve code quality at personal and team level? Would be really useful for my case.

For me Clean Code was a bit of an eye opener. I generally found following SOLID principles to be valuable.

It's however important to understand that principles are not unbreakable laws of the universe, but rather things that should guide you but that are also subject to questioning.

Re: Ask HN: How bad should the code be in a startup?

#112
post #83

In my experience, "code quality" vs "features" is simply not a real tradeoff. Writing clean code with tests, function documentation, a good level of modularity, automated deployments... etc will save you time in the short term . It's pretty simple: 1. Writing quality code is not substantially slower in the first place, especially when you factor in debugging time. You just have to have the right habits from the get-g…

What is good code. I prefer DDD

But there's no substitute for quick development and iterations than a simple monolith in 1 project and 1 person, if you know what you are doing ofc.

You'll get the disadvantages with this method as soon as someone joins the team.

Re: Ask HN: How bad should the code be in a startup?

#113

Earlier quoted context omitted.

Can you suggest a way to understand and develop the right habits? Or Any good method to improve code quality at personal and team level? Would be really useful for my case.

For me Clean Code was a bit of an eye opener. I generally found following SOLID principles to be valuable. It's however important to understand that principles are not unbreakable laws of the universe, but rather things that should guide you but that are also subject to questioning.

They are also principles for the second or third pass. Get it working (rough draft, brain storm) and then refactor.

Re: Ask HN: How bad should the code be in a startup?

#114
Here's the thing - you can spend forever making the code pretty. It would never end.

I would say writing the code "with care" simply depends on the initial team. There are plenty of startups that take the extra 20% or so time to build it right and with care that are successful.

I worked at one company with a wonderful code base for seven years. They're about to hit 100m ARR. We wrote tests, mostly used Java, and cared about building reusable components and a platform. I would say hitting 100m ARR in that timespan is good.

Re: Ask HN: How bad should the code be in a startup?

#116

Earlier quoted context omitted.

Can you suggest a way to understand and develop the right habits? Or Any good method to improve code quality at personal and team level? Would be really useful for my case.

I imagine you'll get comments here like "have good code hygiene" and "aim for good test coverage", which are not wrong. However, for me, what really stuck was learning directly from senior developers. Anecdotally, having at least one senior developer on a team dramatically changes the long-term prospects of a project, even if they are not the ones actually leading the project. I would be curious to hear other's exper…

> aim for good test coverage

From the beginning? Not. That's completely counterproductive.

The first thing you have to do is be sure that you are testing the correct thing. Only after it you write your tests down.

Specs come before tests, and on most problems you will need to write a lot of code before your get the specs down.

Re: Ask HN: How bad should the code be in a startup?

#117

Never forget that your startup customers aren't buying your code. They're paying for whatever the product does for them. They don't care if the code is good or bad, as long as the app does what they need it to do and does it well. So to answer your question: The code should be bad enough that it allows you to ship as fast as possible, but not so bad that the app doesn't work properly. This can be a shock if you've be…

"However, startups don't fail because the codebase is ugly, or convoluted, or not following best practices." Yes, they do. The obvious one is one senior developer who writes a bunch of trash code to get stuff done in a hurry. Later is asked to maintain it and add features. But it's no fun cause it's a pile of poo. New shiny attracts his attention and he moves on (cause, you know, he delivered at his current job!). Ne…

The software is not really doing what the customer wants if it does not work reliably. The company dies because their the product they sell does not do what their customer wants. If you buy a car, you care about the quality if the parts indirectly. No one wants a car that works 50% of time. Same goes for software. So yes, poor code can kill the company, because the product does not work.

"However, startups don't fail because the codebase is ugly, or convoluted, or not following best practices." Yes and no are both right I suppose, depending on the viewpoint.

Re: Ask HN: How bad should the code be in a startup?

#118

Never forget that your startup customers aren't buying your code. They're paying for whatever the product does for them. They don't care if the code is good or bad, as long as the app does what they need it to do and does it well. So to answer your question: The code should be bad enough that it allows you to ship as fast as possible, but not so bad that the app doesn't work properly. This can be a shock if you've be…

"However, startups don't fail because the codebase is ugly, or convoluted, or not following best practices." Yes, they do. The obvious one is one senior developer who writes a bunch of trash code to get stuff done in a hurry. Later is asked to maintain it and add features. But it's no fun cause it's a pile of poo. New shiny attracts his attention and he moves on (cause, you know, he delivered at his current job!). Ne…

Jeff Bezos seems to disagree with you. Ask people about the first 10 years of Amazon. Mark Zuckerberg also disagrees.

Re: Ask HN: How bad should the code be in a startup?

#119
post #93

Earlier quoted context omitted.

"However, startups don't fail because the codebase is ugly, or convoluted, or not following best practices." Yes, they do. The obvious one is one senior developer who writes a bunch of trash code to get stuff done in a hurry. Later is asked to maintain it and add features. But it's no fun cause it's a pile of poo. New shiny attracts his attention and he moves on (cause, you know, he delivered at his current job!). Ne…

Can you name a company that failed because of a bad codebase as the number one reason? I feel like people walk through hypotheticals like that, but I've not heard people say "Company X failed because of that scenario."

Friendster imploded during its growth stage due to either bad code or not enough spending on servers.
Post reply on HN