News for hackers. Stuff that matters.
Re:Why Ruby Is More Readable Than Python by EdwardDiego on Tuesday July 19, 2022 @07:22PM (#32159264)
Subjective opinion presented as fact? Say it ain't so.
Re:Why Ruby Is More Readable Than Python by klodolph on Tuesday July 19, 2022 @07:54PM (#32159525)
This is a matter of style; we encourage writers to write this way and trust that readers know the difference between fact and opinion.

Go through a typical college writing class and the teacher will direct you to delete phrases like “I think” and “I believe” from your writing.

Re:Why Ruby Is More Readable Than Python by wpietri on Tuesday July 19, 2022 @09:01PM (#32159999)
What concerns me is that I see quite a lot of writers who don't know the difference between fact and opinion. Without that, the reader doesn't have much hope. Especially when the writer has some incentive to muddy the waters.

I'm all for pieces clearly from a personal perspective. There one can drop the redundant "I think" bits. But often dropping the qualifier turns it from a statement about one person to a universal statement, as with the title of the article. For me this erases the many interesting possibilities in between.

For example, a post title something like, "Which programmers find Ruby more readable than Python?" is way more interesting. The universal is false, but I'm sure it's true for some people and false for others. An exploration of that could lead to interesting ways to think about languages. E.g., is it better for novice programmers? For programmers from non-engineering backgrounds? For programmers with difference cognitive styles or capabilities?

Re:Why Ruby Is More Readable Than Python by klodolph on Tuesday July 19, 2022 @09:33PM (#32160249)
This has always been true. However, the way that you should distinguish fact from opinion is analyzing the content. You should not rely on other people to explain to you which things are facts and which things are opinions.

In a world where people (in general) are capable of distinguishing fact from opinion (most of the time), you can omit the "I think", "I believe", "I feel" crap. In a world where people are bad at distinguishing fact from opinion, you can't rely on the "I think", "I believe", "I feel" crap because writers wouldn't be able to use them correctly.

Re:Why Ruby Is More Readable Than Python by wpietri on Wednesday July 20, 2022 @01:03AM (#32161618)
That the reader should distinguish fact from opinion in no way absolves the writer of doing that first and expressing clearly which is which.
Re:Why Ruby Is More Readable Than Python by pessimizer on Tuesday July 19, 2022 @09:22PM (#32160157)
> "Which programmers find Ruby more readable than Python?"

What if you don't care about analyzing the psychologies of programmers, and just want to say why one thing is more readable than another thing?

Re:Why Ruby Is More Readable Than Python by wpietri on Wednesday July 20, 2022 @01:05AM (#32161632)
Readable for whom? And how could you possibly understand why something is readable for a given person or group without touching upon psychological topics? Reading is a mental experience that varies from person to person in many ways. Reading code even more so.
Re:Why Ruby Is More Readable Than Python by mikkergp on Tuesday July 19, 2022 @08:02PM (#32159589)
I get this, and I've started to write this way, because it gets a better response; but it feels to me like it's designed to maximize an emotional response and not a cognitive response, and find I have less trust in people who write this way (Which is most things, i get)

I do wonder how this style of writing has impacted the psychology of argument, I imagine there are others who read this style of writing and assume it is written in stone or as an objective statement, and not a subjective one. This may just be human nature.

Re:Why Ruby Is More Readable Than Python by arcticfox on Tuesday July 19, 2022 @08:38PM (#32159833)
I have to say I appreciated but also laughed at the sheer number of the qualifiers you're discussing in your post... "it feels to me", "I find I", "I do wonder", "I imagine", "this may"

I find it makes for less combative discussions. So I like it.

Re:Why Ruby Is More Readable Than Python by klodolph on Tuesday July 19, 2022 @09:32PM (#32160240)
I'd say that these qualifiers are much more useful in informal communication, like HN, and inappropriate for long-form stuff like essays. Essays are longer, more coherent, and denser.
Re:Why Ruby Is More Readable Than Python by mikkergp on Wednesday July 20, 2022 @10:08AM (#32166002)
I think it’s more distasteful in the modern clickbait blog world then more intellectual and well thought out books/essays/etc, where your perspective is not designed for a purely emotional response.
Re:Why Ruby Is More Readable Than Python by mikkergp on Wednesday July 20, 2022 @10:07AM (#32165990)
“Yeah? Well, you know, that's just like uh, your opinion, man.”
Re:Why Ruby Is More Readable Than Python by djbusby on Tuesday July 19, 2022 @07:58PM (#32159558)
Use the Active Voice.
Re:Why Ruby Is More Readable Than Python by ignurant on Wednesday July 20, 2022 @04:14PM (#32171604)
New Rails 8 feature? (I’ll see myself out).
Re:Why Ruby Is More Readable Than Python by philovivero on Tuesday July 19, 2022 @08:10PM (#32159652)
Oh. So this is why clickbait and trolling have increased so dramatically? The kids are being encouraged to do it by their teachers?

Eternal September gets worse when their teachers are teaching them bad habits from the get-go.

Re:Why Ruby Is More Readable Than Python by Avshalom on Tuesday July 19, 2022 @08:27PM (#32159776)
you think click bait and trolling have increased dramatically

In your opinion eternal September....

Re:Why Ruby Is More Readable Than Python by cgriswald on Tuesday July 19, 2022 @09:43PM (#32160330)
> you think click bait and trolling have increased dramatically

Assuming "click bait", "trolling" and "dramatically" are all either explicitly defined or implicitly defined by consensus or what have you, this would not be a matter of opinion but of fact, so stating "I think" would either be incorrect or would be an admission of uncertainty about whether the fact is true. If he is correct and honest, he has no reason to add the phrase. If he is dishonest or incorrect, he has reason not to add the phrase.

Additionally, in the context of the full sentence, it would imply that the subject pronoun "this" is causing his thoughts rather than causing the object of his thoughts, but I know what you mean. I think.

Re:Why Ruby Is More Readable Than Python by pessimizer on Tuesday July 19, 2022 @09:23PM (#32160167)
Not that way - only when it's someone else's opinion, not mine.
Re:Why Ruby Is More Readable Than Python by cassianoleal on Tuesday July 19, 2022 @07:44PM (#32159456)
Weird criticism.

If I say that halloumi is better than tofu, do you not assume I'm talking about my personal opinion? Do I need to make it painfully clear that it's my subjective opinion?

Taste, as much as readability, are subjective so that can be assumed.

Also, if you read the post, you'll have noticed the author is constantly saying "I find this more readable", and engaging the reader with "what do you think?" questions on each point made, which makes it very obvious that they're presenting a personal, subjective view.

Re:Why Ruby Is More Readable Than Python by philovivero on Tuesday July 19, 2022 @08:18PM (#32159704)
> Do I need to make it painfully clear that it's my subjective opinion?

Yes. Because a sentence written in the Arial font, as much as I might find that font distasteful, is more readable than the same sentence written by a Captcha-generator.

A bubble-sort written in Golang is easier to read than the same bubble-sort written in Brainfuck.

Yes, there are exceptions to the rule (I imagine someone who knows Brainfuck, but doesn't know Golang for example), but the rule is very clear in both cases. The clickbait flamewar-inducing headline is saying, essentially, Ruby is the former in the examples I gave, and Python the latter.

We're not junior-high students trying to one-up one-another with cute gotchas. We're technical professionals. We should expect higher standards of communication skills from other technical professionals.

If you mean "I have a useless opinion that no-one should care about," then state it. If you mean "I have statistical evidence that most technical professionals will be able to comprehend programs written in Ruby better than the same programs written in Python," then state it. But don't expect a good reaction when you say the former, while tricking us into thinking you were saying the latter.

Re:Why Ruby Is More Readable Than Python by cassianoleal on Tuesday July 19, 2022 @09:53PM (#32160402)
> If you mean "I have a useless opinion that no-one should care about," then state it.

I don't. People will care about. Not everybody but some will, and that's fine.

> We should expect higher standards of communication skills from other technical professionals.

Reading comprehension is just as important as writing. I expect my peers to know that an opinion is subjective without me needing to say so.

For instance, I would have expected you to not gloss over my last paragraph on the previous post, just as much as I would have expected you to understand, by reading the article, that everything written there is the author's opinion but I guess that wouldn't have been such a good straw man.

Re:Why Ruby Is More Readable Than Python by anothernewdude on Tuesday July 19, 2022 @08:41PM (#32159857)
Every sentence said by a person is their opinion. That's what saying things is.

Even the "obvious" counter-example, lying, works because every sentence said by a person is their opinion. You couldn't lie if it wasn't.

Re:Why Ruby Is More Readable Than Python by pessimizer on Tuesday July 19, 2022 @09:18PM (#32160132)
You get facts from measuring devices, not people. And even then, when you read the number on the display, or try to figure out if the device is functioning correctly, the facts instantly become opinion again. If it helps you, prefix everything that everyone ever says from now on with "It is my opinion that..." e.g. "it is my opinion that it is 6 o'clock."

The "that's just your opinion, man" thing is the only thing I'd like to see as a universally ban-worthy offense on the internet. It's an entirely empty statement that can be made about anyone who said anything, is always a bitter defense against somebody who took the risk of putting themself out there, and shouldn't be seen as anything but a troll.

And I'm fully aware that this is my opinion, which is why I said it and not someone else.

Re:Why Ruby Is More Readable Than Python by voidhorse on Tuesday July 19, 2022 @10:54PM (#32160808)
No. If the author were truly trying to present this as fact there’s be far more remarks against anticipated disputes “pythonistas will say… blah blah blah… but here’s why they’re wrong” or more extreme statements, “it’s an objective truth that… only fools would deny…”

The author doesn’t do any of this, in fact the author is barely even arguing a point. It’s pretty clearly an opinion piece. Human beings have been writing like this and differentiating between fact and opinion for centuries. Demanding that all writing be watered down to hedge-laden statements and statistics would land us in a very boring world indeed. People can read, judge, and think for themselves. We don’t all approach literature like computers reading instructions.

Re:Why Ruby Is More Readable Than Python by drewcoo on Tuesday July 19, 2022 @08:58PM (#32159977)
The author relies on you, the reader, to exercise thought? Say it ain't so.
Re:Why Ruby Is More Readable Than Python by EdwardDiego on Tuesday July 19, 2022 @09:43PM (#32160328)
Maybe the blog post title should then be "Why a Ruby dev finds Ruby more readable than Python".

And the post body reads: "Because that's what they're used to." Fin. Roll credits.

Personally, I find Python more readable, because I know Python better than Ruby.

I don't think there's anything inherently more discoverable about @@ to denote a class field. Python instance fields are all prefaced with self, so a bit of cursory Python learning makes it clear.

But yes it feels weird that you can't declare them upfront. (And it gets weirder when using libs like Pydantic where class level fields are used to describe instance fields in (de)serialised objects.)

IMO, Java's static keyword is far more discoverable because it's far easier to google.

As I discovered when trying to figure out what an @ meant in a TS import statement.

But, I'm not writing a blog post about why Java is more readable than Ruby, because that's just, like, my opinion man.

Re:Why Ruby Is More Readable Than Python by voidhorse on Tuesday July 19, 2022 @11:04PM (#32160873)
Right, but the goal of an essay is typically not to disseminate certified, proven fact beyond all possible dispute. In fact, many essays argue points that are inherently fuzzy—e.g. an essay on your interpretation of your favorite novel will make an argument for your interpretation but it will never prove that it is the one true interpretation of a novel since that’s ridiculous and impossible.

Often the goal in writing an essay is to share a personal view or experience, and sometimes to get others to share their thoughts on a topic. For example, if you did write an essay on why Java’s static is better than Ruby’s @, it might lead others to engage with you, share their thoughts, and help you learn more or modulate your own viewpoint as a result.

Montaigne, the oft-touted father of the essay as a form of literature, in fact explicitly wrote essays as a means of self-reflection and self-exploration.

This isn’t some technical paper coming from a research lab or standards body, it’s someone interested in a particular topic sharing their thoughts on that topic, potentially influencing others and potentially being influenced themselves.