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

Feedback on teaching for loops steps in JS Beta Build a Pyramid Project #54770

Open
hbar1st opened this issue May 13, 2024 · 1 comment
Open
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.

Comments

@hbar1st
Copy link
Contributor

hbar1st commented May 13, 2024

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

@hbar1st hbar1st added scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. 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. labels May 13, 2024
@jdwilkin4 jdwilkin4 added status: discussing Under discussion threads. Closed as stale after 60 days of inactivity. new javascript course These are for issues dealing with the new JS curriculum labels May 13, 2024
@hbar1st
Copy link
Contributor Author

hbar1st commented May 14, 2024

In my initial comment I said: "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)"
I will be creating a separate issue for this as Quincy has agreed that it is something that can be addressed. (see forum post: https://forum.freecodecamp.org/t/way-of-learning/689345/4 )

Remaining concerns about value of teaching for loops before conditionals are taught are hopefully to be addressed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

2 participants