Early vibe coding thoughts

Some thoughts on coding with AI (or, that awful, awful name, “vibe coding”):

It’s my kid’s PSLE year*, and I got bored of reading spelling words to him.

So I thought, why don’t I write an app for that?

45 minutes later, I had something fully-functional — not because I’m fast, but because I used Cursor (pictured). AI coding tools like Cursor, GitHub Copilot, and Windsurf can help programmers write full code, in-editor, soaking in the full context of the existing codebase.

This is different from “asking ChatGPT” because of the in-editor and full-context parts. In the “bad old days” of… 1 year ago, I’d have had to copy my code over to ChatGPT, give the AI context about what language and framework I was working with, get some code back, and hope that the generated code was easy enough to just plug back into my codebase somewhere. So much cognitive overhead!

This new tech, however, is remarkable; I really just ask for a feature, get the code inserted into my project. I check if it works, request some modifications, and repeat the process. AI researcher/influencer Andrej Karpathy calls it vibe coding:

I ask for the dumbest things like “decrease the padding on the sidebar by half” because I’m too lazy to find it. I “Accept All” always, I don’t read the diffs anymore. When I get error messages I just copy paste them in with no comment, usually that fixes it.

This is mind-blowing, and poses all kinds of new and frightening questions for programming educators. For my Swift Accelerator app development class in particular, I realised that the app I “made” in 45 minutes was comparable to what they’d take 2 weeks to struggle through. Wouldn’t it be better for students to have a working product quick, and then iterate on it? We could just teach students the basics, then get them to “vibe-code” their way to awesome apps.

I posed this thought to my co-instructors at Swift Accelerator Jia Chen and Sean — both former students, from the first batch in 2018 — and I was surprised at the vehemence of their feedback. They worry about:

  • How it’ll degrade the students’ learning
  • Students generating code they might never understand
  • AI generating the wrong code
  • How it just changes what the class is.

All valid points! But I wonder about students who fall behind in my class — would this help engage them more? The feeling of creating something so quickly with AI can’t be understated. Then again, I do acknowledge it’s short-cutting the hard work of comprehension, understanding, and perhaps creativity that comes with “manual” programming.

I don’t have any answers yet, but for this year’s class, I’m intending to take a couple of groups with which to run this experiment.

* Positive vibes appreciated. Kiddo knows about Perplexity and he knows the AI is great at finding answers from specific questions from specific practice papers — a power he’s abused to spend more time playing video games. Gahh!

One Million Checkboxes

In June, a programmer, Nolen Royalty or “eieio”, released a web-based mini-game, onemillioncheckboxes.com, which allowed users to check or uncheck any of 1,000,000 checkboxes — and when they did, it changed for everyone viewing the site simultaneously. The goal was to get everything checked at once, which was nigh-impossible. The site went viral: 500,000 people ended up checking more than 650 million boxes in just two weeks. The Washington Post described it as “the most pointless site on the internet; it’s fantastic”.


In August, eieio detailed an unexpected, and remarkable, outcome of the game in this blog post :

  • Some technically-savvy teens discovered they could do more than just random clicking.
  • They realised they could encode the messages as binary data (1s and 0s), and began doing all kinds of weird tricks to send secret messages and graphics to anyone who could decode them.
  • eieio followed the breadcrumbs, and found the teens on a private Discord chat!
  • He had a great time chatting with them, and was just genuinely blown away by their ingenuity.

I loved this!

First, because the initial product was about making something useless and fun — and I always love seeing useless and fun things my students create with code.

Second, because this useless and fun thing managed to inspire young people to form their own learning communities, share discoveries, and build on one another’s ideas.

It speaks to what I’d like to achieve as an educator — create spaces and enable students to explore, experiment, and find their own paths to understanding, perhaps in ways that I never anticipated.

I also really liked how he closed his video version of the blog post:

I found this so moving. As a kid, I spent a lot of time doing dumb stuff on the computer, and I didn’t get in too much trouble for it, like when I, for example, repeatedly crashed my high school mail server. There’s no way that I would be doing what I do now without the encouragement of people back then. So providing a playground like this, getting to see what they were doing, getting to provide some encouragement saying, “Hey, this is amazing!”, was so special for me. The people in that Discord are so extraordinarily talented, so creative, and so cool. I cannot wait to see what they go on to make.

The blog post and video are great, but watch out for some swearing and crude humour in the screenshots, if any teachers reading this want to send them along to students ????

Happy Teachers’ Day

Happy Teachers’ Day to:

My wife, who every day, brings all her primary school teacher experience to bear for our kids’ education, especially in Chinese language;

My parents, with over 60 years of teaching experience between them, part of which convinced them to spend weeks persuading me not to take a teaching scholarship 25 years ago;

My teachers, most of whom might no longer be teaching, but whose lessons still resonate after all these decades;

My teacher friends and peers, especially those still in the service, because look at all the lives you’ve touched! Could you have imagined that 20+ years ago when we started?;

My ex-colleagues, wherever you are now, for having supported me as a beginning teacher who unfortunately never quite stayed long enough to outgrow that term;

My current colleagues, who create curriculum and programmes and still step into classrooms to teach our odd little non-academic subject;

My kids’ teachers, who my wife and I try to bother as little as possible, because we know the kids love you and that’s really nearly all that matters;

