How that in any way compares to a full blown application-in-browser like eg Figma or an infrastructure product like Stripe or a household brand marketplace like Airbnb that have to cater to various user groups, iterate at breakneck speeds and keep a triple/quadruple 9 uptime is beyond me.
Nobody cares about your clean code
51–60 of 177 posts
Re: Nobody cares about your clean code
#52"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.
Re: Nobody cares about your clean code
#53This assumes that your app will grow indefinitely. What if we had more apps that were considered finished?
Re: Nobody cares about your clean code
#54Hidden value of clean code: Developer's sanity and willingnses to work on it.
Code has the 'Broken Windows' problem: if it's a pile of dirt, people will treat it like a pile of dirt, and not want to work on it. If it's clean, their their work will have legacy, they're more likely to value their own time and effort.
Re: Nobody cares about your clean code
#55I really don't get all the hate towards php, I'm about to put my old blog online and it's written in php. It's a cool language.
It’s because it makes no effort to prevent people doing insanely insecure things. Rails has a lot of safeguards for insecure things like using user input to update a record. PHP won’t even fix bugs due to backwards compatibility. They worked out their sql string escape function didn’t escape properly but instead of fixing it and telling everyone to check their code, they duplicated the function and prefixed the name…
PHP maintainers do fix bugs.
I don't use PHP right now, it's not my favorite language, but I hate when people are trying to excuse their own laziness and incompetence by saying “it’s all because of tool X”.
Re: Nobody cares about your clean code
#56yarp. we dont love clean code for the user, that should be obvious for anyone who has written a medium amount of code. we love clean code for the fact that some day, we are going to have to read our code, trace it for a bug... etc. You can feature bloat something up to a certain point and then.... kaboom goes the rewrite. Hopefully into clean code, but usually not since clean code is a culture and mindset, not a code…
This is like saying “no one cares about training for a marathon, they only care about running a faster time”
Well, sure, but up the WAY you run a faster time is to train. You need a technique and strategy to accomplish the actual goal.
Re: Nobody cares about your clean code
#57Re: Nobody cares about your clean code
#58Some places where clean code really matters:
- The personal project where, if you can't figure out how you did something, you'll quickly get bored and quit.
- The open source project that needs to onboard hundreds or thousands of developers across language barriers in order to successfully solve problems.
- The medium-to-large startup or enterprise that needs to maintain velocity on a product line.
- The small startup that never quite hit hyper growth and needs to retain developers.
- ... many more
If you're trying to get rich quick, or quickly iterate through many different, dissimilar ideas, then writing sloppy code is fine. I'd argue that that's _not_ most codebases (though perhaps it is in the entrepreneur community).
Re: Nobody cares about your clean code
#59Re: Nobody cares about your clean code
#60Messy codebases and bad architecture quadratically drive up the cost of development time. I've experienced this countless times for over 10 years, and it's endlessly frustrating.
The state of web has gotten so tirelessly messy, I had to write my own framework to return to the clean web architecture we once had. And my clients love it, even if they're not directly aware of it, because everything takes less time (and therefore less cost) to build.