The first JavaScript lesson in the canonical curriculum covers a lot of ground. This pull request breaks that lesson in two, with variables introduced in the second of the two.
The first lesson focuses on the concept of expressions, which are defined as pieces of code that produce a value. I suspect that this idea is so intuitive to experienced programmers that we forget how foreign it is to novice students. Without a solid understanding of expressions, much of what comes later is incomprehensible: using variables, the return value of functions, etc. all rely on the concept that a piece of code often represents a value that is not literally written in the code.
So, I think it’s worth taking a really slow roll.
The second lesson covers variables, but within the conceptual framework of expressions and values that was introduced in the first lesson.
A few notes:
Both lessons are very heavy on the “we do” and vanishingly light on the “you do”. I think that’s pretty unavoidable; the students just don’t have the tools to do anything terribly interesting yet, so the main focus is practicing basic concepts in the console and writing down observations.
I excised the use of console.log from the lessons. In my experience, console.log is a source of tremendous confusion for the students, at least if it’s introduced early on. The median student in my class last year never grasped the difference between console.log and doing actual manipulation of the page.
On the other hand, using the console directly is the main vector for actually running code in these lessons. I think the console is really useful for conceptualizing code and the way it behaves, since each statement produces immediate feedback.
The lessons here are extracted from lesson plans we wrote for GWHS 2015–2016, and executed with a fair amount of success. Worth noting is that at GWHS, the layout of the classroom requires we distribute “we do” as written instructions rather than a teacher-led activity; here are the lesson 1 instructions and lesson 2 instructions.
Experimenting with code and then writing down the results in notes seems to be a pretty good way for students to practice and absorb new techniques. Something to keep in mind for other lessons as well.
Right now this pull request comprises only the main README lesson plans for each lesson. I haven’t fully broken out the other assets like assignments/resources/etc., and I haven’t updated the higher-level TOC READMEs. If you’d like to merge this pull request wholesale, I’d be happy to get everything up to date and consistent; just let me know.
The first JavaScript lesson in the canonical curriculum covers a lot of ground. This pull request breaks that lesson in two, with variables introduced in the second of the two.
The first lesson focuses on the concept of expressions, which are defined as pieces of code that produce a value. I suspect that this idea is so intuitive to experienced programmers that we forget how foreign it is to novice students. Without a solid understanding of expressions, much of what comes later is incomprehensible: using variables, the return value of functions, etc. all rely on the concept that a piece of code often represents a value that is not literally written in the code.
So, I think it’s worth taking a really slow roll.
The second lesson covers variables, but within the conceptual framework of expressions and values that was introduced in the first lesson.
A few notes:
console.log
from the lessons. In my experience,console.log
is a source of tremendous confusion for the students, at least if it’s introduced early on. The median student in my class last year never grasped the difference betweenconsole.log
and doing actual manipulation of the page.