Live data from Hacker News

Nobody cares about your clean code

felipecsl.com

61–70 of 177 posts

Re: Nobody cares about your clean code

#61

"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.

When I was working on this https://codaris.github.io/UnderDeskBike/ I honestly didn't know if what I wanted to do was even possible at many layers. I didn't know how to do Bluetooth. I knew nothing.

It's not worth doing things "the right way" right off the bat because you might not know what that is. My first version was literally a linear file of statements and console output.

Once I got something working and understood the problem space then I could back and fix it up. The final code looks like nothing like the original prototype although at no point did I actually throw it away -- I just transformed it heavily -- but the theory is the same. It started as a console app even though the final product was not one.

Re: Nobody cares about your clean code

#62
post #22

Remoteok.io is a refreshing **ck you to all the over-engineered barely-more-than-static sites rigged-up with the latest version React hook form packaged up in Docker ready to be deployed on Kubernetes. People, we need a movement which embodies this sentiment.

A "eat more blueberries diet" will always be more popular than a "eat less" one b/c with the form you'll have farmers, super markets, etc behind you. With the latter, the message will be don't go to the store and buy something - not 'sale sustaining' (yes that was an awesome pun).

Re: Nobody cares about your clean code

#63
"Users couldn't care less about the programming language you used", and yet the author is so protective of his work that I can't copy paste this phrase. Unhappy user right here.

We code for ourselves. We deliver value to the costumer. Two different things.

Re: Nobody cares about your clean code

#65
The thing now I see in the Go community is cargo culting coming from seasoned veterans who took advantage of Go's minimal set of rules and created their own "standards". Take this project in Github called golang-standards. It even got the attention of Russ Cox who dismissed it in this Github issue: https://github.com/golang-standards/project-layout/issues/11....

Re: Nobody cares about your clean code

#68
I think all the wrong lessons were learned here.

Users do care about how maintainable your code is. They're often committed to your piece of software. If you code is bad, they will eventually feel it. I've experienced that with my own software over time and software built by other companies. At work, the end users know our financial system is fundamentally unmaintainable and we aren't going to buy the fancy total re-write new version from that vendor.

The other lesson is that it's entirely possible that a single file PHP monolith is not a crappy ball of mud. It might even be cleaner and easier to work with than "best practices" over-abstracted over-built monstrosity.

Re: Nobody cares about your clean code

#70

"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…

I do understand the sentiment. However I do think there is something to be said for maintaining good habits all or most of the time. It’s kind of like saying I eat trash all time, but when I need to get in shape, I can stick to a diet. Easy to say, hard to do.
Post reply on HN