Skip to content

Update ruby tutorials #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 20, 2018

Conversation

CaiqueMitsuoka
Copy link

Update the ruby tutorials with the 1.9+ syntax and variable names.

Basically linted with rubocop default configuration.

I made a refactor to the tutorial six (the RPC one) to be a little more clear the role of the instructions and their context. Please send some feedback on that

I will send the pull request on rabbitmq-website once this one is approved or merged.

@pivotal-issuemaster
Copy link

@CaiqueMitsuoka Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@CaiqueMitsuoka Thank you for signing the Contributor License Agreement!


conn = Bunny.new(:automatically_recover => false)
conn.start
connection = Bunny.new
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change really an improvement? Isn't it obvious what conn and ch and x mean in this small script?

Sorry but in rabbitmq/rabbitmq-website#499 (comment) I mentioned what would accepted without scrutiny and long names wasn't on that list. Changes for the sake of changes is not something anyone is interested in.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think better names always improve code readability. This kind of name seems obvious to native speakers but for people who english it is not the mother tongue this kind of names can get trick really quick.

Like x is obvious that is for exchange because in the context there is an exchange and x sounds like ex. But for people who can read but not necessary speaker english x sounds like it would sound in their native tongue.

Sorry for not letting this clear the first time. If you still think it does not worth I can switch back.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a native speaker. You have method names such as queue, fanout and create_channel. They return values and in a 13-25 line long script it is trivial to see where a particular variable is initialized regardless of whether you use an IDE or a sophisticated enough editor.

@michaelklishin
Copy link
Contributor

So Python, Java and PHP (IIRC, the 3 most visited tutorials on rabbitmq.com) and a few others use names such as connection. Fair enough, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy