Reuven Lerner teaches Python through onsite training, email courses, online courses, and writing for Linux Journal.

We talk about his training experience, as well as how incorporating testing into teaching can add a level of clarity to the interaction and help people during the learning process.

Transcript for episode 62 of the Test & Code Podcast

This transcript starts as an auto generated transcript.
PRs welcome if you want to help fix any errors.

Welcome to Test and Code, a podcast about software development and software testing.

There are a lot of learning styles, a lot of ways to learn Python.

If you started Python through a classroom, at work, or through an online course or maybe an email series, it’s possible you may have learned from Ruven learner if your first encounter with pytest was reading an article on Linux Journal recently, that would be the writing of Ruin. Ruven Lerner teaches Python and we get to talk to him today. This interview definitely falls into the category of talking with interesting people doing interesting things with Python. We talk about how incorporating testing into teaching can add a level of clarity to the interaction and help people during the learning process.

I’m also fascinated by people who teach and train and especially teaching and training Python because teaching and training is the skill I’m trying to improve. Thank you to PyCharm for sponsoring this episode. Check them out at PyCharm and listen to their segment later in the show.

This is the Test and Code podcast and I have today, and I should have made sure I understood your name beforehand. It’s Ruben Lerner. Is that right?

Perfect. Absolutely.

Okay, well, Reuben and I ran into each other at the hotel bar in Ohio at the last Python. It’s the first time I met him. But instead of introducing him, I think I’ll ask you, Reuben, will you introduce yourself?

Sure. My pleasure, Brian. So I’ve been using Python for a long time, interstate with some other languages as well. I’ve been using about 92, 93 and I’ve been a self employed consultant since 95, also using various high level languages and various degrees. And about ten years ago, I decided to really focus my consulting work on training and most of that training on Python. So you can say for about ten years now, I’ve been a full time Python trainer, going to different companies, cities, countries. I’ve taught in North America, Europe, Israel where I live, and in China, giving my various Python courses. And I also do a bunch of writing. I have some online courses that I do of various sorts. I guess we’ll talk about that a bit as well. I write for Links Journal. I have some email lists.

But I would say most of my work lately has involved some form or another of teaching Python, getting it out to people, helping them advance their skills.

Remind me again what you did before 96 when I graduated from College.

I worked for HP for about two years, two and a half years, and I was all set to move to Israel. And I got a phone call from a College friend of mine saying, hey, Time Warner needs web developers. Would you like to do this? This was in early 95, early 95. And I mean, I set up one of the first websites back when I was an undergrad at MIT. So this is a College friend of mine. I was like, no, I’m all set. I’m moving in and said, listen, you should talk to these people. So I talked to him. I was like, oh, this is super cool. So I worked with them for about nine months on site at Time Warner in New York. And then I came to Israel, set up a consulting company and continued working with them for about four years. They were sort of my first consulting client. And that sort of allowed me to then scaffold up my consulting, working with a bunch of companies both in Israel and the US, doing, I would say, some combination of programming, web development, Linux stuff.

And over time, more and more places asked me not just to do the development for them, but teach their developers how to do what I did. That was sort of the wedge that started the whole training thing for me.

Okay? And since you’re as a consulting role, you’re jumping around to various companies every once in a while. That kind of turned into a training role fairly easily for you then.

So what happened was I was doing all these different things. I was doing some consulting, some development, some training in various mixtures. And then we went to Chicago for four years where we started grad school. And when we came back to Israel, I was still working on my PhD. And I ran into someone actually literally he almost ran into me with his car. After nearly hitting me and apologized, he realized that he knew me instead of cursing me out or vice versa, he said, hey, you should talk to if you’re interested in doing more training. I know a training company that can market you to various companies here. I was like, I’m working on my dissertation. I could really use that marketing help. So I talked to a training company and it started being like, oh, well, I sent out my resume and I said, Well, I’m interested in doing Ruby training. That was like the main thing I was doing. And they called me back. They said, that’s great, except there’s desperate need for Python training. And it says here, you know Python, how much do you want to work? I was like, I’m in. So it starts off being like one week a month and then two weeks a month. And at a certain point, after three or four years with this training company, I was scheduled out almost fully booked, about three, four months in advance. And then I finished a PhD. And I called him up and said, Guess what, guys? I’m going back to doing this on my own. And then I just sort of continued. Some of the companies that I had been training for through this training company continued with me. And then others started calling me as well. So it’s probably been about ten years now that most of probably 1620 days a month, I’m teaching full days, intro Python, Advanced Python, Data Science Regular and so forth.


