Exactly - that's how I learned programming, too. It didn't matter so much about the syntax, but what problem you could solve. For me it was a Perl CGI script for letter writing and earlier a Hypercard registration system that got me into programming, despite my father and teachers repeatedly trying to teach me BASIC. Today it might be adding javascript to a page, or customizing/coding a game using tools like Scratch or Gamemaker.
And there is decades worth of research backing this up (problem-based learning, situated cognition), but CS education has been slow to adapt.
And there is decades worth of research backing this up (problem-based learning, situated cognition), but CS education has been slow to adapt.