All the teachers we work with, for giving us a chance to bring our lessons to your students;

And finally, to my 25-year-ago self, who — as teenagers are wont to do in the face of sound parental advice — thought a teaching scholarship to go study in the US couldn’t have been *that* bad an idea. I’m glad for the choices we made, and I’m grateful for the people who got us here.

Happy Teachers’ Day.

Code in Place

This week, I finished my final weekly volunteer session with my Code in Place section for 2024. Code in Place is a free online introductory programming course offered by Stanford University, teaching the fundamentals of Python programming based on the university’s flagship CS106 course.

CS106 has been a huge inspiration for me ever since I took the class in fall quarter of freshman year (in 1999!), and especially since I took CS198, the course where they taught us to run our own sections. I don’t think I’m overstating things when I say that CS106 + CS198 have been transformative experiences for me: My times section leading for CS106 were some of my fondest Stanford memories, and the inspiration and energy from then have informed my career for the last 15–20 years as an educator here. I’m not certain we’d have Tinkercademy or Swift Accelerator now if I hadn’t been through those.

Thanks to all my students, mostly from halfway around the world, for showing up every week, putting in the work, and for participating actively in class. This was some of the most fun I’ve had teaching an online class in a while. (Yes, the cat made an appearance during section.)

The Code in Place team remains a huge inspiration — thanks to profs Chris Piech, Mehran Sahami, and the rest of the team at Stanford CS for this opportunity, all the teaching training materials, and for making this available to everyone.

Super cool too that I managed to reconnect with Leoson — an ex-student from over a decade ago when he was in high school — as a section leader whose post I happened to stumble upon in the forums!

Pictured: A screenshot of the section homepage, showing “Next section: 2 days and 2 hours ago” ????)

Screenshot

The day I lost a child on the Tube

From the Teacher Network Blog on The Guardian:

Twenty years ago our blogger lost one of his pupils on the London Underground and didn’t even report the incident to the child’s mother or his headteacher… fast forward to the present day and it’s a very different story

A little old in Internet-time, but I just got around to reading it, and it’s a fun read with a very insightful conclusion that’s not “OMG look at kids and parents nowadays ughhhh”.

When I first read the title, though, I thought it was “the day I lost a child on YouTube”. THE HORROR

An argument for teaching Computer Science over basic Math

An interesting argument: that calculating devices are now ubiquitous, and math should focus on computational problem-solving instead of drilling and memorisation. An example the author cites:

Computer languages allow students to transform ideas into action. Here is a simple rule that a math teacher might describe to her students:
If the number is greater than 9, carry the 10’s place; otherwise add the number to the bottom row.

The solution for this can be expressed as an if/else statement:

if number > 9:
carry += number / 10
else:
bottom += number

There are, as expected, plenty of opposing views in the comments, but it’s good food for thought. Also noteworthy: the comments aren’t completely stupid. Not-completely-stupid comments! On the Internet! WHAT IS THIS WORLD WE’RE LIVING IN

Nobody Wants to Learn How to Program

From the blog behind the “Invent Your Own Computer Games with Python” book:

“[For] the casually interested or schoolchildren with several activities competing for their attention, programming concepts like variables and loops and data types aren’t interesting in themselves. They don’t want to learn how to program just for the sake of programming. They don’t want to learn about algorithm complexity or implicit casting. They want to make Super Mario or Twitter or Angry Birds.”

We’ve actually found that our students are usually quite happy to spend lots of time making silly console-output programs, like printing a pyramid of asterisks. However, the intro programming courses we’ve conducted have been for a fairly self-selected bunch.

The book is available [online](http://inventwithpython.com/chapters/) for free, and it certainly looks like a great instructional resource.

C’est la Z: a computer science teacher’s blog

Mike Zamansky is a very experienced and highly-regarded computer science teacher in New York, and founder (I think?) of the upcoming New York City Academy of Software Engineering (here’s [Joel Spolsky](http://www.joelonsoftware.com/items/2012/01/13.html) on the topic). Imagine, then, my delight at discovering that he’d recently started blogging again.

I love his [latest post](http://cestlaz.blogspot.com/2011/12/my-favorite-student.html) on teaching:

I’ve been thinking a lot about my career as a teacher recently. I decided to leave industry over twenty years ago. As teachers, particularly teachers with technical backgrounds we leave a financially lucrative field to enter one with very few financial rewards. It’s also a field very much under attack, particularly in recent years. […]

So, what do I get out of the deal? Well, when I hear form my graduates, I know that I’ve made a difference. Also, the friendships I’ve developed over the years.

His other pieces are great, too — [thoughts](http://cestlaz.blogspot.com/2012/01/pretty-sneaky-sis.html) (with starter code!) on a software engineering class project that teaches design through implementation, some [reflections](http://cestlaz.blogspot.com/2011/12/ml-and-ai-courses-how-they-were-taught.html) and [suggestions](http://cestlaz.blogspot.com/2011/12/stanford-classes-what-id-do-next.html) on the Stanford profs’ CS classes, and some details of a [lesson module](http://cestlaz.blogspot.com/2011/12/wheres-waldo-text-style.html) he developed to teach 2-D arrays (again, with code). Fantastic.