You did mention that you write for Linux Journal. And the funny thing is I found this out because of your Pipes article that you wrote there. And I didn’t know before that my boss was a subscriber to this magazine and he has been since it was like a physical magazine. And he came over to my cubicle and pulled up his phone and said, look at this article, that’s cool. He said, no, look at the bottom, it plugs your book. And I’m like, wow, that’s really cool.

So, yeah, thanks for that. And thanks for impressing my boss. That was a good day.

My pleasure. What happened there? Just like, it’s like one of these funny sort of stories. So I used to edit the Emax FAQ way back in the day. And so the company that used to publish Linux Journal, many like, I don’t know, iterations ago made most of their money doing reference cards like those physical fold out cards. So they emailed me one day and said, Hi, since you’re the Emax FAQ editor, would you mind looking over our Emax card and double checking that it’s good and we’ll pay you in ten things from our catalog, whatever you want. So I chose a bunch of things for the catalog, including Linux Journal. And they had an ad in the back saying, coming soon, Web Stiff magazine all about web development. The web is going to be new and it’s going to be big. And you know what? I think you’re right, it is going to be big. So basically I wrote to them and said, hey, I see you’re doing this new web magazine. Would you be interested in having a columnist talk about development for web stuff? And they were like, sure. So basically I wrote for that magazine for about four or five months and then it died and they just silently folded my column into Linux Journal. And so I’ve been writing for them just about every month since 96. And they are super nice in every way, including basically giving me carp launch to write whatever I want. So I basically choose the topic that I’ve been most enchanted by, interested in and or want to learn about and that someone is willing to pay me a bit to spend some time learning about. And over the last few months I’ve been getting into podcast and being impressed by it. I was like, darn it, I should write about this. So I got three goals out of the deal. So it’s good for both of us. Me, you, and your boss, I guess.

Oh, that’s cool. So one of the things we could be asked for a long time, but one of the things you reached out to me to come on the show is you said that you’re falling in love with pytest or maybe just testing that it has changed and improved the way you teach and I’d like to ask about that.

I have yet to incorporate testing. Let me back up a little bit. So I’ve known sort of intellectually for a long time that testing is the right thing to do. But it’s very hard to argue that testing is bad. And I’ve often told clients, look, we should do testing on these various things. And I think I just had a lot of cheapscape clients over the years because they’ve been like, no, we don’t want to spend the time on that, don’t worry about it. And I’ve sometimes managed to convince that the testing was good, but not always. And so I was always, like I said, intellectually in favor of testing, but it was never sort of fully grown emotionally inside of me. And it wasn’t a natural part of my development necessarily. I think part of it was because I never had a library that sort of flowed naturally with development that I was doing. It always felt a little stilted or the latest sort of like cucumber type stuff where it looks super great at first and after you’re in it and you’re like, oh my God, this seemed great. What happened?

And I also had asked by some of my clients about testing for a while. So I haven’t really incorporated into any of my courses in person. Where it really struck home though, was I’ve got an online course called Weekly Python Exercise, which you’ll be surprised to hear is a weekly Python exercise.

Every Tuesday people get an exercise and the following Monday they get the solution. And in between there’s a forum where people can discuss it with each other. And it’s been through a few different iterations. I’m starting up, I think the fourth or fifth cohort. We’re recording this in early January. So later this month it’s going to be a new one for beginners. And so I’m basically every two months now open up new, shorter cohorts. It used to be a year long shorter, and it’s to challenge people and get them to expand and learn both through problem solving and through collaboration. And one of the biggest pushbacks I got from people in the first cohort, two or cohorts was where are the tests? Because I’m presenting them with a problem. Every Tuesday they get emails saying, here’s the problem. And I would describe it. And even if my description was fantastic and it sometimes wasn’t, it wasn’t specific, it wasn’t precise, it wasn’t something they could test too. And so the combination of them complaining and me then discovering Pi test was like a match made in heaven. Basically, I was like, okay, this is great. I can now easily write tests, describe what I want to do. It’ll force me to improve my code and improve my testing.

They will see examples of testing which will improve their coding. And this way I don’t have to give away the store, I can just give them the test and when the test passed, they know that they’ve done it correctly. And this has been a sea change in, I think, my ability to teach in their ability to get things. The interactions between me and the students have also gotten better because now they can push back and say, hey, the following tests are really lousy. And the following tests were really great and helped me to understand where I failed to get things right. Oh, yeah, I feel like moving forward, I’m going to try to incorporate this into more and more of my courses as well.

Yeah, that’s great. I’ve talked to multiple people that have had adding testing to this sort of thing and finding that it improves the descriptions because once you have to write a test for it, you realize that sometimes maybe the requirements sometimes conflict with themselves.

