Do you like to play games or solve puzzles?
Chances are pretty good that you do.
After all, what is programming and software development but one really elaborate puzzle?
On this episode of Talk Python to Me, you'll meet someone who has pushed this idea of programming
as a game to its logical conclusion.
Alexander Leibach is the creator of Check.io and Empire of Code.
Check.io is a programming adventure game where you solve puzzles and share them with fellow
players.
Empire of Code is a tower defense game where part of the strategy is to actually program
the AI in Python.
This is Talk Python to Me, episode 75, recorded September 8th, 2016.
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 Hired and SnapCI.
Thank them for supporting the show on Twitter via at Hired underscore HQ and at Snap underscore
CI.
Hey, everyone.
Thanks for listening as always.
Before we get to the interview with Alex, I want to give you a heads up on something I've
created just for you listeners.
Near the end of this episode, I speak with Alex about the class management and group management
features in the game in Check.io.
So I've decided to create a class that consists of all podcast listeners.
If you want to group up with your fellow listeners and do some of these puzzles, you can use the
following link to join up and share your updates and solutions.
Just go to py.checkio.org slash group slash talk dash python dash listeners, create an account or log in, and then say you want to join the class.
You can, of course, find that link in the show notes as well.
If you're a teacher yourself, keep an ear open to the end of the show about how you can do this for your own classes, whether that's university, high
school or middle school courses.
Now, let's talk to Alex.
Alex, welcome to the show.
Hi.
It's great to be here and a big honor for me.
Thank you.
Oh, it's my honor to have you.
I really appreciate you coming here.
We are going to talk about programming and games and some really interesting stuff that you guys have built over at checkio.org.
Yeah, I love to talk about it.
I bet that's your baby, right?
Okay.
So before we get to talking about that, let's hear your story.
How did you get into programming and Python?
Yeah, that was a long time ago, the high school.
So I remember before that I was using my father's computer only for games.
So I was a big gamer.
But at that time, my friends come in and show me his first code.
It was Pascal.
And I was so much amazed how easy it is.
How, what are cool things I can do by coding.
And I started taking coding class with him.
So, yes, it was the Pascal a long time ago.
And then later on in my university, it was Delphi, then PHP, Perl, and then Python.
And I stayed with Python for a long time already.
I love it.
Yeah, Python's really nice.
It definitely has some improvements on those other languages that you mentioned.
But also the community is so excellent, right?
It's really fun to work with the people who like Python, not just the technology.
Yeah.
I remember myself starting actually the Python.
So when I was, my first programming job actually was Perl developer in a bank.
So, and when the first time I saw Python's piece of code, I was amazed how beautiful it is.
Is it actually a really code?
Like, it can be a poem or like a song, but it's not a code.
Because like before I was coding Perl for four years.
And it was so beautiful.
I was so amazed at that time.
So I started doing some, start learning Python after work and eventually quit my job and start doing Python freelancing.
That's cool.
And was that like web development or what kind of apps were you building?
Web development, yeah.
Python, Django.
Okay, with Django.
Yeah.
Uh-huh.
Nice.
I remember Django when it was, remember new forms, like with this transaction.
Still my favorite framework.
You've moved on to building something that is actually a pretty incredible web app.
I must say a couple of incredible web apps, I guess.
And a whole interesting world here that brings all the stuff that you talked about, more or less,
together at Check.io.
Tell us what is Check.io.
Back to the time when I just started learning Python.
I think the first line of code was written during my first year of learning Python.
So at the time, as I said, I was so much amazed how beautiful Python is.
And I thought it should be a gallery.
It should be a gallery of different Python solutions since it's so beautiful.
And if I create a new solution, I should share it somehow.
I should show it.
And I should go through all other solutions and see how everybody else solved this particular puzzle.
So this is why I created Check.io.
And later on, I have more people join the team.
But yeah, the first version of Check.io wasn't that beautiful.
But the core idea is still from the very beginning to the version that we have right now,
is that you should solve the puzzle.
And you can share a solution if you want.
But after you solve the puzzle, you can see a solution of other users.
You can discuss their solution.
There are several categories for the solution, like clear code, creative code, speedy code.
And I love this feeling, you know, when you're spending like five hours in a row
trying to figure out how to solve this mission, this puzzle.
And later on, when you solve it, and maybe even you share your solution,
and then get into solution of other users, and you're like amazed.
Oh my God, it's possible to solve in two lines?
I can't believe.
And why I didn't figure out this later?
And I think this is the perfect learning curve.
Like when you're trying to figure out it by yourself,
then see how some other users solved it.
And again and again, I think,
so I know a lot of people who become a Python developers,
very good Python developers through the checker in that way.
Yeah, it's really cool.
So maybe I should just try to give like a visual description of the experience.
Yeah.
So you come in, you create an account,
and then you land in this world of floating islands.
And it has this very 3D feel with animations and stuff,
even though it's in a flat web page.
You know, it doesn't, it's not like a Flash game.
It's HTML5 or something like this, yeah?
Yeah.
Yeah, with Canvas and whatnot.
Cool.
And so you have these worlds,
and each world represents a set of similar programming puzzles.
Did you ever play the game Myst,
M-Y-S-T?
One of these super beautiful but puzzle-oriented games.
And it feels like a little bit like that for code.
Like you go to these different parts of the world,
and you go in,
and you get these different puzzles, right?
Yeah, yeah.
By solving those puzzles on each island,
eventually you can get more island open around this island,
and you can explore more and more island around.
Yeah, it's quite neat.
I think, you know, you go into these puzzles,
and I guess there's probably 5 to 20 puzzles per little island.
And you go in there,
and they're ranked in levels of difficulty and categories.
So some are like data structures,
and some are finding bugs or things like that, right?
And you also have a difficulty level.
Actually, all the time we're trying to experiment
with different kind of puzzles.
So in some part of Checker world,
you can find like a machine, like you said.
You just need to fix the bug on the solution,
so we actually give you a solution.
It's almost working.
There are some, but some,
there are some tests that doesn't work.
So your mission here to fix those bugs.
There are some other missions
that you actually don't share your solution,
but you can get more points for these solutions,
depends on the rules.
So for instance, we can ask you,
try to solve this puzzle in a short way possible.
So your solution should be as short as possible.
I call that coding golf puzzles.
And after you solve,
you can see how short solution of other users.
And you think, oh my God,
I think it's,
I'm like spending all night and get 50 symbols,
and someone find out how to make it in 12.
I can't believe in.
Yeah, it's really amazing.
And like you said,
you can,
you basically,
you write the solution
and it's,
it's run by the system.
And we could talk about how you write your solution
and all that in a moment.
but you write some Python code
that solves the problem under the conditions,
the inputs and outputs that you're supposed to,
which usually they're pretty self-contained.
It's not too elaborate.
So,
but they are kind of tricky in some interesting way.
And then once you're done,
you can categorize your solution.
If you want to share it,
if you want to publish it,
as like you said,
like really concise,
really efficient,
you can just leave it and say,
I don't have no idea what you would call this,
but it works,
things like that.
And it reminds me,
you know,
you can go through the solutions
and you can see other people's solutions.
And my feeling is,
it's a little bit like the Mark Twain quote
that says,
I'm sorry I wrote you a long letter.
I didn't have time to write you a short one.
You know,
that,
that kind of thing.
Like,
like I go through and I solve it.
I'm like,
oh yeah,
this is,
this will totally do it.
And then you just flip the next line
and it's like,
filter this,
did it at one line.
You're like,
whoa.
Okay.
It also,
I think it's really interesting
in that it,
it sort of touches on this concept
of Pythonic code
by looking at the solutions,
right?
Yeah.
So in the new Python release,
we are trying to test this new idea.
So we actually put,
so mission has three stages.
So in the first stage,
it's the collecting modes.
If you see some of others,
you should share your solution first.
No matter what.
So let's,
we're looking for collecting mode.
Then,
so viewing mode.
So you might not share your solution,
but you should definitely solve this,
no matter what.
And then you can go and see leaderboard
of other user solution,
review their solution,
and so on and so on.
So usually what we see right now.
that we may be some other
checker users,
we are trying to figure out,
out of all the solutions,
we pick some solutions
that we think are the most different.
It might be not that,
it might be not as perfect
as it should be,
but they are definitely unique
in the whole specter of solutions.
Okay,
that's interesting.
So you try to provide like
a variety of answers to people?
Yes,
yes,
yes.
So you,
all the time you see,
when you check editor's solutions,
you see only different
and only unique solutions
that we find in checker.
So this is the third stage
of each mission.
It is really interesting.
So I learned a lot
when I solved some of the problems
and published it.
And I realized
that there were biases
in the solutions I was creating.
And I didn't,
I didn't realize they were biases.
Like for example,
on one of them
that I was working on,
I was trying to do stuff
what I felt like
was the most efficient way,
not in lines of code,
but what I thought
would be like
the most efficient algorithm
for like maybe large data sets
or whatever.
And that resulted in,
I don't know,
maybe eight lines of code.
And then other people
were doing the answers
with like a list comprehension
in one line.
But I'm like,
oh,
but that's going to be way slower.
But,
you know,
I guess it depends
on what you're aiming for,
right?
Like if you're aiming
for super readable
and you know you're not working
with,
you know,
100,000 lines of data elements,
you're working with 500,
then,
you know,
probably that solution
is way better.
And so it just,
I thought it was interesting
that it brought out
little biases
that I had
in ways of approaching problems
that I didn't,
it's not like I started out
to say,
oh,
this will be way more efficient
if I do it this way.
So let me try this.
It's just,
that's the way I started
writing the code.
So that was really interesting.
Yeah,
this is why we created
Couchverse
for this session.
Depends on your,
what is your aim
to,
what was your goal
while you created this solution.
Some of the people
just love to create
crazy solutions,
like one-liners
or just
try to make it
as confusing
as possible,
I would say.
So we have
one,
one of the most famous
user on check,
Vicky.
And I want just to say
hi to him
if he,
I'm sure he's listening
to this podcast.
So he has the most
biggest amount
of followers
in the game
and he is,
he'll love to create
the most crazy solutions.
So I think
the creative category
we created
just specifically
for Vicky.
And yeah,
for those unique people
who love to create
some unique solution
or create a creative
and they're
competing with each other
in creativity.
Yeah.
Yeah,
that's,
yeah,
I think it really
does bring out
a lot of,
a lot of interesting stuff.
Would you say,
it seems to me like,
tell me if I have
the right sort of feeling.
I did start at the beginning
so I kind of feel like
I can at least guess at this.
That Check.io
is really good
for people that know
something about
programming
but in order
to do it,
you kind of need
to know a little bit,
a little,
almost a little tiny bit
of Python rules,
right?
Like how to define
code blocks
or suites
and how to perform
conditionals.
And so it's,
it's not like
I'm bored
with my job
in finance
and I've never touched
a line of code
but I want to come learn it.
You've got to be
a little bit
into programming.
Yes.
I do have this question
a lot,
why we are not
teaching Python
and I do have
a lot of questions
like this.
Well,
you are teaching Python,
you're just not teaching
zero to like
the very first step.
this is what I love.
Yeah,
yeah.
So we are not teaching
like you said,
we are not teaching
from zero
to some point.
So I do believe
that in internet
out there,
there are so many
places
where you can learn
how to code
but there are
so few places
where you can
actually learn
how to create,
how to produce
code with a good
quality
and yeah,
and I believe
that Checo
is one of those
places.
So this is
our goal
to not maybe
to teach you
how to code
but teach you
how to create
a good coding
solutions.
Yeah,
I think that
that's correct.
You're right,
there are so many
places to learn
to code these days
if you're kind
of like a career
switcher.
I kind of think
of people as
they're like,
I know that I want
to get into programming,
I have no idea
what that means,
like that level
that you probably
got to start
somewhere else
but I heard
someone say,
one of my listeners
suggested that I
reach out to you
again and we get
this show put together
and I,
sorry,
I don't remember
who it was
but thanks for
contacting me
on Twitter
and they said,
look,
you guys really
have it right,
you have it
so that you want
to just keep learning
and you want to
make learning
to code addictive
and fun
and I think
that's a way
more important service
than teaching people
what a variable is
or what a string is
or,
you know,
what an if,
the concept of an if statement
for example.
Yeah,
this is actually
one of the reasons
why a lot of teachers
and in a lot of university,
teachers recommend us
as an additional way
to learn coding
so because we don't
provide any learning materials
or something like that,
we probably,
we don't have any conflicts
with what they are teaching,
we just give them
an additional way
to learn.
So if you are,
right now,
if you are learning
how to code
and even from zero,
you should definitely
start practicing
right from the very first day
and you should learn,
you should find
some places to do it
and Check.io,
I think it's the perfect place
to do it.
Yeah,
it's definitely
a good place to start
because often
people start wanting to code
because they've got
some grand idea
but the grand idea is,
it can be so overwhelming
because you don't even
know where to start
but Check.io,
the missions are
sufficiently self-contained
that it doesn't feel like,
oh,
there's no way
I can get,
like where do I even start,
right?
You can get started
and it's pretty structured
so I think it is
a great place to learn.
Let's talk about
the experience
of doing the exercises.
Okay.
I go to my little island
which like I said
is beautiful,
it's got little clouds
and stuff
and I pick my challenge,
my puzzle
and then it takes me
to an online editor,
right?
We have online editor
and actually
at the same time
with online editor
we also have
web plugins
and with those
web plugins
that you can install
in your Chrome browser
Firefox,
you can use
your local editor
actually.
So you don't need
to actually,
if you start doing
some big solution
or working on
a big problem
on Check.io,
you most of the time
use your local editor.
So we give you
this opportunity
to use your local editor
and then you just
open the Check.io
and you see your code
right from your local editor
in our web editor.
Oh, okay.
That's awesome.
So like if I'm using
PyCharm or Sublime Text
or something like that,
I can just sort of
download it
and somehow
the web plugin
keeps my local version
and my Check.io version
in sync?
Yes, yes, yes.
We're synchronized
of both of those solutions.
So right after you
make some changes
in our web version
of Check.io,
this goes to your local editor
there as well.
So it's very easy
for you to solve
and actually,
since you mentioned
PyCharm,
we also
partnering with
PyCharm
and also
and the whole partnership
starts with
PyCharm Education.
So we have this
PyCharm has
a plugin
for PyCharm Education
and using those plugins
you actually can
solve puzzle
actually by using
PyCharm.
so the whole Check.io interface,
those mission description,
the island structure,
animation,
and it all goes
to write
in your PyCharm editor
and you can solve
coding puzzles
right from there.
Oh, that's pretty interesting.
So I didn't realize
that you guys integrated
with PyCharm Education Edition.
So people have heard me
go on and on
about how I like PyCharm
as like a proper editor,
but they have
an alternate version
for education
that has these
like lessons
built into it
and so you guys
have integrated
with those lessons
in some way?
Yeah.
They have this ability
to create plugins
for the PyCharm Education
and right when I
figured out
that PyCharm,
my favorite editor,
created the
educational version
and I was,
it is so crazy.
I should find a way
to be part of this
and yeah,
I contact with them,
we start doing
those plugins
and eventually,
yes,
the plugin was released
and we're both happy.
That's nice.
I'm going to have to
check that out now.
So yeah,
and one more unique idea
for Checker Editor
that we are using
and the user love it
is that
for some of the mission,
we create this
try it panel.
So let me tell you
the idea.
so we wanted
to present
the solution
you are trying
to solve
with some interface.
So we create
for almost each
coding puzzle,
we create some interface.
For instance,
if you need to
find all the unique
symbols
in a piece of text,
right,
we give you
this text input
and you can put
your text in this input
and then click
tests
and it gives you
the result,
what symbols
were unique
in this particular text
and in order
to get the result,
those interface
actually using
your code,
the code that you
have written
in the editor.
And for instance,
one other mission
that's one of my favorite
is Open Labyrinth
and there you have
actually the whole
labyrinth
created
and the
idea
for puzzle
is
to find
a way
to get
out of the
labyrinth.
And in this interface,
you can create
your own labyrinths.
After clicking
solve,
you see how
some
arrow,
small,
tiny arrow,
trying to get,
find a way
out of the
labyrinth
by using
actually
the program
that you created.
So,
in such a way,
we're trying
to show you
that every
piece of code
has
an interface
that's probably
going to use
your code.
It's not just
this boring
function
or boring piece of code.
Take these numbers
or turn those numbers,
but something more
advanced, huh?
Yes, yes.
This portion
of Talk Python
is brought to you
by Hired.
Hired is the
platform for
top Python
developer jobs.
Create your profile
and instantly
get access
to 3,500
companies
who will work
to compete
with you.
Take it from
one of Hired's
users who
recently got a
job and said,
I had my
first offer
on Thursday
after going
live on Monday
and I ended
up getting
eight offers
in total.
I've worked
with recruiters
in the past,
but they've
always been
pretty hit and
miss.
I tried
LinkedIn,
but I found
Hired to be
the best.
I really like
knowing the
salary up front.
Privacy was
also a huge
seller for me.
Sounds awesome,
doesn't it?
Well, wait
until you hear
about the
signing bonus.
Everyone who
accepts a job
from Hired
gets $1,000
signing bonus.
And as
Talk Python
listeners,
it gets way
sweeter.
Use the link
Hired.com
slash Talk Python
to me and
Hired will double
the signing bonus
to $2,000.
Opportunity's
knocking.
Visit Hired.com
slash Talk Python
to me and
answer the
door.
So the
editor is
really cool,
and the fact
that you
integrate with
the local
editors, I
think, is
even better.
And I
noticed that
at the top
it says you
can import
some modules
or create
additional
functions or
things like
that, or
classes or
whatever.
Yeah, we
have a set
of modules
that we
allow you
to import.
Yeah, that's
what I was
going to ask.
Like, surely
pretty much the
standard library
for the most
part, but then
are there
external open
source ones
as well?
A lot of
users ask
to add
SciPy.
Sure, some
of the machine
learning stuff
maybe, yeah.
And NumPy.
So we
integrated all
of those
modules for
them, and
even for
Python version.
For Python,
we created
the specific
category for
those
solution.
We call
it third
party
solution.
And if
you are
using those
kind of
modules, we
encourage you
to share
your solution
in those
categories.
So for
those categories,
you can
check
solutions that
are using
those
modules.
Oh, that's
really cool.
Now, another
thing that I
see up at
the top that
makes me
smile is
in this
editor, and
if you've
ever used
something like
JS
Fiddle, it's
a little bit
like that with
multiple
panes and
so on, if
you haven't
checked it
out, is it
has sort of
navigation, and
one of the
dropdowns at
the top is
it says I
can pick my
Python version,
and I
could pick
Python 2.7,
but the one
that I have
active is
actually Python
3.6
alpha 3,
or A3.
That's pretty
awesome that you
guys are
running such a
new version of
Python 3.
Yeah, we
are trying to
keep Python
version as
fresh as
possible, so
users of
Check.io can
play with the
freshest Python
version as
early as
possible, and
show some
awesome solutions
with new
cool Python
features that
are coming out
soon.
So yeah.
Yeah, that's
really cool.
So if you want
to say, look,
I'm going to
demonstrate how
much easier this
problem is to
solve in
Python 3.6
than it was
in 3.4 or
something.
You can do
that, right?
Yeah.
How awesome.
Okay.
That's really
cool.
Thank you.
Yeah, you bet.
So once I get
my solution and
I write it,
and I can play
around with it,
my console or
my local editor,
I mean the
online terminal
console, or my
local editor, and
then once it
passes, it gives
me a couple of
options, right?
I can basically
just save it, or
I can publish
it and share
it with the
world, right?
As I said,
this is what
the first, very
first idea of
checkout, the
core idea of
sharing code
solution with
other users.
So this is
where you can
share your
code, pick a
category, in
which category
actually you want
to share your
code.
It can be a
clear solution if
you think this
is the code the
most appropriate
for actually
production code.
This can be
creative solution
like one
liner, some
crazy ideas, some
funny solutions.
It can be
speedy when
you're focusing,
so no matter
how clear it
is, I only
want to create
the solution as
fast as possible,
and as I
mentioned, just
earlier, third-party
solution when you're
just using some
additional modules,
and we also have
uncategorized.
When you're not
sure which category
you want to
share, you just
want to share
this solution.
Maybe later on
you want to share
with your friends
as well, so we
create this category
for you as well.
So, yes.
And after you
share, or maybe
after you solve,
you can get into
solution of other
users.
This is actually
where all the
magic happens.
You actually can
see solution of
others, upvote,
downvote solutions,
you can make code
reviews, and
sometimes we
have so crazy
code reviews,
very details,
like every line,
why it's good,
why it's bad,
and, yeah,
very educational
part of Checker
is actually inside
of these solutions
sharing.
And you can
actually follow
some of the
people, some of
the people on
Checker, and
you can filter
all the solution
by only people
you follow.
So it's easy
for you to find
your favorite
solution.
Yeah, that's
cool.
Like, you've
got, like, an
activity, sort
of stream of
activity on
there, and it'll
show you, like,
this is the
activity around
the various
puzzles you've
solved, or you
can follow people
and things like
that, right?
One of the
earliest features
as well, somehow
it become
naturally, like,
if I very
love what some
of the user is
doing, I want
to follow him,
I want to know
first what other
solution this guy
have made, and
what code
reviews he's
doing, which
solution he'll
like and don't
like.
And that's why we
created this
activity, so you
can follow your
friends, maybe your
classmates, maybe
your teacher,
actually, or maybe
just a random
guy who's just
using, like,
Becky.
Yeah, that's
cool.
So if I'm, like, so
the other thing I
can do once I
publish it is I
can start cycling
through similar
solutions that are
either similar or
different than mine,
and maybe I find one
that's like, oh, that
is so much more
clever than what I
had done.
Maybe you could
follow that person
and just see what
they're up to,
right?
Yeah.
We actually, in
activity line, we
actually can propose
you some of the
users to follow.
Depends on maybe
you have some
intersection with
this user during
the game, like,
you like his
solution a lot, or
you, this person
actually give you
some code reviews
or whatever, some,
any kind of
intersection.
So when you next
time get into your
activity feed, we
can propose you.
Maybe you want to
follow this guy since
you have so many
common interests.
So, yeah.
Yeah.
Very cool.
You also have
levels, like,
um, reminds me of
playing the MUDs
way back when,
level 1 to 20, and
there's just a few
people that are 20.
That's cool.
Switch gears from
the CheckIO puzzle
story for just a
moment.
The other thing that
you can do, in
addition to solving
these puzzles in
this mist-like,
sort of, visit the
island style, is
there's more of a
tower defense,
World of Warcraft
type of game that
you've also created
that has to do with
code.
Why don't you tell
people about that?
So about a year
ago, maybe more,
we created one more
game, Empire of
Code.
So the idea of
this game was what
can happen on
intersections, some
popular game, like
Tower Defense, like
Clash of Clans.
So we used Clash of
Clans or Boom
Beach as the game
based game part of
this.
And add coding
there.
And what kind of
game we can create?
What can it be?
So we start working
and this is what
happens.
Empire of Code is
intersection, or
you can say it's
mixing of game
strategy, like
coding, like
Boom Beach, and
coding.
So when you get
started out, you
have, you know, like
a base and you can
build attack type
units, like people
and whatnot, and
defensive ones, like
little turrets and
whatnot, like a
standard tower defense
game.
But then how does
coding fit into this?
This is a good
question.
One of the ideas
behind Empire of Code
is that you actually
can play this game
even without coding.
So you should
somehow know how
to code in order to
progress in the game.
In Empire of Code,
you don't need it.
You just play the
game as long as you
want.
But eventually,
some puzzles can
pop up and tell you,
okay, you can
improve this
building if you
solve this puzzle.
You may not, but
if you solve this
puzzle, this
building that
produces resources
for your troops
can produce in a
more efficient way.
So you might,
okay, good to
know.
I'll get back to
it later.
Or maybe you can
start right away.
So this is one
part where coding
actually can be
used.
And another
part of the
game is that
actually in order
to control your
troops in the
game, you should
do coding.
So on the
coding, you can
control your
troops in the
battle.
So I'll say it
again.
You can control
your troops in the
battle by code.
So you can say,
okay, this can go
at that point and
then attack this
tower by reading
a code.
but in the
same time, we
give you some
basic strategy that
you can use without
going.
So use whatever
strategy you want.
And the
awesomest part of
this, the whole
game, is that the
whole game is the
competition between
two forces, Python
and JavaScript.
So right after you
finish the tutorial,
you should choose
which side you want
to join.
if you join a
Python site, you
can conquer
Python bases.
You can only
conquer JavaScript
bases.
And if you choose
JavaScript side, you
can only conquer
Python bases and
still resources from
that bases.
So it's pretty fun
as well.
That's really
awesome.
So these puzzles
you solve around
like your buildings
and structures and
whatnot, is that a
little bit like
letting you mob the
game?
Like you can change
the behavior of the
thing?
Or is it more just
like you solve the
puzzles and it gets
more power?
Do you know what
I mean?
Like could I write
an algorithm that
would change the
way like say a
tower works as
part of like
improving it?
Or do I just
like solve a
puzzle and then
the tower goes up
a level or
something?
Thank you for
this question.
Actually for
towers that defend
your base, there
are actually two
kinds of puzzles.
The first kind of
puzzles is they
just after you
solve this puzzle,
the tower becomes
stronger or it
has more health
and it's hard to
destroy the
tower.
And another
coding part of
this tower is you
actually can write
a strategy as
well as like you
are creating
strategy for your
troops in the
battle, you can
create strategy for
your defend tower.
So for instance,
it can be, okay,
if I see a heavy
bot running on me
and some small
bots that also
running on me
right now, I
would like to
destroy those
small bots first
and then I
start doing,
like I start
destroying,
start attacking
those heavy
bots because it's
more efficient in
that way.
So you can play
this strategy on
a defense base,
on a defense
building.
Does it make
sense?
Yeah, yeah,
that's really cool.
nice.
Yeah, and you
can basically
when you get
into an area,
you can say
attack with this
strategy and then
you can actually
have like a little
editor for each
strategy, right?
Yeah, yeah.
And one of the
awesome parts that I
love a lot, so do
you remember I said
that there's actually
competition between
two forces, Python
and JavaScript.
But actually you
can ask your, if
you are playing for
Python, you can
ask your Python
fellows that also
play in this game,
can you test my
defense strategy?
And they actually
play against your
strategy, but the
difference is nobody,
they are not going
to lose their
troops and you're
not going to lose
any resources in
any cases.
So you can use
your teammates for
testing your
strategies, for
testing your defense
and attack strategy.
Yeah, that's really
cool.
Thanks.
Yeah, it seems like
a fun game.
I wasn't able to
play it super far
into the game, but
it's definitely a
cool idea.
I like it.
And that's also a
web-based game,
right?
Yeah, it's
completely web-based,
HTML5.
We all want to
ship our software
faster, respond to
user requests, and
build an edge on
the competition.
But the faster you
go, the more likely
a bug or issue will
slip by and cause
your users grief.
I have the same
trade-offs with my
Talk Python websites
and infrastructure.
That's why I use
SnapCI.
Every time I check in
at GitHub, SnapCI
springs into action.
A clean copy of code
is pulled from GitHub,
a Python 3 virtual
environment is created,
all the packages and
dependencies are
installed, the unit
tests are run,
finally I'm notified in
Slack and a menu bar
on my Mac about the
outcome.
That way I know it's
safe to ship a shiny
new version of my web
app.
Ship your software faster
with a 30-day free trial
at snap.ci
slash Talk Python.
It's kind of played on
like a tablet or a
phone, on the browser
on them.
It's not very adapted
for iPhone right now,
but we are working on
it.
The most efficient way
to play in this game
is from your desktop.
Yeah.
Yeah, sure.
Any browser.
Something with a
keyboard and a mouse.
Cool.
So, I haven't brought
it up yet because it's
not super relevant to
the audience necessarily,
but one of the things
you guys did just add,
and you touched on it
here, is you've
recently added
JavaScript support.
Like, it used to be
just Python for, say,
like the Czech I.O.
puzzles, but now you
have JavaScript versions
as well, right?
Yeah.
So, in Czech I.O.
we decide not to
create a lot of
languages at one time.
So, a lot of
coding puzzles,
coding games,
or something like that,
they are adding
many languages
in one time.
So, 20 different
languages.
you can use any
of your favorite
languages in order
to solve the puzzle.
First of all,
we were in Python.
We tested a lot
of different ideas.
What does work,
what doesn't work.
And then, later,
when we figured out,
okay, we have
pretty solid ideas,
and we can replicate
it.
The next language
to try
for us
become a JavaScript.
So, we decided
to start growing
JavaScript communities.
Since JavaScript
become more and more
popular,
there are a lot
of new frameworks,
new ideas
coming out
of the JavaScript,
and there are
new fancy ways
to coding JavaScript,
like React,
and so on and so on.
So, we decided
to create something
for JavaScript
community as well,
since we are all
coding JavaScript
somehow,
and want to learn
how to do it
in a more efficient way.
So, we just
recently released
JavaScript Checker
for JavaScript players.
So, the Checker
become a portal
between Python coders,
between Python Checker
and JavaScript Checker.
But, every portal
is still independent.
So, in Python,
we are talking
only about Python.
All the solutions
only about Python.
And in JavaScript,
it's also independent.
So, yes.
Yeah, okay.
Yeah, very,
very cool.
So, if you're
into JavaScript,
also, I'll do
something here for you.
Nice.
Now, one of the things
I like when I go
to a mission
is,
if I go there,
it has like a
summary description,
then a button
to solve it,
and that's cool.
But it also has
a GitHub link
at the bottom
to the actual
problem,
the verification,
and everything.
And they're stored
in various places,
but one of the places
that has a whole
bunch of them
is github.com
slash checkio-missions.
And you guys
have many,
many pages
of the solutions
and the starter code,
because often you
start with starter code
and little tests
and whatnot.
I think that's
a really cool touch
that each one
of these missions
or puzzles,
rather,
you can go
and see the code for.
Yeah.
So,
what we decide
is we decide
to open source
those puzzles,
and there are
some reasons for that.
first of all,
while we're creating
some puzzles,
we often make
some mistakes,
like we forgot
to add some tests,
and after you go
through the solution,
you think,
okay,
this is the wrong solution,
it shouldn't work.
And you go
to a mission repository
and see,
okay,
they don't have
this test,
and they should have.
And you create
a pull request
to us
that explains
you guys
should add this test,
and we add
this new test
for this mission
and test
all the solutions
once again.
So,
one of the reasons
is so the community
can improve
our mission.
Yeah,
I think if you're
looking at a problem
and you're like,
oh,
but it's not testing this,
and this person
who says they have
a solution,
it's not really
the right solution,
that can be frustrating.
so you could just
go do a GitHub pull request
and go,
I'm at another test,
right?
Something like this.
Yeah,
that's cool.
Also,
what we allow
our community
is to provide
a translation
permission.
So,
actually,
you can,
each mission
has up to
seven different
languages.
So,
you can choose
which language
you want to
read this particular
mission.
And we have
a lot of
Chinese translation,
Russian,
of course,
Ukrainian,
Spanish,
and German.
So,
a lot of
people can
just commit
a new translation
just from
GitHub.
They just go
and create
a new pull request
with new translation
and we just
merge this pull request
and check
have one more
new translation.
This particular
mission have
one more
new translation.
And,
for instance,
if I'm
native Russian
and Ukrainian
speaker,
I can see
translation,
Russian translation,
okay,
this is not
correct and
go and make
a pull request
in this
translation and
make this
translation even
better.
So,
yeah.
Yeah,
that is really
cool.
Yeah.
And also,
an additional
way,
additional thing
that you can
actually improve
in CheckIO
is that we
actually have
a set of
hints for
some mission.
So,
if you're
stuck in
a solving
mission,
we have
a set of
hints
and that
allows you
with small
pushes
that can
get you
in the right
way by
doing this
small push
like,
okay,
maybe you
should try
to Google
this thing.
Maybe,
what do you
think if we,
here is the
link on
a Python
tutorial,
maybe you
can find
something here.
So,
those small
pushes,
we call
hints.
And,
you can do
a pull request
and give us
some hints
for this
mission.
that's really
cool.
Can I
create my
own
mission?
Like,
if I want
to add a
mission to
the scientific
expedition
island,
how do I
do that?
We have a
set of tools
for mission
creatives.
And,
actually,
there are a lot
of missions that
was created
by other
users who
has an idea.
Sometimes,
users can just
send me an
email.
I have an
awesome idea,
but I don't
have time to
create it.
Can you create it?
Yes,
of course,
we can create
this mission
for you.
But,
sometimes,
users just
create those
missions by
themselves.
And,
if you find
in the
mission,
the right
panel of
the mission,
there are
a page
with
after name
on this
page.
So,
each mission
has their
own after
who created
that,
who actually
created this
mission.
Yeah,
that's cool.
I saw that.
Is there
criteria for
taking a
mission or
not?
Like,
if somebody
makes a
mission and
it's basically
the same as
another,
would you say,
thanks,
but no?
Or,
what do you
look for
when somebody
comes with
an idea?
We have
some
procedure
in order
to accept
this mission
to
Checker
Map.
So,
every
person who
created this
mission,
he should
submit this
mission first
on the
forum,
in some
specific
section of
the forum,
and where
experienced
players who
played a lot
in Checker,
they,
first of all,
those group
of people,
they are
mainly for
testing those
candidate
missions or
whatever,
candidate
puzzles.
Yes.
And almost
all the time
they can propose
some changes.
The mission
definition,
puzzle definition
is wrong,
or maybe
some tests
are missed,
or whatever.
There are some
various,
so they are
starting to
discuss.
those mission
after,
he is taking
part in
the mission
discussion,
and after
this,
we have
pretty solid
mission.
After that,
our team
member can
improve this
mission as
well.
For instance,
we can add
some animation
part in this
part,
or try it
panel,
or maybe
our designers
want to
create
illustration
for this
mission.
So,
we also
take part
in the
mission
creation.
And after
that,
we put
this
mission
on the
island.
And if
you
subscribe
on
Checker
newsletter,
you will
get
in use
that we
have
some new
missions
coming out,
and you
can be the
first one
who tried
and played
this mission.
That's awesome.
Yeah,
very cool.
I love it.
That sounds
really great.
And I like
that you
add
illustrations
and stuff
and kind
of make
it feel
more part
of the
thing
once they
add it.
Thanks.
We have
very cool
and very
passionate
designers
team.
Yeah,
the designers
definitely
are doing
nice work
there.
Like I
said,
the overall
view of
the islands
is just
totally
beautiful.
It's great.
So,
I want to
touch on
two things
really quickly
before we,
maybe three,
before we
call it a
show.
So,
one of the
ones I
wanted to
ask you
about is
you said
there's
something like
a Czech
IO
classroom
or something
like that.
What's the
story there?
Yeah,
as I
mentioned
before,
there are
a lot
of
universities
and
some
classes
and
teachers
who
are
using
Czech
IO
as
an
additional
material.
So,
you know,
guys,
just take
this site
and you
use whatever
you want
to use
and just
improve
your
skills
there.
so,
we want
to help
those
teachers
in their
class.
We
give them
an additional
functionality.
We give
them more
hands-on
on Czech
IO.
So,
if you
are a
teacher who
is actually
teaching
class,
you can
put all
your
students
in
Czech
IO
and
they
will
be
in
some
group.
And
while
they
explore in
the
world,
while
they're
solving
puzzles,
they can
interact
with
each
other.
So,
those
activity
pages
that you
saw,
the whole
activity
become
the
class
activity
and
you
see
activity
of
each
class
member.
If
you
solve
some
puzzle,
first
you
see
solution
of
your
classmates
and
then
you
can
go
and
check
solution
of
other
Czech
users.
And
what
else
we
have?
We
have
this
progress
page.
So,
in
this
progress
page
you
can
actually
in
one
page
you
can
see
all
the
missions
that
your
class
solved
and
all
the
students
and
you
can
see
all
the
intersections
who
solved
each
mission
and
you
can
go
and
see
solutions
that
were
shared
by
this
particular
person.
So,
what
actually
Classroom
is doing
is just
give
some,
we
don't
want
to
change
checker
for
classrooms
but
we
want
to
give
more
power
to
teachers
so
they
can
keep
their
class
together.
Yeah,
that's
really
nice
and if
you go
into one
of the
pages
like your
profile page
that has
a footer
there's a
class manager
at the
bottom
and it
looks
really
easy.
So,
let me
give you
a few
scenarios
and you
tell me
if this
makes sense
is
one
thing
I
could
do
is
I
could
create
a
class
and
the
class
could
be
talk
Python
listeners
and
everyone
who
listens
to
the
podcast
could
they
be
in
a
class
and
go
through
it
together
and
share
ideas
as a
group?
Yes,
yes.
So,
if you
are creating
a
class
you
have
two
options.
First
option
you
can
simply
put
all
the
emails
that
you
think
you
want
to
add
in
this
class
in
the
specific
text
field
and
then
put
some
messages
out
there
and
just
send
it
out.
This
is
the
first
option.
And
the
second
option
you
can
just
provide
you
with
the
link
and
this
link
has
a
page
of
your
class
and
some
button
below
that
actually
tells
I
want
to
join
to
this
class.
The
only
thing
that
you
should
done
after
join
you
as
a class
creator
should
go
and
approve
this
joining
right?
I see.
And
after that
you can
have the
whole
class
just
for
your
podcast
listeners.
Okay.
Cool.
Yeah.
Also
like for
some
of my
online
courses
maybe
I'll
see if
I can
create
a class.
I'll
look into
it.
That's
very
cool.
Thanks.
Yeah.
I will
create
additional
video
tutorial
that I
will
explain
all the
features
and I
will
share
it
and check
out
so you
can
go
there
and see
how
exactly
it
works
and how
you
can
use it.
Okay.
Excellent.
Yeah.
And I'll
try to
link to
that if
the timing
lines up.
Cool.
So that's
one thing
I wanted
to cover.
The other
is can
you give
us a
look
behind the
scenes
at the
technology
involved?
Like are
you using
Django?
Are you using
Docker?
Like how's
Python in the
backend
working?
Like those
kinds of
things.
Yeah.
I would
love to.
So we
are using
Django
for
web
part.
Also for
running
coding
solutions,
running user
solutions.
We're using
Twisted and
we're using
Docker.
So every
mission is
covered in
Docker
container and
running in
the Docker
container.
And all
these runs
and all
those runnings
are actually
managed
by
Twisted
server.
And that's
cool.
Is that also
for Empire
of Code?
Yeah.
The same
kind of
things actually
working for
Empire of
Code but
we make
it a little
bit different
for Empire
of Code.
We actually
every mission
is actually
Docker
container and
for every
mission we
have somehow
prepared the
Docker
container before
the run.
And it's
actually a
little bit
more efficient.
I'm not
sure.
I think
this part
may be
too much
detail.
Yeah.
We don't
have to go
into too
much of
the details
but I
saw it
will take
a few
moments for
us to
deploy your
army to
this asteroid.
I'm thinking
oh is that a
Docker container
because it's
running your
code strategy
and stuff
like that.
yeah we
we had a
lot of
complaints
from
why don't
you show
me
progressively
how my
army is
going.
Yeah we
are actually
running all
the code
and then
show you
the result.
Yeah cool.
Awesome.
All right well
we're getting
pretty much out
of time so I
think maybe
we'll leave
it there.
But Alex this
has been a
super interesting
look where
Check.io came
from and where
it's going.
So thanks for
that.
Thank you.
Thank you for
inviting me here.
It was great.
It was a big
pleasure for me
to share all
the ideas.
You're welcome.
Now before I
let you go I
have two
questions I
always ask my
guests.
The first one
is I just
checked there
are if I
look at
pypi.io
which is the
shiny new
Python package
index.
It's still it
says it's in
beta but the
backing data
store is the
production data
store so you
might as well
use the pretty
one.
If you look
there there's
88,000 plus
packages today
which is amazing.
It's so
amazing right?
And of those
there's tons that
you're exposed to
that people maybe
don't know about.
Is there a
favorite one you're
like hey everyone
should know about
this but they
probably haven't
heard of it.
I think everybody
heard about Django
so I think this is
my favorite package
that I'm using a
lot so yeah Django
is one of my
favorite and I
don't have any
fancy one that I
think everybody
should use.
Yeah all right so
Django check it out
very cool.
And if you're going
to write Python code
and it's not in
your online editor
what what editor
do you open up?
I'm using PyCharm.
This is definitely
one of my favorite
code editor.
Yeah I love
PyCharm too.
I use it for
almost all my
Python work and
it's one of those
things that you
kind of have to
take a moment and
learn but as you
learn more features
they add up you're
just like okay I
have to use this
thing.
It's very cool and
I think it's awesome
that they're partnering
with you so well
done JetBrains guys.
That's great.
Yeah thanks.
All right Alex it's
been a fun
conversation.
thanks for being
on the show.
Thanks for having
me here.
You bet.
Bye-bye.
Bye.
This has been
another episode of
Talk Python to Me.
Today's guest has
been Alexander
Leibach and this
episode has been
sponsored by Hired
and SnapCI.
Thank you both for
supporting the show.
Hired wants to
help you find your
next big thing.
Visit Hired.com
slash Talk Python to
me to get five or
more offers with
salary and equity
presented right up
front and a special
listener signing
bonus of $2,000.
SnapCI is modern,
continuous integration
and delivery.
Build, test, and deploy
your code directly
from GitHub all in
your browser with
debugging, Docker, and
parallels included.
Try them for free at
snap.ci slash
talkpython.
Are you or a
colleague trying to
learn Python?
Have you tried books
and videos that just
left you bored by
covering topics point
by point?
Well check out my
online course Python
Jumpstart by
building 10 apps at
talkpython.fm slash
course to experience a
more engaging way to
learn Python.
And if you're
looking for something
a little more
advanced, try my
Write Pythonic code
course at talkpython.fm
slash pythonic.
You can find the
links from this
episode at talkpython.fm
slash episodes slash
show slash 75.
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 slash
iTunes, Google Play
feed at /play, and
direct RSS feed at
/rss on
talkpython.fm.
Our theme music is
Developers, Developers,
Developers by Corey
Smith, who goes by
Smix.
Corey just recently
started selling his
tracks on iTunes, so I
recommend you check it
out at talkpython.fm
slash music.
You can browse his
tracks he has for sale
on iTunes and listen to
the full-length version
of the theme song.
This is your host,
Michael Kennedy.
Thanks so much for
listening.
I really appreciate it.
Smix, let's get out
of here.
Staying with my voice.
There's no norm that I
can feel within.
Haven't been sleeping.
I've been using lots of
rest.
I'll pass the mic back to
who rocked his best.
Developers.
Well, first developers, developers, developers.
We'll be right back.
Thank you.