Live data from Hacker News

Nobody cares about your clean code

felipecsl.com

31–40 of 177 posts

Re: Nobody cares about your clean code

#32

"throw the first one away" When I'm prototyping or hacking something together, I don't write tests, I don't comment/document much, I use lots of shitty variable/type names, lots of commented out code, debugging printfs, not much organization of files (often one large file). The prototype software is write-once, read-maybe. Maybe I'll want to see what I did down the road, but more likely I'll be shortly rewriting what…

When I'm prototyping or hacking something together, it eventually becomes production. I cannot relate to people who make prototypes to throw away, I've never done it, and I don't know why I'd do it. Due to that, I write my first line of code as if it's going to be on production forever, because it will.

>I cannot relate to people who make prototypes to throw away, I've never done it, and I don't know why I'd do it.

I did it a lot through university. If you have no experience tackling a certain type of problem, your perception of it tends to change significantly as you build the solution and become familiar with the problem space. It makes sense to throw away what you've written, because most of it was based on assumptions that were wrong.

Re: Nobody cares about your clean code

#34
This is a false equivalency. Pieter does not run a hypergrowth startup. His businesses are completely different to AirBnB and Stripe.

He does this because he's the only person who works on the codebase and because it generates a lot of attention due to how polarizing this choice is.

I'd also argue that messy code is the product of hypergrowth, rather than messy code being required for hypergrowth. Purposefully writing shit code because you're "moving fast and breaking things" seems like a dumb idea.

Re: Nobody cares about your clean code

#37
post #11

Weird post. The main insight is easily captured by the phrase "technical debt is a resource, not a vice". It also disregards that developers who care about clean code do exist, such that the title becomes merely metaphorical, and is more accurately rendered as "users don't care about clean code". Except that they do, they just don't know it. Time to new features and time to bug fixes (both of which users do care abou…

Money is a resource too, but rock stars tend to turn it into a vice.

Re: Nobody cares about your clean code

#38

The fatal flaw of this article is assuming that having a single PHP file implies ugly code, or at least uglier than the average codebase. I would, in fact, guess that its code is much cleaner than the average Fullstack Javascript app. If you're capable of writing a full, functional website in one PHP file, you know what every line of code does, you have only what you need and the ways to factor your code become more…

If learning a couple of basic tools like an ORM and JS build tools is too much of a barrier, you probably shouldn’t be let anywhere near a database with real users data in it.

PHP is too easy to get started with and let’s you do some truely horrific things trivially.

Re: Nobody cares about your clean code

#39
post #12

I think it's ironic that the author claims that clean code is....... Package your code down into small, atomic and reusable units Follow the single responsibility principle Use frameworks and libraries to avoid reinventing the wheel Whatever language you pick, don’t pick PHP These are best practices. It is possible to follow every one of those rules and still have a pile of broken, insecure, garbage code. Likewise yo…

Given the drift of the article, as signalled by its title, I think this precis of 'clean code' was being presented sardonically - particularly that last point. As you point out, you can nominally follow all these rules and still not squeak.
Post reply on HN