Skip to content

There is an issue regarding variable namings in the tutorials and pedagogy #3559

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

E-SEAsianEthnicityOSSI
Copy link

Imagining you are a new programmer, the ruby tutorial on the website does not do as clear as could be in regards to calling the name input for the method called "name" when this may be unclear to new programmers who may be unclear about notion "method name". this lack of clarity can be solved by calling the input variable "text" which becomes clearer than the tutorial is as now.

For instance:

irb(main):019:0> def hi(name = "World")
irb(main):020:1> puts "Hello #{name.capitalize}!"
irb(main):021:1> end

hi is the "method name". While experience programmers know this it is the method name and "name" refers to the variable someone may not know this"

Let me know if you'd like this edit translated into the other languages and I can do this too. I can also go back and change it to "textVar" or "inputTxt".

I am also willing to rewrite tutorial to include this kind of basic programming info or create a tutorial thats more aimed at new programmers. It'd be better if I got info from the more active devs on this project if this is even going to be accepted as a commit so I can know if this is even worthwhile edit.

Pedagogical issue resolved
Pedagogical issue regarding fact that new programmer may become confused regarding the notion of "method name"
@E-SEAsianEthnicityOSSI E-SEAsianEthnicityOSSI requested a review from a team as a code owner April 27, 2025 23:20
Copy link
Member

@sorah sorah left a comment

Choose a reason for hiding this comment

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

I disagree this direction of change. While I agree some readers may confuse with method name, but in general input is not a good variable name.

It's still straightforward as we're saying 'Just redefine hi to take a name as a parameter.'

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

Successfully merging this pull request may close these issues.

2 participants