I don’t know if that happened for you.

But I found all sorts of weird things.

I had something just recently I had an exercise in which I had people create a new version of Integer that when you compared it, it would sort of loosely say things were equal. So if you set the threshold to be five, then two and four are equal also because two plus four is within that threshold. And so that’s the sort of fun exercise that I have people do because they’re so useful. Actually, most of them are trying to prove a point. And so I had a whole bunch of tests in there that were all the different mathematical operations you can do, at least like the basic ones. And so a bunch of people discovered, oh, my implementation doesn’t work because I didn’t handle all these different cases. So that was great for them to discover. And I discovered it doing that same one that I failed to take into account.

You can do both directions. I need to take absolute value. So certainly it has forced me to check and double check my code and improve it. And sometimes it’s also the structure. Like sometimes in the past, I would set up an exercise where they just need to have a simple infinite loop where they were getting input from the user again and again calculating something, summing something, and then they break out a loop and they sort of get the result. And you can’t test that very easily. So I’ve had to restructure some of those exercises such that it’s write a function that does this or write a few functions that work together to do this. And that’s quite frankly, more realistic software like how many of us are writing programs that the beginning line is, while true, hopefully not too many, unless we’re paid by the hour.

You said that there’s a forum or something that people interact with each other.

Yeah. So from the beginning, like when I was putting the other weekly plans and exercise, I was trying to think, okay, my PhD is in learning Sciences, like an education sort of thing. So I’m always trying to think, okay, how much of educational theory can I sort of leverage to maximize learning people will get? And so solving problems on your own is great, but solving problems with other people is even better, both because people can help each other. I had this pipe dream that people would pair program with each other to solve problems. That’s not happening. But they are probably time zone issues and partly because they’re coworkers are too small still. But definitely people say, I’m having problems with this or I didn’t understand what was necessary here or I didn’t understand the solution. And so there’s a discourse forum and I specifically chose discourse rather than slack so that answers would stick around and people would need to be there in real time. And that has been fantastic. A small number of people actually use it. I’d say it’s like 20% 30% of the participants, but those who do really seem to value it, they can call me out and say, hey, what do you think of this? Or what did you mean by that? I see the form is a really important part of the learning process that I’m offering people in the courses as well.

So you said you use Discourse. How does that work? Do you have a particular web page for each problem or something that you attach a discourse thread to.

One of these things that sort of evolved. So I rented a server from discoursehosting. Net. I think they’re called it’s not that much money. It’s like 20 $30 a month, something along those lines. And so what I do is I put people in each cohort in a group for security purposes, and then I make a new topic for each exercise. So the year long version of weekly part of the exercise you have like exercise one to 52. And then it would say basically, hey, discuss this week’s exercise here. And then I would just restrict it to be who’s in what cohort? Originally, I just sort of hidden the URLs, thinking, well, I won’t have more than one cohort. Well, let’s see if this thing actually takes off. And now it’s taken off. I realize, okay, I need the structure a little differently. So people in theory, when they log in, only see messages for the cohorts that are appropriate for them and don’t have access for the others, which actually seems to work pretty well.

Okay, interesting. Cool.

This episode is sponsored by PyCharm. I’ve told you about how my team has switched to PyCharm to speed up our workflow. I’ve talked about the Get integration, Bite test support, VM emulation and more. But I also want to explore a few more ways. Pycharm saved time and today it’s virtual environments. Let’s say I’ve got a newly cloned project or a new directory or a package I’m starting to work on with no current virtual environment. I just opened the directory in Python go to the Preferences and Select Project interpreter. There’s a little gear icon there, and that has a drop down with the add button. The default is already set up to create a new virtual environment right in my directory called Venv. And then it lets me select which Python which installed Python to use, which of course, for me right now it’s either Python 36 or 37. This explanation actually just took way longer to explain and to just do it. It’s like three clicks and you’re done. It’s set up matches my workflow, but it may not match yours. There are also options there for condo environments, or just using the system interpreter or using Piping. Even vaguerant Docker and Docker vows. It’s very cool. So virtual environment support seems me time and my team time helps us work consistently with good practices. Next time I’ll share some other fun times errors. If you value your time, you owe to yourself to try PyCharm. And just for test and code listeners, you can try PyCharm Pro for an extended four month trial. This offer is good until April 1, but don’t wait. Save time right now with Pitecher.

I should have asked this before, but you live in an interesting place. You live in Modin. How do you pronounce that?


It’s like AII sound between Tel Aviv and Jerusalem. I looked this up this morning and I went, wow, you’re definitely in a different time zone than me.

I guess I don’t really have any questions about that other than that seems cool.

I don’t know how big Modin is, but do you travel to either Tel Aviv or Jerusalem on a regular basis?

Modine when it was So it was established. We moved here 20 years ago, 19 years ago when we got married. At that point there were 10,000 people living here and it was touted as Israel’s city of the future. And they put fiber optic cables to all the homes and everything until they discovered that it was incompatible with the fiber optic cables. The phone company wanted to use all these crazy things that we could do in the future. And it was originally slated to be like eventually Israel’s fourth largest city, and they were going to have lots of high tech and all sorts of other stuff. It’s basically become now it’s about 100,000 people, so it really has grown quite a lot. They’re building schools all the time and roads all the time and buildings all the time, but it’s basically a bedroom community. The few businesses that are here are basically logistics warehouses and restaurants and clothing stores. So for any sort of serious business, you go to either Jerusalem or Tel Aviv, mostly in the Tel Aviv direction. Quite frankly, Jerusalem is more and more high tech and about a half hour, 40 minutes drive in either direction, although I tend to take the train most days to Tel Aviv from going there. Okay, we happen to luck out in the house that we bought is a ten minute walk from the city’s train station.


Yeah. It actually worked out very well on that front.

Is a lot of your in person training done in one of those cities?

I would say most of the training I do here is in. I did a ton of Jerusalem for many years. That’s petered off a little bit because our clients not doing so great. But now it’s like Tel Aviv, Castilia, which is a city north of Tel Aviv for Saba, which there. But I sort of go west and then north. And how far north depends on the client, depends on the day.

So you have the email list with the cohort stuff you also do online. You have some pre canned online courses, right.

I was actually adamantly against that for a long time. And I got a blog post somewhere saying I will never do online recorded courses. Probably should, like retract that or update. One of these days I want to deliberate and I’m going to do live courses because live courses are the best, because then I can talk to people, I can interact, they can ask questions. And so I guess it was like the summer of 2017, fall 2017. I did a few live courses that I advertised on my list and elsewhere, and a handful of people showed up and they seem to like a lot. And then I asked my list, like my mailing list. So what time zone would be best for you to do these courses? Because after all, I’d like to have more people sign up. And at the very last moment before I posted the survey, I added another option, which was I don’t want live courses. I want recorded courses. 80% of the people said they wanted recorded courses. So you can’t force the market to do what you want. And I totally understand because time zone differences and I want to be able to pause it also and go make dinner or whatever it is. So I’ve been taking a growing number of my courses and recording them and putting them online, and now I think about six or seven of them. It’s a bit of a patchwork of different topics from the courses I currently teach. And I’m hoping in the next year or two to really get a Fuller suite of them. The very beginning of my intro course, which talks about data structures and basic project syntax. I want simple objects based objects. I want on comprehensions. And then I have initiated the weekly Python exercise, email based course. I have two books that I published, one on Python exercises and one of regular expression exercises. And then there’s sort of like video courses that go along with those where I go through and solve those as well.

Very cool.

Yeah. It’s fun. And the video recording has been increasingly straightforward and easy for me to do and fun. And it’s nice. The other fact is, the bad news with the training is I can only be in one place at one time. And so this way, even people who are in countries I can’t get to or I don’t have time to get to, or just individuals I can manage to train them and they get the benefit, even if their company doesn’t have a training budget or I don’t have the time.

So, yeah, it’s great for the online courses. Do you set it up as in cohorts also? Or is it just whenever anybody wants to take it.

That’S whenever I toyed with the idea of having like a Slack channel or having a discourse forum for people who are in the course and it wouldn’t cost me anything to be that difficult to set up.

No one has really been clamoring for that. I mean, I might be able to do that. I might do that. It’s not a bad idea just because. Why not? And maybe people see this as extra value. But no, so far, for those courses, you get it. And if you have questions, sometimes people email me, sometimes I emailed them back. No, I backed up by email in general, as many of us, but I actually enjoy getting the feedback from people and hearing from them and sometimes update things accordingly.

I still get email from my book and for the pipe test book. And people ask questions or ask for clarification on things. The interesting thing is occasionally somebody will add at the beginning.

I know you probably get a ton of email.

But actually, I don’t. I get like maybe one or two a week at most. I really don’t get a lot of feedback email. I don’t know if it’s that people just aren’t asking questions or maybe my spam filters too, but yeah. So I welcome people getting in touch with me and asking questions is great. Actually, you’re doing all we haven’t told people where to go. If people are interested in what you’re doing, where should they go?

Look for this stuff.

So my online store with all the courses is at store. Learner. Co. Il, and it’s learner L-E-R-N-E-R my website, which has sort of linked all this stuff, including the stories at just learner co. Ilernerco.

Okay, we’ll put those links in the show notes, of course. What’s the future for you? What do you think you’re going to be doing more of in 2019 and beyond?

The fact is, I love training. I feel like I’ve got just like the best job ever, because every day I get to meet super cool smart. Well, I mean, all programmers are cool, so I try to tell my children.

So I’ve been very smart people different companies. I hear how they’re using Python and programming in different ways from their questions. I’m always learning new stuff as well. Easily 60% of what I teach is based on what people have taught me or asked me about. So I’m definitely going to keep doing the in person training. What I’m hoping to do is crank up the online training a bit more so that I can be a little more selective in terms of time and place with the in person training so that instead of maybe training in person four weeks a month, they’ll do it like three weeks a month or two weeks a month and balance it out with more courses online. So I want to complete my intro course online. I want to get out my intro data science course online, at the very least, the NumPy and pandas part. And if I can do like my introsychiat learn stuff, I think that would be interesting and fun and popular. My experience with the data science course. I always tell people this is like a four day course, two days of NumPy and pandas and two days of ScikitLearn. I say the first two days are a lot of syntax and a little more boring, but that’s what you’re actually going to use in your work. And the second two days of ScikitLearn. Super cool ideas. But most people who at least pass through my classes aren’t actually going to use it. So we’ll see what the demand is and what people are interested in. And then I actually am thinking very seriously about putting together a PY test course just because, boy, I’m so in love with this framework, and I sense that a lot of other people enjoy it also and want to get to know it better.

Yeah, it’s a good idea.

And we’ll see.

The other thing is the weekly part of the exercise stuff. I hope it’s going to take off even more and it’s going to take up more of my time. What I would love to do is do like a new cohort every month or two, even sort of alternating beginning intermediate, and I’m bringing that down to the smaller bits. Instead of one year long course, I’m bringing that into 315 week courses. And so then I can do like we did by the next exercise, 101 21122 alternating beginning intermediate. And I’m even toying with the idea of doing it for other technologies in other languages. We’re putting other people to do that. So I know PostgreSQL pretty well. I might do something for that. Well, we’ll see lots of ideas, and I just kind of sort of plot through the things I’ve already committed to for trying those.

That’s great. It sounds interesting. And I’ll definitely keep in touch with you and keep up with what you’re up to. Excited to see where all this goes. I really enjoyed talking with you. Is there anything that we didn’t cover that you wanted to hit on before we sign off?

I’ll just mention also if people are interested in training, if they find it interesting, intriguing, want to hear more about it. So we’ll put this in the show notes also. But I also have a newsletter for people. I mean, Additionally my programming newsletter. I have a training newsletter for people interested in what I call the business pedagogy and logistics of training. I’m even hoping to put up a podcast about that in the near future. I’ve recorded a few episodes just need to upload them. But if you go to, you can sign up for my trainer newsletter and I get hints about sort of how to get clients, how to price things, how to teach, how to come with a syllabus, how to make yourself seem like a real professional trainer and the trade offs of working on your own versus the training company going through them. So I love helping people get into training. As I said, I feel like the best thing I’ve ever done for my career and so if people are interested in that, happy to talk to them about that or just spam me with my newsletter every week.

Okay, cool.

Thanks a ton for talking with me and I probably talk to you again.

My pleasure, Ryan.

Thanks for bringing me on Thanksgiving to PyCharm for sponsoring the show. Remember to try out PyCharm pro for four months before picking a license by going to Pyturn. That link is also in the show notes at 62 Also in the show notes are the links we discussed in the show and Ruven is doing something cool. If you are interested in his weekly email exercises, he’s giving listeners a 10% discount with the link in the show notes. Thanks Ruben, for doing that and also thanks for talking with me. Thank you also to Patreon supporters, there are currently 56 patrons and seven at the five dollar level. That’s awesome. Big round of applause to new patrons Chris Fraser and Michael harp, as well as longtime supporters Steve Holden, Oliver best, Walter, Andrew Diedrich, Jordan rink, and Evan. These are all the $5 level supporters. Thank you so much. I would actually clap right now because I’m so happy with these people, but I know some of you are listening on your headphones and I don’t want to blow out your ears. Also thank you, the listener, thank you for helping to grow the show by spreading the word to friends and colleagues on social media and giving ratings on itunes or wherever you listen. That’s all for now. Now go out and test something.