If there's one message I've been pushing across all of the Talk Python episodes, it's that programming is a superpower.
Rather than all of us abandoning what we're interested in and becoming CS majors, we can take our passion or our expertise and 10x it with a little programming skill.
In that case, we should be teaching kids fluency in programming at a younger age.
And yet, almost every platform or example meant to do so pulls its punches.
We teach kids programming concepts, but not code itself.
We'll use these blocks because text-based programming, that's a bridge too far.
But it's not, and that's why I'm excited about CodeCombat.
It's an online coding platform that uses real Python syntax to guide your hero visually through a dungeon full of challenges.
Yet the editor in customized error messages means this is approachable for kids before they can even reliably type.
On this episode, you'll meet Nick Winter, one of the co-founders of CodeCombat.
There's a lot of philosophy behind the tool and technology to make it kid-friendly and real Python at the same time.
Oh, and it's running Python in the browser.
This is Talk Python to Me, episode 278, recorded July 19th, 2020.
Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.
This is your host, Michael Kennedy.
Follow me on Twitter where I'm @mkennedy.
Keep up with the show and listen to past episodes at talkpython.fm.
And follow the show on Twitter via at Talk Python.
This episode is brought to you by Linode and us.
Have you tried to learn Python but got stuck or lost focus?
We know how it feels to try and jam fact after fact, loop construct after turn hair expression, into your head.
At best, it's boring.
At worst, it can turn you off programming altogether.
That's why we built our course, Python Jumpstart by Building 10 Apps.
This course guides you through carefully planned applications.
It starts simple but progresses to quite real apps.
Best of all, you won't be learning dry facts.
You'll be learning like the pros do by building real applications and learning in context.
If you want to start building with Python, just visit talkpython.fm/course to get started.
Nick, welcome to Talk Python to Me.
Oh, thanks for having me.
Yeah, it's great to have you here.
Your platform, Code Combat, is something I've been a fan of for a while, ever since I came across it.
So I'm looking forward to talking to you about it.
Before we get into that, though, let's start with your story.
How did you get into programming?
My dad was an engineer at IBM doing custom chip designs for a long time.
And so he had the first big open source home automation project written in Perl.
And he would even have neighborhood kids around mentoring them in coding and all this sort of stuff.
And I never tried it.
And so that's not how I got into coding.
You had this chance, but you didn't take advantage of it.
I don't even know.
Maybe I just thought that was like a dad thing.
I don't know.
But like, I never tried it.
I was doing all this other stuff.
My mom was more on the artistic side, writer.
And I was trying all the writing really terrible poetry, all that kind of stuff.
And so when I got to college, I had no idea what I was going to do.
And I tried everything.
And chemistry class, maybe not so much fun.
Poetry class, pretty fun.
Tried a coding class by luck.
And I was like, damn, this is so boring.
And but that was like the first, you know, part of the semester, right?
Because we're coding in Java.
And, you know, at this year, I've had like, I've had like billions of years of advanced mathematics
class.
And it was like, all right, we are going to do simple arithmetic in Java.
And it's going to be really hard.
And I was like, why would I need to make a computer do something that I already know how
to do since like 20 years ago?
But like, and we got to the end of that first semester, though.
And although it was kind of boring, it was really easy for me, not so for necessarily all
my classmates, just the way that it was taught, typical failure rates in computer science programs.
And we get to the end.
And then there's this project.
And the project is a rabbits and foxes simulation.
And I was like, okay, got coding it up.
It's kind of cool.
I can say these colored squares on the screen.
There's the red one.
There's the, wait a minute.
Could I make another one?
And of course, this was a sample project, which almost everything done for you so that
you get anything done.
And I figured out, I was so proud.
I put in zombies.
And so now there's the black squares on the screen.
I'm like, wait, they're infecting them.
And there's undead rabbits and zombie kings.
And I was like, wait a minute.
You could just make stuff with code.
You could just do whatever you want.
It's creative.
Wait, oh, this is cool.
I'm into that.
So then I got into it.
So this college class, finally, I got lucky with like the last project of that first semester.
And then I was hooked.
And so we had that whole computer science undergraduate thing in Java.
And I was like, man, Java is kind of terrible.
We got into Scheme.
We're doing a lot of that.
I was like, this is great.
And then we got into Python because I actually had to start writing some real software.
And that was where you kind of put together a lot of the high level elegance and power
that you would have from something like a Scheme.
But you don't have to be a genius hacker, which at that point, I definitely wasn't to like
actually write something to put some UI on the screen and get people to use it.
So that's awesome.
And you didn't have to have like 50 closing parentheses.
There, I remember doing a lot of closing parentheses and it being real, real messy.
Scheme is such a crazy language.
Scheme is less.
I took that as well in college as like my CS credit or whatever.
And it kind of drove me crazy.
But yeah, I feel like hearing your story that it's pretty common that the way programming is
taught in universities, especially at the low levels, I think it's like, we're just going
to teach you the facts and you have to wait four months before you can actually do anything.
And you're just going to have to have this delayed gratification or you have to be motivated
beyond the near term, right?
Like I'm going to spend a whole week doing loops.
I don't really have anything to loop over.
I don't care about looping, but we're doing loops.
And then the next time we're doing functions and we're doing types and then we're doing
interfaces.
And like it's taught is just like a series of facts.
I feel like that strips out a lot of people because they don't get to have that experience
you had at the end of the class until the very end.
And by that time, a lot of people are like, yeah, no.
Well, yeah.
And it's even worse than not having anything to loop over because they do give you something
to loop over.
And it's math.
It's like we're doing arithmetic here.
Or like it's the terminal stuff.
Like let's print some strings, but like the length of the string.
And like that doesn't get you going.
That's not what's getting most of these kids out of bed.
It's not what's getting like really matters to folks.
And so it's sending the message, hey, coding, computer science.
This is like math, but geekier.
So, you know, if you're not a math person, stay away.
That is wrong to me.
Yeah, I agree.
Because there's a lot of creative aspects.
There's a lot of amazing things that you can build.
I think it's a little bit less so now with all the mobile apps and like applications
have really infused society or come across like deeply.
They're all over society now and they're somewhat beautiful.
A lot of times 10 years ago, that wasn't even the case, right?
Well, but the thing that you're starting off with is rarely going to be a beautiful mobile
app that you care about, especially if you're in a formal learning environment.
Right.
Maybe it's worse.
Maybe it's you look at Instagram, that mobile app.
You're like, I want that.
They're like, no.
What you're going to do is you're going to implement the quick sort algorithm in scheme
by hand over these numbers.
Why would I do this?
I would never do this.
For some of us, it kind of gets you going.
I liked that part of it, but, you know, I didn't know that I would like that.
And I never thought like, hey, let me give this a try.
Yeah, I think ultimately people who are really into it do get to where they like that.
But I feel like you've got to get to the, hey, this stuff is awesome sort of place.
And then you can start to appreciate and dig into those things.
So if we think then what happened next.
So I was in college and I was learning all this coding stuff and I was also learning math and
I was learning Chinese and I was reading Paul Graham essays and Paul Graham essays have a
lot of great stuff in there about your high level languages.
But they also have this entrepreneurship stuff, which I had never heard of.
I have been coming for like the scheme talk and the list talk.
And he's like, he's got one of these where he says, oh, you know, you shouldn't have a job.
You weren't meant to have a boss.
You should just start your own startup and do your own thing.
And smart young people should just start their own startups.
And I was like, yeah, man, that sounds great.
I don't want a job.
I'll just start my own startup.
So I went to my roommate and I was like, hey, hey, hey, we've got to start our own startups.
He program says, who is the what?
No, I'm doing my econometrics homework.
So I get my Wall Street job.
And so stop bothering me.
And I'm like, no, no, no.
I pestered him until he's finally fine.
If you can think of something that's a good idea that like as a business, then we can maybe
give it a shot.
Until then, Wall Street, econometrics, go away.
And so I was pondering, pondering, pondering it and had all sorts of really stupid ideas.
And I went to China as I was learning Chinese for a few weeks.
And I had this really crazy experience with reverse culture shock.
And I was really sick.
And it was like four in the morning.
And I saw this other guy who was named basically the same as me.
And he's the only other like Chinese and computer science student in my same year.
And like randomly met him in Beijing.
And I had no idea he was going to be there.
Like Beijing is a city of like 20 million.
Yeah.
And so 4 a.m.
We're getting up to go to the Chinese McDonald's on the way out to fly to the airport.
I was like, what is going on?
I see him.
He's writing Chinese characters.
On his Nintendo DS practicing it at like the stroke level.
So he's got this handwriting recognition.
And I'm like, man, that's so cool.
I need to learn Chinese characters like that.
And he's like, what?
No, I'm playing trauma surgery.
I'm like a Japanese surgeon in combat, like saving patients.
I'm like, oh, I thought you were practicing Chinese.
Oh, wait a minute.
I do want to practice Chinese like that.
So I, and that was the first kind of Python program, right?
We got into it there because I was like, hey, I need to write some software that makes it
so that you can write characters in Chinese at the stroke level and like practice that
way.
Because it takes a lot of learning Chinese characters to really learn Chinese.
And that's like the hard part.
So it's all that part.
Like, hey, that's got to be a business there.
People pay for that, right?
I pay for that.
Well, I mean, I don't have any money, but I would, I would use it.
And so you can see we're thinking much more from the technology aspect at that time than
the business aspect.
But we say, hey, there's a problem.
We can solve it.
And, you know, we reach for the real practical language here.
We're not pulling Lisp off the shelf where we're going into Python.
And I hardly knew it.
So the first Python program that I wrote basically was this character editor that would like start
to form the data layer for this Chinese language learning app.
And with that, I was able to convince my roommates to kind of jump and not go and work in Wall
Street, which is great because that was 2008.
And my roommate was actually not a terrible time to go to Wall Street.
Then lost that job.
Yeah.
He would have had a good two month run there maybe.
But yeah, yeah, yeah.
Yeah.
So we, then we're just some guys hacking in our house and working on this thing, see if
we can get it going.
And, you know, even though we were really kind of terrible coders at that time, but, you
know, Python was flexible enough that we didn't get bogged down in architecture.
And we wrote that we had, you know, at the time, we had, you know,
at that time there was no iPhones.
It was like welcome tablets and, you know, handwriting recognition, learn some Chinese,
hack on some code.
And, you know, that took off.
So we made the, and, you know, the backend we did in Google app engine with Python and
Django.
And we kind of got it going.
We got profitable.
We made the number one app for foreigners to learn to write Chinese characters and off
to the races.
So the first Python program I wrote ended up, you know, pretty good, man.
That's pretty awesome.
That sounds like a useful app.
And I think it captures a little bit of what you've done with code combat as well.
in the sense of, oh, I don't want to just sit down and learn this rote memory practice type
of thing, but I want to learn it in the context of play.
If we think of kind of the transition from Skritter, which is the Chinese character running out to
code combat, it was the same founding team.
And we had, we'd been running it for five years and we said, Hey, well, you know, we've made enough
money to not need to work again.
Let's retire.
And I made it about nine days.
I was like, guys, I'm so depressed.
We got to do another one.
And they're like, okay, what should we do?
We had some really stupid ideas on there too.
We're like invisibility cloaks that actually work.
Let's do it.
And they were like, no, no, what do we know guys?
We know how to make ed tech teach hard things.
Okay.
Cause we take this language learning approach to learning Chinese characters.
Obvious.
It's a language.
You should do that.
And then we thought, okay, coding.
That's something we cared a lot about.
Me and my other co-founder, you know, he had also learned in college.
We both wished we'd learned earlier.
And we're like, okay, well, yeah, those CS classes could have worked a lot better if
we kind of built the fluency first, as opposed to kind of the intensive learning.
We do the extensive learning where it's easy, just right at that zone of proximal development.
You're going to go for hours in flow state as opposed to go for half an hour and, you know,
rage kick your segfault computer out of the window or something.
And so we're like, all right, well, if you can build the convert, if you can make it more
like language learning than like math, where you're having a conversation with the computer,
then I mean, language learning, if you have a kid and you have a native speaker and they
have a one-on-one conversation and the native speaker can bring it down to the kid's level,
like, obviously that kid is going to learn that language.
It's not a question of if they're like a language person, like people think of themselves as math
people or not math people.
Like that would be absurd to think, oh, I'm not a Spanish person.
I can't, I can't learn Spanish.
I mean, that would mean something else, right?
I'm not from Spain.
But so we were thinking, okay, if you use these methodologies where you have just like native
speaker conversation with the learner and you can bring it down to the learner's level,
then that should work, right?
If computer science, the hard part of that is actually the coding part, as opposed to
the science part where you, all these other things are pretty easy to explain in lectures
or there's not all that much science in what most people do with it either.
It's kind of the craftsmanship and being able to express your thoughts to the computer.
Well, if we have, we need a native speaker, well, who's the native speaker of coding?
Well, it's the computer already.
Like you don't need a human for that, but the computer only speaks computer language.
So you, you, you get the beginner coming in there and they're saying, you know, they're
trying to print out their hello world, but you know, they're like putting some extra spaces
in there, whatever they do.
Of course, they're going to make some mistakes.
Normally that syntax error, unexpected token.
And they're like, yeah, what does this mean?
And they need someone to explain.
Right.
I like, I forgot the comma, but it knows what I mean, right?
Like, no, it doesn't know what you mean.
It has zero forgiveness.
Yeah.
No forgiveness.
And it's because all of the code engines out there.
And I mean, I love the Python interpreter, but like it, like everything else was designed
for professional software engineers to use by professional software engineers who have
this curse of knowledge.
And they're like, oh yeah, this makes sense without ever thinking like, what if it didn't
make sense?
What should you say?
And so not at all suitable for beginners, but that's every text-based code language engine
out there that I know of, right?
Error messages are quite arcane.
And that's a huge problem in learning to code because you need someone to interpret.
So if you did something as simple as seemingly simple as make all the error messages make
sense, then that'd be a huge step towards having that conversation flow.
So for example, in CodeEngine, in CodeCombat's CodeEngine, we have written a lot of codes
so that, you know, no matter where in the stack the error is, whether this is a syntax error,
a linting error, it's a runtime error, it's maybe not even an error, but it's just a logic
error and could be valid, but we happen to know it isn't for this level that you're trying
to do.
Then we'll say beginner-friendly error message.
So it will say, don't put a space, or that should be a capital R, not a lowercase R.
Did you spell, you said dwan instead of down, you should probably fix that.
Yeah.
And everything else is like syntax error and expected token or, you know, undefined method.
Like, those are not words.
So when we came at it with this language learning perspective, then you have the native speaker,
which is the computer, get it to speak the beginner's language.
And then, you know, people are just off to the races.
Like, every mistake they make is a teaching opportunity.
They solve it in 10 seconds that it takes them to read the error message and edit the code.
And that is so much faster.
It's that conversation.
So if our insight for teaching coding was you have that conversational mode as opposed to
that intensive kind of abstract, geeky instruction kind of mode, and then you have to make it mean
something like you were saying to the learner.
And what do you, you know, if we're targeting kids, especially here, what do kids care about?
They want to make and play games.
You want to make websites and apps.
And those are the things that matter.
And so if you can get them learning to code and making that stuff quickly, then that has
meaning not just for your geeky boy who sees themselves as, you know, a coder someday, which
is a huge minority of the population.
It's more like basically everyone because 97% of kids play video games.
So like, what was I doing instead of learning all this coding stuff from my dad?
Well, I was just playing video games the whole time.
And so if I had had a video game that taught me to code, maybe we could, we could get out
on that a little earlier.
And same thing for co-founders, right?
So we're like, can you make it so that you're just playing a game and not like gamified where
you just get badges and points?
Because with our first business, Skritter, you know, you would get, the users would say,
hey, it's so great.
It's like a game.
And we're like, no, it's a hardcore learning.
So what do you mean?
It's not like a game at all.
I'm like, well, there's, you know, you go fast, there's animations, and then you get
points.
So like, no, no, no, there's no points.
What do you mean points?
There's no points.
Well, the number of characters, you know, it's kind of like points.
There's a graph.
A real game would have this, this, this, this.
And they're like, that's great.
When are we going to get those features?
We said, this is a tiny market.
And we're already number one.
We're not going to build that.
Wait a minute.
We could build that for this other market, which is much more starting to learn about business
and markets here.
This portion of Talk Python to Me is brought to you by Linode.
Whether you're working on a personal project or managing your enterprise's infrastructure,
Linode has the pricing, support, and scale that you need to take your project to the
next level.
With 11 data centers worldwide, including their newest data center in Sydney, Australia,
enterprise-grade hardware, S3-compatible storage, and the next-generation network, Linode
delivers the performance that you expect at a price that you don't.
Get started on Linode today with a $20 credit, and you get access to native SSD storage, a 40-gigabit
network, industry-leading processors, their revamped cloud manager at cloud.linode.com, root
access to your server, along with their newest API and a Python CLI.
Just visit talkpython.fm/Linode when creating a new Linode account, and you'll
automatically get $20 credit for your next project.
Oh, and one last thing.
They're hiring.
Go to linode.com slash careers to find out more.
Let them know that we sent you.
Could you even do it?
And so that's where we spent years and years in the R&D phase, building up code combat, seeing
if we could get this interpreter to work, seeing if we could get the game engine to work, seeing
if you could get those two things to work together.
And that was just a lot of hacking and hacking and hacking, like we do, just sitting in my
succession of tiny, now in the Bay Area apartments, and eventually got something going, eventually
got those kids not just in JavaScript, which runs in the browser, but you have it in Python
too, because the code engine supports these other front-end languages.
Which is such a nice learning language.
Oh, it's the best.
I think Python's special in that regard, in that it's good for learning, but you can build
professional things like Instagram or whatever else, right?
Pinterest, you name it.
It spans that spectrum, which I think is one of its superpowers.
Oh, it's so fantastic.
And if you look, depending on how you count, Python and JavaScript are the top two languages.
Maybe some ways you count Java gets in there in the top three.
But to have Python, which is so great for learning, and also so great for everything else, also
be so popular to where it could be the default choice if someone doesn't have a reason that
they're coming in to learn something else, like, hey, try Python.
I think we haven't measured this super exhaustively, but I think it's about a grade level easier
than JavaScript.
And for what we're doing, Code Combat, it's all basically the same stuff.
You're not doing any language-specific things in the beginning, but it's the syntax and your
curly braces versus your colons and indentation.
Like, you know, it's a whole year worth of, you know, kid development on average, thereabouts,
easier to do it in Python.
Yeah.
So you can start sooner.
And yeah.
So let's, I don't think we formally talked about what Code Combat is.
We talked about the history, which is incredible.
I had no idea about it.
But you tell people what Code Combat, like, what's the experience when you go there as a learner?
You talked about playing it as a game.
Like, what is it?
Yeah.
So it's the game for learning how to code.
We can qualify that a little bit to say it's aimed at kids age 8 to 18, basically as soon
as they can type.
Not to say that only kids play it.
We have a lot of adults play it.
We just aren't marketing it in that audience.
Still, what are the best ways to learn to code from scratch?
And so you get in there, you're playing a game, you're controlling your hero.
In the beginning, you're kind of escaping from dungeons, solving mazes, killing ogres, and
you're building your armies.
And it progresses from there.
So dungeon crawling role playing game in the beginning.
And then as you learn more pieces of code, because everything you do in the game, you're
coding, right?
You can't even move your hero without coding some stuff.
But as you go through the game, you get more items.
And so this could be a new sword, a shield, a pet, whatever it is.
Those things give you new APIs and new control structures.
And so as you progress through this really natural game-based learning progression of loot and
XP and leveling up and new challenges, it's introducing and making you use and learn and
practice different coding concepts and new abilities.
So you're not just leveling up your hero, you're leveling up your knowledge of coding.
You can do that in Python, JavaScript.
We have CoffeeScript, Lua.
In China, we have C++.
Java could be turned on at any point.
All those things go into this code engine because what we're really trying to do is be the best
way to learn to code.
And so whether it is magic craziness over in the code editor, whether it's kind of deep
dive into the code engine, whether it is kind of custom tuning on the game engine and
the levels, whether it's just like a look at the overall pedagogy.
Everything is trying to get the kids to learn coding and computer science, both more engagingly
and more efficiently than otherwise they would be doing.
So that is what it is.
We do that for kids at home, which of course doesn't need to be kids, but it's usually kids.
We'll also now, a new thing we're doing is we will give you a coding teacher on video call
to help you go through this stuff as well and maybe explain a little bit more about the concepts
around it.
And then we also have it in the school.
So the computer science curriculum, the new teacher needs to run a full coding class, full
computer science class, even if they don't have any coding background.
Because you have the self-paced software.
I mean, each computer is kind of doing a lot of the instruction in dialogue with the student.
And then we provide all the curriculum and lesson plans and resources for the teacher
to run that class.
And it's been doing pretty well lately just because with COVID-19 and all the school shut
down, you need something that's distance learning friendly in the schools that kids might actually
want to do, even if they have no better options when stuck in the classroom.
Now the whole internet is right there on that same computer.
So you got to engage them where they are.
And I think it's super engaging.
So let me try to talk a little bit about what I think the experience feels like.
And it's definitely like what you said.
You have these different, you call them worlds, right?
Yes.
In the home version, you would progress from the dungeon world to the forest world, the desert,
the mountain, the glacier.
And the kids really, really are excited about the volcano, which doesn't exist yet.
But it's kind of like there to tease them.
But if you got all the way to the glacier, like, you know, you probably all plus code the volcano
because it gets pretty advanced.
Yeah, for sure.
So what you do is you go into these worlds and then each world has maybe 40 or so little
puzzles or challenges, right?
So you, if you go to like one here, if I click on it, it'll say, okay, I'm going to descend
further into the dungeon.
So what I need to do is use a loop to navigate.
And then it talks about the lessons I'm going to learn.
I'm going to get arguments, basic syntax and while loops.
And then when you go in there, you get your little character.
And this is like a visual thing, right?
It's not like a mud or a text-based game.
It's like literally the characters are there, which is super cool.
And then when you go do the programming, and this is the thing that I thought was really
the magic of what you guys have built is that you've got this nice code editor that's true
Python, right?
Or the other languages.
But I think the Python one is extra special.
And when you go there, you type Python code.
But the editor has a special kind of autocomplete.
I think you would say that is incredibly beginner friendly.
So like you might have to type hero dot move, right?
Parenthesis, parenthesis.
And if you just type the word R or RI, it'll like autocomplete hero dot move, right?
It'll complete the whole thing.
So you can just type a little tiny bit of what you want.
And I think that that's so special because you don't have to form it all.
Like if you misspell hero and you type dot in a regular editor, you get nothing, right?
Right.
Or if you just type the word right, it's like, oh, what you actually have to do is
hero dot move, right?
So I feel like it's incredibly supportive for writing real code rather than, you know,
I think there's this trade-off that people always make.
Like, oh, you can do like a blocky scratch language where you drag the blocks around and
you get like a looping block and you drag the blocks into the looping block.
And it's like, that's maybe programming thinking, but that's far from programming.
Yeah.
Real code.
Whereas this, I feel like it's almost as supportive, but you write
real code and you see it actually do things.
Well, there's definitely a lot more to writing, even in CoCombat, writing this text-based code,
whether it's Python, JavaScript, whatever, than to dragging the blocks around in something
like Scratch or Blockly.
Those are really great introductions to computational thinking, I would say.
And you can actually write a bunch of stuff in there that gets fairly advanced.
The problem is you do not learn some of the key skills by doing that.
So there are some things that like, yeah, this is just as good for conceptualizing how a loop
works or variable or something like that.
But you are not building any of the fluency with formal syntax that you're going to need
eventually.
And you're not building most of your facility with debugging.
And, you know, a few other things there.
So the problem comes when kids tend to move from those drag and drop block-based visual programming
things to text-based.
And they've actually learned a lot of coding, computational thinking concepts.
But they start facing that blank editor page.
They try to type something in.
They don't know the syntax.
And they feel like they've learned nothing.
And a lot of times they rage quit out of coding forever at that moment.
And really, they just had a few extra things to learn.
And then they can go on and express those concepts they had gotten practice with.
But that transfer is pretty hard to show.
And people always avoid starting there because it's so complicated.
The teachers will have such a hard time with like setting up Python or JavaScript and then
debugging it.
with this environment being so supportive in the editor, like totally geared for, I'm going
to help you write that line of code from, you know, 10 options that you might potentially
write.
It makes it entirely doable for an entirely different level of learner.
Yeah.
So the, we had learned a lot from Brett Victor's learnable programming essay when we were starting
out.
And that we tested out a lot of his more advanced things too, like time travel, debugging, and
all this showing the variable state.
It turns out a lot of that stuff is not what the learner needs in the very beginning.
Although really great thinking.
And I'd love to get that some more of that turned back on for more advanced players someday.
But the things that you really need to lower that hurdle of formal syntax are just being
incredibly forgiving, but sensitive to the kinds of mistakes that people are making.
And this goes way beyond what we would thought it would ever come to in terms of what you need
to do in that text editor so that students aren't bleeding all over themselves and cutting
themselves on sharp edges.
So for example, let's say that you, like you mentioned with the autocomplete, you got to
do the fuzzy ordering because they're typoing all over the place.
So this fuzzy search through your options, and this would never work in a real code editor
because you've got hundreds, if not thousands of things that you could autocomplete.
It's not going to be a great experience if you're starting to pop up all these options.
But when in CoCombat, we can start them off from a set of four APIs and progress adding one
or two at a time from there.
So they always have a sense of what's available.
And then they learn just how many characters or digits they need to type in order to activate
those.
And that's that smooth progression.
Okay.
So we knew we were going to need something like that.
What we didn't know is stuff like if someone is typing an argument, like a number or a string
or something like hero to attack Brack and Brack is the name of the ogre.
Every kid out there, they're going to type, you know, maybe hero dot, maybe HA, maybe ATT.
They're going to select the attack.
Now you, you got to highlight the inside of the quotes for them, because if they just start
typing, they're not going to type the quotes.
They're going to delete them.
They're going to get one off.
Those kind of errors are kind of hard to fix.
They're going to type, replace the enemy name with Brack.
Okay.
They're probably going to do it with lowercase.
So you have to fire a message that says, Hey, that should be an uppercase B.
Leave off the quotes.
Probably all those kinds of things you've got to detect, which normally parsers have a hard
time.
They're like, Oh, I don't know any sort of code here.
Like the ending terminus of this string constant literal blah, blah, blah.
Not only their message is weird, but they don't know what line it's on.
Whereas like, we're like, yeah, we know we have all this data on where students make mistakes,
but they need to hear even what error message work.
You got to say the right thing.
You got to know for that particular program that they're trying to write, which again,
a general purpose IDE doesn't know what program you're trying to write.
So it can't do this kind of thing, but we can.
But then you have to make it so that when they type Brack and they type that K and they hit
enter, they always have the cursor inside the string and the parentheses.
So in any other code editor, bang, you got an ending quote and ending parentheses on the next line.
Like, good luck, right?
This one, we're like, you know, for a long time until they're level 30 or something like that.
We don't want them to deal with that kind of mistake.
So we're just going to move the cursor to the new line and run the code.
And so there's a ton of little things like that that you need to do because you don't
have the basic facility with text editing.
Everything from that to when they're deleting, you need to do extra, extra, extra pauses when
you delete to the beginning of the line before you start to go back and delete previous lines,
you know, highlighting the way that the indentation works so that visually they can see like,
hey, this isn't correct, like error messages that there's all sorts of things that like
could technically be valid code, but we have to point out as soon as they do it, like, no,
you can't have two while true loops in a program.
Like that is not going to make sense.
And then one thing too, like you want to have your characters in your game,
like doing important, interesting stuff.
The easiest way to get them to do more of that is to do an infinite loop where they do the thing.
But while they're coding that loop, if they don't have a blocking action inside the loop,
normally then your program grinds to a halt because time doesn't pass.
And so all sorts of crazy hackery inside the engine whereby they're writing fully general
purpose code, but we're digging in and saying, hey, does this frame have this or that kind of
continue or break or condition?
If not, we're going to add an extra like one frame blocking action to this and remove it.
If once they add an action that does something like moving or attacking or saying or something
like that, so that there's this magic behind the scenes that you need to do where it's technically
not how the code execution would happen, but it matches their mental model much, much better.
And then later when they get into conditionals, then you start to take that away and show them
what happens when infinite loop, which again, isn't just crash the browser tab.
It's like, hey, here's your infinite loop.
I disabled your hero and then he got killed.
So maybe you want to fix this by putting that here.
Your hero got tired and just like ran out of water or something.
A red X showed up under the one that didn't work.
Yeah.
So you have to do all these sort of things.
So like every sort of error makes sense, not just in the context of the code editor, but
also in the context of the game.
And you would never be able to do that if you hadn't written and have full control over
the stack and execution of your entire program.
So the custom interpreter that we've written has that like, because it will run Python,
JavaScript, you know, whatever language that you provide a runtime adapter to a JavaScript,
a Mozilla ASD.
So that abstract syntax tree gets executed by our interpreter.
And then whenever it calls out to something that doesn't exist in JavaScript or needs to behave
differently than in JavaScript, you know, that that we have a runtime language component that
makes it behave like that.
And being able to do it from, you know, top to bottom and back up lets you go in and mess
around with whatever layer of execution you need to.
This is where it like helps to actually have had that computer science class in college and
kind of understand how the compiler works.
Mess around in there.
But this stuff you have to do, you're like, oh, the student is messing around with this.
So we need to fuzzily check in this level.
We have these kind of possible strings that could work and these ones that shouldn't work.
And so over here, if they have a fuzzy match typo, we're going to adjust this error message
over there.
You need to do so much of that.
But when you do, they don't need to ask teacher.
They don't need to ask parent.
They don't need to like bang their head against the wall for an hour.
They just get it.
And that's really key for anyone learning anything.
But like, especially young kids learning something that like maybe is a little bit disconnected
from what they see other kids around them doing and wanting to do.
And, you know, that's that kind of thing if you want to get any kid into it.
Yeah.
I think you guys have done a really good job with the way you put that editor together.
It's super helpful.
It's clear that it's focused on helping beginners.
And I think the way that you put it together, you don't even have to really be able to type
in the traditional, like, you know, Cordy, don't look at the keyboard type of typing, which
you kind of need for programming.
You need to know, okay, where are the R and the I?
I mean, you got to sort of know, but like a fifth grader could totally do that, who maybe
just touch types without getting frustrated.
Because really, to solve a puzzle, you're probably doing eight, nine lines of code on a long one.
And you've a couple characters per line, right?
It's not that much of typing, but they still get that real experience.
And that's what I think is super special about what you guys have built compared to all the
other stuff that looks fun, or it's very approachable, like the blocky type languages.
But it has that big crossing the chasm sort of thing to go from there to like textual text-based
languages.
Yeah.
The amount of typing that you need will increase.
And the amount of difficulty of each level increases as you get further through the game.
So, whereas, you know, your middle schooler can probably do most of, I don't know, we have
like 600 some levels.
Maybe they can get through the first 400.
It really depends on them.
To do the later ones, they'll probably need to work through it with a teacher or a coach
just because all this stuff actually does get kind of complicated.
You're implementing some graph search algorithm.
Like, yeah, but you're 12.
So maybe let's talk about the graph search algorithm instead of just, you know, sitting out in front of
the computer and banging that out there.
But the really young kids can do the easy levels that you see where you're like, let's move
right.
Let's move up.
Let's attack the ogre.
Let's use the potion.
Let's do a while loop.
While loops, variables, function calls, not defining function, but function calls, XY coordinates,
all those things, any of these kids can get with the right kind of setup.
And then when you get into if statements, then you're thinking like, okay, well, this might
be a good stopping point for some five, six, seven year olds.
Others can totally get it.
I just saw a recorded video class that one of our teachers did with this.
I think he's eight in Hong Kong.
And the guy's like almost all the way through the mountain.
He's like commanding his armies.
He's he's doing different ways of looping over indexes.
I don't think he quite got to the module arithmetic, but like, you know, some of these kids are capable
of so, so, so, so much and they get super into it.
Talk Python to Me is partially supported by our training courses.
How does your team keep their Python skills sharp?
How do you make sure new hires get started fast and learn the Pythonic way?
If the answer is a series of boring videos that don't inspire or a subscription service you
pay way too much for and use way too little, listen up.
At Talk Python Training, we have enterprise tiers for all of our courses.
Get just the one course you need for your team with full reporting and monitoring or ditch
that unused subscription for our course bundles, which include all the courses and you pay about
the same price as a subscription once.
For details, visit training. talkpython.fm/business or just email sales at talkpython.fm.
And other kids like, hey, we'll just go and do as much as you're ready for now.
And maybe you come back to this in a couple of years as some of this abstract thinking gets tougher.
But my three-year-old, I had him start doing it.
And, you know, at that point, it's like 20 seconds to find the R key.
But then he types R and he can move to the right.
And actually meant to move to the left.
But like, you know, two minutes later, he's fixed it.
And he pressed the delete key and deleted everything.
You need to be despite all our protections.
But of course, I wrote the program.
So I'm like, OK, let's press the reset button over here.
But like he's gotten through several dozen levels.
He's five now.
So you can see how fast he goes through it.
But he gets super into it.
So it's not nearly when you're learning to code.
It doesn't matter if you're 5, 15, 25, 35.
Everybody's starting at the beginning.
And there's so few good software pieces out there to help you with that.
That it's one of the best ways, I think, to get started for anyone.
So that motivation from the game-based format is extra helpful at these young ages.
But it doesn't hurt anywhere.
Yeah, no, it's pretty cool.
Maybe we could talk through the different worlds.
So I got to figure out how to get back to it.
Yeah.
So you start off in Kithgar Dungeon.
This is the hardest piece to design because they know almost nothing.
And so you have to build up every piece of it from scratch.
And in a normal learning environment, that'd be pretty hard to design because it's just throwing
the book at them.
But in this one, we can vary the game scenario too.
So even if you need to do five or six or seven levels in a row where you're going from just
moving right up, down, left.
So maybe you do that, but there's an optional argument for how many times to move.
And then you've introduced arguments.
Now you can introduce an attack method where you can then put a string in there.
And you very slowly pace it out, but it keeps fresh because throughout you're getting new
items, you're getting new game scenarios, you meet new enemies, and different art all the
time.
So they're really thinking like, hey, I'm exploring this game.
And it does take a bunch of levels to get these basics in place.
But you get through that in the first dungeon, which people, you know, some kids are doing
this in a couple hours.
They've got, they can write code like move, hero.move down, hero.move down, hero.buildxy,
fence, 3420.
And then they have three different coordinate pairs of where they build their fence.
And they'll say, well, true, move, right.
And so that moves their hero down.
There's a bunch of ogres coming at them.
They're building fences to block off the attack.
And then they move until they get to the end of the dungeon and get the gem.
And that's the last level of the dungeon.
That one doesn't have a variable in it, but they also have variables in there.
So they can move up enemy equals hero without find your enemy attack the enemy.
They don't have any if statements yet.
So as we get into the forest and it opens up and we should have done this from the beginning
where the dungeon is still kind of more appealing to the boys because, yeah, let me get in this
dank dungeon.
It's kind of dark.
Let's hack some ogres apart.
It's not as violent as, you know, you would think from the name and the first setting,
but we sure could have made some different design decisions there.
So then you get into the forest and there's a lot of that, but there's a lot of like,
okay, let's corral our horses.
Let's build other things.
Let's defend the village.
Let's, you know, go and talk to the villagers.
And so there you're introducing if statements and Boolean logic.
You get your pet.
You got your pet earlier, but you didn't know how to do anything with it.
Now you can write event handlers and functions so that your pet can be doing stuff for you.
And you're of course increasing your kind of normal fighting capabilities.
You get to your first multiplayer arenas where you're writing your Python AI hero.
So use all your heroes capacities that you developed and you're either trying to get more gold than
the others or you're trying to just kill them or defeat them.
And, you know, from there you would move on into the desert.
And here we're doing more with numerical arithmetic.
I mean, this whole time you've been getting into the XY coordinates.
Now you can add them, subtract them.
You can do break and continue statements.
Arrays, for example.
Arrays start to happen in there.
You start to get object, a lot of it too, in the desert.
Because once you start to get arrays, you can do a lot more interesting tactics.
So you're, you know, arrays with this other stuff,
let's see you implement algorithms of, you know, finding the closest enemy,
finding the weakest enemy, finding the closest weakest enemy,
finding the coins, finding only the right type of coins, finding the best ones.
You're like optimizing all this stuff.
And that's really interesting for when you're kind of fighting in some of these battles.
Then once you get into the mountains and we're introducing while loops over indexes of the arrays and for loops over the arrays,
and you're starting to summon troops and you can command them to do things, you're getting into basic graphics because you're, you know,
moving in different patterns to draw the kind of the flowers that go behind you in this flower ring.
There's all sorts of like all through this time, you're constantly doing a ton of if, else, else, elif kind of statements because you need to activate all the special powers of your hero.
Whether that's to, you know,
whether that's to use your bash ability or shield or cast your magic spells or go invisible.
And the kids really love getting the new capabilities like that.
Yeah.
My daughter was blown away when she got a new pet and then she got two pets and she couldn't decide which pet was her favorite and what she would take with her.
And it was, yeah, it was, it was great.
Yeah, yeah, yeah.
And so then you're, as you move on through the mountain and here's where you know the basis of all the code you need to do really,
really well in some of these tournament arenas that will run, then the glacier will happen.
And the glacier is kind of like, all right, let's introduce the vectors.
And now you're doing vector arithmetic.
So operating with these various like linear algebra transforms only to you.
It's not been a linear algebra transform.
It's like, okay, vector dot rotate.
And let me think about it.
This is where it starts to get a little tricky.
We're introducing kind of the Boolean logic and, you know, counting in other bases and some of these graph search algorithms.
There's one where you just have to code up your team to play soccer for you.
And like, that's a lot of geometry and trigonometry there.
But some kids get that far by themselves.
Most of them will need to work through that with a teacher.
Yeah, it's cool.
And just to give people a sense, like the first engine, there's 43 puzzles, puzzle programs you got to write.
The forest has 121.
And the desert has 97 and so on.
So there's a lot of little problems that the kids can go solve and work on.
And they're pretty bite-sized.
So it's quite cool.
The target goes from three minutes per level in the dungeon up to like, once you get to the glacier, we're like, hey, at least you should take you like half an hour.
So there's a lot of content in there.
There's also a lot of hidden content that shows up if you, the system determines you might need a little bit more help.
Or if you go back and then you unlock secret stuff in the earlier worlds.
Because everyone is learning at different rates, they're going to need different amounts of practice on the same concepts.
So if you're doing levels particularly slowly or particularly difficulty, the system might say, okay, here's the next level.
But it's actually a practice level.
Some other student might not have gotten that level if they didn't need it.
Oh, interesting.
Yeah, that's clever.
So it can slow it down if you need to.
We don't have a way to really speed it up.
But then again, learning this thing is already going pretty fast.
Yeah, for sure.
Awesome.
Well, I think it's a really cool world you've created for these kids and basically beginners in general.
But it definitely seems like it's going to connect with the kids.
I know it did with mine.
So let's talk about some of the internals.
Yes.
You talked about the different languages.
We write Python in the browser in this cool editor with a special autocomplete that we talked about.
Where does it run?
So it runs right there in your browser.
And there's a few pieces of magic to make this happen.
So the first is we use the Ace text editor.
And then we've heavily customized that.
But it's a really, really great, fantastic base layer for doing all sorts of crazy stuff with your code editor.
So once you get the code, then we are feeding that constantly into a web worker thread that is parsing it, linting it, looking for kind of hints to give to the player.
Even pre-running it in advance.
So that once they hit run, the entire world is simulated in the background thread.
And we just swap out the front-head state with kind of like a video-like playback.
You can scrub back and forth with what happened.
So that's all this custom code simulation game engine stuff.
But what makes it possible are these two libraries.
So one is Sculpt.
And that is kind of the Python in the browser implemented JavaScript interpreter parser thing.
And that is implemented so that you can actually run full Python programs as much as you can.
We're just using the parser layer from that because we don't want kind of all of these other behaviors to happen that we don't have control over.
And that ends up giving a crazy error message.
So, you know, picking pieces of Sculpt out there and then augmenting them with our own systems.
And some of this you can start to get crossovers.
So a library for code linting that works for JavaScript.
And we've turned the AST into a Mozilla JavaScript AST format.
Then you can start to run some of these tools that were designed to work on JavaScript.
But you're giving useful information for Python.
So that's pretty cool.
That's awesome.
It is all on top of this thing that we wrote called esper.js.
And esper.js is designed to be the kind of controllable, pumpable, beginner-friendly interpreter that runs in the browser.
But takes multiple languages.
And so there's a Python plugin for it.
There's a Lua plugin for it.
As much as you need to do, there's a CoffeeScript plugin for it.
And then those things, it's two pieces.
The parser piece.
So the parser piece, we're relying a lot on Sculpt.
And we'd previously written our own.
And it just wasn't very good.
So we moved over to Sculpt on there.
And then the runtime library piece where you can take some pieces of that.
But really for performance, you're implementing a lot of Python functions and modules in this kind of interpreter language
where you're operating on abstract syntax tree nodes.
You could just pull in that part of the Python library or write it in Python and then just run it.
But it gets pretty slow.
So you'll kind of bring in the hot loops and pull those in natively in Esper itself, in Esper's Python plugin.
So the more Python behavior that you want, like you want to make integer division work correctly, if it's different from JavaScript, something like that, then you're just putting more and more of it into your runtime or your parser library that plugs into Esper.
Esper is fully open source.
So is the Python plugin.
And if you have a project where you want to mess around with having more control over how the code executes, interrogating each frame, stopping it, starting it again, yielding it and putting another thread in, like all that kind of stuff.
Definitely check out Esper.js on GitHub.
If you just want to be able to run Python in the browser, you can just run scope straight up if you don't want to do it.
Right.
If you don't need to reinterpret what the instructions mean and like capture them and whatnot, right?
Like you have a kind of a special use case here, I suspect, and what you're trying to do.
Well, there's a lot of people that go and want something like this.
So some of the projects are using Esper.
I haven't kept a huge track of it, but it's definitely what you would want when you want more control, whether that's for teaching it better or it's for controlling your infinite loops a little better, whether it's for just security of your program.
Because, you know, you're running this thing in your user's browser.
You know, maybe you're pulling in code that someone else wrote into that.
You got to make sure that it can't break out.
And so just having that knowledge that it's secure and it can't touch anything and you can redefine your global variables and lock them down.
Make your own copies of them, whatever you want to do.
It's pretty good.
Yeah, that's pretty neat.
In Python or in other languages.
Yeah.
Did you consider something like Docker, like a server side solution as well?
Or was it always we've got to do this on the front end?
You know, after seeing Brett Victor's talk on learnable programming, which is fantastic.
So if you haven't seen it, you know, stop listening, go check it out.
I mean, no, this is probably kind of interesting, but that is so interesting.
So the idea there is this kind of run it on the server and send the result back format.
Is kind of old school algorithms competition kind of thing going on?
Yeah.
Super secure.
Take some server resources, which you can probably figure out how to get working.
But it's limited in the bandwidth of what it can tell you back.
So if you think of, hey, here's an algorithms program, a problem, and I'm going to write my algorithm and run on the server and see if it gets the right answer.
Really, you're sending back the answer.
Yeah.
But what we want for a rich, immersive gameplay world is we don't want to just know the answer.
We want to see everything about how this code is executing because it can touch every part of the world.
So if you wanted to do that, you have to run the whole thing on the server.
And now you're basically spinning up your own kind of network to multiplayer game that your servers have to run every instance of and send the entire state of the execution back.
And like normally in computer graphics, you are just sending like positions of the various entities in the game, maybe their velocities, rotations, and a few status things so that you can render them.
And you kind of have the same thing going on here.
But we don't know in advance what you're going to need to show because instead of the, you know, C++ optimized game engine having like, okay, everything is going to be rendered, like efficiently optimized for rendering these 12 properties on this number of entities and then these types of backgrounds or whatever.
Anything can happen.
So you can't optimize that much, which means the amount of data that you have to send back in order to render it is fairly high.
So if you sent that to the server, you'd be downloading like 15 or 20 megabytes every time you ran the code.
I mean, maybe we would, if we optimize that, I'm sure we could get it down to something workable, but it's kind of going to be a little, a lot further towards that.
Just tell me the answer.
Then like I'm playing this here in my browser.
So that's, that's why we didn't do it there.
Yeah.
And also you'd have to do some interception to like kind of rewrite what execution means to do the work that you're doing.
Yeah.
Right.
So you'd have to do it on the server side anyway.
It sounds like you can't just drop it in and hit it with C.
Well, the advantage of doing it on the server side is that you can use actual JavaScript is the only language that you're going to be able to run in the browser there.
And JavaScript, I love it.
It's a great language.
It's basically scheme in Java's clothes.
And so you can do all this really high level crazy stuff, but you, you can shoot your foot off and there's not that many packages that want to do what we want to do there.
So, you know, if you had to run this code on the server, you could do it in C, you could do it in Python, you could do it in whatever.
And that would be pretty advantageous.
And there's a lot of these most, we, at some point we're looking at teaching like dozens of program languages way.
And you look and say, okay, who's implemented an interpreter that I can use or a parser that I can use.
And it's all implemented either in the language itself or something like C or something like that.
You can't use any of that in the browser.
So it could have saved some work, but, you know, we really wanted it.
Like, write some code, click the button, immediately see what happens and enrich detail and be able to like scroll back and forth.
We want to send the entire state of the world so you don't just see it once.
We want to have it render as fast as we can so you know if there's any bugs or any errors.
And then we want you to be able to play back, go back and forth, time travel, debug, any of that stuff.
So we kind of over-engineered it in the beginning after seeing that talk and happy with how that turned out.
But, yeah, it's a lot of work.
Yeah, well, it definitely helps on the scaling side of things.
Oh, yeah.
The other thing that you can do, because the user's browser knows how to not just run the game but their code,
when you go to do the multiplayer pieces, our server doesn't do anything either except for say like,
hey, peer-to-peer distributed simulation net, you simulate some games here,
and then they report the answers back and we just keep a leaderboard.
But, like, we'll be distributing all these other players' games to everybody who's, like,
trying to play one of these multiplayer levels, and then you get this automatic, like,
simulated ladder thing for no compute.
It's pretty great.
Yeah.
Yeah, that's pretty awesome.
Cool.
Well, it's definitely neat to see you guys taking some of these Python in the browser initiatives
that there's not a whole lot of other people doing, like, real work with, right?
Like, building real tools.
You know, the guys over at Anvil, they build a pretty interesting system based on Sculpt as well.
A lot of cool designers and front-end tools, basically.
Have you seen Anvil?
I'll have to check it out.
Yeah, so Anvil is a way for building, like, simple hosted web apps.
Go there.
And they've got, like, a component gallery of buttons and text boxes.
You drag them over.
And then all of those have events.
You double-click it and it switches over to see the code.
But that's all Python code that runs in the browser on Sculpt.
Oh, that's awesome.
Yeah, so it's pretty awesome.
There's also Brython out there, too, for another take on it.
Yep.
Did you look at Brython and consider it alongside Sculpt?
It wasn't as far as along when we kind of put our stuff together.
But, you know, I think either of them could potentially have worked.
We just needed a parser layer from it.
I can't remember if Brython would use the Mozilla AST format or something else.
Right.
I think this is great.
Well done on building it that way.
So let's just talk briefly about the business side of things.
I think it's always interesting to see people building businesses on Python and bringing
these tools together and whatnot.
Yeah.
So I guess, first of all, we haven't talked about this yet for people who don't know.
Like, is there something I pay for?
It's Code Combat free.
What's the story?
Yeah.
So we are an open source project.
And, you know, it goes back to my roots with my dad having that Mr. House home automation
project, which it just seemed like back in the day, that was like the thing you did was
cool.
And when we started building this business, we weren't thinking about open source, but we
knew we wanted to do a for-profit business because that's how you can get the resources
to really make great software.
And, you know, there's obviously going to be a big market for people learning how to code.
So we built this thing, built this thing.
It was free for a long time.
I said, hey, we're going to start charging for this thing.
But that was kind of still in the mind, like there's going to be a lot of people who can't
afford however much you're going to charge that still should be able to learn to code.
And especially if your game is multiplayer, you kind of want those players anyway.
So not just to provide network effects for playing the game, but also for sharing the game.
So the initial model we did is a $10 a month subscription, but freemium.
So you only have to pay for that if you want the extra levels, extra heroes, extra gems,
some of this game content stuff.
But it's not like you get the first 20 levels for free and then you have to pay.
It's more like you get the core progression of levels from the beginning all the way to
your crazy graph algorithms in the end.
And then it's extra practice levels that are kind of the branches of the tree that you would
pay for.
So if you want more help with that, you just want more content, you want a cool hero as
opposed to the basic hero, then you can subscribe.
And so most players, you got a couple hundred thousand monthly active players.
Most of those are just playing for free.
We kind of made a mistake because when we started to take off as a business, we had all
these players.
We said, OK, well, the main market for this is going to be in the schools.
And in the schools, you have this huge need for teachers to be able to deploy some computer
science curriculum that kids will actually do, even if the teacher is not there over their
shoulder all the time.
And especially if the teacher is not a pro coder, which, you know, if you're a pro coder
and you're working in teaching, I salute you because that's a really hard job.
You probably know where you can make elsewhere and it's more than twice what you can make
as a teacher.
So not a lot of super experienced coders in teaching and all of these teachers getting
deputized to teach computer science.
The math teacher has to teach it.
The English teacher, the choir teacher has to teach it like help.
Right.
So they reached out.
We said, hey, you know, we can help you run this with your students.
Let me see what we do, built the teacher dashboard and our main product is now that classroom
version.
And so when we made a bunch more content for that, we actually forgot to set it as paid
on our on our home version.
And so there's a couple of hundred free levels like you could just do so much there.
And it's not the main way we make money.
So I'm cool with that.
We're not trying to optimize that to within an inch of its life in terms of conversion funnels
or anything like that.
So, yeah, it's great.
We make a little bit of money from that business, but it also means you can just go play for free.
You don't have to sign up, try it out.
And if you wanted that extra help or extra content, you can get that.
Now, the new thing is if you want extra help, you can pay for private lessons from one of
our online coding teachers.
You know, they'll work an hour or two hours a week with your kid or you can do group classes
with up to four other students, up to four students total.
And so those are some ways it works.
We've got some different pricing models in China where we run our business too.
But as an open source project and with this kind of community in mind, this helped us
so much.
Like, it's great to be able to give back and make a bunch available for free.
Yeah.
We wouldn't even have Python if it weren't for open source.
When we launched, we only had JavaScript.
And one of the first major contributions, we ran this like programming language edition
like contest.
I think we gave away like a MacBook and an iPad or something.
And for that, we got Python and Lua and like all these parts.
Even someone did Clojure.
And we're like, dang, that was really efficient.
And we hired two of them.
And like going open source was just super interesting.
But yeah, that we have this ethos where if you need to learn to code, you can use us.
I'm not going to charge you.
Yeah.
So there's like a free path through these worlds.
If you want, you can take it, but you can pay for more.
Yeah.
Pay for the side branches of the learning path, basically the learning tree.
Yeah.
Cool.
Well, that seems like a pretty solid model to me as well.
So maybe let's close this out with two quick questions.
One, what's coming in the future?
Do you guys have any like cool things that you're adding or just keep going, adding content?
Well, we have in the classroom, the new thing is Ozaria.
So as we put these teacher features on for based on the home product, you know, we learned a lot.
We ran over 80,000 educators through this thing.
And over the last two years, we've been building out an all new series of content.
Now we're putting it with new brand.
It's got new learning modes, got all this story.
And that is going to be the primary classroom product starting in next month, basically.
So that's at Ozaria.com.
And you can't play that on your own really, because that's meant for the teacher experience.
But, you know, if there's a school involved, then they should, they'll be using that and
they'll have, it's really cool.
So that's the new thing on the classroom side.
The new thing on the home side is of course, we have added this online teaching and that's
growing pretty well.
So just kind of expanding what we're doing with that in China, getting it translated into
even more languages, adding C++ and Java and kind of capitalizing on the potential of what
we're doing.
Like you say, there's, there's all these things you can do to optimize every error message in
every level.
And of course, we haven't done that with everything.
So there's just so much more of the core of polish of what we want to do.
Right, right.
Each little challenge can have like its own special messages and sort of help support that.
I'm sure that can always be polished.
Oh, yeah.
It's unbounded what the kids are going to mess up.
Yeah.
Eventually we need to hook up a machine learning system here that's really doing, I mean, something
simple, like a multi-armed bandit system or something like that, where we're measuring
the effectiveness of every possible intervention point, put it in there and optimizing all of
that based on the data, as opposed to kind of digging into the hotspots by hand and game
designers going into it.
But that's what's up for us, just getting better and better and better at teaching coding and
into more context, more people, more languages.
Yeah.
We're up to.
Yeah.
Cool, cool.
And last question, COVID completely changed education.
Yeah.
It's probably going to change it in the fall for at least in the United States and some
other places.
This has got to be a boon for you guys to say, look, we have this opportunity to reach
out to many more people who need education and maybe, like you said, more remote friendly
education.
Oh, yeah.
It was originally, you know, we have our team in China and China got shut down.
And a lot of the stuff we were selling in China was offline training centers after school.
So we took a hit.
We saw it coming.
And we even hired an epidemiologist in late February to say, hey, what's going to happen?
So she saw everything coming.
And we're like, hey, sound the alarm, guys.
This is bad, but we can help.
And so just as awful as it's been in most dimensions for our business, like it's relatively good.
The intersection of online learning and online gaming for us, it's just this big opportunity
to help out in these trying times.
So like my kids, my five-year-old will be going to kindergarten.
Oh, that's off.
You have kids that like, you know, maybe you're not going to be in as much school as you'd hope,
but you want something for them to do at home.
Have them check out Code Combat.
If you really want them to have some structure, get one of our teachers for that or share it
with your school and we can help out.
So that is, you know, as long as this thing looks like it's going to be with us, we'll be
adding more and more of this stuff that makes it even easier to do it from a distance.
Yeah.
Well, fingers crossed that it doesn't stay with us for too long, but what you guys have
built will definitely, you know, help fill the void, I think.
Yeah, thank you.
Yeah, sure.
All right.
Well, before we get out of here, let me ask you one of the two questions I'll ask at the
end.
So if you're going to write some code and, you know, we were talking right before we hit
record that working on this for Python, this is really mostly a JavaScript project, much
like working on the visualization tools for say like Jupyter Notebooks, right?
Even though it's for Python in some sense, like the creating of it is in a JavaScript.
So what tools do you guys use to write your code to work on this?
Yeah.
So our engineering team is all over the place on editors.
When you have your kind of JetBrains stuff, you have your Visual Studio, your VS Code, you
have some LimeTags.
I started this with Emacs and I'm still on Emacs.
I'll be on Emacs forever because I'm like arcane techno amoeba of Emacs that nobody can
understand.
So you're sticking to your scheme roots, your Lisp roots?
Oh, yeah.
I'm not that great in Emacs Lisp Packer, but I got a few macros here and there.
Probably for my cold dead hands.
Yeah, right on.
Awesome.
All right.
Now, final call to action.
People are excited about this.
They want to try it.
Maybe want to try it with their kids.
Yeah.
What do you say?
CodeCombat.com /play.
No sign up.
Just pop it in front of them.
See how they do.
And if there's a teacher in your life or a school, that would be the Ozaria product.
Ozaria.com.
Send it to them and see if we can get their school hooked up.
There's a bunch of free stuff there too.
And a lot of people are looking for this.
So, yeah.
Awesome.
Thanks for the time.
This has been really fun.
Yeah.
It's been great to talk to you about it.
And congrats on the project.
I think it's really opened up like proper coding for a whole nother level.
And I'm really happy to see it.
Yeah.
All right.
Take it easy.
All right.
Bye.
This has been another episode of Talk Python to Me.
Our guest on this episode was Nick Winter.
And it's been brought to you by Linode and us over at Talk Python Training.
Start your next Python project on Linode's state-of-the-art cloud service.
Just visit talkpython.fm/Linode.
L-I-N-O-D-E.
You'll automatically get a $20 credit when you create a new account.
Want to level up your Python?
If you're just getting started, try my Python Jumpstart by Building 10 Apps course.
Or if you're looking for something more advanced, check out our new Async course that digs into
all the different types of Async programming you can do in Python.
And of course, if you're interested in more than one of these, be sure to check out our
Everything Bundle.
It's like a subscription that never expires.
Be sure to subscribe to the show.
Open your favorite podcatcher and search for Python.
We should be right at the top.
You can also find the iTunes feed at /itunes, the Google Play feed at /play,
and the direct RSS feed at /rss on talkpython.fm.
This is your host, Michael Kennedy.
Thanks so much for listening.
I really appreciate it.
Now get out there and write some Python code.
I really appreciate it.