Why Programmers Type
π― Today's mission briefing
We are learning what a general-purpose programming language gives us that a blocks language cannot, and how to write the four constructs every language shares β assignment, conditionals, loops and functions β as text that a human can read.
You'll know you've got it when:
- I can explain, with an example, two things a general-purpose language lets me do that blocks make slow or impossible
- I can write assignment, an if/else, a loop and a function as text, with correct indentation
- I can explain what '=' means in code, and why it is not the '=' I use in maths
Forty-one blocks, or four lines
Connects to what your guest already knows and makes them curious. Activating prior knowledge is one of the strongest predictors of new learning.
Two Year 6 students get the same job: work out the total of the canteen's takings for the term β 40 daily amounts β and print a warning on any day over $200. The first opens a blocks editor. Forty minutes later she has a screen of interlocking jigsaw pieces, a repeat block she has dragged three times because it kept snapping to the wrong place, and a scroll bar she cannot see the bottom of. The second writes four lines on the back of an envelope in pencil. They both get the right answer. But only one of them can email her solution to a friend, change it in six seconds, or read it back in a fortnight and still understand it. Today you find out why grown-up programmers gave up dragging.