6 ms·
I’ve noticed the worse someone is in a language, the worse they format it. People then develop fastidious code formatting rules because they realize well forma
by bena 2y ago
I’ve noticed the worse someone is in a language, the worse they format it.
People then develop fastidious code formatting rules because they realize well formatted code is easier to read and extend.
Then people realize it’s the organization of the code, not the rules themselves. They have preferences, but don’t treat those preferences as “the one true way”.
So people with fastidious rules are in that middle ground of becoming less bad, and that’s a wide swath of abilities.
- raverbashing 2y ago> Then people realize it’s the organization of the code, not the rules themselves. They have preferences, but don’t treat those preferences as “the one true way”. Yup, I agree with this It's not about, let's say, where your curly braces stay, but being consistent Though in some cases I'd argue that things like a very strict 80 character limit actually results in worse code (or at least worse to read code)
- ninetyninenine 2y agoDisagree. Highly disagree. 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.
- holoduke 2y agoReality 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.
- ninetyninenine 2y agoTrue. 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”
- Ma8ee 2y agoOr maybe the smartest people understand that it is as important that less smart/experienced people than them can work with the code.
- ninetyninenine 2y ago[flagged]
- jjj123 2y agoOkay 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.
- ninetyninenine 2y agoNo. 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.
- ddejohn 2y agoThis is the silliest thing I've ever heard
- ninetyninenine 2y agoProbably 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.
- dkarl 2y agoI'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.
- ninetyninenine 2y agoYeah they learn. But the tendency is still there. They make an attempt to dumb down their code but often they prioritize speed and what works.
- bena 2y agoThat's definitionally untrue. 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.
- ninetyninenine 2y ago[flagged]
- bena 2y agoThen 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.
- Pxtl 2y agoWhen 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.
- ninetyninenine 2y agoI never said smart people are writing code with their full intellect. They are likely writing code with a fraction of their intellect and that code is still too complicated for normal people to comprehend.