Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Code is not art, it's instructions.

I'll slightly disagree here because code needs to be read by a computer and by your human teammates.

There are times when I'm frustrated because prettier is making a necessary but unintuitive choice and causing my code to become harder to read. But those are rare, and I would never trade them for the guarantee of readable code the other >99% of the time.



Yes, this is fundamentally where I disagree with the person you're responding to and what seems like most programmers (or perhaps mostly web developers). If code is just instructions, it would look barely comprehensible to [most] programmers.

Again, maybe I came off as more extreme than I actually am, because I think that consistent formatting is a very good thing most of the time, but that last 5-10% that programmers in positions of power fetishize is where things can get frustrating and time can get wasted.

The worst is when linter rules are used for things that should be evaluated by a human being in code review. At a previous workplace, someone thought it was a marvelous idea to try and enforce things like functions having no more than 6 lines or some other poppycock. My current workplace is OK, but even then there are some stupid rules like not being allowed to assign `this` to a constant, even though the function in-scope is being re-bound by some stupid middleware making it impossible to use fat arrows or `.bind` (in JavaScript). Sorry, but I'll assign whatever the f*** I want to a constant that isn't escaping the current scope in any way. What's also funny is that I've never worked anywhere that didn't have `eslint-disable` sprinkled everywhere. In many cases, these rules should be warning instead of errors, but because programmers love errors for some reason, virtually every rule violation needs to be an error.


> What's also funny is that I've never worked anywhere that didn't have `eslint-disable` sprinkled everywhere. In many cases, these rules should be warning instead of errors, but because programmers love errors for some reason, virtually every rule violation needs to be an error.

Well I'm quite proud of having owned a certain repo at work which takes exactly this approach. If I have to disable a rule more than once, I take a good look at whether we need it at all, so we have extremely few `eslint-disable` comments in the entire codebase. It's one of the cleanest and most transparent codebases I've worked in -- but that's also an artifact of me spending long stretches working in it alone and having little oversight of how I spend my time. So there's a tradeoff :)


Programmers don't love errors. In fact, we see time and time again that even just seeing the word "error" causes programmers to forget how to program. It's their kryptonite.

But they don't see value in warnings. Either you have a problem that needs to be fixed or you don't.


> I'll slightly disagree here because code needs to be read by a computer and by your human teammates.

I still don't think that makes it art and this is why: art can't be simplified. Code can.

Take that to it's extreme and you see that code can be simplified down to nothing without anything being destroyed. Art can't.

Maybe you could say that the act of programming (or simplifying) is an artform, but that's not what we're talking about here.

We're talking about the product of that process, which is just instructions to accomplish a task.


> Take that to it's extreme and you see that code can be simplified down to nothing without anything being destroyed.

I disagree. The thing being destroyed is readability and common understanding with your fellow programmers.


My point was that removing code (not just reformatting it) without changing behavior is a gain, not a loss. Art is the opposite.

That tells me that the code itself is not important; the task/instructions the code performs is the important part. Therefore code is a utility, not an artform.

Yes I want written instructions to be understandable to humans, so my code conforms to tool-enforced formatting standards 100% of the time, not subject to artistic interpretation.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: