WEBVTT

00:00:00.001 --> 00:00:04.380
It's time to obey the testing goat and fire up some Python in the browser.

00:00:04.380 --> 00:00:10.140
This is Talk Python To Me, episode number 10, with guest Harry J.W. Percival, recorded

00:00:10.140 --> 00:00:12.800
Tuesday, May 12, 2015.

00:00:12.800 --> 00:00:42.580
Hello, and welcome to Talk Python To Me.

00:00:42.840 --> 00:00:44.360
A weekly podcast on Python.

00:00:44.360 --> 00:00:47.700
The language, the libraries, the ecosystem, and the personalities.

00:00:47.700 --> 00:00:49.860
This is your host, Michael Kennedy.

00:00:49.860 --> 00:00:54.240
Follow me on Twitter, where I'm @mkennedy, and keep up with the show and listen to past

00:00:54.240 --> 00:00:56.640
episodes at talkpythontimmy.com.

00:00:56.640 --> 00:01:02.380
This episode, we'll be talking to Harry Percival from Python Anywhere about hosting Python applications

00:01:02.380 --> 00:01:08.240
and making Python available to the masses, as well as his book and mission, TDD in Python.

00:01:09.200 --> 00:01:13.360
I'm thrilled to tell you that this episode is brought to you by Codeship.

00:01:13.360 --> 00:01:18.080
Codeship is a platform for continuous integration and continuous delivery as a service.

00:01:18.080 --> 00:01:20.120
I'll talk more about them later in the show.

00:01:20.120 --> 00:01:25.880
Please take a moment to check them out at codeship.com or follow them on Twitter, where they're at Codeship.

00:01:25.880 --> 00:01:30.140
This show is kind of special because I've traveled all the way from the west coast of the United

00:01:30.140 --> 00:01:33.320
States to cheerio, London to meet with Harry in person.

00:01:33.320 --> 00:01:39.920
Well, maybe I also came here for a conference in central London, which happens to be close to Python Anywhere's headquarters.

00:01:39.920 --> 00:01:43.840
Either way, it was really fun to do an in-person interview with Harry.

00:01:43.840 --> 00:01:45.540
Now, let's get to the show.

00:01:45.540 --> 00:01:48.620
Harry, welcome to the show.

00:01:48.620 --> 00:01:49.440
Hi, Michael.

00:01:49.440 --> 00:01:50.040
Thanks for having me.

00:01:50.040 --> 00:01:50.880
I'm excited about it.

00:01:50.880 --> 00:01:53.880
This is really an amazing show.

00:01:53.880 --> 00:01:55.700
It's the first one we're doing in person.

00:01:55.700 --> 00:01:56.300
Right.

00:01:56.480 --> 00:01:56.840
Okay.

00:01:56.840 --> 00:01:57.380
All right.

00:01:57.380 --> 00:01:58.300
Well, I hope I don't mess it up.

00:01:58.300 --> 00:01:59.360
No, you definitely won't.

00:01:59.360 --> 00:02:01.100
So I'm here in London.

00:02:01.100 --> 00:02:02.340
I'm not normally in London.

00:02:02.340 --> 00:02:03.980
I love this place, but I don't live here.

00:02:03.980 --> 00:02:05.420
So it's kind of unique.

00:02:05.420 --> 00:02:11.260
And I happen to be at a conference like a block away from your office where Python Anywhere is.

00:02:11.260 --> 00:02:11.700
Right.

00:02:11.700 --> 00:02:12.400
There you go.

00:02:12.400 --> 00:02:14.920
And so why don't we get together and do this in person?

00:02:14.920 --> 00:02:15.960
And here we are.

00:02:15.960 --> 00:02:16.580
Fantastic.

00:02:16.580 --> 00:02:17.840
All right.

00:02:17.840 --> 00:02:20.160
So I really want to talk about Python Anywhere.

00:02:20.160 --> 00:02:23.660
I want to talk about Obey the Testing Goat, all those types of things.

00:02:23.660 --> 00:02:25.700
But let's just start at the beginning.

00:02:25.860 --> 00:02:27.020
How did you get started in programming?

00:02:27.020 --> 00:02:28.020
How did you get started in Python?

00:02:28.020 --> 00:02:28.460
Sure.

00:02:28.460 --> 00:02:32.920
I guess I started in programming when I was quite young, like a lot of people, maybe when

00:02:32.920 --> 00:02:39.440
I was 10 years old, on various old bits of hardware from the, this is the sort of early

00:02:39.440 --> 00:02:41.740
90s, maybe even the late 80s.

00:02:41.740 --> 00:02:49.080
And I had like an Amstrad PCW green and black background, had like one of the early Olivetti

00:02:49.080 --> 00:02:49.960
laptops.

00:02:50.460 --> 00:02:55.420
And this thing had, it had not one, but two three and a half inch floppy drives.

00:02:55.420 --> 00:02:56.120
Oh my gosh.

00:02:56.120 --> 00:02:57.820
No hard disk at all.

00:02:57.820 --> 00:03:02.720
And you could run, you could run MS-DOS on one and Microsoft Word or a really good copy

00:03:02.720 --> 00:03:04.620
of Snake on another one.

00:03:04.620 --> 00:03:07.300
And then at school we had them as well.

00:03:07.300 --> 00:03:08.380
So I was programming in basic.

00:03:08.380 --> 00:03:10.040
I had a few books from America.

00:03:11.100 --> 00:03:14.340
And at school we had these things called Thompson TO7s.

00:03:14.340 --> 00:03:15.520
I've never heard of that thing.

00:03:15.520 --> 00:03:15.740
Yeah.

00:03:15.740 --> 00:03:16.160
Okay.

00:03:16.300 --> 00:03:20.700
So it's a, it's like a, it's a big ugly box thing that you plug into a television screen

00:03:20.700 --> 00:03:25.200
and it's got these like rubber keys on and they go like boop when you press them.

00:03:25.200 --> 00:03:28.100
You know, 10 going toot, doot, go to 20.

00:03:28.100 --> 00:03:31.420
And we're programming basic.

00:03:31.420 --> 00:03:35.520
And the cool thing with that actually was that they had, they had this thing called an input

00:03:35.520 --> 00:03:38.520
pen, which was like this pen thing that you could press against the screen.

00:03:38.740 --> 00:03:42.800
And it had some voodoo that then would be able to register an XY coordinate against where

00:03:42.800 --> 00:03:43.940
it was on the TV screen.

00:03:43.940 --> 00:03:48.140
I guess it was like calculating where the sort of raster had got to or something like that.

00:03:48.140 --> 00:03:49.440
That's pretty cutting edge for it.

00:03:49.440 --> 00:03:50.100
What year was this?

00:03:50.100 --> 00:03:53.080
This is like 1992, I'm going to say.

00:03:53.080 --> 00:03:53.360
Wow.

00:03:53.360 --> 00:03:53.600
Right.

00:03:53.600 --> 00:03:55.040
That predates Mozilla.

00:03:55.040 --> 00:03:57.760
Well, I think those computers were already old then, to be fair.

00:03:57.760 --> 00:04:03.480
And so, yeah, we would make like little drawing programs on them, which is really cool actually,

00:04:03.480 --> 00:04:06.440
because if you watch kids programming these days on much more advanced computers,

00:04:06.440 --> 00:04:07.840
they've got really cool things like Scratch.

00:04:07.940 --> 00:04:09.960
They don't have to go through basic and go-tos.

00:04:09.960 --> 00:04:11.160
But they did exactly.

00:04:11.160 --> 00:04:12.880
I mean, you watch kids in schools doing this.

00:04:12.880 --> 00:04:16.580
They do exactly what I did at that age, which as soon as you figure you can do some graphics

00:04:16.580 --> 00:04:20.980
on the screen, you start making a paint program, you draw circles and squares and spirals and

00:04:20.980 --> 00:04:21.640
things like this.

00:04:21.640 --> 00:04:23.840
And so, yeah, yeah, that sort of thing.

00:04:23.840 --> 00:04:25.260
I'm sure everyone's got a similar story.

00:04:25.260 --> 00:04:26.020
That's awesome.

00:04:26.020 --> 00:04:28.340
So that's basic.

00:04:28.340 --> 00:04:29.160
How about Python?

00:04:29.160 --> 00:04:30.040
Yeah.

00:04:30.040 --> 00:04:32.200
So that was my origins, right?

00:04:32.200 --> 00:04:33.160
I was on the right path.

00:04:33.160 --> 00:04:40.380
And then somehow my life went wrong and I sort of went and studied economics and I got a job as a management consultant,

00:04:40.380 --> 00:04:43.580
which was very tedious.

00:04:43.580 --> 00:04:48.180
And I didn't really do any programming other than kind of overcomplicated Excel spreadsheets

00:04:48.180 --> 00:04:51.700
until I was pretty much 30 years old.

00:04:51.700 --> 00:04:54.460
And this is like 2008.

00:04:54.460 --> 00:04:58.260
I took a sabbatical from my job, which turned out to be just me quitting, basically.

00:04:58.260 --> 00:05:04.080
Go off and do a new degree and get a master's in computer science and just learn programming again

00:05:04.080 --> 00:05:05.700
and kind of do it properly.

00:05:05.880 --> 00:05:08.160
And then I went off and that's what I do now.

00:05:08.160 --> 00:05:09.220
Nice.

00:05:09.220 --> 00:05:12.340
Was it really refreshing to step away from science?

00:05:12.340 --> 00:05:12.880
Yeah.

00:05:12.880 --> 00:05:18.300
Well, management consulting is a lot of talk, not so much action.

00:05:18.300 --> 00:05:18.820
Yeah.

00:05:18.820 --> 00:05:19.300
Yeah.

00:05:19.300 --> 00:05:21.300
I mean, so it's not for everyone, I think.

00:05:21.300 --> 00:05:22.160
It wasn't for me.

00:05:22.160 --> 00:05:25.060
And it was interesting in parts.

00:05:25.060 --> 00:05:28.320
But I found myself, like, just if I looked at the part of the job that I enjoyed,

00:05:28.320 --> 00:05:32.520
it was mostly just making an overcomplicated Excel spreadsheet and, you know,

00:05:32.520 --> 00:05:37.260
like just a 25-line functions in Excel and, like, VBA to do things that were, like,

00:05:37.260 --> 00:05:40.520
absolutely not required by the project that I thought were cool.

00:05:40.520 --> 00:05:44.660
So, you know, there was a clear direction I should probably have been going.

00:05:44.660 --> 00:05:45.840
You should have taken that clue.

00:05:45.840 --> 00:05:50.720
You know, my programming experience is like that as well.

00:05:50.720 --> 00:05:52.400
I kind of became an accidental programmer.

00:05:52.400 --> 00:05:56.860
I was working on my PhD in math and was working on some Silicon Graphics,

00:05:56.860 --> 00:05:57.840
like supercomputers, right?

00:05:57.840 --> 00:06:01.280
And I remember after about a year of working on this project,

00:06:01.280 --> 00:06:04.940
it was this cool 3D simulator that I really enjoyed working on,

00:06:04.940 --> 00:06:06.520
except when I got to the math parts.

00:06:06.520 --> 00:06:10.660
And then after about six months of that, I'm like, you know,

00:06:10.660 --> 00:06:14.220
maybe I should take this as a clue that I should stop doing math and go do computers.

00:06:14.220 --> 00:06:14.880
So very cool.

00:06:14.880 --> 00:06:15.800
Nice to hear that.

00:06:15.800 --> 00:06:16.120
Yeah.

00:06:16.120 --> 00:06:21.860
So I know you because when I was looking for a place to host my website and get started,

00:06:21.860 --> 00:06:27.160
I ran across Python Anywhere and I thought, wow, this is a super cool project you guys have.

00:06:27.160 --> 00:06:28.300
It is amazing.

00:06:28.300 --> 00:06:30.560
And so maybe you could tell me about that.

00:06:30.560 --> 00:06:33.560
It's only moderately amazing.

00:06:33.560 --> 00:06:35.180
It's pretty awesome.

00:06:35.180 --> 00:06:36.900
Well, let's see.

00:06:36.900 --> 00:06:40.060
So Python Anywhere is kind of, what is it?

00:06:40.060 --> 00:06:43.960
It's a place where you can code Python in your browser.

00:06:45.280 --> 00:06:47.180
And that could mean a lot of things.

00:06:47.180 --> 00:06:55.700
And what it means for us eventually is like, I guess where we're really headed is to try and sort of be as Google Docs is to Microsoft Word.

00:06:55.700 --> 00:07:00.540
Maybe we could try and be that to installing and running Python on your local computer.

00:07:00.540 --> 00:07:01.040
Right.

00:07:01.180 --> 00:07:07.380
So if you have Python that runs, you know, in the cloud with apologies for the buzzword, what can you do?

00:07:07.380 --> 00:07:09.980
Well, so first of all, you don't have to install any software on your PC.

00:07:09.980 --> 00:07:15.080
So you go along, you can come to our website and we'll give you a text editor, which is going to work.

00:07:15.080 --> 00:07:19.780
And it's going to have syntax highlighting for Python and even maybe some error checking with the PyFlakes.

00:07:20.520 --> 00:07:27.560
It's going to have a console just like you would have on your own computer and not just like a sort of line by line console, but like a real terminal emulator there.

00:07:27.560 --> 00:07:28.800
So you can have tab completion.

00:07:28.800 --> 00:07:30.600
You can run Vim or Emacs in it.

00:07:30.600 --> 00:07:34.980
And we'll try and give you those tools that you're used to having on your PC in the cloud.

00:07:34.980 --> 00:07:38.720
And what that gives you is the ability to kind of run things from anywhere.

00:07:39.560 --> 00:07:43.680
And it gives you the ability to do more kind of collaboration things that are a bit harder to do on your own computer.

00:07:43.680 --> 00:07:51.360
And then you can do some number crunching that maybe you can't do on your own computer because we can do maybe a little paralyzation for you.

00:07:51.360 --> 00:07:52.960
And then finally, we can do web hosting.

00:07:52.960 --> 00:07:55.460
So, you know, like we're already on servers.

00:07:55.460 --> 00:08:01.500
It's that much, not much effort for us to then say, okay, well, we'll give your code some sort of public access to the Internet.

00:08:01.500 --> 00:08:05.480
And so, you know, we end up having a lot of people just hosting websites on that.

00:08:05.480 --> 00:08:06.520
Yeah, that's really cool.

00:08:06.640 --> 00:08:11.960
Can you speak to, like, what percentage of users are doing what type of use case?

00:08:11.960 --> 00:08:13.720
It's hard to tell, really.

00:08:13.720 --> 00:08:18.060
Like, because we've got an awful lot of users of free users who come along.

00:08:18.060 --> 00:08:22.240
And then, you know, like any website, there's some of them come and check it out and go, cool, and never come back.

00:08:22.240 --> 00:08:24.800
And a lot of them will never talk to us.

00:08:24.800 --> 00:08:26.500
So we're not too sure what they get up to.

00:08:26.500 --> 00:08:33.600
But of the ones that pay us, an awful lot of them do use it for web hosting.

00:08:34.000 --> 00:08:36.500
So, you know, we built this thing.

00:08:36.500 --> 00:08:39.160
What it came out of was actually an online spreadsheet.

00:08:39.160 --> 00:08:40.260
Okay.

00:08:40.260 --> 00:08:42.700
So the company I work for is called Python Anywhere Now.

00:08:42.700 --> 00:08:44.840
But when I joined it, it was called Resolver Systems.

00:08:44.840 --> 00:08:49.340
And what they were building was a Pythonic spreadsheet.

00:08:49.340 --> 00:08:51.760
So I mentioned I love spreadsheets earlier.

00:08:51.760 --> 00:08:52.040
Yeah.

00:08:52.160 --> 00:08:57.240
The reason I got this job is because I decided to do my thesis as part of my master's on spreadsheets.

00:08:57.240 --> 00:08:57.700
That's amazing.

00:08:57.700 --> 00:09:02.320
And what I thought I'd do is I'd phone out around a few companies that do spreadsheet software.

00:09:02.320 --> 00:09:06.580
And, like, other than Microsoft, right, there's only, like, a very few of these, and they're small.

00:09:06.580 --> 00:09:10.540
And I would just ask them, hey, I'm going to do a thesis all about spreadsheets because I'm crazy.

00:09:10.540 --> 00:09:14.520
And probably if you guys love spreadsheets like I do, you want to sponsor me, right?

00:09:14.580 --> 00:09:17.260
And there was one company stupid enough to say yes to that.

00:09:17.260 --> 00:09:19.040
And that was Resolver Systems.

00:09:19.040 --> 00:09:20.440
And that's how I ended up working there.

00:09:20.440 --> 00:09:21.960
And they were making a Pythonic spreadsheet.

00:09:21.960 --> 00:09:29.120
So, like, just imagine Excel, which works like Excel, except that when you want to script it, you get to use Python instead of using VBA.

00:09:29.120 --> 00:09:31.160
That's a nice place to be, I would think.

00:09:31.160 --> 00:09:33.760
It was really good fun and a great tool.

00:09:33.760 --> 00:09:41.000
But, like, ultimately, if your pitch is you want to try and tell people to stop using Excel and use this other tool, it's a very high mountain to climb.

00:09:41.000 --> 00:09:41.340
Yeah.

00:09:41.340 --> 00:09:42.120
Even Google.

00:09:42.120 --> 00:09:44.240
I think they're having some success with Google Docs.

00:09:44.320 --> 00:09:47.260
But even for them and their reach, that's a hard story to tell.

00:09:47.260 --> 00:09:47.620
Yeah.

00:09:47.620 --> 00:09:55.500
So, like, for a small, like, five-person company out of London, it had a dedicated following of people who loved it because it was loads of fun.

00:09:55.500 --> 00:09:58.500
But so that wasn't necessarily working.

00:09:58.500 --> 00:10:01.360
So the first pivot was, like, let's take that online, right?

00:10:01.360 --> 00:10:02.740
And let's build that tool.

00:10:02.740 --> 00:10:07.080
Instead of having a desktop app, let's make it web-based and see whether people like that.

00:10:07.080 --> 00:10:07.600
And they did.

00:10:07.600 --> 00:10:09.300
And they liked the sort of number-crunching aspect.

00:10:09.300 --> 00:10:12.920
But this was a sort of very, like, lean startup-y thing we were doing.

00:10:13.540 --> 00:10:15.080
Let's reinvent this product online.

00:10:15.080 --> 00:10:16.880
We did that sort of for three or four months.

00:10:16.880 --> 00:10:18.580
I tried to gather a lot of user feedback.

00:10:18.580 --> 00:10:23.360
And what people were coming back to us and saying is, you know, like, the coolest thing about this isn't the spreadsheet part.

00:10:23.360 --> 00:10:28.320
It's just the fact that I can actually run Python scripts online off my computer in the cloud.

00:10:28.320 --> 00:10:29.900
And I can just go there and it's there.

00:10:29.900 --> 00:10:31.440
And so we said, all right, fine.

00:10:31.480 --> 00:10:34.680
What if we dropped the spreadsheet bit and just had Python in the cloud?

00:10:34.680 --> 00:10:35.500
What would that look like?

00:10:35.500 --> 00:10:36.400
And that was Python.

00:10:36.400 --> 00:10:37.680
Anyway, that's really interesting.

00:10:37.680 --> 00:10:40.280
There's some parallels to Docker and .cloud, I think.

00:10:40.280 --> 00:10:40.560
Totally.

00:10:40.560 --> 00:10:41.420
In there, right?

00:10:41.420 --> 00:10:45.660
Like, the thing that was just the foundation of your actual product became the product.

00:10:45.660 --> 00:10:45.840
Yeah.

00:10:45.840 --> 00:10:46.900
And the thing that worked so well.

00:10:46.900 --> 00:10:47.280
Yeah.

00:10:47.320 --> 00:10:51.180
The classic Silicon Valley pivot, although in this case, Silicon Roundabout pivot.

00:10:51.180 --> 00:10:55.720
Yes, the Silicon Roundabout, which is, what, a few blocks away in London, that district.

00:10:55.720 --> 00:10:56.120
Excellent.

00:10:56.120 --> 00:10:56.280
Thanks for having me.

00:10:56.280 --> 00:10:56.340
Thanks for having me.

00:10:56.340 --> 00:11:09.700
Now, let me take a minute and tell you about our sponsor for the show, CodeShip.

00:11:09.700 --> 00:11:16.300
CodeShip is a hosted continuous delivery service focused on speed, security, and customizability.

00:11:16.300 --> 00:11:22.440
You can set up continuous integration in a matter of seconds and automatically deploy when your tests have passed.

00:11:22.440 --> 00:11:25.700
CodeShip supports your GitHub and Bitbucket project.

00:11:25.700 --> 00:11:29.040
You can get started with CodeShip's free plan today.

00:11:29.040 --> 00:11:39.020
Should you decide to go with a premium plan, Talk Python listeners can save 20% off any plan for the next three months by using the code TALKPYTHON.

00:11:39.020 --> 00:11:44.600
That's T-A-L-K-P-Y-T-H-O-N, all caps, no spaces.

00:11:44.600 --> 00:11:53.400
Thanks to CodeShip for sponsoring the show, and I encourage you to check them out right now at CodeShip.com and thank them on Twitter where they're at CodeShip.

00:11:53.400 --> 00:12:23.380
CodeShip.com and thank them for joining us.

00:12:24.320 --> 00:12:27.020
Is it on multiple data centers or is it on one?

00:12:27.020 --> 00:12:28.360
No, at the moment it's just in one.

00:12:28.360 --> 00:12:34.740
And as we grow, we get a few customers going, hey, can we get some in Australia or can we get some on the West Coast or whatever.

00:12:34.740 --> 00:12:37.700
But U.S. East one, A, B, C, D.

00:12:37.700 --> 00:12:39.500
Somewhere in northern Virginia.

00:12:39.900 --> 00:12:40.640
That's it, yeah.

00:12:40.640 --> 00:12:42.260
I have cousins down there, a lovely countryside.

00:12:42.260 --> 00:12:43.860
Fantastic.

00:12:43.860 --> 00:12:47.640
Yeah, so I think that's a really interesting place to be in.

00:12:47.640 --> 00:12:53.520
Like I said, the way I found about you guys is I'm actually hosting my website for the podcast on there.

00:12:53.520 --> 00:12:54.000
Right.

00:12:54.100 --> 00:12:55.720
And that thing is super responsive.

00:12:55.720 --> 00:12:57.240
I really like the experience.

00:12:57.240 --> 00:13:08.760
So I tried to find these other places that would host it, and they're like, oh, yeah, we'll support Python 2 and Python 3, but, oh, we don't support Pyramid, which is one of the framework I use for the website.

00:13:09.040 --> 00:13:15.340
Or, yeah, we support Pyramid, but we only do Python 2, and I write it in Python 3, and I'm like, you know, because it's a brand new project.

00:13:15.340 --> 00:13:17.020
Like, I can write this in, like, Python 3.

00:13:17.020 --> 00:13:17.640
That'll be fun.

00:13:17.640 --> 00:13:19.460
Until I wanted to host it.

00:13:19.460 --> 00:13:20.360
Then it was not so much fun.

00:13:20.360 --> 00:13:23.880
And I just stumbled across you guys, and I think what you're doing is really, really cool.

00:13:23.880 --> 00:13:28.400
You know, you support a whole bunch of different interpreters, yeah?

00:13:28.400 --> 00:13:30.360
Well, Python interpreters, yeah.

00:13:30.360 --> 00:13:31.480
Of course, yeah, of course.

00:13:31.480 --> 00:13:35.660
So you've got several versions of Python 2, several versions of Python 3.

00:13:35.660 --> 00:13:35.820
Yeah.

00:13:35.820 --> 00:13:39.940
PyPy, which I thought was just because you can, right?

00:13:39.940 --> 00:13:40.420
Why not?

00:13:40.420 --> 00:13:42.260
That is really cool.

00:13:42.260 --> 00:13:44.080
Did you have to do anything special to support that?

00:13:44.080 --> 00:13:45.120
No, no, it's okay.

00:13:45.120 --> 00:13:53.740
So, I mean, supporting things from the web hosting point of view means we use UWSGI or MicroWISGI,

00:13:53.740 --> 00:13:57.420
if some people have it in the background, and that just has plug-ins for various interpreters,

00:13:57.420 --> 00:13:58.860
including non-Python ones.

00:13:58.860 --> 00:14:01.740
So it's just a matter of activating the ones that we think we can do.

00:14:01.920 --> 00:14:06.300
So, like, we could actually, if we wanted to, go off and make RubyAnywhere.com.

00:14:06.300 --> 00:14:08.480
The trouble is, none of us know anything about Ruby.

00:14:08.480 --> 00:14:09.960
So we could do it.

00:14:09.960 --> 00:14:11.180
Technically, it wouldn't be hard.

00:14:11.180 --> 00:14:14.680
But then I think we're taking on a lot of users that would be asking us questions that we don't know how to answer.

00:14:14.680 --> 00:14:15.680
Right, sure.

00:14:15.680 --> 00:14:18.680
And there's places that host Ruby, but you guys are hosting Python really well.

00:14:18.680 --> 00:14:18.960
Yeah.

00:14:18.960 --> 00:14:19.940
And that's the sweet spot.

00:14:19.980 --> 00:14:21.680
I mean, there's lots of people out there in there.

00:14:21.680 --> 00:14:25.940
You know, so if you're someone going, oh, okay, I want to run my code on some servers,

00:14:25.940 --> 00:14:28.100
like whether that's for web hosting or anything else.

00:14:28.100 --> 00:14:30.920
But, you know, you can go to Amazon straight.

00:14:30.920 --> 00:14:32.700
You can run your own server in a cupboard.

00:14:32.700 --> 00:14:37.400
You can go to Google App Engine or Compute, as it's now called.

00:14:38.360 --> 00:14:42.480
Or you can go to Heroku or you could go to .cloud in the old days.

00:14:42.480 --> 00:14:48.280
And so it's about sort of figuring out where there's a space in that sort of fairly crowded market.

00:14:48.280 --> 00:14:50.960
And I think the one is, like, let's focus on Python because that's what we know.

00:14:50.960 --> 00:14:52.600
And there's plenty of business there.

00:14:52.600 --> 00:15:00.280
And then let's try and say, okay, well, the hard work if you're running your own server is all the kind of sysadmin and configuration and maintenance.

00:15:00.280 --> 00:15:04.580
There's this kind of tradeoff between, like, the ultimate flexibility is if you do everything yourself.

00:15:04.580 --> 00:15:04.980
Right.

00:15:04.980 --> 00:15:07.420
Go to Z2, start up in Linux machine.

00:15:07.420 --> 00:15:08.220
Yeah, yeah, yeah.

00:15:08.260 --> 00:15:10.280
But then it's your Linux machine you've got to babysit.

00:15:10.280 --> 00:15:10.520
Yeah.

00:15:10.520 --> 00:15:11.800
So it's more effort.

00:15:11.800 --> 00:15:13.480
So, like, more flexibility, more effort.

00:15:13.480 --> 00:15:19.400
And then there's, like, the other end back in the old days, like Google App Engine, where they would do a lot of the work for you, but they were also very restrictive.

00:15:19.400 --> 00:15:23.800
So we'd say, right, well, you can use App Engine, but, you know, these are the rules about what kind of things you can run.

00:15:23.800 --> 00:15:24.720
It's this version of Python.

00:15:24.720 --> 00:15:26.280
You know, these things won't work.

00:15:26.280 --> 00:15:29.720
And you have to, you know, like, all your requests will be killed after X seconds.

00:15:29.720 --> 00:15:30.760
Don't touch the files.

00:15:30.760 --> 00:15:32.500
Yeah, no database, no nothing.

00:15:32.500 --> 00:15:38.140
And so we, like, so we're sort of somewhere between those two, trying to give, like, there's enough flexibility that people find it interesting.

00:15:38.160 --> 00:15:42.280
Whilst solving enough of the problems that developers don't want to have to think about.

00:15:42.280 --> 00:15:45.360
You know, scaling, backups, load balancing.

00:15:45.360 --> 00:15:49.800
Yeah, so maybe we could talk about the sort of experience of creating a website in there.

00:15:49.800 --> 00:15:54.860
And then we should also talk about other things like web job type stuff, which I think is interesting.

00:15:55.180 --> 00:15:56.900
But you go there, you say, I want to create a website.

00:15:56.900 --> 00:15:58.380
You can do that for free, right?

00:15:58.380 --> 00:15:58.660
Right.

00:15:58.660 --> 00:16:01.700
So I can create a free website as long as I don't care about the domain name.

00:16:01.700 --> 00:16:01.900
Yep.

00:16:01.900 --> 00:16:03.300
It would be .pythonanywhere.com.

00:16:03.300 --> 00:16:04.100
Yeah, exactly.

00:16:04.100 --> 00:16:05.780
Something .pythonanywhere.com.

00:16:05.780 --> 00:16:08.040
Your username .pythonanywhere.com.

00:16:08.040 --> 00:16:08.380
That's right.

00:16:09.020 --> 00:16:12.860
And then I'm giving something that's really interesting.

00:16:12.860 --> 00:16:16.580
It says, here is your bash shell in a browser.

00:16:16.580 --> 00:16:16.980
Yeah.

00:16:16.980 --> 00:16:18.580
To configure your environment.

00:16:18.580 --> 00:16:18.900
Yeah.

00:16:18.900 --> 00:16:19.580
Yeah.

00:16:19.580 --> 00:16:23.080
And basically I can start with, like, a virtual environment.

00:16:23.080 --> 00:16:23.420
Yeah.

00:16:23.420 --> 00:16:24.100
Yeah.

00:16:24.480 --> 00:16:24.880
Exactly.

00:16:24.880 --> 00:16:38.680
I mean, so we haven't done enough about this, but we want to try and so, you know, people who learn Python, there's a sort of first learning curve, like, trying to get it installed and figuring out how pip works and can you install packages.

00:16:38.680 --> 00:16:43.440
And we try and solve that problem for people by just saying, look, Python is already installed.

00:16:43.440 --> 00:16:43.960
Here it is.

00:16:43.960 --> 00:16:47.340
You just type Python or you click this button that says which version of Python you want.

00:16:47.340 --> 00:16:49.820
And then, you know, like, how do you install packages?

00:16:49.820 --> 00:16:50.480
Well, here's pip.

00:16:50.480 --> 00:16:51.240
It will just work.

00:16:51.300 --> 00:16:54.320
And also we've pre-installed a bunch of them just of popular things.

00:16:54.320 --> 00:16:55.460
So maybe it's already there.

00:16:55.460 --> 00:16:55.920
Nice.

00:16:55.920 --> 00:16:57.400
Like, what are the popular ones you have installed?

00:16:57.400 --> 00:16:59.380
We have, like, a file that we have overdone it.

00:16:59.380 --> 00:17:01.920
There's, like, a thousand packages installed.

00:17:01.920 --> 00:17:05.360
Like, SciPy, NumPy, Pill, blah, blah, blah, blah, requests.

00:17:05.360 --> 00:17:07.180
And so many of them.

00:17:07.180 --> 00:17:08.080
Yeah.

00:17:08.080 --> 00:17:11.760
But in the web apps thing, it's the same thing.

00:17:11.760 --> 00:17:12.840
And they go, okay, well, great.

00:17:12.840 --> 00:17:15.480
I've developed a little, you know, I want to develop a web application.

00:17:15.480 --> 00:17:15.900
What do I do?

00:17:15.900 --> 00:17:18.520
Well, you know, now you're going to need to install this web framework.

00:17:18.520 --> 00:17:20.780
You need to configure the following settings files.

00:17:21.180 --> 00:17:22.920
You need to have a folder structure that looks like this.

00:17:22.920 --> 00:17:24.560
You need to put your static files over there.

00:17:24.560 --> 00:17:30.360
And if you're on a web server, then you'll want to configure, you know, a static file serving here and a database there and an environment variable there.

00:17:30.360 --> 00:17:35.500
And we just want to try and do as much as possible to try and just kind of give users a thing that works.

00:17:36.240 --> 00:17:37.480
They can get started with it.

00:17:37.480 --> 00:17:39.480
And so we've tried to do a bit of that.

00:17:39.480 --> 00:17:41.120
And so we've tried to do a bit of that.

00:17:41.220 --> 00:17:47.000
So if you want to start, like, a Django project, you can go to our web tab, go start a new project.

00:17:47.000 --> 00:17:47.840
Do you want to use Django?

00:17:47.840 --> 00:17:48.240
Yes.

00:17:48.240 --> 00:17:54.800
And we'll install Django for you and set up a basic sort of run the sort of Python manage.py start project for you.

00:17:54.800 --> 00:17:56.660
And there'll be a working Django site there.

00:17:57.140 --> 00:17:58.260
And you can start with that.

00:17:58.260 --> 00:17:58.680
Yeah.

00:17:58.680 --> 00:17:59.280
That's the idea.

00:17:59.280 --> 00:18:00.600
And, like, you know, we need to do more work.

00:18:00.600 --> 00:18:03.640
The version of Django we have for Python 2 if I'm nitpicking is out of date.

00:18:03.640 --> 00:18:05.620
So then, okay, you do have to use a virtual environment.

00:18:05.620 --> 00:18:07.340
And that's a bit more complicated and blah, blah, blah.

00:18:07.820 --> 00:18:15.320
I think the fact you have the virtual environment possibility there means that you can do whatever you want more or less on the system.

00:18:15.320 --> 00:18:18.620
But you don't have to manage the infrastructure.

00:18:18.620 --> 00:18:24.800
And so in my mind, I think you guys are a very interesting blend of platform as a service and infrastructure as a service.

00:18:24.800 --> 00:18:28.140
So, like, I see it as infrastructure because I get a bash shell.

00:18:28.140 --> 00:18:30.000
I can really kind of install stuff.

00:18:30.000 --> 00:18:31.360
I can work with the file system.

00:18:31.360 --> 00:18:32.560
It's kind of like a VM.

00:18:32.560 --> 00:18:36.920
But it's platform as a service because I don't care what the web server version is.

00:18:36.920 --> 00:18:39.380
I don't care about Linux and I'm setting that up.

00:18:39.380 --> 00:18:40.380
Yeah.

00:18:40.380 --> 00:18:42.020
You take care of it for us, right?

00:18:42.020 --> 00:18:43.120
Yeah.

00:18:43.120 --> 00:18:43.620
I guess.

00:18:43.620 --> 00:18:44.100
So that's right.

00:18:44.100 --> 00:18:50.920
Some other people will try and hide some of that stuff from you and just give you a thing where you write some config files and then...

00:18:50.920 --> 00:18:53.840
Like Google Compute, for example, right?

00:18:53.840 --> 00:18:53.920
Yeah.

00:18:53.920 --> 00:18:55.460
And then, like, magic happens.

00:18:55.460 --> 00:18:56.840
And ours is a little bit...

00:18:56.840 --> 00:19:04.760
Maybe it's more about trying to recreate the kind of environment you have on your own laptop when you're running a dev version of a Flask app or something.

00:19:04.760 --> 00:19:05.600
You know how that works.

00:19:06.020 --> 00:19:13.160
Making that as much as possible the same on Python Anywhere where you just go, okay, well, if I wanted to edit a file in Bash or whatever, I can.

00:19:13.160 --> 00:19:17.480
And it's just that this part over here will do the web serving of it.

00:19:17.480 --> 00:19:22.460
Or if I want to view my log files, I can just, you know, tail my log file over here and there it is.

00:19:22.460 --> 00:19:27.700
So I don't have to go through some complicated UI to go and retrieve the log file, you know, it can do it in Bash.

00:19:27.700 --> 00:19:28.880
Yeah, that's really cool.

00:19:28.880 --> 00:19:32.560
I feel like, you know, it's a nice middle ground because...

00:19:32.560 --> 00:19:35.020
I'm getting more enthused about my own website by talking to you about it.

00:19:35.020 --> 00:19:35.600
It's all you should.

00:19:35.600 --> 00:19:35.980
This is great.

00:19:35.980 --> 00:19:36.700
This is fantastic.

00:19:36.700 --> 00:19:38.220
I'm here to make you excited.

00:19:38.220 --> 00:19:40.200
Keep you going because you're doing awesome stuff.

00:19:40.200 --> 00:19:41.060
So...

00:19:41.060 --> 00:19:41.360
Thank you.

00:19:41.360 --> 00:19:47.460
I feel like you're making me maintain things but making me maintain the right things.

00:19:47.460 --> 00:19:50.840
So I've created a virtual environment and everything in the virtual environment is my problem.

00:19:50.840 --> 00:19:57.960
But that's cool because I decide when I upgrade Pyramid or Requests or whatever, and that's all in line with what my app's doing.

00:19:57.960 --> 00:19:59.480
But everything else I don't care about, right?

00:19:59.480 --> 00:20:02.920
Like, would you upgrade Python 3 for me at some point?

00:20:02.920 --> 00:20:05.700
Like, would I just magically switch to a new version of Python?

00:20:05.700 --> 00:20:08.620
Well, you need to rebuild virtualenv if you switch to Python.

00:20:08.620 --> 00:20:09.140
Right, of course.

00:20:09.140 --> 00:20:09.540
That's right.

00:20:09.540 --> 00:20:11.680
But we're trying to be a bit clever about that.

00:20:11.680 --> 00:20:15.780
And we're trying to think of ways where you can say, you know, virtualenv is actually a bit scary for beginners.

00:20:15.780 --> 00:20:16.280
Sure.

00:20:16.280 --> 00:20:19.660
Like, they're used to going, all right, I figured out this command line thing.

00:20:19.660 --> 00:20:22.060
I know that if I type Python, I'm going to get a Python prompt.

00:20:22.060 --> 00:20:23.000
Okay, fine.

00:20:23.000 --> 00:20:26.420
And then you go, right, but, aha, you need a virtualenv.

00:20:26.420 --> 00:20:30.900
And so that when you do your command prompt, you have to check, have you activated the virtualenv, and is it the right one?

00:20:30.900 --> 00:20:33.360
And, like, this is another point at which some big N is just going to go, what?

00:20:33.360 --> 00:20:34.620
I just forget it.

00:20:34.620 --> 00:20:35.360
Yeah, it's scary.

00:20:35.360 --> 00:20:37.320
So people get that wrong.

00:20:37.320 --> 00:20:41.560
And so that's why we try and give a default no virtualenv setup that might work.

00:20:41.560 --> 00:20:47.020
And then we try to see if there's ways we can maybe build a bit of a GUI around the virtualenv stuff one day,

00:20:47.020 --> 00:20:50.260
where you say, like, a virtualenv is a thing that Python Anywhere understands.

00:20:50.260 --> 00:20:51.700
And so it knows what your virtualenvs are.

00:20:51.700 --> 00:20:54.220
And we can give you a GUI that says, this is what your virtualenvs are.

00:20:54.680 --> 00:21:02.120
And if you don't want to edit your virtualenv through bash with, you know, pip freeze angle bracket requirements.txt,

00:21:02.120 --> 00:21:06.100
maybe we can give you a UI for that, and then you can selectively click on things and upgrade them.

00:21:06.100 --> 00:21:11.280
Yeah, you could surface, like, the top 100 most popular packages, and they could check them off.

00:21:11.280 --> 00:21:12.540
Yeah, yeah, yeah, yeah, exactly.

00:21:12.540 --> 00:21:14.200
So things like that.

00:21:14.200 --> 00:21:16.920
But that's, I mean, that's Vaporware, so I apologize for talking about it.

00:21:17.620 --> 00:21:19.080
No, but these are good ideas.

00:21:19.080 --> 00:21:21.740
I think it would really move it down farther.

00:21:21.740 --> 00:21:27.680
So web hosting, you said, is kind of what people who are paying you, people like me, are doing.

00:21:27.680 --> 00:21:29.320
But there's other stuff you can do as well, right?

00:21:29.320 --> 00:21:31.460
Like, one thing I saw is I can run, like, scheduled jobs.

00:21:31.460 --> 00:21:37.780
So if I want to, you know, like, run a script that, like, sucks down some sort of screen scraping type thing.

00:21:37.780 --> 00:21:38.080
Absolutely.

00:21:38.080 --> 00:21:38.940
Beautiful soup.

00:21:38.940 --> 00:21:39.260
Yeah.

00:21:39.260 --> 00:21:39.880
I can do that, yeah?

00:21:39.920 --> 00:21:40.760
A lot of people do that, yeah.

00:21:40.760 --> 00:21:43.040
So a lot of people are using it for web hosting.

00:21:43.040 --> 00:21:44.540
A lot of people do scraping.

00:21:44.540 --> 00:21:46.460
And so we have this thing, scheduled tasks.

00:21:46.460 --> 00:21:47.480
It's basically cron jobs.

00:21:47.480 --> 00:21:47.880
Yeah.

00:21:47.880 --> 00:21:53.100
And you get to say, oh, yeah, every hour, every day, this sort of time, I'd like to run this script, whatever script you want.

00:21:53.100 --> 00:21:54.900
And we'll go ahead and run that for you.

00:21:54.900 --> 00:22:00.380
And maybe it's, you know, pulling down some data and saving it to a database, which maybe you've also got a web app that's then displaying that data.

00:22:00.380 --> 00:22:02.760
I don't know, show me the train times or something.

00:22:02.760 --> 00:22:03.300
Whatever.

00:22:03.300 --> 00:22:08.680
Yeah, so people do it to, like, run automated jobs that they don't need to keep their own computer switched on for.

00:22:09.340 --> 00:22:16.280
And then the third category of user, I guess, who might pay us are people doing big number crunching.

00:22:16.280 --> 00:22:27.520
So every so often we get some people coming along going, right, I want to just download megabytes and megabytes of tweets and, like, just run massive number crunching sentiment analysis on them.

00:22:27.520 --> 00:22:36.220
And so we have a system where if you use a certain amount of, like, CPU power on the system, we kind of put a quota on that each day.

00:22:36.420 --> 00:22:39.500
When you go past that quota, we don't switch your stuff off.

00:22:39.500 --> 00:22:41.980
We just put it in a tar pit where it gets slowed down.

00:22:41.980 --> 00:22:49.080
And so if you want to do a lot of number crunching all day long, then you have to pay us to get a higher quota so that it's actually going to run at a reasonable speed.

00:22:49.080 --> 00:22:49.700
Right.

00:22:49.700 --> 00:22:50.240
That's the deal there.

00:22:50.240 --> 00:22:53.800
Your web apps don't have that restriction right now, do they?

00:22:53.800 --> 00:22:55.360
So they don't count towards your quota?

00:22:56.300 --> 00:22:56.740
Yeah, yeah.

00:22:56.740 --> 00:22:59.580
We find most web apps aren't big number crunching sources.

00:22:59.580 --> 00:23:06.960
And we do actually have a thing where if a web request hasn't responded within, I think, the limit is five minutes, we kill it.

00:23:06.960 --> 00:23:08.160
That seems reasonable.

00:23:08.160 --> 00:23:11.060
It seems reasonable to us.

00:23:11.060 --> 00:23:19.420
So, yeah, you could try and very cleverly circumvent our number crunching restrictions by building a web app if you want, but it would be pretty painful.

00:23:19.800 --> 00:23:23.520
Yeah, no, I'm just more like thinking it's just not something you have to worry about with web hosting.

00:23:23.520 --> 00:23:26.180
It's more of a jobs sort of consideration, right?

00:23:26.180 --> 00:23:26.780
That's right.

00:23:26.780 --> 00:23:27.540
Yeah, yeah, yeah.

00:23:27.540 --> 00:23:28.580
Because I was feeling really good.

00:23:28.580 --> 00:23:31.240
I'm like, after a half a day, I have a lot of hits on my site.

00:23:31.240 --> 00:23:34.200
So I've used up 0.00 seconds of my time.

00:23:34.200 --> 00:23:36.380
I'm like, wow, I wrote that thing pretty efficiently.

00:23:36.380 --> 00:23:37.340
But not really, right?

00:23:37.340 --> 00:23:38.400
No, that's right.

00:23:38.400 --> 00:23:39.380
We don't count the web hits.

00:23:39.380 --> 00:23:47.960
And the web model in general is that, you know, like, so it's like any, what do you call it, shared multi-tenancy?

00:23:47.960 --> 00:23:48.400
I don't know.

00:23:48.400 --> 00:23:48.620
Yeah.

00:23:48.620 --> 00:23:52.400
But the point is that you can, like an airline booking system.

00:23:52.400 --> 00:23:56.440
Oh, God, I just compared myself to an, I compared our website to an airline booking system.

00:23:56.440 --> 00:23:57.840
This is the worst PR ever.

00:23:57.840 --> 00:24:04.780
You know, like, we can host a lot of people on a big web server, and most of them are, like, not going to be doing very much.

00:24:04.820 --> 00:24:14.380
And every so often, if someone hits the front page of Hacker News, you know, if you run your website on an Amazon micro instance, right, it's pretty fast most of the time.

00:24:14.380 --> 00:24:19.220
And the way Amazon work is that, you know, they'll do really, really fast hits on requests.

00:24:19.220 --> 00:24:23.980
And once you've used about 10 seconds of continuous CPU power, they throttle you down to nothing.

00:24:23.980 --> 00:24:24.320
Yeah.

00:24:24.320 --> 00:24:24.700
Right.

00:24:24.700 --> 00:24:29.220
So it's great for running a website that gets low traffic, and it's super cheap, and it can be free.

00:24:29.220 --> 00:24:33.100
But then if you hit Hacker News, your website just goes down.

00:24:33.100 --> 00:24:33.500
Yeah.

00:24:33.500 --> 00:24:34.380
Whereas, long on all.

00:24:34.380 --> 00:24:35.780
When you need it most, it lets you down.

00:24:35.780 --> 00:24:40.140
Like, the one you finally have gotten the word out about, and it's toast.

00:24:40.140 --> 00:24:40.840
Right.

00:24:40.840 --> 00:24:45.020
So whereas we say, hey, look, like, we're running, so you're on servers that have spare capacity.

00:24:45.020 --> 00:24:46.500
They're big servers.

00:24:46.500 --> 00:24:48.460
We use triple extra larges.

00:24:48.460 --> 00:24:50.080
I forget which one on Amazon.

00:24:50.080 --> 00:24:58.160
So when someone gets, you know, Hacker News, they just start using up more of the CPU on that instance for however long they're at the front page of Hacker News for.

00:24:58.160 --> 00:24:59.240
And that's, like, we're fine with that.

00:24:59.240 --> 00:25:00.020
That's part of the plan.

00:25:00.400 --> 00:25:09.240
You know, if it turns out you're still at the front page of Hacker News after several days, like, we are going to notice, and we're going to have a quiet word with you about maybe it's time to start paying us.

00:25:09.240 --> 00:25:09.700
Yes.

00:25:10.100 --> 00:25:15.440
But in the meantime, it's a nice thing, so you don't have to be scared of that sort of getting slash dotted moment.

00:25:15.440 --> 00:25:15.700
Yeah.

00:25:15.700 --> 00:25:25.200
A friend of mine said, when I told him I was using your service, Python, and he said, well, why don't you just go to EC2 and create, like, a micro Linux?

00:25:25.360 --> 00:25:31.340
I'm like, one of the things I really liked is it's really running on a big machine, and it has a lot of power.

00:25:31.340 --> 00:25:35.760
It's just kind of shared, but, you know, those spikes kind of even out.

00:25:35.760 --> 00:25:40.160
And so it seems like it's way more responsive than a micro instance for me.

00:25:40.160 --> 00:25:40.460
Yeah.

00:25:40.460 --> 00:25:40.860
Yeah.

00:25:40.860 --> 00:25:42.280
So that's the idea.

00:25:42.280 --> 00:25:43.420
It's like we can provide that.

00:25:43.420 --> 00:25:48.480
Within reason, we can scale up for when you get crazy traffic unexpectedly.

00:25:49.020 --> 00:25:52.340
And if it turns out to be forever, then we're just going to come after your money.

00:25:52.340 --> 00:25:54.060
It seems fair.

00:25:54.060 --> 00:25:55.720
Gently encourage you to upgrade.

00:25:55.720 --> 00:25:57.520
It seems fair.

00:25:57.520 --> 00:26:05.640
So other than, of course, talkpythontome.com, are there other notable moments that you guys can talk about?

00:26:05.640 --> 00:26:08.760
Certainly, talkpythontome.com is our favorite website.

00:26:08.760 --> 00:26:10.000
I would say so, yeah.

00:26:10.000 --> 00:26:12.960
If it's not the one that's getting the most hits, it is certainly the best one.

00:26:12.960 --> 00:26:16.320
Well, yeah.

00:26:16.320 --> 00:26:17.620
So who do we host?

00:26:18.220 --> 00:26:21.100
We've got a sort of funny niche in the Web2Py community.

00:26:21.100 --> 00:26:25.640
So we host Web2Py.com, and we've got lots of users of that site.

00:26:25.640 --> 00:26:34.080
And then a sort of case study example we sometimes trot out, which is a terrible example.

00:26:34.080 --> 00:26:35.660
Again, bad PR, but it's just fun.

00:26:35.660 --> 00:26:38.220
There's this guy.

00:26:38.220 --> 00:26:43.520
He's a student at university, and he made a website called Stereodose.com.

00:26:43.520 --> 00:26:45.020
Stereodose.com.

00:26:45.020 --> 00:26:46.300
Is that D-O-S-E?

00:26:46.300 --> 00:26:46.660
Yeah.

00:26:46.920 --> 00:26:49.680
Yeah, and the Stereodose.com website is very simple.

00:26:49.680 --> 00:26:52.380
What it says is like you come into a screen.

00:26:52.380 --> 00:26:53.780
It says, pick your mood.

00:26:53.780 --> 00:26:59.580
And it sort of says like energetic, mellow, a couple of other choices like funky.

00:26:59.580 --> 00:27:02.420
And then screen number two says, pick your drug.

00:27:02.420 --> 00:27:03.500
Right?

00:27:03.560 --> 00:27:06.940
And you get to choose acid, mushrooms, ecstasy, weed.

00:27:06.940 --> 00:27:11.980
And then it's going to auto-generate a playlist for you that's appropriate to your mood and drug of choice.

00:27:11.980 --> 00:27:12.480
Fantastic.

00:27:12.480 --> 00:27:12.660
Right?

00:27:12.660 --> 00:27:13.540
So he's a university.

00:27:13.540 --> 00:27:14.600
He's a college, right?

00:27:14.600 --> 00:27:16.020
This is hugely popular.

00:27:16.020 --> 00:27:16.720
I've asked all his friends.

00:27:16.780 --> 00:27:18.100
So he knocked this together in no time.

00:27:18.100 --> 00:27:19.380
It's a simple website, right?

00:27:19.380 --> 00:27:21.480
And he hosted it with us.

00:27:21.480 --> 00:27:24.240
And so he had the equivalent of hack and use.

00:27:24.240 --> 00:27:27.240
I don't know what the equivalent of hack and use is for drug-induced playlists.

00:27:27.240 --> 00:27:28.440
But he got on that.

00:27:28.440 --> 00:27:34.920
And so he went from 10 hits a day to 10,000, 100,000 an hour.

00:27:35.680 --> 00:27:36.860
And we were just like, yep, fine.

00:27:36.860 --> 00:27:38.520
Very mellow hits.

00:27:38.520 --> 00:27:39.880
Yeah, some of them.

00:27:39.880 --> 00:27:41.360
Some of them were like really hyperactive.

00:27:41.360 --> 00:27:44.780
Just keep refreshing the thing.

00:27:44.780 --> 00:27:46.340
That's pretty cool.

00:27:46.340 --> 00:27:48.180
Yeah, so that's an example.

00:27:48.180 --> 00:27:49.260
So he made that thing.

00:27:49.260 --> 00:27:50.380
Out of nowhere, it got popular.

00:27:50.380 --> 00:27:52.100
And then we were just able to handle that fine.

00:27:52.100 --> 00:27:55.160
And then gently suggested that now he's making some money off advertising.

00:27:55.160 --> 00:27:56.820
Could he pay us X dollars a month?

00:27:56.820 --> 00:27:58.340
I think, yeah.

00:27:58.340 --> 00:28:01.880
Probably he's still on quite one of the quite low plans, like $20 a month.

00:28:01.880 --> 00:28:02.760
Yeah, yeah, probably.

00:28:02.760 --> 00:28:03.980
And so that's very cool.

00:28:04.280 --> 00:28:07.100
Well, we do that for some of the first customers that have a big hit.

00:28:07.100 --> 00:28:12.840
We like to reward them by keeping them around at a price that's quite frankly cutting our own throats, Michael.

00:28:12.840 --> 00:28:13.660
Cutting our own throats.

00:28:13.660 --> 00:28:14.540
What can you do?

00:28:14.540 --> 00:28:15.440
It's what you have to do now.

00:28:15.440 --> 00:28:16.500
It's what you have to do.

00:28:16.500 --> 00:28:20.860
So we were talking earlier before we started recording.

00:28:20.860 --> 00:28:24.500
You said you do a lot of Python sort of end-to-end of the whole thing.

00:28:24.500 --> 00:28:29.440
So looking in from the outside, obviously, it's interesting that I can host Python there.

00:28:29.440 --> 00:28:33.880
But can you talk a little bit about what the internal usage is and how that goes?

00:28:34.100 --> 00:28:34.600
Yeah, yeah.

00:28:34.600 --> 00:28:35.980
So it's all Python inside as well.

00:28:35.980 --> 00:28:36.780
It was the same.

00:28:36.780 --> 00:28:39.740
So the guys talk about Resolver Systems and that spreadsheet product.

00:28:39.740 --> 00:28:43.000
They decided to start building it in Python and they were going to target Windows.

00:28:43.000 --> 00:28:44.340
So they built it in Iron Python.

00:28:44.340 --> 00:28:44.840
Okay.

00:28:44.960 --> 00:28:46.420
And they went, hey, let's build it in Iron Python.

00:28:46.420 --> 00:28:48.720
And then, like, obviously, it'll get too slow at some point.

00:28:48.720 --> 00:28:51.420
And then we'll start writing some C or some C#.

00:28:51.420 --> 00:28:53.560
And they found with that they just never reached that point.

00:28:53.560 --> 00:28:55.060
Like, they just keep going in Python.

00:28:55.060 --> 00:28:55.620
It was fine.

00:28:55.620 --> 00:28:57.960
And so we had a similar approach with Python anyway.

00:28:57.960 --> 00:28:59.360
And they said, well, Python is what we love.

00:28:59.360 --> 00:29:02.960
It's the fastest way to get websites built that we're going to be able to do.

00:29:03.240 --> 00:29:05.400
So let's just start with that and see if we ever need anything else.

00:29:05.400 --> 00:29:07.100
And no, we don't really.

00:29:07.100 --> 00:29:11.660
I mean, there's about four lines of lua somewhere.

00:29:11.660 --> 00:29:17.180
And there's a bunch of JavaScript, obviously, which is a nightmarish help.

00:29:17.180 --> 00:29:17.880
Yeah.

00:29:18.400 --> 00:29:20.020
But other than that, yeah, no, it's all Python.

00:29:20.020 --> 00:29:23.840
I'm just trying to think of any exceptions to that.

00:29:23.840 --> 00:29:24.980
Python 2?

00:29:24.980 --> 00:29:25.560
Python 3?

00:29:25.560 --> 00:29:27.260
Well, yeah, Python 2.

00:29:27.260 --> 00:29:28.000
Yeah, of course.

00:29:28.000 --> 00:29:30.780
Well, we're joining a club with literally everybody else.

00:29:30.780 --> 00:29:36.720
But I think you are doing a good deed to have a wide variety of interpreters, right?

00:29:36.720 --> 00:29:38.460
Like, even PyPy is super cool.

00:29:38.460 --> 00:29:38.860
Yeah.

00:29:38.860 --> 00:29:39.220
Yeah.

00:29:39.220 --> 00:29:39.900
Yeah.

00:29:39.900 --> 00:29:44.540
I mean, yeah, so making the choice to sort of start supporting Python 3 for web apps, for example.

00:29:44.540 --> 00:29:48.020
You know, just having Python 3 around, I mean, you can install it on your own computer in seconds.

00:29:48.020 --> 00:29:48.600
So that's fine.

00:29:48.600 --> 00:29:56.260
It's like supporting it for a real thing on the internet, like an application was, you know, we were looking at it going, is this going to be a niche concern?

00:29:56.260 --> 00:30:01.120
But then we were saying, look, a lot of the people who come to us are beginners or hobbyists or not professional programmers.

00:30:01.120 --> 00:30:04.100
And the message out there is, yeah, you should use Python 3.

00:30:04.100 --> 00:30:06.700
And so to support them well, I think we did.

00:30:06.700 --> 00:30:12.640
We did have to go, okay, well, even if we're not using ourselves right now, the wider world, yeah, our users want this.

00:30:12.640 --> 00:30:13.860
So, yeah.

00:30:13.860 --> 00:30:14.140
For sure.

00:30:14.140 --> 00:30:14.700
That's cool.

00:30:14.700 --> 00:30:14.980
Yeah.

00:30:14.980 --> 00:30:17.140
I talked with Kenneth Wright.

00:30:17.140 --> 00:30:17.840
Yeah, I had that.

00:30:17.840 --> 00:30:20.840
About Python 2 and Python 3.

00:30:20.840 --> 00:30:25.080
And, you know, it seems like it's some of the little things that make a big difference.

00:30:25.080 --> 00:30:35.120
He said that having Django switch their docs by default to Python 3 made, you know, a noticeable bump in the usage for web apps for Python 3 just doing that.

00:30:35.220 --> 00:30:36.980
So things like, you know, having it available.

00:30:36.980 --> 00:30:37.580
Yeah.

00:30:37.580 --> 00:30:38.880
Lowering the friction.

00:30:38.880 --> 00:30:39.700
Yeah.

00:30:39.840 --> 00:30:41.220
I think that's happening.

00:30:41.220 --> 00:30:43.600
I heard the Kenneth episode, actually.

00:30:43.600 --> 00:30:50.360
And he was saying, I wish Python.org would just decide which one the version is that they want to push and have that as the one that appears when you download.

00:30:50.360 --> 00:30:52.000
And that should be Python 3.

00:30:52.000 --> 00:30:55.020
And if you want Python 2, you should go and have to search for it.

00:30:55.040 --> 00:30:58.420
Because ultimately, I think, yeah, beginners are using Python 3.

00:30:58.420 --> 00:31:00.360
Educators are using Python 3.

00:31:00.360 --> 00:31:01.960
Hobbyists are using Python 3.

00:31:01.960 --> 00:31:03.860
Because, you know, why would you use the old version?

00:31:03.860 --> 00:31:05.900
Like, if you don't know any different.

00:31:05.900 --> 00:31:08.360
And so, Python 2 is kind of a legacy language.

00:31:08.360 --> 00:31:12.220
It just so happens that this is the one that 90% of professional Python developers use.

00:31:12.660 --> 00:31:18.360
But, yeah, I think we should make every effort, I guess, to start supporting Python 3 first for that sort of community.

00:31:18.360 --> 00:31:18.840
Yeah.

00:31:18.840 --> 00:31:25.480
He was talking about some really interesting ideas of, like, what is the killer feature we need to actually make people go, okay, it's time to switch.

00:31:25.480 --> 00:31:27.940
Like, removing the global interpreter lock.

00:31:27.940 --> 00:31:33.620
Maybe making, like, a super simple way to build distributable binaries that have no dependencies.

00:31:33.620 --> 00:31:35.820
I think those would be really cool things to work on.

00:31:35.820 --> 00:31:37.140
And I think it would make a difference.

00:31:37.140 --> 00:31:39.400
You brought up education.

00:31:39.400 --> 00:31:39.900
Yeah.

00:31:40.120 --> 00:31:44.540
And you guys are probably used a lot for students and people trying it out.

00:31:44.540 --> 00:31:47.080
Or there are, like, classes or university classes.

00:31:47.080 --> 00:31:49.960
Like, okay, go create your Python in your account to start your project.

00:31:49.960 --> 00:31:50.340
Yeah.

00:31:50.340 --> 00:31:51.000
Yeah, there are, actually.

00:31:51.000 --> 00:31:56.260
So, one of the things with Python is that it's the most popular education language for good reason, I think.

00:31:56.260 --> 00:31:58.800
It's just really straightforward.

00:31:58.800 --> 00:32:00.940
Like, you know, if you...

00:32:00.940 --> 00:32:07.600
I'm not Guido Van Rossum, but if you were to try and design the most obvious way of writing a programming language, that's how it is.

00:32:07.600 --> 00:32:15.200
Like, if you think about how a for loop works in Python versus C++ or JavaScript, you know, you just go, I just want to loop through these items.

00:32:15.200 --> 00:32:17.680
So, for each item in the thing, I want to do a thing.

00:32:17.680 --> 00:32:20.380
And you look at Python, that's actually it, isn't it?

00:32:20.380 --> 00:32:21.160
That's fantastic.

00:32:21.280 --> 00:32:22.520
So, for beginners, that's great.

00:32:22.520 --> 00:32:24.540
Like, the learning curve is really nice for Python.

00:32:24.540 --> 00:32:26.920
It's, you know, the Zen of Python is there.

00:32:26.920 --> 00:32:29.480
Within the language, that's great.

00:32:29.480 --> 00:32:30.720
So, that's working.

00:32:30.720 --> 00:32:33.900
Outside the language, there's some peripherals where it's not so good.

00:32:33.900 --> 00:32:38.060
I saw someone doing a poster about this at a PyCon three years ago.

00:32:38.520 --> 00:32:41.160
Just saying, you know, here's what beginners find hard about Python.

00:32:41.160 --> 00:32:43.660
Installing it is hard.

00:32:43.660 --> 00:32:45.340
Like, first, you have to choose between two and three.

00:32:45.340 --> 00:32:47.200
And then you install it on your system.

00:32:47.200 --> 00:32:49.240
And, like, I don't know if you've done this on Windows recently.

00:32:49.240 --> 00:32:49.980
I have.

00:32:49.980 --> 00:32:50.320
It's beautiful.

00:32:50.320 --> 00:32:52.580
Like, it doesn't add itself to the path.

00:32:52.580 --> 00:32:55.720
And it still doesn't add itself to the path by default, by the way.

00:32:55.720 --> 00:32:58.660
And so, then when people go, oh, just open up a command.

00:32:58.660 --> 00:32:59.740
Try to type Python.

00:32:59.740 --> 00:33:01.040
Like, it doesn't happen.

00:33:01.040 --> 00:33:02.260
Python not found.

00:33:02.260 --> 00:33:05.360
And, you know, it's like getting Python installed.

00:33:05.360 --> 00:33:07.780
And then people say, oh, yeah, you need pip to install packages.

00:33:07.780 --> 00:33:11.180
You know, so just, you know, apt-get install pip or brew install pip.

00:33:11.180 --> 00:33:12.040
And beginners go, what?

00:33:12.040 --> 00:33:13.020
What does this apt-get?

00:33:13.020 --> 00:33:14.080
You know, we've got Windows.

00:33:14.080 --> 00:33:15.280
Everyone's got Windows.

00:33:15.280 --> 00:33:16.460
We have no apt-get.

00:33:16.460 --> 00:33:19.720
And even the ones that have Macs, right, they go, oh, yeah, just install Homebrew.

00:33:19.840 --> 00:33:20.860
And they go, what's Homebrew?

00:33:20.860 --> 00:33:24.340
And they find a GitHub page, which is a terrifying thing, right, for beginners.

00:33:24.340 --> 00:33:28.700
And the GitHub page just says, oh, yeah, you just need to download Xcode, which is 1.1 gigabytes,

00:33:28.700 --> 00:33:33.780
just to be able to install this thing that's going to help you install this thing, right,

00:33:33.780 --> 00:33:34.900
that maybe you think you need.

00:33:34.900 --> 00:33:36.780
What is it, like, five Macs or something?

00:33:36.780 --> 00:33:37.680
I mean, how big is pip?

00:33:37.680 --> 00:33:38.200
I haven't even looked.

00:33:38.200 --> 00:33:39.220
It's totally small.

00:33:39.220 --> 00:33:39.780
Pip is tiny.

00:33:39.780 --> 00:33:42.440
But, like, to install it on a Mac, people tend to say, oh, yeah, use Homebrew.

00:33:42.440 --> 00:33:47.120
And then, so I have to, like I say, you have to hop by this 1.1 gigabyte thing,

00:33:47.120 --> 00:33:49.500
which is going to help you install this thing, which is going to help you install this thing,

00:33:49.620 --> 00:33:53.460
which finally is what you need to install this thing that you hope to use for some programming.

00:33:53.460 --> 00:33:55.200
And, yeah, people have given up by now.

00:33:55.200 --> 00:33:56.180
Yeah.

00:33:56.340 --> 00:34:03.120
I think people sometimes forget what is obvious to us now, but the things you get hung up on,

00:34:03.120 --> 00:34:05.240
like you're saying, like the path, you know.

00:34:05.240 --> 00:34:07.480
It would be no big deal to us.

00:34:07.480 --> 00:34:08.720
We could easily go do it.

00:34:08.720 --> 00:34:09.320
It's not fun.

00:34:09.320 --> 00:34:12.480
But to new people, they're literally out of luck, right?

00:34:12.480 --> 00:34:12.680
Yeah.

00:34:12.680 --> 00:34:13.560
It's like, what do I do?

00:34:13.560 --> 00:34:13.860
Yeah.

00:34:13.860 --> 00:34:14.300
Yeah.

00:34:14.300 --> 00:34:14.740
Yeah.

00:34:15.240 --> 00:34:17.400
And so you guys make that easier, right?

00:34:17.400 --> 00:34:17.960
Well, yeah.

00:34:17.960 --> 00:34:22.960
So teachers, you know, have to, if you're teaching Python, you have to, like, face that learning curve.

00:34:22.960 --> 00:34:28.340
And if you've got a bunch of students in a school, then you go, right, let's get Python on all the computers.

00:34:28.340 --> 00:34:28.680
Go.

00:34:28.680 --> 00:34:32.580
And then the school IT department goes, well, we're an IT department, so we say no to everything.

00:34:32.580 --> 00:34:33.940
It's our job.

00:34:34.340 --> 00:34:38.880
You know, or I don't mean, you know, there's great school IT departments out there, of course.

00:34:38.880 --> 00:34:42.220
But, you know, maybe that's going to take time or maybe, you know, whatever.

00:34:42.220 --> 00:34:49.140
Or you are, you know, teaching Python to a bunch of people out there, maybe adults, or they've got a disparate bunch of laptops.

00:34:49.140 --> 00:34:49.960
Some of them have got Windows.

00:34:49.960 --> 00:34:51.800
Some of them have got, you know, like, Macs.

00:34:51.800 --> 00:34:54.200
And you've got to try and make sure each one of them has got Python installed.

00:34:54.200 --> 00:34:56.920
And you've got to try and make sure each one of them has got a text data to install.

00:34:56.920 --> 00:35:00.180
And then you've got to be like, hey, if you're using sublime text, it looks like this.

00:35:00.180 --> 00:35:02.040
Or if you're using idle, it looks like that.

00:35:02.420 --> 00:35:04.500
Or if you're using a Mac, then type this command.

00:35:04.500 --> 00:35:06.060
If you're using a PC, type that command.

00:35:06.060 --> 00:35:11.120
And so, you know, a lot of people teaching Python is the first day has just been installing Python.

00:35:11.120 --> 00:35:12.100
And they go, well.

00:35:12.100 --> 00:35:13.840
Programming's not fun.

00:35:13.840 --> 00:35:14.640
Programming sucks.

00:35:14.640 --> 00:35:16.340
It's all about these little settings, right?

00:35:16.340 --> 00:35:16.540
Right.

00:35:16.540 --> 00:35:18.840
And so then if you just say to them, okay, well, forget all that.

00:35:18.840 --> 00:35:22.320
Like, if you go to Python anywhere, you need a username, you choose a password, and then go.

00:35:22.320 --> 00:35:24.280
Everyone has a text editor that works.

00:35:24.280 --> 00:35:26.660
Everyone has the same bash prompt.

00:35:26.660 --> 00:35:28.680
Everyone has the same version of Python.

00:35:28.680 --> 00:35:31.440
And everyone has the same packages all available and pre-installed.

00:35:31.600 --> 00:35:34.520
So if you want to do a class on NumPy, you can hit import NumPy.

00:35:34.520 --> 00:35:36.280
You don't even need to explain pip install.

00:35:36.280 --> 00:35:36.500
Yeah.

00:35:36.500 --> 00:35:46.040
You haven't even mentioned that on Windows, you might not have, like, the clang compiler or GCC or VSVars.bat.

00:35:46.040 --> 00:35:46.600
Yeah.

00:35:46.600 --> 00:35:47.500
VSVars.bat.

00:35:47.500 --> 00:35:51.420
That will literally stop the beginner in their tracks.

00:35:51.420 --> 00:35:54.060
If, like, the path thing didn't get them, that will definitely get them.

00:35:54.060 --> 00:35:54.580
Yeah.

00:35:54.680 --> 00:35:55.260
So that's great.

00:35:55.260 --> 00:35:56.040
So it's all set up.

00:35:56.040 --> 00:35:59.540
Even the stuff that's harder to install, like NumPy, are the things that have C dependencies.

00:35:59.540 --> 00:36:00.060
Yeah.

00:36:00.420 --> 00:36:02.920
So teachers, like, have been, you know, coming to us for that.

00:36:04.140 --> 00:36:08.280
And we've recently decided to try and do a little bit more for education.

00:36:08.280 --> 00:36:12.840
As education in Python worldwide becomes more and more popular.

00:36:13.940 --> 00:36:17.600
In the UK over here, the government have decided to make it part of the national curriculum.

00:36:17.600 --> 00:36:19.840
So they're saying that you have to teach it in schools.

00:36:19.840 --> 00:36:22.400
And this isn't just, like, you know, sort of secondary schools.

00:36:22.400 --> 00:36:23.440
It's, like, it's middle schools.

00:36:23.440 --> 00:36:26.700
So, you know, seven, eight, nine-year-olds are going to start to learn programming.

00:36:28.300 --> 00:36:36.140
And, you know, what can we do to try and, like, help teachers who, like, some of these teachers, they're not computing teachers, right?

00:36:36.140 --> 00:36:38.040
These are, like, generalist teachers who are just going, well.

00:36:38.040 --> 00:36:39.240
They might be a science teacher or something.

00:36:39.240 --> 00:36:41.540
I don't even like computers that much myself.

00:36:41.540 --> 00:36:42.540
I don't know if I, you know.

00:36:42.540 --> 00:36:44.780
So they're just trying to stay one week ahead of their students.

00:36:44.780 --> 00:36:47.440
And so if we can do something to try and make their lives a bit easier.

00:36:47.440 --> 00:36:50.540
So, yeah, we've been doing a bit of that recently, and it's been really cool.

00:36:50.540 --> 00:36:51.360
Yeah, it's really great.

00:36:51.360 --> 00:36:54.720
Last episode, I talked to a guy named James Curran.

00:36:55.460 --> 00:37:08.300
And in Australia, he's involved in the curriculum there for high school and said that in Australia, they're requiring a text-based programming language as part of the high school curriculum.

00:37:08.300 --> 00:37:08.600
Yeah.

00:37:08.600 --> 00:37:09.900
And so that really natural.

00:37:09.900 --> 00:37:12.780
Yeah, and he can't require two because we're sort of twice as good as Australians.

00:37:12.780 --> 00:37:14.640
Nice, yeah.

00:37:14.640 --> 00:37:17.980
So I think Python is the natural choice if they say text.

00:37:17.980 --> 00:37:20.660
You know, you can do Scratch or something like that for beginners.

00:37:20.660 --> 00:37:25.160
But as soon as it's, like, you've got to do a, quote, real programming language, I think Python is a good choice.

00:37:25.160 --> 00:37:26.820
Yeah, in the UK, it's equivocated.

00:37:26.820 --> 00:37:32.140
So people tend to teach HTML and Python, which, you know, you can have an argument about that.

00:37:32.140 --> 00:37:36.760
Yeah, my daughter's in their high school have a class called Web Coding, and they learn HTML.

00:37:36.760 --> 00:37:37.320
Yeah.

00:37:37.320 --> 00:37:39.580
I'm not sure HTML and coding go together, but whatever.

00:37:39.580 --> 00:37:41.580
They're doing something with computers, and it's cool.

00:37:41.580 --> 00:37:43.180
Well, CSS is true and complete.

00:37:43.180 --> 00:37:44.600
Accidentally.

00:37:44.600 --> 00:37:45.320
Accidentally.

00:37:45.320 --> 00:37:47.200
Nice.

00:37:47.200 --> 00:37:51.280
Okay, so talked about people getting started.

00:37:51.280 --> 00:37:51.900
That's great.

00:37:51.900 --> 00:37:53.580
Talked about the web hosting.

00:37:53.580 --> 00:37:58.580
Another thing that you're really into, and you were recently at PyCon last year, right?

00:37:58.580 --> 00:37:59.000
Mm-hmm.

00:37:59.000 --> 00:38:01.800
Or was it this year doing a workshop or tutorial?

00:38:01.800 --> 00:38:02.280
All the PyCons.

00:38:02.280 --> 00:38:03.200
All of them.

00:38:03.200 --> 00:38:03.720
Yeah, yeah.

00:38:03.720 --> 00:38:04.240
All of them.

00:38:04.240 --> 00:38:05.640
On testing, right?

00:38:05.640 --> 00:38:05.820
Sure.

00:38:05.820 --> 00:38:06.700
Testing a Django app.

00:38:06.700 --> 00:38:07.340
Yeah, yeah.

00:38:07.640 --> 00:38:08.720
Yeah, so that's my shtick.

00:38:08.720 --> 00:38:16.460
So I guess it was in 2009, 2010 that I started with Resolver and what became Python Anywhere.

00:38:16.460 --> 00:38:22.920
And I guess I'd learned enough Python and Django to be dangerous.

00:38:22.920 --> 00:38:27.020
And I'd built my first kind of web application for a client.

00:38:27.020 --> 00:38:29.680
And I remember how this went.

00:38:29.680 --> 00:38:33.820
Have you read Dive Into Python?

00:38:33.820 --> 00:38:36.720
I think I've skimmed it.

00:38:36.800 --> 00:38:37.820
I haven't read it all the way.

00:38:37.820 --> 00:38:44.080
To Dive Into Python is a good intro to Python for someone who already knows another programming language.

00:38:44.080 --> 00:38:49.700
And in about chapter 10, he starts talking about testing and test-driven development.

00:38:49.700 --> 00:38:52.680
And he goes, you know, we've learned about how Python works by RR.

00:38:52.680 --> 00:38:57.620
Now let me tell you a bit about testing and how you can write tests and how you can even write them first.

00:38:57.620 --> 00:39:01.140
And he uses a very traditional example, which is a Roman numeral translator.

00:39:01.140 --> 00:39:05.020
So let's build a function that can translate Roman numerals into integers.

00:39:05.160 --> 00:39:09.880
So like I is going to become 1 and II is going to become 2 and IV is going to become 4 and so on.

00:39:09.880 --> 00:39:12.760
And he goes, so, you know, imagine how you do that.

00:39:12.760 --> 00:39:15.280
And let me show you that if you actually, you can write tests for this.

00:39:15.280 --> 00:39:19.120
You can write a thing that says I should equal 1 and II should equal 2.

00:39:19.120 --> 00:39:23.860
And you can run that as a program which tests, you know, the thing you're about to write.

00:39:23.860 --> 00:39:26.100
And then when you write it, you know when you've got the right answer.

00:39:26.240 --> 00:39:30.660
And secondly, you know, you're going to be able to modify your solution and know that it's still correct.

00:39:30.660 --> 00:39:33.880
And I remember reading that and going, you know what, that's a really good idea.

00:39:33.880 --> 00:39:37.400
That sounds like something you really should do.

00:39:37.400 --> 00:39:38.100
It's like it's healthy.

00:39:38.100 --> 00:39:38.740
It's good for you.

00:39:38.740 --> 00:39:40.320
It's like flossing your teeth.

00:39:41.600 --> 00:39:46.020
And what happened next is I got my first real client and there were real deadlines.

00:39:46.020 --> 00:39:49.440
And all of my good intentions about TBD just went right out the window.

00:39:49.440 --> 00:39:54.960
And besides, by then I'd had a full seven or eight days of experience with Python and Django.

00:39:54.960 --> 00:39:56.440
You had it all figured out.

00:39:56.440 --> 00:39:57.640
I thought I was pretty smart.

00:39:57.640 --> 00:39:59.360
I figured I could get away without tests.

00:39:59.360 --> 00:40:00.560
And yeah.

00:40:00.560 --> 00:40:01.140
Yeah.

00:40:01.140 --> 00:40:02.540
Actually, I was fine.

00:40:02.540 --> 00:40:04.840
I was absolutely fine.

00:40:04.840 --> 00:40:05.240
Yeah.

00:40:05.240 --> 00:40:06.180
At first.

00:40:06.180 --> 00:40:07.860
And then.

00:40:07.860 --> 00:40:09.920
And then you started maintaining that thing.

00:40:09.920 --> 00:40:10.280
Yeah.

00:40:10.280 --> 00:40:10.600
Yeah.

00:40:10.600 --> 00:40:10.800
Yeah.

00:40:10.800 --> 00:40:10.880
Yeah.

00:40:10.880 --> 00:40:11.060
Yeah.

00:40:11.060 --> 00:40:14.420
I mean, you know, I read a thing about like called Don't Repeat Yourself.

00:40:14.420 --> 00:40:16.060
And I was like, right, well, I better not repeat code.

00:40:16.060 --> 00:40:22.820
And so like I started to that ended up being like sort of an inheritance class hierarchy, five levels deep.

00:40:22.820 --> 00:40:26.060
Did you hear that siren?

00:40:26.740 --> 00:40:29.640
Well, it's 4 p.m. on a Tuesday.

00:40:29.640 --> 00:40:33.660
So I guess that means it's a perfect time for a fire alarm test.

00:40:33.660 --> 00:40:35.240
It was ridiculously loud.

00:40:35.240 --> 00:40:38.940
Now, let's pick up the conversation again after ears stopped ringing.

00:40:38.940 --> 00:40:42.700
So you had written this app and it started out all fine.

00:40:42.700 --> 00:40:45.300
Then you heard about the derived principle.

00:40:45.300 --> 00:40:46.300
And you're like, yeah, that's a good idea.

00:40:46.300 --> 00:40:46.720
Let's do that.

00:40:46.720 --> 00:40:46.820
Yeah, yeah.

00:40:46.820 --> 00:40:47.300
Let's do that.

00:40:47.300 --> 00:40:49.580
Let's have an inheritance hierarchy, five levels deep.

00:40:49.580 --> 00:40:54.220
And like for some reason, I decided that like somehow I'd got to eval statements, right?

00:40:54.240 --> 00:40:56.400
So there was eval statements in the code doing stuff.

00:40:56.400 --> 00:40:59.700
And, you know, like it was no longer a one page app.

00:40:59.700 --> 00:41:01.940
You can just check works by like checking that one page.

00:41:01.940 --> 00:41:04.580
Like there was 25 pages and they were all interdependent.

00:41:04.580 --> 00:41:07.080
And I would change the thing over here and go, oh, I think I could.

00:41:07.080 --> 00:41:09.040
Oh, no, that's going to break that one over there, I think.

00:41:09.040 --> 00:41:09.460
So, but what?

00:41:09.460 --> 00:41:11.040
Maybe if I override this method.

00:41:11.040 --> 00:41:16.300
And like pretty soon I had like a nightmare of crufty code and I was scared to change it.

00:41:16.300 --> 00:41:18.320
And, you know, like all of those things happened to me.

00:41:18.320 --> 00:41:18.820
So, yeah.

00:41:18.820 --> 00:41:23.800
So then I got a job at Resolver and they went, you know, we do test driven development.

00:41:23.800 --> 00:41:24.620
I'm like, oh, really?

00:41:24.620 --> 00:41:24.920
Okay.

00:41:24.920 --> 00:41:25.740
Maybe that could help.

00:41:25.740 --> 00:41:27.500
But I still dragged my feet about it.

00:41:27.500 --> 00:41:29.960
But, you know, yeah, they showed me this thing.

00:41:29.960 --> 00:41:32.060
And so it's an extreme programming shop.

00:41:32.060 --> 00:41:33.240
Everything is pair programming.

00:41:33.240 --> 00:41:33.820
Really?

00:41:33.820 --> 00:41:34.180
That's cool.

00:41:34.180 --> 00:41:35.060
Yeah, yeah, yeah.

00:41:35.060 --> 00:41:40.760
I mean, it was like honestly so lucky for me to learn from these guys who've been doing it for ages.

00:41:41.180 --> 00:41:46.280
And, you know, if you're a pair programming and you just sit next to someone and they start asking programming and you just sit there going, why?

00:41:46.280 --> 00:41:47.200
Why?

00:41:47.200 --> 00:41:52.420
You know, and it's just like a sponge just sucking in all this knowledge.

00:41:52.420 --> 00:41:56.500
So it's an amazing way to learn.

00:41:56.500 --> 00:41:59.080
It's almost like an apprenticeship type of thing.

00:41:59.080 --> 00:41:59.360
Right.

00:41:59.360 --> 00:42:00.620
Yeah, I mean, that's really true.

00:42:00.620 --> 00:42:01.020
Yeah.

00:42:01.020 --> 00:42:02.880
And so that's, yeah.

00:42:02.880 --> 00:42:11.300
So I learned all this testing and I decided to try and kind of like regurgitate it a little bit and turn it onto some online resources.

00:42:11.300 --> 00:42:13.140
I made a couple of blog posts.

00:42:13.140 --> 00:42:14.520
I rewrote the Django tutorial.

00:42:14.520 --> 00:42:15.520
You have a website, right?

00:42:15.520 --> 00:42:15.980
Yeah.

00:42:15.980 --> 00:42:16.360
Yeah.

00:42:16.360 --> 00:42:19.620
It's called obeythetestinggoat.com.

00:42:19.620 --> 00:42:20.240
Fantastic.

00:42:20.240 --> 00:42:23.620
I used to have a website called tddjangotutorial.com.

00:42:23.620 --> 00:42:26.720
And what it was was like the official Django tutorial except test driven.

00:42:26.720 --> 00:42:27.940
So it tests at every stage.

00:42:27.940 --> 00:42:28.360
That's nice.

00:42:28.360 --> 00:42:32.200
And that turned into like a sort of tutorial I would do in real life and at conferences.

00:42:32.200 --> 00:42:36.700
And that eventually turned into a book which is published with O'Reilly.

00:42:36.700 --> 00:42:38.420
It's called obeythetestinggoat.com.

00:42:38.420 --> 00:42:39.160
Unfortunately not.

00:42:39.160 --> 00:42:45.000
No, I had, yeah, we discussed this with my editor and obeythetestinggoat is going to be too arcane a title.

00:42:45.000 --> 00:42:48.020
So that is actually the tagline or the subtitle.

00:42:48.020 --> 00:42:56.900
So the book itself is called test driven development with Python colon or comma obeythetestinggoat colon.

00:42:56.900 --> 00:42:58.200
And we actually argued about this.

00:42:58.200 --> 00:43:01.200
I wanted an exclamation mark but they insisted on a colon.

00:43:01.200 --> 00:43:06.960
So it's obeythetestinggoat colon tdd with Python, JavaScript, Django and pals or something like that.

00:43:06.960 --> 00:43:07.820
That's fantastic.

00:43:07.820 --> 00:43:09.240
So what kind of stuff do you cover in there?

00:43:09.240 --> 00:43:21.200
So yeah, it's test driven development but instead of taking that sort of classic slightly artificial example of a Roman numeral calculator which everyone does or a banking currency converter, right?

00:43:21.200 --> 00:43:27.300
There's always these TDD tutorials with like an example function and it goes, oh yeah, but it's nothing like the code you write in real life.

00:43:27.300 --> 00:43:28.840
It has no dependency.

00:43:28.840 --> 00:43:29.260
Right.

00:43:29.260 --> 00:43:30.860
It doesn't touch the file system.

00:43:30.860 --> 00:43:34.600
It doesn't have like a huge bunch of code calls, all that kind of stuff, right?

00:43:34.600 --> 00:43:36.380
And so I just did the opposite of that.

00:43:36.380 --> 00:43:38.660
I went like, okay, well let's do actual web development.

00:43:39.080 --> 00:43:40.440
And we'll just have all the dependencies.

00:43:40.440 --> 00:43:49.800
So yeah, it will be a web application which needs a web browser and it needs the file system straight away because of templates and there's going to be a database and all that is like from the ground up.

00:43:49.800 --> 00:43:51.280
But maybe that's a hideous mistake.

00:43:51.280 --> 00:43:52.340
I don't think so.

00:43:52.340 --> 00:44:05.340
I think a lot of those, I do a lot of training for my job and a lot of people have the same reaction that you were saying is like, it's all well and good to tell me about this stuff but this is a fake thing.

00:44:05.580 --> 00:44:08.980
It won't work in my complex company because X, Y, and Z.

00:44:08.980 --> 00:44:12.680
And if you don't see it for real, then who's going to believe it, right?

00:44:12.680 --> 00:44:13.520
So yeah.

00:44:13.520 --> 00:44:14.620
I mean, it's still a fake thing.

00:44:14.620 --> 00:44:20.520
I mean, I go through the development of a web application from scratch, but it's a simple web app, right?

00:44:20.520 --> 00:44:25.040
It's a to-do list app because that's everyone's example and I have no imagination.

00:44:25.660 --> 00:44:33.960
So it's the simplest possible web app, but it does have a database and it does use a web browser and it does do things to the file system and whatnot.

00:44:33.960 --> 00:44:34.700
Nice.

00:44:34.700 --> 00:44:39.420
So what are the testing frameworks and things?

00:44:39.420 --> 00:44:44.000
Like do you use pytest, Unitest, Nose, Clean Green?

00:44:44.000 --> 00:44:45.940
What's the story on it?

00:44:45.940 --> 00:44:46.760
It's been Clean Green.

00:44:48.460 --> 00:44:49.460
Nathan.

00:44:49.460 --> 00:44:52.540
I met Nathan who did this green testing framework.

00:44:52.540 --> 00:44:53.440
He's a lovely guy.

00:44:53.440 --> 00:44:59.700
His GitHub username is CleanCut and that's because he's just got the most preppy set of teeth.

00:44:59.700 --> 00:45:04.120
I think he's saturizing himself a bit.

00:45:04.120 --> 00:45:04.840
Nice.

00:45:04.840 --> 00:45:05.240
Yeah.

00:45:05.240 --> 00:45:05.420
No.

00:45:05.420 --> 00:45:19.700
So for the book, I just use the kind of standard air quotes tools, which are the UnitTest, Standard Library, Test Framework, and the Django Test Runner because that's what most people use.

00:45:19.700 --> 00:45:23.360
And at work, we use those as well.

00:45:23.360 --> 00:45:26.000
And we've also started experimenting a little bit with pytest.

00:45:26.000 --> 00:45:29.180
So there's a few talks out there if you look at it.

00:45:29.180 --> 00:45:32.420
I'm saying pytest versus Nose versus UnitTest.

00:45:32.420 --> 00:45:33.480
What are the pros and cons?

00:45:34.160 --> 00:45:44.640
And the Noses and pytest do come off well when they say, you know, like, UnitTest came from the Java world and this sort of like XUnit thing, which involves classes and it involves methods.

00:45:44.640 --> 00:45:49.140
And, you know, they've got these camel case method names, which is they've got them for historical reasons.

00:45:49.140 --> 00:45:52.160
And people new to Python will look at that and go, oh, that's weird.

00:45:52.160 --> 00:45:53.560
Why are we using camel case here?

00:45:53.560 --> 00:45:56.040
They don't look like methods on anything else I've ever seen.

00:45:56.040 --> 00:46:01.820
And so moving away from that, the pytests and the Noses who have a more just why have a class?

00:46:01.820 --> 00:46:02.340
There's no point.

00:46:02.700 --> 00:46:05.640
Let's just have functions because that's all we're really using these classes for.

00:46:05.640 --> 00:46:07.260
And that has a lot of appeal.

00:46:07.260 --> 00:46:10.220
And so I've dabbled with that and we've dabbled with that at work.

00:46:10.220 --> 00:46:11.580
And I think they're kind of cool.

00:46:11.580 --> 00:46:14.160
So I would definitely recommend people take a look at those.

00:46:14.160 --> 00:46:19.760
And particularly, I think pytest has got a lot of – I get the feeling that, you know, people have been out there and looked at these things.

00:46:19.760 --> 00:46:24.160
pytest is coming out as like the new kid on the block or the one where people go, yeah, yeah, yeah.

00:46:24.240 --> 00:46:26.700
Having assessed all three, this is the one to look at.

00:46:26.700 --> 00:46:28.940
What do you think the benefits are there?

00:46:28.940 --> 00:46:30.020
Is it more Pythonic?

00:46:30.020 --> 00:46:30.420
Yeah.

00:46:30.420 --> 00:46:31.500
Is it easier to use?

00:46:31.500 --> 00:46:31.820
Yeah.

00:46:33.460 --> 00:46:35.360
So those two things, for example.

00:46:35.360 --> 00:46:35.840
Yeah.

00:46:36.920 --> 00:46:45.420
You know, like so in unit test, you're going to have – you know, you go, well, if I write a test without any framework, I go assert thing equals three.

00:46:45.420 --> 00:46:46.140
Right.

00:46:46.140 --> 00:46:49.020
This is actually – I do this in the book to explain why would you use a test framework.

00:46:49.760 --> 00:46:52.080
And you go assert thing equals three and it fails.

00:46:52.080 --> 00:46:53.820
And you get a thing saying assertion error.

00:46:53.820 --> 00:46:57.420
But it doesn't say, well, thing you expected was three was actually equal to four.

00:46:57.420 --> 00:46:58.180
That would be useful.

00:46:58.180 --> 00:46:58.860
That would be great.

00:46:58.860 --> 00:47:05.320
So you can write your own error message handler, right, by, you know, using the sort of comma second argument to the assert keyword.

00:47:05.320 --> 00:47:06.780
But that's hard work.

00:47:06.780 --> 00:47:07.320
And you know what?

00:47:07.320 --> 00:47:09.700
People have discovered these problems before and there are standard solutions.

00:47:09.700 --> 00:47:12.600
And one of them is use unit test, put in a test method.

00:47:12.600 --> 00:47:15.300
You get set up and tear down, which is a common requirement in tests.

00:47:15.680 --> 00:47:20.960
And you can go self.assert equal thing with thing and then it's going to give you a nice error message.

00:47:20.960 --> 00:47:22.960
And I think that's all very well.

00:47:22.960 --> 00:47:26.100
But you've gone through the trouble of making a class and making a test method.

00:47:26.100 --> 00:47:30.680
And you're – I think Raymond Hesinger was saying the other day about Pepe's indentation.

00:47:30.680 --> 00:47:35.560
You know, when you've written a test class, you're already three levels of indentation down before you've written any test code.

00:47:35.560 --> 00:47:37.060
And you're going to go self.assert equal.

00:47:37.060 --> 00:47:43.080
And there's also self.assert items equal if you just want to compare list items without the order.

00:47:43.080 --> 00:47:45.280
And you've got self.assert is none.

00:47:45.520 --> 00:47:47.920
And you've got assert multiline equal for strings.

00:47:47.920 --> 00:47:50.280
And you've got assert rejects matches.

00:47:50.280 --> 00:47:53.900
You've got assert – you know, like I can't even remember them, right?

00:47:53.900 --> 00:47:54.260
Yeah.

00:47:54.260 --> 00:47:58.360
And so you have to start looking at the docs whenever you're trying to compare two things.

00:47:58.360 --> 00:48:02.700
And I think pytest is superior to that in which they just go, look, just say assert and then a thing.

00:48:03.360 --> 00:48:07.320
And the test framework will figure out what the thing was you were asserting.

00:48:07.320 --> 00:48:11.160
And it will try and give you a sensible error message without you having to be clever about it.

00:48:11.160 --> 00:48:11.980
Yeah, that's fantastic.

00:48:11.980 --> 00:48:12.700
And I really like that.

00:48:12.700 --> 00:48:15.260
Just the assert keyword that you've seen before and a thing.

00:48:15.260 --> 00:48:18.400
And other than that, you just put your tests in methods that start with test.

00:48:18.400 --> 00:48:20.420
There's no need for a class unless you really want one.

00:48:20.700 --> 00:48:20.980
Sure.

00:48:20.980 --> 00:48:22.040
Very nice.

00:48:22.040 --> 00:48:24.280
Well, I've been using unit tests.

00:48:24.280 --> 00:48:25.680
Maybe I should be checking out pytest.

00:48:25.680 --> 00:48:26.420
Yeah.

00:48:26.420 --> 00:48:29.280
So you can run pytests on existing unit test tests.

00:48:29.280 --> 00:48:29.820
Yeah.

00:48:30.260 --> 00:48:32.540
And so there's a migration path there that will work.

00:48:32.540 --> 00:48:35.260
And then the weird thing.

00:48:35.260 --> 00:48:40.680
So the fact that the assert keyword, it will magically tell you what the two values were,

00:48:40.680 --> 00:48:45.160
is the first bit of pytest magic that people raise their eyebrows at a little bit.

00:48:45.160 --> 00:48:49.400
The really magic part is the way it does sort of set up and tear down.

00:48:49.400 --> 00:48:53.320
Which is, you know, in unit tests, we write a methodical set up and a methodical tear down.

00:48:53.320 --> 00:48:56.160
And that seems instinctive to us now because we're so used to it.

00:48:56.160 --> 00:48:58.020
It's been beaten into us over the years.

00:48:58.020 --> 00:49:01.480
But what we really want, and so that the pytest world is more kind of functional.

00:49:01.480 --> 00:49:06.060
And what they say is, okay, well, if you want some setup to be done in a test,

00:49:06.060 --> 00:49:07.920
you're going to define a method that does that setup.

00:49:07.920 --> 00:49:10.080
Well, define a function that's going to do that.

00:49:10.080 --> 00:49:14.000
So you define a function that says, like, prepare database, for example,

00:49:14.000 --> 00:49:15.920
that's going to, like, set up a test database for you.

00:49:15.920 --> 00:49:17.020
You do some stuff.

00:49:17.020 --> 00:49:22.080
And then if that function is called prepare database, you put a decorator on it.

00:49:22.080 --> 00:49:23.320
Say this is a fixture.

00:49:23.320 --> 00:49:27.360
pytest's word for test setup stuff is a fixture.

00:49:27.360 --> 00:49:31.700
Which is slightly different from the way Django uses the term, but bear with us.

00:49:31.700 --> 00:49:34.000
Pop a decorator on it.

00:49:34.000 --> 00:49:37.120
And then take any of the tests that need that fixture.

00:49:37.120 --> 00:49:39.820
And then you just say, add an argument to that test.

00:49:39.820 --> 00:49:42.020
Which, first of all, that function didn't have any arguments.

00:49:42.020 --> 00:49:43.320
Now, you add an argument to that test.

00:49:43.320 --> 00:49:45.880
And you just give that argument the same name as the function you'd find earlier.

00:49:45.880 --> 00:49:49.340
And then when you run it, we'll magically find that function, execute it,

00:49:49.340 --> 00:49:50.720
and inject it into your test for you.

00:49:50.800 --> 00:49:51.440
That is magic.

00:49:51.440 --> 00:49:52.320
That is magic.

00:49:52.320 --> 00:49:53.720
Or a crazy convention.

00:49:53.720 --> 00:49:55.520
Well, or a convention, right?

00:49:55.520 --> 00:49:58.300
And, I mean, setup and teardown are kind of magic as well.

00:49:58.300 --> 00:50:00.460
Like, there is something happening to make those happen.

00:50:00.460 --> 00:50:01.560
Yeah, absolutely.

00:50:01.560 --> 00:50:02.820
And so, like, is it any more explicit?

00:50:02.820 --> 00:50:03.800
That's debatable.

00:50:03.800 --> 00:50:04.440
I think it's just...

00:50:04.440 --> 00:50:05.520
No, it sounds great to me.

00:50:05.520 --> 00:50:08.560
But then you can have fixtures inheriting from fixtures.

00:50:08.820 --> 00:50:11.160
So, if you have a fixture function called prepare database,

00:50:11.160 --> 00:50:13.260
maybe that inherits from prepare file system.

00:50:13.260 --> 00:50:17.160
And so, similarly, you can give an argument to a fixture that's also another fixture.

00:50:17.160 --> 00:50:19.300
And, you know, like, yeah, yeah.

00:50:19.300 --> 00:50:21.000
It'll get...

00:50:21.000 --> 00:50:22.040
It's like a Russian doll.

00:50:22.040 --> 00:50:23.500
It'll get pretty fun pretty quickly.

00:50:23.500 --> 00:50:24.420
Yeah, that's very cool.

00:50:24.420 --> 00:50:28.820
So, do you discuss code coverage?

00:50:28.820 --> 00:50:30.100
I don't, no.

00:50:30.100 --> 00:50:32.820
It's a lacuna.

00:50:34.480 --> 00:50:39.000
I guess we've never used it at work because we've got such a sort of religious adherence to TDD.

00:50:39.000 --> 00:50:41.040
The guy next to you is the code coverage.

00:50:41.040 --> 00:50:42.180
Well, they are.

00:50:42.180 --> 00:50:47.420
And the methodology is in that, like, we basically don't allow ourselves to write any code in production that hasn't got a test.

00:50:47.420 --> 00:50:51.880
So, you know, we've kind of assumed our coverage is 100%.

00:50:51.880 --> 00:50:57.820
And so, it would be probably educational for us to actually run coverage one of these days.

00:50:57.820 --> 00:50:59.640
But, no, I don't talk about it in the book.

00:50:59.640 --> 00:51:01.700
I mention it at the end going, hey, here's the thing you should check out.

00:51:01.700 --> 00:51:02.820
Yeah, here's the thing you should check out.

00:51:02.820 --> 00:51:03.220
That's cool.

00:51:03.540 --> 00:51:04.600
You know, you can't cover everything.

00:51:04.600 --> 00:51:05.560
Yeah, no, of course.

00:51:05.560 --> 00:51:07.340
You have to ship.

00:51:07.340 --> 00:51:09.180
Even when it's a book, you have to ship at some point.

00:51:09.180 --> 00:51:09.960
Yeah, yeah.

00:51:09.960 --> 00:51:11.920
It's the trouble of anyone writing a book.

00:51:11.920 --> 00:51:12.940
But, no, I do find that.

00:51:12.940 --> 00:51:14.080
So, I talked about it being real.

00:51:14.080 --> 00:51:16.420
In the book, we build a to-do list app.

00:51:16.420 --> 00:51:17.420
So, we go ahead.

00:51:17.420 --> 00:51:19.500
We learn how to database to-do list.

00:51:19.500 --> 00:51:21.600
We start with a to-do list app that has, like, one item.

00:51:21.600 --> 00:51:22.860
Then it has many items.

00:51:22.860 --> 00:51:24.660
But it's the same list for everybody on earth.

00:51:24.660 --> 00:51:27.140
And then there's, like, multiple lists for multiple people.

00:51:27.140 --> 00:51:27.680
Great.

00:51:27.680 --> 00:51:30.060
And then, like, once we've got that working, I go, okay.

00:51:30.060 --> 00:51:31.860
Well, you've made a really ugly website.

00:51:31.860 --> 00:51:32.840
Let's do some styling.

00:51:32.840 --> 00:51:36.020
Because, like, it's not just about a Django view that returns horrible HTML.

00:51:36.020 --> 00:51:39.960
Let's put Bootstrap on there and use CSS and make it look a bit presentable.

00:51:40.660 --> 00:51:43.340
Which is something that, you know, most guys might not cover.

00:51:43.340 --> 00:51:45.600
And then that's Chapter 7.

00:51:45.600 --> 00:51:46.220
And then Chapter 8.

00:51:46.220 --> 00:51:46.780
I'm like, right, good.

00:51:46.780 --> 00:51:47.820
We've built a basic web light.

00:51:47.820 --> 00:51:48.220
It's fine.

00:51:48.220 --> 00:51:49.920
I know you can't delete to-do items.

00:51:49.920 --> 00:51:51.140
You can't edit existing ones.

00:51:51.140 --> 00:51:52.540
But that is a working to-do list app.

00:51:52.540 --> 00:51:53.820
It's a minimum viable product.

00:51:53.820 --> 00:51:55.040
So, now we need to ship it.

00:51:55.040 --> 00:51:57.380
And so, like, Chapter 8 is deploy it to a server.

00:51:57.380 --> 00:52:02.080
And I'm just going to go through how, like, now that you've got your tests, can you run them against a server?

00:52:02.200 --> 00:52:04.880
Can they actually help you deploy as well?

00:52:04.880 --> 00:52:07.840
And so, yeah, that gets even more real, I guess.

00:52:07.840 --> 00:52:08.740
Yeah, very cool.

00:52:09.020 --> 00:52:11.280
And a fairly fierce learning curve.

00:52:11.280 --> 00:52:13.940
Yeah, it seems like a good place for people to start.

00:52:13.940 --> 00:52:16.880
So, I'll put a link in the show to the book.

00:52:16.880 --> 00:52:17.700
So, thank you.

00:52:17.700 --> 00:52:20.700
Yeah, so you were talking about databases and dependencies.

00:52:20.700 --> 00:52:24.920
And I'd like to come back to Python anyway to start a bit and talk about that a little bit more.

00:52:24.920 --> 00:52:29.000
So, you guys have MySQL.

00:52:29.000 --> 00:52:29.380
Sure.

00:52:29.380 --> 00:52:30.080
Your Postgres.

00:52:30.080 --> 00:52:30.540
Yeah.

00:52:30.540 --> 00:52:30.860
Postgres.

00:52:30.860 --> 00:52:37.320
And then I noticed something interesting, I think, in an email from you guys.

00:52:37.520 --> 00:52:39.020
I think I'm remembering this, right?

00:52:39.020 --> 00:52:40.600
So, now you're using containers.

00:52:40.600 --> 00:52:41.420
Oh, yeah.

00:52:41.420 --> 00:52:42.760
For your Postgres.

00:52:42.760 --> 00:52:43.140
Sure.

00:52:43.140 --> 00:52:43.460
Yeah.

00:52:43.460 --> 00:52:44.720
So, is that Docker?

00:52:44.720 --> 00:52:46.700
The Postgres ones are, yeah.

00:52:46.700 --> 00:52:46.980
Yeah.

00:52:46.980 --> 00:52:47.280
Yeah.

00:52:47.280 --> 00:52:47.640
Yeah.

00:52:47.640 --> 00:52:52.960
Well, so I guess anyone that's building a thing a little bit like what we're building eventually comes across containers.

00:52:52.960 --> 00:52:54.060
Like, this is .cloud.

00:52:54.060 --> 00:52:55.940
We're in a similar business and they invented Docker.

00:52:55.940 --> 00:52:56.320
Yeah.

00:52:56.320 --> 00:53:02.080
So, if you're running a lot of people's untrusted code on your servers, you've got to figure out a way of isolating them.

00:53:02.080 --> 00:53:07.140
And the way you do that in Unix is with a bunch of cool tools that put together a tool these days,

00:53:07.220 --> 00:53:07.860
containerization.

00:53:07.860 --> 00:53:10.880
So, we've used bits and pieces of these tools everywhere.

00:53:10.880 --> 00:53:22.200
And the thing with MySQL is the way we provide that is if you host a MySQL server, you can do multi-tenancy fairly easily.

00:53:22.700 --> 00:53:30.680
You can create different user accounts for different users and you can say this user has permissions on this database and this user has permissions on that database and you're fine.

00:53:30.900 --> 00:53:32.940
They're pretty well sandboxed from each other.

00:53:32.940 --> 00:53:36.160
Postgres isn't so good in that respect.

00:53:36.160 --> 00:53:39.220
It's not really designed with a multi-tenancy model in mind.

00:53:40.020 --> 00:53:45.800
And pretty much in Postgres, unless you've got super user access to the server, you can't really do anything.

00:53:45.800 --> 00:53:50.960
And none of the cool Postgres stuff is possible without being a super user.

00:53:50.960 --> 00:53:53.780
So, you can't really do multi-tenancy Postgres.

00:53:54.340 --> 00:54:01.640
So, we were forced to say, okay, well, then we can't just have one Postgres server that runs everyone with user accounts on the same server.

00:54:01.640 --> 00:54:03.720
We're going to have to have multiple servers.

00:54:03.720 --> 00:54:06.160
Everyone's going to have to effectively be a super user in there.

00:54:06.160 --> 00:54:11.220
And a sensible way of doing that seemed to be to run each Postgres instance in some sort of container.

00:54:11.220 --> 00:54:12.180
Yeah, that's really cool.

00:54:12.180 --> 00:54:14.400
A virtual machine probably wouldn't be the right answer.

00:54:14.400 --> 00:54:15.700
Yeah, too slow, right?

00:54:15.700 --> 00:54:17.160
I mean, this is why everyone's using containers.

00:54:17.160 --> 00:54:18.100
They're too expensive.

00:54:18.100 --> 00:54:20.580
The density on the servers just isn't there.

00:54:20.580 --> 00:54:21.100
Yeah.

00:54:21.100 --> 00:54:23.540
If you're offering something for free, density matters.

00:54:23.540 --> 00:54:23.900
Yeah.

00:54:23.900 --> 00:54:24.220
Yeah.

00:54:24.220 --> 00:54:24.640
Yeah.

00:54:24.640 --> 00:54:26.420
So, that was nice.

00:54:26.420 --> 00:54:31.420
So, that was where, yeah, we used Docker for the first time in production and we used Py.Test for the first time in production.

00:54:31.420 --> 00:54:34.380
So, the Py.Test and Docker, like two experiments at the same time.

00:54:34.380 --> 00:54:34.840
Terrible idea.

00:54:34.840 --> 00:54:35.260
Great fun.

00:54:35.960 --> 00:54:36.560
Sounds excellent.

00:54:36.560 --> 00:54:38.700
And, yeah, so that's how that works.

00:54:38.700 --> 00:54:39.500
We've been happy with it.

00:54:39.500 --> 00:54:39.920
Uh-huh.

00:54:39.920 --> 00:54:40.760
Cool.

00:54:40.760 --> 00:54:47.760
And I saw on your features you're considering maybe sometime maybe was MongoDB.

00:54:47.760 --> 00:54:48.500
Yeah.

00:54:48.500 --> 00:54:50.160
Would that be a thing that might show up over there?

00:54:50.160 --> 00:54:50.640
It might be.

00:54:50.640 --> 00:54:54.920
I think we're looking in the short term to probably outsource that.

00:54:54.920 --> 00:55:00.420
So, there's, I can't remember, there's a couple of companies out there that do MongoDB as a service.

00:55:00.420 --> 00:55:00.720
Sure.

00:55:00.720 --> 00:55:03.120
MongoHQ, MongoLab, ObjectRocket.

00:55:03.120 --> 00:55:04.040
There you go.

00:55:04.040 --> 00:55:04.600
All of these guys.

00:55:04.820 --> 00:55:06.240
I think I'm going to say the three that come to my mind.

00:55:06.240 --> 00:55:10.060
Well, I, you know, since we haven't settled on it, we won't big up any of them in particular today.

00:55:10.060 --> 00:55:10.260
Yeah.

00:55:10.260 --> 00:55:11.580
Because maybe they'll give us a good deal or something.

00:55:11.580 --> 00:55:12.140
Yeah, exactly.

00:55:12.140 --> 00:55:13.680
It's time for a bidding war.

00:55:13.680 --> 00:55:14.960
Yeah.

00:55:15.000 --> 00:55:22.460
So, I think what we do for Mongo maybe in the short term is pick one of those, try and build a bit of integration, just make it really easy for people to go, oh, okay, start a Mongo service.

00:55:22.460 --> 00:55:24.440
And it will actually go out to, you know, whoever it will be.

00:55:24.440 --> 00:55:25.080
Sure.

00:55:25.080 --> 00:55:26.080
Create a user account on there.

00:55:26.080 --> 00:55:27.600
And then, you know, wrap it up.

00:55:27.600 --> 00:55:29.140
Just kind of delegate, wrap it up, make it amazing.

00:55:29.140 --> 00:55:30.040
Yeah, that's cool.

00:55:30.460 --> 00:55:34.300
And a lot of those guys are either on AWS or direct connect to AWS.

00:55:34.300 --> 00:55:35.460
So, it would be relatively.

00:55:35.460 --> 00:55:35.960
Yeah.

00:55:36.340 --> 00:55:51.120
So, that's one of the fun things about Python Anywhere, actually, is if you ever do a Git clone of a massive repo and you're sitting there and it's going, okay, downloading 400 megabytes or more, not everything is fast on Python Anywhere.

00:55:51.120 --> 00:55:56.320
But that is one of the things it is because it's in Amazon's data centers and GitHub's got some servers right next door.

00:55:56.320 --> 00:55:56.660
Yeah.

00:55:56.660 --> 00:55:59.660
When you get a repo, it comes down super fast.

00:55:59.660 --> 00:56:00.220
Yeah.

00:56:00.220 --> 00:56:00.720
Which is great.

00:56:00.720 --> 00:56:01.300
Yeah.

00:56:01.660 --> 00:56:10.480
I mean, other file system things aren't so fast because we have to have the challenge of running multiple servers but needing to give people access to the same file system no matter what server they're on.

00:56:10.480 --> 00:56:13.340
You know, there's NFS in the background and that's not the fastest thing ever.

00:56:13.340 --> 00:56:14.180
Yeah, of course.

00:56:14.180 --> 00:56:14.940
But, yeah.

00:56:14.940 --> 00:56:18.900
No, for doing internet stuff, being in a data center in the first place is great.

00:56:18.900 --> 00:56:19.400
That's cool.

00:56:19.400 --> 00:56:22.620
And that's how I get my source code onto the machines.

00:56:22.620 --> 00:56:25.160
I just get, you know, get pull.

00:56:25.160 --> 00:56:28.640
I've cloned it, set up my virtual environment, point it at the Git repo.

00:56:28.640 --> 00:56:29.000
Yeah.

00:56:29.000 --> 00:56:29.220
Yeah.

00:56:30.520 --> 00:56:32.800
Is there a way to set up continuous delivery?

00:56:32.800 --> 00:56:33.540
Yeah.

00:56:33.540 --> 00:56:33.900
Yeah?

00:56:33.900 --> 00:56:37.640
So you can, continuous delivery, so you can hack it a little bit.

00:56:37.640 --> 00:56:40.280
Yeah, like with a web job to do a Git portal?

00:56:40.280 --> 00:56:41.240
That sort of thing, yeah.

00:56:41.240 --> 00:56:42.000
You could do that.

00:56:42.000 --> 00:56:54.340
But you can, you can, you can set up, because like Python Anywhere is essentially a Linux server, you can set up a Git repository on it, one that you can push to.

00:56:55.480 --> 00:57:03.360
So there's a, we've got a blog post about this, but you can set up a Git repository that will, that you can push to, set it up as a remote in your own local computers one.

00:57:03.360 --> 00:57:05.380
And then you can do Git push Python Anywhere.

00:57:05.380 --> 00:57:06.700
It'll arrive on Python Anywhere.

00:57:06.700 --> 00:57:08.180
You can set up some hooks on Python Anywhere.

00:57:08.180 --> 00:57:10.700
When they see new code coming in, maybe they'll even run your tests.

00:57:10.960 --> 00:57:16.060
And then they can do a little thing that will like bounce your web workers and, and your website will be deployed.

00:57:16.060 --> 00:57:17.180
Nice.

00:57:17.180 --> 00:57:18.500
So you can, you can sort of hack it.

00:57:18.500 --> 00:57:19.920
So we haven't built that in yet.

00:57:19.920 --> 00:57:23.680
But you can, you can hack around a thing like that if you feel like it.

00:57:23.680 --> 00:57:23.860
Yeah.

00:57:23.860 --> 00:57:24.680
Cool.

00:57:24.680 --> 00:57:26.840
Is that something you're considering?

00:57:26.840 --> 00:57:27.860
Maybe, maybe not?

00:57:28.240 --> 00:57:34.540
Well, we always have to think, you know, we have to serve, we have to serve the beginners and we have to serve the more advanced people.

00:57:34.540 --> 00:57:34.640
Right.

00:57:34.640 --> 00:57:35.360
And so the model is.

00:57:35.360 --> 00:57:38.120
That what I'm describing is not very much in your original mission.

00:57:38.120 --> 00:57:38.580
Right.

00:57:38.580 --> 00:57:39.280
Yeah, yeah, yeah.

00:57:39.280 --> 00:57:46.500
So like continuous deployment, right, as a thing is not the first thing, you know, it's not the first hurdle that people walk up to.

00:57:46.500 --> 00:57:55.220
And so we like, we'd run, I think maybe for now we'd rather like say, can we make it easier for people to use virtual M's or can we make it easier for people to upgrade their version of Django?

00:57:55.220 --> 00:57:59.640
If they're a beginner, we're like trying, trying to make that learning curve a bit smoother.

00:57:59.640 --> 00:58:00.080
Yeah.

00:58:00.080 --> 00:58:04.300
It seems like that kind of stuff would actually be way more broadly valuable.

00:58:04.300 --> 00:58:04.920
Yeah.

00:58:04.920 --> 00:58:05.520
I don't know.

00:58:05.520 --> 00:58:06.720
It's different audiences, right?

00:58:06.720 --> 00:58:07.080
Yeah.

00:58:07.080 --> 00:58:11.940
Not necessarily to me because I'd like continuous integration as a button, but our continuous delivery.

00:58:11.940 --> 00:58:13.880
But for most people will come.

00:58:13.880 --> 00:58:16.460
It seems like that would be the right place to focus.

00:58:16.700 --> 00:58:17.940
Yeah, yeah, yeah.

00:58:17.940 --> 00:58:19.740
I mean, there's so many things.

00:58:19.740 --> 00:58:20.940
It's hard to prioritize.

00:58:20.940 --> 00:58:22.920
That's a good problem to have, right?

00:58:22.920 --> 00:58:27.800
There's all this cool stuff you want to do and you got to pick.

00:58:27.800 --> 00:58:28.800
Yeah, yeah.

00:58:28.800 --> 00:58:32.320
So, you know, see what your users are asking for, right?

00:58:32.320 --> 00:58:34.120
Yeah, IPython notebooks they want.

00:58:34.120 --> 00:58:36.260
And we're trying to try to figure out what people are doing.

00:58:36.260 --> 00:58:36.560
Oh, yeah, that would be cool.

00:58:36.560 --> 00:58:37.400
Yeah, yeah, yeah.

00:58:37.400 --> 00:58:38.340
I mean, it is.

00:58:38.340 --> 00:58:41.760
You're getting IPython running in your local computer isn't totally straightforward.

00:58:41.760 --> 00:58:45.500
It's not, especially on Windows because you've got some C dependency somewhere or whatever.

00:58:45.500 --> 00:58:46.920
There are, there's anacondas.

00:58:46.920 --> 00:58:47.960
Right, that's true.

00:58:47.960 --> 00:58:50.720
Yeah, some of the prepackaged environments.

00:58:50.720 --> 00:58:53.720
Before that, there was the M4 scientific Python distribution.

00:58:53.720 --> 00:58:55.220
It's all the same problem.

00:58:55.220 --> 00:58:57.040
Like, yeah, there's the things that should be easy that aren't.

00:58:57.040 --> 00:58:59.020
And so, yeah, yeah.

00:58:59.020 --> 00:59:00.060
We're going to see what we can do about it.

00:59:00.060 --> 00:59:04.100
Yeah, so if you make that open web browser click button, that'd be fantastic.

00:59:04.100 --> 00:59:05.180
Yeah, yeah, yeah.

00:59:05.180 --> 00:59:06.280
Nice.

00:59:07.740 --> 00:59:12.820
So, I think that's kind of getting to be a decent amount of stuff we've covered in the show.

00:59:12.820 --> 00:59:14.800
Anything else you want to add?

00:59:14.800 --> 00:59:21.580
Now, I promised myself I was going to say a thing and it's gone.

00:59:21.580 --> 00:59:24.960
Let me ask you something else and maybe it'll sneak back into your subconscious.

00:59:24.960 --> 00:59:31.520
So, one of the things I ask a lot of the guests on their way out the door is what is your sort of favorite package or library in Python?

00:59:31.740 --> 00:59:33.580
Do you have some favorites?

00:59:33.580 --> 00:59:41.180
You know when you type in pip install requirements.txt and it goes no package called this point requirements.txt?

00:59:41.180 --> 00:59:45.980
Because you have to type in pip install -r requirements.txt.

00:59:45.980 --> 00:59:46.360
Yeah.

00:59:46.360 --> 00:59:46.780
Right.

00:59:46.780 --> 00:59:53.240
I've been trying for a little while to figure out if I can upload a package to PyPI called requirements.txt somehow.

00:59:53.240 --> 00:59:57.740
So, that when you accidentally mistype pip install requirements.txt, it installs my package.

00:59:58.220 --> 01:00:02.220
And because the setup.py is like, you know, completely unsecure.

01:00:02.220 --> 01:00:02.880
It's just straight.

01:00:02.880 --> 01:00:03.860
You can do whatever you want.

01:00:03.860 --> 01:00:09.000
I was just going to open up Firefox to rickroll people.

01:00:09.000 --> 01:00:11.900
So, that pip install requirements.txt would just rickroll you.

01:00:11.900 --> 01:00:12.880
I think that would be great.

01:00:12.880 --> 01:00:16.400
I think the PyPI guys have got there ahead of me on that.

01:00:16.400 --> 01:00:19.280
So, it's not possible that I've found.

01:00:19.280 --> 01:00:23.540
But I thought I'd throw that little evil idea out there in the world to the listeners of the podcast.

01:00:23.540 --> 01:00:25.240
If you guys can figure it out, it would be hilarious.

01:00:25.240 --> 01:00:25.960
That would be great.

01:00:25.960 --> 01:00:28.760
Maybe slight misspellings of the word requirements.

01:00:28.760 --> 01:00:29.340
Yes.

01:00:29.340 --> 01:00:32.680
Get them like 10% of the time or 5% of the time.

01:00:32.680 --> 01:00:34.860
Maybe requirements text without the dot.

01:00:34.860 --> 01:00:35.400
Yes.

01:00:35.400 --> 01:00:35.640
Right.

01:00:35.640 --> 01:00:37.740
You could maybe catch a few people like that.

01:00:37.740 --> 01:00:39.720
That's fantastic.

01:00:39.720 --> 01:00:41.260
All right.

01:00:41.260 --> 01:00:41.800
Final thoughts.

01:00:41.800 --> 01:00:42.480
Have you thought of it?

01:00:42.480 --> 01:00:43.300
I know.

01:00:43.300 --> 01:00:43.600
That was it.

01:00:43.600 --> 01:00:44.700
I think that was actually the rickroll thing.

01:00:44.700 --> 01:00:45.740
That was the rickroll.

01:00:45.740 --> 01:00:45.960
Awesome.

01:00:45.960 --> 01:00:46.740
I must bring that up.

01:00:46.740 --> 01:00:47.140
That's fine.

01:00:47.140 --> 01:00:47.860
Yeah.

01:00:47.860 --> 01:00:48.500
That's really good.

01:00:49.840 --> 01:00:51.720
So, Harry, thank you so much for being on the show.

01:00:51.720 --> 01:00:52.340
Yes.

01:00:52.340 --> 01:00:53.520
It's really interesting.

01:00:53.520 --> 01:00:55.340
I'm a huge fan of Python Anywhere.

01:00:55.340 --> 01:00:59.140
If someone's out there listening and they're like, that sounds cool.

01:00:59.140 --> 01:00:59.900
I want to check it out.

01:00:59.900 --> 01:01:02.620
I want to play with this idea of a bash shell in my browser.

01:01:02.620 --> 01:01:04.140
Whatever.

01:01:04.140 --> 01:01:05.760
How do they get started?

01:01:06.340 --> 01:01:07.860
So, pythonanywhere.com.

01:01:07.860 --> 01:01:12.260
Python, P-O-I-T-H-O-N, anywhere, N-A-N-Y-W-H-E-R-E.

01:01:12.260 --> 01:01:14.220
Or you can go to pythoneverywhere.com.

01:01:14.220 --> 01:01:16.540
That redirects to pythonanywhere.com appropriately.

01:01:16.540 --> 01:01:18.380
You can also go to python.org.

01:01:18.380 --> 01:01:21.460
There's a little Python console on the front page there.

01:01:21.460 --> 01:01:22.120
You can click the button.

01:01:22.120 --> 01:01:22.940
You get a live console.

01:01:22.940 --> 01:01:25.880
That's supplied by us if you feel like it.

01:01:25.880 --> 01:01:28.480
And the other thing I have to plug or my editor will kill me.

01:01:28.480 --> 01:01:29.240
I'm going to plug my book.

01:01:29.240 --> 01:01:32.860
So, the book is available at obeythetestinggoat.com.

01:01:32.860 --> 01:01:35.800
It's available both for free and for purchase.

01:01:35.920 --> 01:01:41.120
So, the whole thing is available online for free for the zero pounds or dollars or anything.

01:01:41.120 --> 01:01:43.220
But if you feel like buying it, you can as well.

01:01:43.220 --> 01:01:46.120
And, yeah.

01:01:46.120 --> 01:01:48.420
Those are the two websites that you have to go to.

01:01:48.420 --> 01:01:49.660
pythonanywhere.com.

01:01:49.660 --> 01:01:51.480
Obeythetestinggoat.com.

01:01:51.480 --> 01:01:57.820
And your testing tutorial you did at PyCon is on YouTube, right?

01:01:57.820 --> 01:01:58.160
Sure.

01:01:58.160 --> 01:01:59.180
Yeah, yeah, yeah, yeah.

01:01:59.180 --> 01:02:00.540
Is that just in the...

01:02:00.540 --> 01:02:01.960
I think I actually have it in my list.

01:02:01.960 --> 01:02:05.840
In one of the previous shows, I said, like, here are the essential presentations.

01:02:05.840 --> 01:02:06.280
Yeah.

01:02:06.280 --> 01:02:07.560
From PyCon 2015.

01:02:07.560 --> 01:02:08.420
And I think it's in there.

01:02:08.420 --> 01:02:10.520
But I'll put a direct link to it in the show as well.

01:02:10.520 --> 01:02:11.060
For sure.

01:02:11.060 --> 01:02:11.500
Yeah, yeah.

01:02:11.500 --> 01:02:14.680
I mean, there's an O'Reilly official video you can buy.

01:02:14.680 --> 01:02:15.500
Okay.

01:02:15.500 --> 01:02:16.340
Maybe I'll link to that as well.

01:02:16.340 --> 01:02:17.220
You can if you want.

01:02:17.220 --> 01:02:19.940
But, you know, there are also free versions of all these things.

01:02:19.940 --> 01:02:22.460
I'm no great believer in, you know, this is the internet.

01:02:22.660 --> 01:02:29.500
This point is pretending that you can charge for digital things and that people won't find a way of getting them for free if they want them for free.

01:02:29.500 --> 01:02:32.120
So I'm all about saying let's have them for free.

01:02:32.120 --> 01:02:37.240
You know, your choice is between having it for free without your consent and having it for free with your consent.

01:02:37.240 --> 01:02:38.680
And my choice is with my consent.

01:02:38.820 --> 01:02:41.960
So help yourself to the stuff for free and pay for it if you feel like it.

01:02:41.960 --> 01:02:42.700
Yeah, that's great.

01:02:42.700 --> 01:02:47.280
I think people are more generous than a lot of businesses give them credit for.

01:02:47.280 --> 01:02:51.260
And they're, you know, they'll say thanks and they'll buy something if it really helped them.

01:02:51.260 --> 01:02:55.700
Well, so we're in danger of overstepping the end of the podcast here.

01:02:55.700 --> 01:02:59.260
But I'm sort of a bit into internet activism.

01:02:59.260 --> 01:03:01.360
I'm a member of the Pirate Party here in the UK.

01:03:01.360 --> 01:03:04.420
And for me, it's worked very well.

01:03:04.420 --> 01:03:06.820
Like I say, put my stuff online for free and people will pay for it.

01:03:06.820 --> 01:03:09.980
And so I would love to expose that as an ideology.

01:03:09.980 --> 01:03:16.420
I would say that it's a different calculus for me than it is for Stephen King.

01:03:18.060 --> 01:03:25.960
If I put my book online for free, the people that read that, why are they reading a book about test-driven development for web development, right?

01:03:25.960 --> 01:03:28.080
They're not reading that like to…

01:03:28.080 --> 01:03:28.960
It's not a scary…

01:03:28.960 --> 01:03:31.720
This is not a holiday airport thriller, right?

01:03:31.720 --> 01:03:32.940
This is a thing they're reading.

01:03:32.940 --> 01:03:38.520
They're reading because they want to get better at programming and they want to get better at programming because they're probably doing it for a job for money, right?

01:03:38.520 --> 01:03:42.660
So I think people see the very act of reading that book as quite a commercial transaction.

01:03:42.660 --> 01:03:45.300
And when I'm saying, hey, look, it's try before you buy.

01:03:45.300 --> 01:03:46.120
Like, so read this.

01:03:46.120 --> 01:03:48.000
If you get value out of it, you know, I'd love it if you paid.

01:03:48.400 --> 01:03:53.080
I think people do go, well, I was reading this in the first place for monetary reasons, so I think I should probably pay.

01:03:53.080 --> 01:03:59.320
Whereas, you know, like if Stephen King is sitting there putting all his books for free out there, you know, you're reading that.

01:03:59.320 --> 01:04:01.060
You're not reading it for monetary reasons.

01:04:01.060 --> 01:04:03.620
Your personal value of it is not the same as if it means a better job.

01:04:03.620 --> 01:04:04.040
Exactly.

01:04:04.040 --> 01:04:11.040
So maybe it's easier for me to upsell people to the paid version than it would be for Stephen King or something.

01:04:11.040 --> 01:04:11.940
But yeah, no, absolutely.

01:04:11.940 --> 01:04:12.520
It works for me.

01:04:12.520 --> 01:04:13.160
That's cool.

01:04:13.160 --> 01:04:13.520
Great.

01:04:13.520 --> 01:04:13.880
All right.

01:04:13.880 --> 01:04:15.720
Well, thank you again so much for being on the show.

01:04:15.720 --> 01:04:17.060
It's really nice to meet you.

01:04:17.420 --> 01:04:20.280
And I think it'll be a great conversation for everyone to listen to.

01:04:20.280 --> 01:04:20.760
Great.

01:04:20.760 --> 01:04:21.220
Thanks, Michael.

01:04:21.220 --> 01:04:21.740
Yeah.

01:04:21.740 --> 01:04:22.000
Bye.

01:04:22.000 --> 01:04:22.320
Bye.

01:04:22.320 --> 01:04:22.340
Bye.

01:04:22.340 --> 01:04:22.360
Bye.

01:04:22.360 --> 01:04:27.140
This has been another episode of Talk Python To Me.

01:04:27.140 --> 01:04:29.520
Today's guest was Harry Percival.

01:04:29.520 --> 01:04:33.740
Follow him on Twitter where he's at H-J-W-P.

01:04:33.740 --> 01:04:36.420
This episode has been sponsored by CodeShip.

01:04:36.420 --> 01:04:41.440
Please check them out at CodeShip.com and thank them on Twitter via at CodeShip.

01:04:41.440 --> 01:04:43.480
Don't forget the discount code for listeners.

01:04:43.480 --> 01:04:44.180
It's easy.

01:04:44.460 --> 01:04:46.540
It's Talk Python, all caps, no spaces.

01:04:46.540 --> 01:04:54.780
Remember, you can find the links from the show at Talk Python To Me.com slash episodes slash show slash 10.

01:04:54.780 --> 01:05:00.600
And if you're feeling generous, check out our Patreon campaign at Patreon.com slash mkennedy.

01:05:01.260 --> 01:05:03.020
Be sure to subscribe to the show.

01:05:03.020 --> 01:05:09.540
Visit the website and choose subscribe in iTunes or grab the episode RSS feed and drop it into your favorite podcatcher.

01:05:09.540 --> 01:05:12.080
You'll find both in the footer of every page.

01:05:12.080 --> 01:05:14.120
This is your host, Michael Kennedy.

01:05:14.460 --> 01:05:15.000
Thanks for listening.

01:05:15.000 --> 01:05:15.020
Thanks for listening.

01:05:15.020 --> 01:05:16.020
Bye.

01:05:16.020 --> 01:05:17.020
Bye.

01:05:17.020 --> 01:05:17.020
Bye.

01:05:17.020 --> 01:05:18.020
Bye.

01:05:18.020 --> 01:05:19.020
Bye.

01:05:19.020 --> 01:05:19.020
Bye.

01:05:19.020 --> 01:05:20.020
Bye.

01:05:20.020 --> 01:05:21.020
Bye.

01:05:21.020 --> 01:05:22.020
Bye.

01:05:22.020 --> 01:05:23.020
Bye.

01:05:23.020 --> 01:05:24.020
Bye.

01:05:24.020 --> 01:05:24.620
best.

01:05:24.620 --> 01:05:26.620
First developers.

01:05:26.620 --> 01:05:28.620
First developers.

01:05:28.620 --> 01:05:29.620
First developers.

01:05:29.620 --> 01:05:31.620
First developers.

01:05:31.620 --> 01:05:32.620
First developers.

01:05:32.620 --> 01:05:33.620
First developers.

01:05:33.620 --> 01:05:35.620
First developers.

01:05:35.620 --> 01:05:36.880
Don't forget.

