Code smell is a useful concept that should be explicitly taught much earlier, and not mentioned for the first time in a highly dense, technical article that most people struggle to read buried in the testing section.
One of the most common questions I see beginners ask is "Am I writing bad code?," and while the curriculum does a good job of explaining what good code looks like, it's much harder for beginners with little experience to evaluate whether their code meets the standard of often abstract and technical definitions, in data structures they can't easily parse yet.
Code smell allows someone to evaluate "is my code bad" without needing to think about the abstracts, using just the "feel" of their programming workflow. It's also easier to keep to the "if it ain't broke, don't fix it" school of refactoring by keeping learners focused on how their code structure is affecting their ability to work with it, instead of adhering to some theoretical technical standard that doesn't matter for their use case (looking at you, unnecessary time complexity optimizations).
I think the OOP lesson is the best place for this topic, as learners have enough projects under their belt that they'll have the context to immediately understand the ideas, and because it introduces a good code standard (SOLID). Code smell pairs nicely with this concept by helping learners identify when they might need to re-evaluate whether their code meets good standards. Generally, "is my code bad" is much easier for the brain to mentally evaluate constantly in the background, whereas "is my code good" is a much more complicated checklist that will be visited once or twice as a final check, or will otherwise bog you down with indecision and over-engineering. Code smell teaches people to re-evaluate their code quality if and only if they're having perceivable issues.
Refactoring Guru has another good alternative that clumps similar smells into memorable categories, with further links to examples for each.
Both of these can explain the bulk of the concept, so the TOP lesson would only need to add a short introduction on how code smell fits into the coding process.
Checks
Describe your suggestion
Code smell is a useful concept that should be explicitly taught much earlier, and not mentioned for the first time in a highly dense, technical article that most people struggle to read buried in the testing section.
One of the most common questions I see beginners ask is "Am I writing bad code?," and while the curriculum does a good job of explaining what good code looks like, it's much harder for beginners with little experience to evaluate whether their code meets the standard of often abstract and technical definitions, in data structures they can't easily parse yet.
Code smell allows someone to evaluate "is my code bad" without needing to think about the abstracts, using just the "feel" of their programming workflow. It's also easier to keep to the "if it ain't broke, don't fix it" school of refactoring by keeping learners focused on how their code structure is affecting their ability to work with it, instead of adhering to some theoretical technical standard that doesn't matter for their use case (looking at you, unnecessary time complexity optimizations).
I think the OOP lesson is the best place for this topic, as learners have enough projects under their belt that they'll have the context to immediately understand the ideas, and because it introduces a good code standard (SOLID). Code smell pairs nicely with this concept by helping learners identify when they might need to re-evaluate whether their code meets good standards. Generally, "is my code bad" is much easier for the brain to mentally evaluate constantly in the background, whereas "is my code good" is a much more complicated checklist that will be visited once or twice as a final check, or will otherwise bog you down with indecision and over-engineering. Code smell teaches people to re-evaluate their code quality if and only if they're having perceivable issues.
Both of these can explain the bulk of the concept, so the TOP lesson would only need to add a short introduction on how code smell fits into the coding process.
Path
Node / JS
Lesson Url
https://www.theodinproject.com/lessons/node-path-javascript-oop-principles
(Optional) Discord Name
phosphorflux
(Optional) Additional Comments
No response