Feedback on teaching for loops steps in JS Beta Build a Pyramid Project #54770
Labels
new javascript course
These are for issues dealing with the new JS curriculum
scope: curriculum
Lessons, Challenges, Projects and other Curricular Content in curriculum directory.
status: discussing
Under discussion threads. Closed as stale after 60 days of inactivity.
status: waiting triage
This issue needs help from moderators and users to reproduce and confirm its validity and fix.
type: bug
Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.
Describe the Issue
I noticed that the beta JS course attempts to teach for loop syntax before introducing conditional statements. Wouldn’t it make it easier to understand loops by first teaching conditional logic and its uses in code? I find the current order to be off-putting even from my perspective as a has-been soft. dev, so I imagine newbies would too. Has this order found success so far?
I would also add that I have never come across a programming course or book that introduces loops ahead of conditionals.
My other thought is when teaching loops, we should really start with the simplest loop type available, which to me is a while loop, but I understand if there are other schools of thought on this.
first attempt to discuss this on the forum here:
https://forum.freecodecamp.org/t/question-about-about-pyramid-project-and-general-thoughts-on-new-js-curriculum/690061/27
I would also suggest that the project can 'meander' a bit more in order to teach the concepts better by going through a series of learning exercises like the following (all within the same project):
1- learn how to make a pyramid manually by printing out 1, then 2 then 3 hashes for example to form a 3+ row pyramid.
(brute force method of creating a pyramid is a classic and should be introduced so learners can gain an appreciation for loops later)
2- learn if statements and booleans in general
3- learn while loops and make a pyramid of #s with a while loop (perhaps it would be a flat pyramid on 2 sides versus a centered one here)
4- modify the while loop to print the pyramid with alternate characters depending on whether the row is even or odd (for eg use
#
if even and$
if odd)5- learn for loops and create the pyramid again more efficiently
ps. I would also argue that step 28 starting sentence of "To generate a pyramid, you will need to create multiple rows.." makes a, rather large, assumption that the reader knows what the heck a generated pyramid is at this point. These learners may have no clue about what is meant here as it wasn't shown to them in any context prior? (at least within the confines of this course)
Affected Page
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-introductory-javascript-by-building-a-pyramid-generator/step-28
Your code
N/A
Expected behavior
An idealized centered version of a pyramid can be built in this project but should -not- be built till we have learned how to make a left-handed pyramid first like this:
and a multiple-symbol pyramid like this:
among other variations and using multiple methods so as to learn problem solving with conditionals and loops in bite-sized pieces with clear progressions for newbies with no prior coding experience.
Screenshots
No response
System
N/A
Additional context
No response
The text was updated successfully, but these errors were encountered: