Skip to content

Clean Code: About naming conventions #28643

@ghost

Description

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions