Earlier quoted context omitted.
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 i…
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.
Why Ruby Is More Readable Than Python
81–90 of 149 posts
Re: Why Ruby Is More Readable Than Python
#82Earlier quoted context omitted.
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.
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 universa…
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
#83Earlier quoted context omitted.
Ruby is object-oriented, for better or for worse. Similar to Java, you can have static methods, but they have to live in a class (or module in Ruby's case).
I assumed OP was asking if Ruby had a way to import specific functions from a module (i.e. "from math import pi".) the way that many other languages (like Python) support. Instead, Ruby forces you to require the entire module, which makes tracking public interface usage harder.
Re: Why Ruby Is More Readable Than Python
#84Earlier quoted context omitted.
I know it's completely subjective and intellectually irrelevant, but wow I think those annotations are super ugly. In Ruby it's all just method calls - properties, methods, user control-flow, everything.
It's a bit of a weird take when attribute definition in Ruby also uses at signs specifically. Which part do you find ugly?
No that’s instance variables.
> Which part do you find ugly?
In Ruby to modify a method you just call a method. I guess I think a second, redundant, way to call methods is not elegant.
Re: Why Ruby Is More Readable Than Python
#85Subjective opinion presented as fact? Say it ain't so.
The author relies on you, the reader, to exercise thought? Say it ain't so.
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
#86Earlier quoted context omitted.
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.
you think click bait and trolling have increased dramatically In your opinion eternal September....
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
#87Does Ruby have support for just exporting functions around? All these examples are class based. When I was a Python programmer, we found functions scaled infinitely better over time (with the exception of data classes, unfortunately) for complex business logic especially.
I tend to go with static methods on modules.
Re: Why Ruby Is More Readable Than Python
#88Earlier quoted context omitted.
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?" que…
> 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, bu…
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
#89Earlier quoted context omitted.
I think that misses the point. Ruby doesn’t have macros! The metaprogramming makes it possible to create very readable DSLs but it’s all very consistent not “magical” like macros. At the end of the day coding is hard. I’d rather have nice DSLs to learn than verbose spaghetti to read.
Absolutely. DSLs are a great application of metaprogramming. Same with libraries like ActiveRecord. Metaprogramming in a pull request at work? Nope. I'm going to smack some knuckles with a ruler. :)
Re: Why Ruby Is More Readable Than Python
#90Until metaprogramming, autoloading, DSLs and everything that eventually makes Ruby code unreadable takes place due to personal preferences. Ruby is clever, it can be beautiful, but I've never seen a good codebase using it grow well without enforcing strictly opinionated ways of writing it to ensure maintainability. Which breaks a lot of the expectations of some Ruby developers that chose the language because they lik…
I believe every good maintainable software needs an enforcing strictly opinionated ways of writing it to ensure maintainability.
Language need be general to be useful. Any language can create utterly unmaintainable code. If you shift "opinionated" into the language, it is less easy to write unmaintainable code, but it is also more difficult to write fitting maintainable code because that "opinionated" opinion may not best fit (and usually can't best fit) a specific application, a specific team, and a specific set of experience. On the other hand, if we shift "opinionated" to the programmer, the language inevitably need add more meta-programming ability or simply more ways to do the same/similar thing. The code can easily become unmaintainable under less experienced programmers who are not opinionated and aren't disciplined.
The current programming culture expect programmers to be commodities, thus favors opinionated languages and idiomatic code. I can easily imagine a shift in culture that favors experienced and opinionated and disciplined programmers, where different set of languages will be favored.
Today's software, once grow to certain size, are all quite unmaintainable.