Think about it. It’s because smart people don’t need clean code. It’s so trivial to them and so readable that they really don’t need things to be ultra clean and well formatted.
So the tendency to have this ocd need to write clean code among smart people is random. They either have it or they don’t give a shit.
But among stupid people it’s not random. They need clean code because they are not smart enough to understand code that isn’t clean.
Shitty code doesn't run or doesn't do what the author thinks it's supposed to do. You can't write genuinely shitty code and be smart.
I've seen smart people get caught in trying to write "clever" code. Abusing features of a language to make the code "look" smart. And I've never seen someone I've considered smart write completely unformatted code where it matters.
I may not agree with all of their choices, but the smartest people I've worked with tend to have the structure of the code reflect the structure of the problem as they see it in their head. And yes, that tracks, you begin to use the code itself as an assistant to your own thinking. You don't think about where things are because they are where they should be.
Forcing yourself to remember a bunch of pointless minutiae in order to write software isn't a mark of intelligence, it's a mark of someone who wants to be seen as intelligent.
>Shitty code doesn't run or doesn't do what the author thinks it's supposed to do. You can't write genuinely shitty code and be smart.
By shitty code I mean aesthetically shitty. Not intrinsically shitty. So definitionally true, depending on your definition. Obviously I'm talking and I established context so most readers can figure out that I'm utilizing MY definition and NOT your own.
>I've seen smart people get caught in trying to write "clever" code. Abusing features of a language to make the code "look" smart. And I've never seen someone I've considered smart write completely unformatted code where it matters.
Then you've never been around the smartest people. Likely you've been around smarter then average people.
>I may not agree with all of their choices, but the smartest people I've worked with tend to have the structure of the code reflect the structure of the problem as they see it in their head. And yes, that tracks, you begin to use the code itself as an assistant to your own thinking. You don't think about where things are because they are where they should be.
Yeah and the smartest people structure the problem in their head in a way normal people can't easily understand. They can hold much more in their head so the structures can be complex.
>Forcing yourself to remember a bunch of pointless minutiae in order to write software isn't a mark of intelligence, it's a mark of someone who wants to be seen as intelligent.
Isn't that my point? Formatting rules are a bunch of pointless minutiae to intelligent people. It doesn't assist them in readability because their intelligence allows them to parse even the shittiest code with complete ease. And I mean aesthetically shitty, not intrinsically shitty.
> Then you've never been around the smartest people. Likely you've been around smarter then average people.
This is totally unfalsifiable. I claim that the smartest people around always wear clown shoes to work. If you disagree, it's simply because you haven't met any of the people I'm talking about. QED
So. I'm offering my anecdotal opinion. If you want to make it invalid because you can't falsify it so be it.
It's like proving the ground exists when you jump off the bed in the morning. The overly nerdy and stupid HNer can't even move an inch off the bed until the scientific method is employed in attempt to falsify whether the groun doesn't exist. OoooooOOh.
I'm just offering my anecdota opinion here. If you can't listen to normal conversation and you can only read research papers (which mind you suffers from a replication crisis) then more power to you.
Then say ugly. "Shitty" can be ambiguous as you see. Most people would classify buggy code as shitty code.
> Then you've never been around the smartest people. Likely you've been around smarter then average people.
This is essentially using your own belief as proof that your belief is correct. You say I haven't been around the smartest people because I say the smartest people don't do what you claim. You are saying "I'm right therefore you are wrong". Maybe you haven't been around the smartest people.
> Yeah and the smartest people structure the problem in their head in a way normal people can't easily understand. They can hold much more in their head so the structures can be complex.
Complex is easy. Simple is hard. And yes, some things are inherently more complex than others. But the goal is to hold the important things in your head. Offload as much as you can so you can focus on what matters.
> Isn't that my point? Formatting rules are a bunch of pointless minutiae to intelligent people. It doesn't assist them in readability because their intelligence allows them to parse even the shittiest code with complete ease. And I mean aesthetically shitty, not intrinsically shitty.
No. It's not the point you are making.
Also, look at to everything I said. Strict adherence to any one style is not a marker of intelligence. I explicitly said that strict adherence is essentially for people in a wide range of skills. But the best have preferences, but realize that they are more guidelines and readability matters more than the rules.
And the rules should be logical and essentially second nature. Like indenting is completely optional in most languages. But proper indenting allows you to better visualize the flow of the code. Nobody reads/writes minified JavaScript.
>This is essentially using your own belief as proof that your belief is correct. You say I haven't been around the smartest people because I say the smartest people don't do what you claim. You are saying "I'm right therefore you are wrong". Maybe you haven't been around the smartest people.
I have quantitative evidence of this. There IQs were above 150.
>Complex is easy. Simple is hard. And yes, some things are inherently more complex than others. But the goal is to hold the important things in your head. Offload as much as you can so you can focus on what matters.
complex is not easy. And simple is not necessarily always hard. The story is obviously more complex then this.
>No. It's not the point you are making.
It is. It was a rhetorical question.
I looked at everything you said. First off I never said anything about strict adeherence to a style. Smart people have there preferences.
>And the rules should be logical and essentially second nature. Like indenting is completely optional in most languages. But proper indenting allows you to better visualize the flow of the code. Nobody reads/writes minified JavaScript.
I've seen smart people who can do this. They don't even really care.
> It's almost like you are saying whatever you think will make you right in the moment.
Please don't cross into personal attack, no matter how wrong another commenter is or you feel they are. It just makes things worse. We've had to ask you this before.
It came up because we talked about Mensa and he was part of it. I asked his iq and he told me. He claimed it and I believe him. Then the other guy also said he was offered to join Mensa but didn’t. Take from that what you will.
Not a huge sample size. Not to mention, 150+ puts one in the 99.9th percentile. One in a thousand. So out of every thousand people you meet, one of them probably had an equivalent IQ.
That being said, I guarantee that there are way more people on these boards with equivalent levels of intelligence and that those people also know several people with equivalent levels of intelligence. You are likely arguing against a couple of them. And you aren't arguing about something you can do, you are arguing about people who claim to be doing it.
Also, let's separate "ability to program" from intelligence. While intelligence is a boon to most things, including ability to program, you can be smart and bad at things.
Also, let's give them some benefit of the doubt. There is a difference between code you don't understand and poorly formatted code.
That’s two people plus my entire experience of about 20 years working with all kinds of people.
I’m tired of nerdy idiots on HN demanding a scientific study when presented with an argument they disagree with.
Like can you debate and talk about topics where scientific data isn’t available? This ironically savant like rigor to interprete reality only through the lens of science when convenient is my anecdotal evidence of someone who is stupid instead of smart. Do you need a fucking scientific study to prove the ground is real when you jump off the bed in the morning? Fuck your science. The most interesting things about this world are things where science isn’t available and those are the things worth debating about. But for you just you can just fuck the hell off every time you encounter a topic where the “sample size” isn’t big enough.
That being said, I don’t have a scientific study on this but I can assure you no programmer claims they write shitty or ugly code no matter their intelligence. The claim is from me. I observe their code and I think their code is shitty while they think their code is fine.
These geniuses solve bugs faster, make features faster, make significantly less mistakes but oftentimes their code is significantly harder to read. That’s my anecdotal opinion. Up to you whether you want to believe it.
The problem with HN is that most people here are average and because they are average they value clean code more then smart people. The issue is these average people think they’re smart and they think clean code is a trait associated with intelligence. That describes YOU to a T and the fact that you know I’m right should tell you that there are people in life smart enough to move through the world and listen to opinions and make decisions without the need of the rigor of science and a large enough sample size.
Could you please stop breaking the site guidelines? We've already had to ask you once. If you'd please review https://news.ycombinator.com/newsguidelines.html and stick to the rules when posting here, we'd appreciate it. Note this one:
"Please don't sneer, including at the rest of the community."
It's reliably a marker of bad comments and worse threads, and you've unfortunately been doing it repeatedly.
If you know more than others and are smarter and more above-average than others, that's great—in that case please share some of what you know so the rest of us can learn. If you don't have time or don't want to do that, that's fine too—but in that case please don't post. Posting putdowns instead doesn't help anybody, and it degrades the container.
When you're writing it you have the help of the compiler and various other tools, plus you have the model of what the code is doing fully-formed in your head, and you have the recent memory of various other approaches you took and how and why they failed. When you're reading it you have none of those things.
So, code is harder to read than it is to write.
So if you write code that uses your full intellect to write it out, you are therefore by definition too dumb to read it.
I've been trying for years to track down a quote I lost, and it sounds like something you might know, because I think it would have resonated with you.
It was from Charles Simonyi, talking about how as he got older, his prodigious ability to juggle large amounts of information in his head declined, and as a result, he started writing better code. Do you know it?
Also, I half agree with your point, but I see it happen in two different ways. When writing ad hoc code for research purposes, I see very gifted people write seemingly sloppy, to-the-point code because it's the quickest way to the result. I say seemingly sloppy because another programmer would see an intricate mechanism that in so many places is a hair's breadth from being wrong, and they would want to reorganize it to make it more obvious that the code is correct. The savant who wrote the code is like, it's already 100% obvious, how could any change make it more obvious than that?
In the software development context, I sometimes see very gifted people write incredibly complex code because they enjoy flexing their intellectual muscles and seeing the ornate towers they can create. But I also see average programmers and dumb programmers do the same thing, the only difference being that the gifted people can get away with more before it starts to hurt them. What's more, I see very good engineers, gifted but not as gifted, try to follow the example of a savant and end up accomplishing far less than they could if they cut themselves a break and wrote plain code without all the flourishes and ornaments. A gifted programmer usually gets tired of this and grows out of it, but some of them enjoy it so much they commit to fooling themselves and other people that it's the right way to write software.
> So the tendency to have this ocd need to write clean code among smart people is random
It is if they work entirely alone and their work doesn't depend at all on the success of others using their code. However, when it comes to big software projects, my experience is that it's not random: the smartest people do end up writing good code, unless they have ulterior motivations or a severe social blind spot.
No. This what stupid people who think they are smart tend to think.
Smart people often don’t realize how smart they are and they don’t recognize there code as unclean. To them it’s trivial.
A lot and I mean a lot of people on HN think they are smart but they are actually average or stupid. The amount of smart people operating at that level is rare. Really rare. I’ve been at entire companies where there isn’t one person who is actually “smart” at the level I describe. Most people are just average.
Okay so your definition of “smart” sounds different than the definition everyone else in this thread is using. Sounds more like you’re talking about “genius” to me, specifically in a savant type way where they are incapable of relating to average people.
No. I’m talking about genius. Not savant. Savants likely can’t relate to your emotions. Geniuses can. The difference is just if it takes them 1 second to parse what takes you 5 minutes to do the same they often don’t realize this unless you tell them.
That being said what I talk about lives on a gradient. The smarter you are the greater degree of tendency you have to write shitty code.
The cleaner your code the higher possible chance you are stupider. It’s not a definitive sign but there is a correlation.
Probably because you think you're smart AND you write excessively clean code and are excessively anal about it. Whether you actually are smart is a different story.
Reality is that you have to work with different levels of intelligence. Your stack must be understandable also for the "common" programmer. Otherwise goodluck finding people.
True. But what I said is still true. The tendency exists.
Smart people don’t often know how smart they are and don’t realize how unreadable their code is until code review time and the stupid person points out what the smart person considered “obvious”
Smarter people write shittier code.
Clean code is for stupider people.
Think about it. It’s because smart people don’t need clean code. It’s so trivial to them and so readable that they really don’t need things to be ultra clean and well formatted.
So the tendency to have this ocd need to write clean code among smart people is random. They either have it or they don’t give a shit.
But among stupid people it’s not random. They need clean code because they are not smart enough to understand code that isn’t clean.