Skip to content
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

Clean Code: About naming conventions #28643

Closed
2 of 3 tasks
ghost opened this issue Aug 15, 2024 · 1 comment · Fixed by #28648
Closed
2 of 3 tasks

Clean Code: About naming conventions #28643

ghost opened this issue Aug 15, 2024 · 1 comment · Fixed by #28648
Assignees

Comments

@ghost
Copy link

ghost commented Aug 15, 2024

Checks

Describe your suggestion

The current lesson as it is ignores the existence of different naming conventions and simply defines some examples as "bad" or "good". This could confuse learners since for many, these might not be considered like that, and certain examples/exercises after (as the leap years one in the javascript exercises) make use of the previously defined "bad naming".

Some of the points given in the discord discussion about this were the following:

Carlos: "I don’t love the idea of calling something bad. I would love that lesson to reflect the idea that conventions are good and offer the ones mentioned there as a possibility while recognizing that different organizations may have different ideas."

Mao: "is-* prefixes for variables (not functions) are quite common, whereas something more explicit like showNorseGods really doesn't make sense for a non-function variable, but would for a function name."

Mao: "I would also propose changing the wording from "good"/"bad" to something closer to "preferable"/"not preferable"

Carlos: "Maybe “preferable for the conventions discussed here. Which I know is wordy but just want to drive home that it’s not universally preferable"

There was an already closed issue about this (#26687) but after the lack of response, was turned into a discussion (#26883). The original issue goes a little more in depth about this and gives examples and references.

Path

Foundations

Lesson Url

https://www.theodinproject.com/lessons/foundations-clean-code

(Optional) Discord Name

sukairaida

(Optional) Additional Comments

No response

@MaoShizhong MaoShizhong self-assigned this Aug 16, 2024
@MaoShizhong
Copy link
Contributor

Agreed on the general discussion @sukairaida, thanks for bringing it up.

Looking through the lesson, I feel like instead of just addressing the naming convention thing discussed, the lesson itself can do with a minor overhaul of language to focus more on the ideas of conventions and why certain things are more sensible, and less on any absolutes for specifics.

I've got an idea of how I would like this to pan out for the whole lesson, so I'll get something up to address this in due course.

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 a pull request may close this issue.

1 participant