JS Beta: please teach what hardcoding is so people can stop doing it for the challenges and projects #55590
Labels
status: waiting triage
This issue needs help from moderators and users to reproduce and confirm its validity and fix.
type: feature request
Threads classified to be feature requests. Implementation to be considered as a nice to have
Is your feature request related to a problem? Please describe.
I think I must have had to explain hardcoding at least 3 times in the past 2 weeks to different people on the forum who chose to hard-code every single testcase for their projects. I'm a horrible teacher. Please spare me this and add a lesson in the gradebook review or earlier to teach people what hardcoding is and why it is not proper coding. (but that it can be useful for debugging).
Hopefully this is doable.
Describe the solution you'd like
Around the time learners are asked to write a function to add two numbers, maybe step 55? of the pyramid project, people start also hardcoding the example into their function with statements like
5+10
being returned. They don't know that this is hardcoding, so we should teach them this explicitly. We can teach them why it is not what we do in coding and why it is what we do in debugging. Maybe we need to deliberately ask them to hardcode the solution once for example then show them why it is not flexible. Then take them to the point of understanding that coding should not involve hardcoding unless on purpose for debugging? I can squeeze my brain for more ideas if needed, let me know.Describe alternatives you've considered
The only alternative I know of is to continue to tell people who've hardcoded their solutions not to do it. I suppose we can create a canned response for this scenario to respond to people with. But why not use it as a teaching opportunity in the curriculum?
Additional context
I can provide links to forum posts that features hardcoding if needed.
The text was updated successfully, but these errors were encountered: