Full show notes can be found at http://podcastinit.com/episode-2-reuven-lerner.html?utm_source=rss&utm_medium=rss
Episode 2 Brief intro
- Recording date/time
- Hosts
- Overview
Reuven Lerner Interview
- Please introduce yourself
- How did you get introduced to Python?
- How did you break into the field of providing Python trainings?
- What are the most common languages that your students are coming from?
- What are some of the biggest obstacles that people encounter when learning Python?
- Where does Python draw the inspiration for its object system from?
- In what way(s) does learning Python differ from learning other languages?
- What sorts of materials/mediums do you use for training people in Python?
- Do you use your book (Practice make Python) as follow up material for your trainings?
- In your freelance work, what portion of your projects use Python?
- Have you seen a change in the demand for Python skills in the time between when you first started using it and now?
- What types of projects would cause you to choose something other than Python?
Picks
- Reuven Lerner
- Chris Patti
- Tobias Macey
Closing remarks
- Reuven Contact:
[00:00:14]
Unknown:
Hello, and welcome to another episode of podcast.init. We are recording today on April 21, 2015. We have Tobias Macy and Chris Patti as your hosts. And today we're interviewing Reuben Lerner.
[00:00:29] Unknown:
So, Reuben, why don't you introduce yourself?
[00:00:32] Unknown:
Sure. So my name is Reuben. I've been a software developer now for, I guess, more than 20 years. Over the last few years, I've been doing, I would say, less and less project and development work and more and more training to such a degree that now I would say a good 90% of my work is doing training, and a huge proportion of that training is in Python. But, like, aside that, I grew up, as you can hear, in the US. I went to high school and college there. I lived in Israel though, halfway between Tel Aviv and Jerusalem and a city called Modim, since 99.
[00:01:08] Unknown:
That's very cool. Israel seems, from everything that I've heard, like a really neat place to live. It's such an interesting confluence of of cultures, and, obviously, it's in a really sort of interesting for better or for worse region. What brought you there? How did you end up deciding to move there?
[00:01:26] Unknown:
Sure. I'm I'm happy to talk about it. How long do we have? But, look, I I would I would say, to sort of put it in a nutshell, it's this way. I went to Jewish schools and Jewish camps, and the basic sort of history lesson that we got there was Jews that wanted to live in Israel over 2000 years, Wouldn't it be great if we could go back? And I sort of looked around and said, actually, guys, we can. We have a country again. You you might not have noticed. And and and the fact that, as someone in the high-tech world, I could make a decent living here just made it a a more compelling case. So I came here. My plan was basically to come to Israel as soon after college as possible. And about 2 and a half years after graduating, I paid off my loans.
And through a lot of frugal living, I moved to Israel. And, I must say I've been very, very pleased here on all fronts. I mean, it's I'm not gonna claim that there are no problems in Israel, but I feel like, far from it. But I feel like these are the sort of the sorts of problems that I wanna wrestle with on a sort of personal national basis. And, we lived in Chicago for 4 years while I was doing my PhD coursework at Northwestern. And, much as I enjoyed Chicago I really enjoyed Chicago. Much under I I enjoyed living back in the US for a little while, That only cemented my my feelings that the US is a nice place. It's not here. But, but I actually am very comfortable with my decision to move to Israel.
[00:02:49] Unknown:
Very cool.
[00:02:51] Unknown:
So how did you get introduced to Python? What when did you first come across it, and what made you wanna stick with it?
[00:02:59] Unknown:
I'm not I know I've been thinking about this actually. I'm not a 100% sure when it was. So I'll I'll give you a little background. So I I went to MIT undergrad and, you have to do an undergraduate thesis when you're there. And I did something, this was just before the web started, my undergrad thesis was this new idea that you can have 1 program that spoke many different protocols. And it really barely kind of worked, but that's okay. It was an undergrad thesis. But in order to get that going, I went to a local bookstore, and I bought 2 books. 1 was on Sed and Auk, and the other was on Pearl.
And so I was sort of really getting into Perl and I did all sorts of stuff with Perl. And I knew at that point, this was in the early nineties, there was a lot of rivalry between the pro world and the Python world. And it just sort of, out of necessity and out of interest, I started learning about Python as well. And I still sort of saw myself as more of a pearl guy and then sort of pearl committed suicide, and so I said, well, you know, Python is actually doing pretty great. Maybe I can do some stuff there. And so it's probably been a good, certainly more than 15 years. I I would say it's about 20 years at this point that I've been using Python on a regular basis.
Sometimes more regular than others. So there was a period where I did tons of work in Python. There's a period of work where a period of time where I did tons of work in Ruby. I would say over the last, yeah, 5, 6 years that I've been getting more and more into doing training, the demand for Python training has been so extensive that many of the people who know me for doing Ruby are sort of surprised at how strong I am in Python. But I I see, actually, the community and the language and the the business opportunities, quite frankly, just growing and growing in Python, which is not as true for Ruby, I'd say, for now.
[00:04:41] Unknown:
Yeah. I I definitely agree, actually. I think I think that while Ruby is thriving in its niches in terms of Ruby on Rails and, and also in infrastructure as code with Chef, I think Python is is definitely gaining ground in terms of it's being used in so many more diverse contexts like in the sciences and, you know, and and obviously, there's there's web quite a bit of web programming being done with it, but also it's also doing infrastructure as code with Ansible and Salt. And, you know, it's being embedded into a 1, 000 different projects. And and and people are just recognizing that it's a really sort of good general purpose language that's easy to learn and and has a great deal of depth for you to grow into as you as you learn it more fully. So I I definitely agree.
[00:05:28] Unknown:
Absolutely. I'll I'll I'll say along those lines, by the way, that when I started doing training in Python, teaching classes, I was convinced that all of my students would be web people. So I was like, well that's what I do with it, right? So that's what everyone must be doing with it. And I could not have been further from the the truth. The overwhelming majority of people who are doing the were in my training are in, you know, automation, they're in testing, they're in big data analysis. All sorts of fields which, as you said now, are just growing and growing in the Python space, and are helping the language to really extend its tentacles, for lack of a better term, into all sorts of new areas that that I never would have imagined. And quite frankly, that I never really learned about before before, I was forced to teach it and deal with these people.
[00:06:13] Unknown:
Right. That's great. It and that kind of dovetails with our next question. How did you break into the field of providing Python trainings? How did you sort of get your start and make an make a name for yourself and and, have people beating down your door?
[00:06:27] Unknown:
Yeah. It's it's it's kind of wild. So I've been doing training so so basically, so I moved to Israel in 95, so it's 20 years ago. And I already had consulting work from my previous employer in the US, Time Warner. And we had a fantastic relationship. I still have a good relationship with many of the people I knew from there. And so I arrived doing Perl and Linux, and I was doing all sorts of stuff in those those fields. And people said to me, well, it's nice that you're doing the development. Would you mind giving us some training in this? And so I had my toes in the training water for a while, and and I did a little Python training as well here and there, but not that much. But the real Python training tsunami happened probably about 6 years ago.
I was still working on my dissertation. I really didn't wanna have to deal with the training marketing. And I figured if I hitched my my wagon to a a bigger horse as it were, hard to a bigger wagon, I don't know what the metaphor is. And then even then maybe I could, maybe I could finish my dissertation faster and reach some new clients. And so I I spoke with a company called John Bryce, which is sort of the 900 pound gorilla of training in Israel. And I sent and and I said I'd like to do Ruby on Rails training. And they said, yeah, you know, this Ruby thing, it's kind of a flash in the pan. We don't think there's really room for training in it, but send us your resume. And within hours, they called me and they said, oh my god. You know how to do Python.
We must have to do Python training. And since then, I've been doing between 2 and 3 courses a month, almost nonstop. And right now, we're recording this late April, and I'm almost solidly booked through the end of December with training. It's just Wow. Nuts. It it's and I love it. I really it energizes me, like, I mean, today. So I slept 4 hours last night because I was trying to get an article done for Linux Journal. I talked for 8 hours today, came home, finished the article, just did our podcast, talking to you guys, and I'm a zombie. No. No. And and when truth be told, when I'm training, it gives me such energy. I love it. I love the questions people have. I love interacting with them. I love seeing those moments or oh my god moments. Like, you can do all that in 1 or 2 lines? And of course, the point in Python is, yes, you can, and you can read it 6 months later, which was not not necessarily true for Perl or I would say even sometimes for Ruby. Right. So so training was sort of a offshoot of my inter interactions with John Bryce. And recently, I decided to sort of now that I finished the dissertation, finished the PhD, I've returned to doing training on my own through my own company directly, and that has just increased the demand even more, much to my pleasant surprise.
[00:08:56] Unknown:
Great. Yeah. It's interesting to hear from the perspective of somebody providing training how much of a demand there really is for Python because, you know, you see all these different reports that come out about the comparative popularity of various various programming languages, and they all can be taken with a bit of a grain of salt. But having that type of perspective on which languages are actually in demand on by larger companies is really interesting, particularly since you're saying how a number of them were really terribly interested in Ruby on Rails, but they they really wanna learn about Python. So good to hear. Oh, for sure. So and I'll tell you.
[00:09:33] Unknown:
First of all, I I think someone in each of these big multinational companies and, I mean, companies I train for, like, I I do training in Cisco, HP, VMware, you know, EMC. These big big kind of Zendesk. These big companies where someone I think at the top basically said, we have to do some standardization. We have to choose a a smaller subset of languages to work with. And Python is good for a lot of people, and so let's just run with it. And so everything from internal web apps to big data to to, testing and everything, they're doing a lot of standardization on Python. And not only are they doing this in a lot of companies, but these kind of the demand is almost insatiable. It turns out that when I'm, say, at Cisco giving training, I'll often meet someone else, You know, new person, I'll say, oh, what are you doing here? Oh, I'm giving Python training.
Like, we're both there on the same day and then then this is really, the demand is almost insatiable. And I would say it's gonna grow before it shrinks in part because such a huge number of universities are now teaching Python as an intro language. Yep. And you know that some ridiculously large proportion of those students are gonna finish school, you know, graduate from college, go off and do startups, and what language are they gonna use? Well, clearly, it's gonna be Python because that's the 1 they know best. Yep. And so we're gonna see another 5 to 10 years, I think, of this, at least.
[00:10:48] Unknown:
And unlike list for scheme, which used to be the kind of de facto standard for intro courses in in at least the the big hardcore CS schools or Java, I guess. I should Java, you know, certainly had commercial use, but lists for a scheme was really kind of, you know certainly, there have been successful commercial enterprises conducted with it, but it's not exactly what you consider a mainstream language. And I and I just wanna say 1 thing about that those language popularity polls that we see. So many times when you actually look at what metric those polls use for, like, how they determine which language is most popular, it's something really stupid and flawed, quite honestly. Like, it's like number of lines committed to GitHub project over the last 6 months. And I mean, you know, like, that's that's That's a win.
Exactly. Exactly. Like, that's certainly or these days JavaScript. That certainly represents a certain subset of the of the computing populace, but by no means is it, like, comprehensively
[00:11:46] Unknown:
showing what language are actually most popular in use out in the world. Well, it's it's it's funny, by the way, that you mentioned Lisp and Scheme. So, like, as I said, I went to MIT, and so I was brainwashed into believing that Lisp is the best language ever, and I continue to believe that. And it actually sort of hurt me inside a bit, when they said they were moving away from Scheme toward Python. And the argument they used was basically the intro course has changed because computing has changed, and what we wanna teach our students has changed. And we can get those ideas across better with Python than with Lisp. I'm not a 100% sure that I agree with that because I really do think there are many things I learned both in that course and from Lisp in general that have been so useful. I didn't recognize at the time, of course. At the age of 18, you don't recognize anything. But Right. Years later, I'm like, wow.
That was such a useful insight that has carried me through, and I use some of those things in my teaching even now nowadays. So I still think people should learn Lisp, but it is pretty great that they can indeed use a practical language that has theoretical depth in an intro CS course.
[00:12:49] Unknown:
So out of curiosity, when you're performing these Python trainings to these big companies, is there a particular language that most of the most of your students are coming from, or is it just sort of a mishmash of various languages languages that they've all used before?
[00:13:05] Unknown:
Well, look. Most of my training is in Israel, and Israel has a very strong dotnetmicrosoftfocus. And a lot of companies I deal with are hardware companies, which means they have a c and a c plus plus focus. And so the sort of more, I don't know, high level programmers among them are the people who've been doing Java, or I guess like c sharp. So it's rare. It happens, I would say maybe 10%, 20% of my students have a background in Ruby, JavaScript, you know, some some sort of high level, language that that I think gives them a closer insight into how Python works. So for a lot of them, this whole idea, like, I I always have to tell them that you're learning not just the language, but the approach. That there's no such thing here as a compiler. Yep. So you can't just write the file, throw it at the compiler, and hope that your errors will be found. You actually you actually have to think of it and you have to run it, and you have to work with the interactive shell with with IPython so that you can test your things and do it iteratively.
Yep.
[00:14:05] Unknown:
Yeah. It's definitely very much diff 2 different things of learning a language and what it is and what the semantics are versus how learning how to use the language in in in an idiomatic manner. So
[00:14:20] Unknown:
Right. And I would say that over the years, I've been learning what the idioms are that surprise people or that are most useful to them, and I've tried more and more to gear my training in that direction. For instance, I used to almost never talk about scope. It's like scoping in Python, it's so obvious, until I discovered it's not. It's not to people who are not used to it. And so now I have a long section where I talk about scoping with people, and I explain to them different kinds of variables and l e g b, and how this works, and the sort of fun tricks you can play with that as well. And and I think that those insights, maybe they're not gonna be redefining true to false and false to true in their day to day work.
I certainly hope not. Although, I do suggest that they do it to someone they don't like when they go to get a cup of coffee. But but, you know, understanding l e g b can really give you deep insights into how the language works and what's going wrong when you're trying something.
[00:15:15] Unknown:
Right. I'm I'm sure. And and speaking to your your point about, what's idiomatic, in different languages, that was I mean, I was a Ruby guy for years years years. I I've only been kind of a a Python convert. Although, I still love Ruby for the last, you know, I don't know, 4, 5 months or so. And that was 1 of the most challenging aspects of learning Python for me is so many of the concepts are very similar, but the idioms are so different. And in in kind of if you're coming from a different environment, you're used to different things unintuitive ways like the, you know, no implicit return thing. I know it's a small thing and most Python Pythonistas are like, well, why would you do it any other way? But when you use the Ruby where implicit return happens, it it it can, you know, lead to some hair pulling and, like, why won't it just work moments until
[00:16:06] Unknown:
yeah. That that actually, I must say, that drives me totally bonkers. And maybe it's just my, like, you know, Lisp, Ruby, even Pearl, Persona coming out. But, like, come on. Can't we just have implicit return? And I understand, no, everything has to be explicit. But, but I I really actually do miss that. And they're very I mean, also the whole thing where when you do assignments, like, or or I would say even, like, you know, you're sorting a list where it returns none. Like, I love getting things back and then being able to chain them. And, yes, we we have sorted and so forth, but I don't know. That's behavior that I just sort of shrug my shoulders at and say, well and I tell my class and I say, well, they never called me to ask what I thought. So
[00:16:50] Unknown:
that's the that's the both the the blessing and the curse of having a benevolent dictator for life. Right? As unfortunately, everybody has an opinion, but his is the only 1 that really matters.
[00:16:59] Unknown:
Yes. Precisely.
[00:17:02] Unknown:
So what are some of the biggest obstacles that people encounter speaking of idioms and and idiomatic, code? What are some of the biggest obstacles that people encounter when they're learning Python? Oh,
[00:17:15] Unknown:
So first of all, the whole dynamic typing thing, I think, really takes them by surprise and and sort of gives them the chills. You know? So, like, just, I guess yesterday, I was doing yesterday and today, I gave the 1st day of an intro Python course to to a company here in Israel. And both days, I think because people were coming from these statically compiled languages, both days people I I have I have this, 1 1 of my 1 of the exercises I give them is just sort of a number guessing game. So get raw input from user, and we're almost always using Python 2, 27. And so, you know, raw input, get a string, and now compare with the randomly generated number with, from the random module.
And I do this on purpose because I know they're gonna get tripped up, and they're gonna remember the hard way that raw input always returns a string. And so someone said to myself, why don't we just declare the variable to be an integer, and then automatically raw input, when it's assigned to that to that variable, it'll become an integer. I was like, no, no, no. That's not the way it works. You can't have a variable that's a certain type. And so the fact that variables aren't type, the fact that parameters, which are variables aren't type, just gives them the willies. Similarly, I think oh, you know what's what's hard for them also? The whole splat argument thing. That and and keyword arguments. Yep. They think it's super cool
[00:18:31] Unknown:
and they cannot wrap their heads around it. Either it's hard for them or they don't they don't know why they would want it. I'll totally admit that I totally love it. I think it's a great feature, but I have to admit that I find it hard to wrap head around sometimes. And whenever I see it in code, I have to be like, what what's this doing again? What what you know, so it it's definitely I can definitely appreciate that it's 1 of those I mean, and for you, for someone who comes from a language like Lisp, it's like, well, of course, you have dynamic arguments. Like, why? Why would you wanna do it any other way? So it's it's a great feature but it can be it can when you first encounter it or even after you first encounter it, it it it can feel kind of alien.
[00:19:13] Unknown:
Yeah. It definitely took a little while for that to sink in for me when I first started using Python.
[00:19:18] Unknown:
Mhmm. Mhmm.
[00:19:20] Unknown:
Yeah. And so, I mean, 1 of the exercises that I give is, to have an XML generator, in a function. And so I say, like, you know, so the the tag name should be the first parameter, and the content should be the second parameter, and then you can take any number of keyword arguments, and those are turned into attributes inside the opening tag. And that usually confuses them because they say, wait a second, where am I supposed to use the splat? Right? Where am I supposed to get any number of arguments? It takes them a while to realize, well, first of all, just because you've learned about a tool doesn't mean you have to use it. But second of all, in that particular case, getting a default argument is typically more appropriate and more useful than having the splat there, you know, splat arks. Yep. But the keyword, you know, keyword arguments, well, that's just super handy. And then you can have this API that looks nice and does something spiffy behind the scenes.
What's another what are other things that drive them nuts? Oh, I know. The fact that objects are totally exposed and open. Right? Right? Like so I even go I even go through the motions of, okay, here's our person object, let's create a getter and a setter. Then I'm like, no. Do not use these. Erase these getters and setters, we don't need them. And people will say, but but but but but we're supposed to have, you know, our objects are supposed to be black boxes. And I say, well, not really in Python. Yep. But, but, but, but, but, but, what if we want to have programmatic access or change the API over time, evolve it? Wouldn't that be better to have a getter or setter? I say, well, actually the way Python approaches this is a property. Typically my intro classes don't even get to properties. It depends on how, sort of, how the class is structured, but usually not. But I say, like, Python does have answers to these things, but they're different than the answers that you're used to. And just because the object system doesn't work or just because the approach isn't what you're used to, it doesn't make it wrong. It just makes it different, and it's a different set of trade offs.
[00:21:05] Unknown:
That's that's really interesting you say that. Properties are 1 of the things that I I kind of, like, you know, as I said, as I admitted already, I'm kind of a Python noob still. I've been using it for a few months and I I can certainly, you know, tootle along and write my code day to day and it but there are various aspects of it that I haven't quite wrapped my head around yet. And and that leads me to wonder, you know, many languages like there's almost nothing new under the sun in computer science. Right? Like, every language can trace various of its features back to some lineage of somewhere else. Where does Python's object system come from? Like, will that that aspect of properties and objects working differently than you would see.
Where do you think it it drew its object oriented inspiration from?
[00:21:49] Unknown:
Well, interesting you say that, because I've always said and thought, and I think it's even true, that a lot of the Python object system came, from, Smalltalk. So you can I mean I mean, so, you know, you you came from Ruby? You've spent some time in Ruby. Like, truth be told, if I have to teach Ruby and I have to teach Python, I often will come up with a new exercise in 1 language and use it in the other because the languages are, under the surface, very similar in some ways. And the object system is very similar in some ways, except Python somewhere said no, no, no. Instead of doing everything through messages, everything through methods, we're gonna turn that around, and we're gonna make everything look like data access. And so, like, properties are basically the inverse of Ruby's attributes.
Where Ruby attributes, we make data look like methods. Right? And and Right. In Python we make our methods look like data. And I've got to assume that it was Guido or someone else or maybe 1 of the languages that he learned. He just really liked that approach. And it definitely is a bit of a bastardization or, like, a real revolution from what small talk did. And and I don't know. I don't know. It's it's it's an interesting approach. There's sometimes when I sort of roll my eyes and say really? We have to do it this way? But the whole object system I mean, basically, if you understand how attributes work, then you understand the hold on object system and inheritance, for instance, just comes straight out of that.
You know, there's no special rule for inheritance. It's just, an extension of or a special case of attribute lookup. And that, I think, is really elegant. But where did it come from exactly?
[00:23:30] Unknown:
I don't know. That's a good question. I'd love to find out. Yeah. Maybe 1 of our listeners can tell us if there's gotta be some language history buffs out there who can who can school us on this.
[00:23:41] Unknown:
Oh, I'm sure. Yes. I'm sure another thing that people, particularly coming from things like c plus plus or Java, have trouble with is the lack of protected and private methods in Python.
[00:23:54] Unknown:
Oh my god. They go nuts over that. Right? Right. I I I mean, right. Right. Because they they sort of wonder, how is this possible? How could this language I mean, so it has dynamic typing. Everything is open. Nothing is private or protected. And especially, like, many of the people whom I teach, are in the security industry. And to them, this whole notion of, well, we're just gonna be really optimistic and nice and friendly, and everything will work great. And they say, are you kidding me? That's like, yo, and does that include everything we do professionally? Yep. And I say well maybe, but it's worked pretty well for 2 decades, you know? Right.
[00:24:32] Unknown:
And interestingly too, Python is actually quite popular in the security industry as well.
[00:24:37] Unknown:
Right. So I I don't know. I don't know. It's it's very, I I I can't explain it. I mean, I do tell them that if you really want I mean, there's always a way around it. But if you really want sort of extra security or pretend that things are private or protected, you can always, you know, you can always use something like a descriptor. Mhmm. But truth be told, how many people are gonna do that? Almost none. I don't know how I don't I mean, I'm sure we're gonna hear from people now. Right? But, like, how often do people really use descriptors after all? They're super cool, but Yep. I I think I think it's, you know, maybe 5% of the population. And that 5% might need it. Yep. But I think it's a it's a relative rarity.
[00:25:18] Unknown:
Once again, I think it comes down to just having to think about different ways of structuring your systems and your code, right, around this new model, this new way of working. I'm sure it's just a matter of getting people to change their mind about things is is the hard part.
[00:25:34] Unknown:
Yes. Yes. Oh, here's another thing that that that people are surprised by, and sort of intrigued by, which is, of course, comprehensions. List comprehensions, set comprehensions, and dictionary comprehensions, where they see it as almost like black magic. And, you know, they see so I give lots of examples of what we can do. We usually, depending on the length of the course, the type of the course, we then practice it to some degree or another. But I know that people don't get it. Like, they don't see the sort of, okay. I have a problem. A comprehension is my solution, and this is what I'm gonna get back. I think part of it is just sort of years of training where if you work with functional languages or, you know, if if you use these sorts of tools like map and and, you know, reduce filter for years, then you just sort of see those as solutions to a huge variety of problems.
But for a lot of people, all they see is this wacky syntax, and and they're not quite sure what they're doing or how they're getting it, but they're getting results back that don't quite make sense.
[00:26:32] Unknown:
Yeah. I was gonna say that for me, list comprehensions and dig like, comprehensions in general are 1 of the Python features that I find myself struggling with. Not because I can't understand them when someone else uses them and I see them in source code and I say, comprehension, it does this and thus. But because the the syntax is so alien to me that when I find I need to do something and I'll, you know, hit a code review and they'll say, well, gee, a comprehension could do this a lot more cleanly and elegantly. And it's like, oh, yeah. I just I never would have thought of that because it's just this for me, in my, you know, really limited way of thinking, it's just this bizarro world thing off in a corner somewhere that I haven't quite embraced yet. And I can only imagine other newbies have a similar challenge with them.
[00:27:17] Unknown:
Yeah. Yeah. Sure. I I often tell my students in Israel that we have an advantage because it helps to read a Liskov branch from right to left. That's good. Actually, just recently, like, a week or 2 ago, I I've gotta write this in a blog post. But I think that it can help to think of a list comprehension or a comprehension in terms of SQL because a lot of people know SQL. If you think of, like, the and I've also started writing my comprehensions in 3 lines, breaking it up. So you've got the you've got the expression you get back, and then you've got the source that you're iterating over, and then you've got your if statement. And I said and and I realized that if you sort of make that analogous to SQL, it's like a select call. Right? You've got your select from some source where and you're filtering it out. And once I made that analogy for people, like, really, just in the last few weeks I sort of came up with this, that I think helped to solidify their understanding of the syntax. It's still a little weird for them, but at least it sort of became close to something they're familiar with. No. I I totally agree. I think that's actually quite brilliant because years years ago, I worked for,
[00:28:20] Unknown:
man, I I worked for a couple of years in the financial service industry, and my boss at the time was 1 of these brilliant SQL hackers just like, you know, he said, SQL is like go. You can learn the rules in 5 minutes, but it could take years years to really appreciate all the all the all the strategies involved. And he he actually taught me a way of of structuring SQL, you know, query statements in exactly the same format that you're kinda talking about, like, this really rigid format with the the select part of the clause up top and then, you know, from is in the next line and where is in the line after that. And this is really sort of, like, almost visual way of representing the syntax. Right? So as opposed to this big long globby thing, like, it kind of the the format that you use shows you what the code is trying to do by virtue of the way it's laid out. And it sounds like this way that you're talking about of of of laying out list comprehensions does the same thing.
[00:29:22] Unknown:
Yeah. Yeah. Oh, okay. Now I definitely have to write this up at some point. Yeah. You do because I wanna read it.
[00:29:29] Unknown:
Yeah. It's definitely a very interesting metaphor. It's, thinking about it, it's that you're very intuitive when you approach it in that manner. So, yeah, that's great. So another question we have is, how does teaching Python differ from teaching other languages? Are there different approaches that you would take for when you're teaching a Python course versus, say, a Ruby or a Pearl course?
[00:29:56] Unknown:
So first of all, like, the the Ruby and Python courses I teach, at least the language parts, like, it's not doing, you know, web stuff or something. Quite frankly, I just steal from each language. I I really see the languages as sort of similar enough to each other. Obviously, there are differences. Obviously, so so here for instance, when when I'm talking about Ruby, I have to talk about blocks. I have to talk basically about functional programming way earlier. So with my Python course, I basically say, listen folks, this section of functional programming on comprehensions and passing parameters, which are functions, like, this is the hardest part of the course. And if you don't get it, it's not you. And and you don't need it to be a Python programmer. But in Ruby, if you don't get blocks, you're sunk. Mhmm. So so that's 1 difference.
Trying to think what else. I think in Python, you could go way, way farther also without creating classes. Right? You don't need to create classes. You you don't need to create methods either. And so we can sort of I I spent the first day to day and a half of my Python courses just talking like we don't even create functions, we're just using the built in data structures and methods. And then we do functions. And then we talk about objects at the end. In part because I think it's really important that people get these basics down, in part because you can. Yep. But again, in Ruby, you sort of need to be mixing and matching a lot more to get the so so that people can get it. Because if you don't know what a class is in Ruby, once again, you're sort of
[00:31:18] Unknown:
sung. I totally agree. And I actually think I think that, that's kind of 1 of the the awkward bits around learning Ruby because I've certainly encountered quite a number of of introduction to Ruby, learning Ruby kind of books where they either show objects right upfront or they wait till the very very very very very end of the book. And and in Ruby's case at least, you get to the end of the book and you get to objects and you're like, why didn't you teach me that in chapter 1 because it would have made a whole lot of things. A whole lot clearer and and you know easier and, I can I can see what you mean though? Python kind of has different aspect to its soul and that you really don't need to use objects for a significant amount of like great procedural coding with some really, you know, deep, useful data structures, you really don't need to use objects unless the the problem domain really calls for it.
[00:32:14] Unknown:
Mhmm. Right. We don't even had some sort of blog post, I think about a year ago, maybe 2 or 3 years ago at this point, where he he was asked how do I make my Python programs faster? And my guess is he's asked this so often. They finally just got sick of it. He said, okay, folks. I'm gonna write down my notes. And 1 1 of the first things he wrote was don't use objects. Like just use the built in data structures. They're fast, they work, They're intuitive. They've been really highly refined and optimized over the years. And and why not? And that's something else people sort of need to shed. That if you're coming from, say, the Java or the c sharp world, you know, someone wants to write hello world, their first instinct is, oh, gotta write a class. And at the time that we saw, no, no, no, slow down. What problem are you trying to solve? And and what the analogy I often use is, like, you wanna have a a toolbox, and then pick the right tool out of the toolbox, not just pick the first thing that that comes to mind.
[00:33:09] Unknown:
Right. Absolutely. And then it also strikes me listening to you that, languages like closure as a for instance, which, you know, is enjoying quite a burst in popularity lately. It doesn't have objects either. And and, you know, people are just using the data structures that it pretty much provides and and using those as building blocks. And obviously, people are doing some pretty amazing, pretty complex things once again without objects. So it's just a matter of sort of breaking out of your usual mode of thought and embracing a different a completely different model for doing your work.
Actually, thank you. You you inspired a a pick that I hadn't thought of previously that I'll put in our pick section.
[00:33:49] Unknown:
Oh, good.
[00:33:52] Unknown:
So what sorts of materials or medium do you use for training people in Python?
[00:33:59] Unknown:
So, this has been going through a bit of an evolution over the years and I'm always looking for for new things. So I I'm a big emacs user. Right? I went to MIT, went through the brainwashing process. Back when I was there, like, back when I was there, even the secretaries used emacs. So, like, obviously, the students were gonna use it. And, you know, my my dotemacs file has been steadily growing over 20 plus years. Every so often I prune it. Every so often I say, really? What's this doing in here? But I just use that. And and I tell my students, you don't have to use emacs. Right? Like, there are some weird people who don't. So I'm Sickos. Sickos. That's what I call them. I actually tell my students they should use PyCharm just because they need something that's a little, shallower learning curve.
So I use emacs, and then I used to use just the regular old Python shell. And someone said to me, we weren't using IPython. I said, oh, yeah. I've heard of it. I'll try it. And of course I tried, I said, oh my God, this is so much better. But I could not use IPython notebook just because I do a a lot of my examples, a lot of my demos are with files. Oh, yeah. And then at some point don't know exactly when, but at some point the iPad notebook let you do files. I said, oh, wow. That's amazing. And so literally a month or 2 ago, I switched to doing all of my live coding demos, and I have a lot of them when I'm teaching. Because if people ask me a question, I want them also to get the feeling that if they have a question when they're working, they should turn to IPython, and they should try it. What happens if the only answer to that is, let me try? Not, oh, boy, I should look it up. Now looking it up is not bad, but but that's why you have this this beautiful sandbox of the interactive, you know, the REPL.
So I I've lately, over the last, I think, month or 2, I've been using a hyphen notebook. And then my my my standard thing at the end of each day is people send me email who are in my class, and I send them a zip file with all the exercises to this like, basically solutions that I've solved in front of them of the exercises, plus the slides in pdf, plus now I can send them the IPython notebook, and they can then replay everything that I demoed to them in the lecture. So IPython notebook has become, like, an essential part of my teaching as well. A third thing is the Python tutor. I don't know if you're familiar with the Python tutor site.
Pythontutor.com. Oh my god. It's amazing. It's ama I I forgot the name of the person who did it. It's beautiful and fantastic. The number of occasions at which someone says, yeah. But why so for instance, I I have an example I often use where I create a small list, you know, my list equals a, b, c. And then I create a larger list, like, big list equals my list, my list, my list. So now we have 4 names for the same list. And I show them that if you change index 0 0 of the big list, you're really changing the original my list as well. At this point, people's noses sort of wrinkle and they are kind of wondering what's going on. And I pulled the Python tutor which has a dynamic, dynamically generated graphical display of the innards of your Python program, and they can see the arrows, they can see the boxes, and it just becomes instantly clear.
[00:36:53] Unknown:
Wow. That's that's really that's really awesome. I I did not know about that and I will definitely plan some quality time to go play with that because as I said, there are definitely a few Python concepts that I could use some brushing up with and that sounds like a really useful tool. Thank you.
[00:37:09] Unknown:
Sure. Sure. I've I've come across it before, but, it's been a while since I've had call to use it. So definitely thank you for the reminder. So I understand that you recently wrote a book called practice make Python, if I'm correct. And I'm just wondering if that's something that you generally use as a follow-up reference for your trainings.
[00:37:32] Unknown:
So, it was basically suggested by my students. I think it was about a year ago, a little less than a year ago. Over the course of 2 weeks, after every class or during the breaks, people would say to me, okay, listen. We're taking a 4 day course. That's great. But there's always gonna be this gap between finishing the course and then wanting to use the information in our actual work. Where can we go to get exercises? I said, well, you know, there's Zed Shaw's learning Python the hard way. And they said, yeah. Yeah. We've done that. Okay. Next. I said, I don't know, but it sounds like a business opportunity.
So basically, I said what I asked them what would happen if I gave you a book or sold you a book with 50 exercises that would force you to really think in Python, and then you would have to work at it but it would probably give you some benefit? And they all said, oh my god. I would definitely get that. Now they're all liars because they didn't all get that. But I will hunt them down. But, basically, what I do is I I wrote up 50 of the exercises that I most like using in my courses either as demos or as exercises that I see give people that moment that they're forced to work. And sometimes the solution is as little as 1 or 2 lines.
But getting to those 1 or 2 lines is the magic and is where the learning really comes from. And so I I wrapped up the book. I guess I finished writing it about, I don't know, probably January or something, January or February. And I've been slowly, very slowly but surely making videos to accompany it for people who want that package. But that's just time consuming and I'm so busy with other things. It's taking way longer than I would like. But the the book is not a tutorial, because I I really think that there are enough tutorials out there in Python. The world doesn't need another tutorial. The world needs something for after you're done with the tutorial. And so what I call my book is it's like your second Python book, or it's the book to read after you've taken a course.
[00:39:23] Unknown:
That's really awesome because I I I'm definitely in that category of I've read some of the tutorials. I read, you know, dive into Python. And as I say, I've been using it at work now for 4 or 5 months. And and so I'm definitely past the intro phase, but I'm not really to the point where, like, you know, when you're in that kind of tentative stage where you're not quite comfortable with every aspect of it and it's not like it doesn't feel like that really well used tool that like, you know, just sort of, like, fits in your hand like it was meant to always be there. I'm not there yet and I think something like this book could be incredibly useful to get me there.
[00:40:00] Unknown:
Good. I hope so. And and I've been very fortunate also. A lot of people who have read it have, emailed me with corrections or suggestions or insights. And and I like that. And and and also when I'm teaching, like, from my perspective, what's what's most important both from my perspective as a teacher, but also for the learning process is the interactions. It's the asking questions, it's the wrestling with things, it's the talking it out talking it through. So, fortunately, in Israel people are not bashful, and they are more than happy to say that's stupid or that's a terrible idea or what do you think about this and really challenge me.
But I really think that that helps with the learning. And, so I've also been learning from the people who've written the book and sending me all suggestions. And so, if anyone out there gets, you know, gets the book and and has ideas, suggestions, improvements, that would be fantastic. I mean, I would say easily easily half or more, probably even 2 thirds of the exercises were either inspired by or improved on by students in my classes who gave me feedback and and really helped me to refine them.
[00:41:01] Unknown:
That's very cool. And speaking of getting the book, Reuben has very kindly offered a, discount code, which we'll be passing on to our listeners. You can find it in the show notes rather than us trying to say it and and having it come across garbled or anything. We'll just put a link to the book and the awesome discount code there for in case you wanna avail yourself of this resource. So, in your freelance work, what portion of your projects use Python?
[00:41:29] Unknown:
Interesting. You should say that. So so that's, of course, the question. So for years, actually, it was kind of embarrassing that I was doing most of my freelance work in Ruby and most of my training in Python. Obviously, I was using Python in multiple different ways, but it was sort of like this, you know, Bruce Wayne Batman kinda thing, I guess. I'm not sure which Python fits it to, so I'll let you guys figure out the analogy where. I've always had some clients who use Python, sometimes more, sometimes less. There have always been some people using it for whether it's database work or web stuff. And, certainly, I've always done some projects on my own with it. But truth be told, it's really only since I've started getting heavily into the training that I've been diving myself into Python and using it for more and more things and trying to find sort of the the corners of of different stuff. So, recently, I've been asked to do more and more training using NumPy, SciPy, big data types of things.
So there, I've started just sort of doing it on my own. But the number of actual paid projects I've done over the I actually, that's not true. In the last 5 years, the number of paid projects I've done in Python, I would guess is about 10%, 20% at most. There was a period maybe 10 years ago when all of it was in Python. I did some stuff on the web with XO. I did some stuff just with databases, with Postgres, with all sorts of analysis. So it sort of come comes and goes. And I I think this is 1 of those periods now where it's what's coming. Like, I I think it's safe to say that over the next year, probably, the overwhelming majority of my work will my project work will be in Python.
[00:42:57] Unknown:
You know, listen, as far as, you know, you mentioned you you're embarrassed to say whatever. Don't be. As far as I'm concerned, it's tool to task. Right? Like, I mean, if your clients are willing to pay you and they want Ruby, and that's the kind of work that you, you know, wanna be doing or need to be doing, then by all means, use Ruby. As far as I'm concerned, I love Python. I think it's a great language. I love Ruby. I think it's a great language, but they're just tools. Like, I think that this kind of, like, crazed partisanship is something that we can leave behind.
I think I think especially in the polyglot era that we're kind of entering, so many companies now are as much as, you know, some are standardizing a lot or kinda saying like, well, what is Python good for? Let's use it for that. What is, you know, Closure good for? Let's use it for that or whatever the case may be. And I think that's an attitude that we should all embrace. I I I agree. I wrote this blog post probably like a year or 2 ago where I I said,
[00:43:51] Unknown:
I I made the analogy that Ruby is Oscar and Python is Felix from the Oscar.
[00:43:58] Unknown:
That is totally apt.
[00:44:01] Unknown:
And and, you know, you can learn from both of them and you can join both of them and each of them has their quirks. But but the the the the, like, knowing both is really where the the the the interesting, things happen.
[00:44:15] Unknown:
So just wondering if you've seen a change in the demand for Python skills in the time between when you first started using it or using it professionally at least and most recently. Would it have been up, down, or both?
[00:44:29] Unknown:
Up, up, up, up, up. It's it's crazy. So, you know, back in the stone age, you know, 20 years ago when I started using Python you know, when I when I got to Israel, basically, and I said to people I do you know, at that point, it was mostly Pearl and Linux. People looked at me like I had, you know, fallen off from the moon. Like, Pearl, Linux, open source? What is this thing? Oh, yeah. It's that it's that thing that's not Windows. And the fact that only Windows and decent Hebrew support only made it harder for it to break in.
But over the years, I've seen a growing interest in Python, and then it was like this explosion about 5 years ago. It was just it's just unbelievable. There's now, as I said, insatiable demand that, I even had these guys. I gave a talk about Ruby, I guess, about 2 years ago. And there were 2 people who came there, and afterwards, they came up to me and they said, listen. We're not really interested in Ruby. We're really interested in Python, and we're hoping that someone who came to your talk who knows Ruby will be interested in learning Python and working for us because we can't find anyone. Like, the demand is so crazy. They were, like, poaching people from other languages.
And and I said, I I have bad news for you guys. The only thing rarer in Israel than a Python programmer is a Ruby programmer. So, good luck with that approach. But the the the demand is growing as I think the as I think for for a variety of reasons. First of all, companies are taking it seriously. They're realizing this is not a toy language. This is a serious language you can use to solve serious business problems. And and, I mean, what I have to tell people is in the sixties seventies, what we cared about with programming was that the darn thing worked. If it worked, we were delighted. In the eighties nineties, what we cared about was, did it work fast?
And nowadays, what we worry about is is it maintainable, and does it let my programmers achieve maximum velocity? And so, Python just hits the sweet spot on that, because nowadays people are expensive and computers are cheap. And so if I can get a 10 times or 5 times, even 2 times increase in my programmer productivity, but it means I have to spend 20% more on on servers, Who cares? Right? Like, that's totally worthwhile. And a lot of the companies, I think, have done the math and said, yeah. That's good for us. Why should we spend tons of money? A lot of people come to come from MATLAB. Right? I've been surprised by the number of people I teach you are MATLAB users. They're like, yeah. We're gonna use scipy and NumPy because it's free. And do you know how much it costs to get these libraries in MATLAB? I said, actually, I have no idea. They said, oh, they cost a lot per seat, per year.
So so the it's really it's astonishing. It's astonishing to see the number of companies, people, places that are interested in Python. And, really, I think it's just it's just
[00:47:13] Unknown:
growing. I bet. And it must be really exciting actually for those people moving to Python from MATLAB because MATLAB is an awesome tool. But with something like Python, you have this incredibly rich ecosystem of not only can you do your numerical analysis, but you can bring in, like, you know, statistics and data analysis with Panda or, like, you know, or or image processing with PIL or 1 of these other tools. And, I mean, you just have this amazing, you know, plethora of of tools to draw from and you don't have to think in terms of well, gee, if I wanna use this, I'm gonna have to pay another $5, 000 or I I have no concept as the amounts involved. Money just isn't an issue because most of them are free.
It's gotta be incredibly liberating for them.
[00:47:57] Unknown:
Right. Right. They no longer have to make decisions on do we have the budget to use this? It's is this is this the most appropriate tool? And people just like the language. They they they like it. They like its breadth. They like its depth. They like the community. And you see, I mean, in addition to for all the specific stuff, just today I had people in my class who, who are big users of R. Now I used R in my dissertation analysis. I love R. It's really great. And R's big claim to fame is that it does and it's a statistics language. It's a great language for that. And it has a huge sort of like, you know, PyPI has a huge number of packages. So r has a similar number of packages than what they call c, yeah, CRAN.
Lots of packages for doing statistical analysis. But I see little by little by little, people are contributing to Python, to scipy, numpy, and all those packages. And I think in a few years, we might see Python eating R's lunch in that sense. It can't yet because it doesn't have the same plethora of modules, but it's getting there for enough people. And then you're gonna have another bunch of people who who are just, like, you know, stoked to use Python and are contributing to the community also. It's it's almost a a matter of increasing returns.
[00:49:09] Unknown:
Yeah. I've heard anecdotally about a lot of people moving from R to Python, particularly when they want to productionize what they're what they've been working on. So they may use R for doing the research and development phase of a project, but when then when they actually need to handle larger volumes of data, they move it over to Python because my understanding is that when you start loading large datasets into r, it just really starts to slow down. So
[00:49:33] Unknown:
Yeah. That's not the reason my dissertation was so late, but I'm willing to blame that.
[00:49:41] Unknown:
That's great. So what kinds of projects might you encounter that would cause you to choose a different programming language from Python?
[00:49:51] Unknown:
Question. Well, first of all, there's just, like, the the fun and experimenting kind of thing. Right? Like, so I I really I I wanna try more closure and and play with that, especially it's software transactional memory, which I would not be surprised if it ends up in in Python at some point in the future, but obviously doesn't exist now, because it just seems like an incredibly cool concept, fun thing to play with. And, of course, it's Lisp, so it must be good. Look. If I were writing and and no 1 should ever trust me if I do write such a thing. Right? But if I were writing an system, if I were writing a desktop application, 1 of those things, where speed is really crucial, then I think, you know, I would I would choose a a real systems programming language. If I'm writing something that needed to scale massively or that really, really, really needed threads that were truly parallel and could not use processes, I would use something else.
I still because I've used Ruby and because I've used Rails and Sinatra for so many years, that's still sort of my first inclination of what to use for web stuff. So my website, for instance, runs in Sinatra. And, you know, it's totally great. It works fine for my purposes. If I were doing it from scratch today, would I use Flask maybe? Maybe. Maybe not. Who knows? But I would say for the the like, your average project like, here, for instance, here's a here's a, story. So I run I live in the city of Modi'in halfway between Tel Aviv and Jerusalem. And when I got to the city in 99, I started or I I guess I I sort of took over an email list for people who live here.
15, I guess, you know, 16 years later, we now have 3, 000 people on the email list. And it's, you know, a local forum. And I decided a few months ago that it was just not worth my while to run an email server of my own anymore. So I decided to move everyone to Google Groups. Well, Google Groups only lets you I asked people to move themselves. Half of them did that. So that left me with 1500 people to move. And Google Groups only lets you add a 100 people at a time manually each day. So I wrote I was like, well, how can I figure this out? I know. I'll use Python. I know. I'll use sets. And, like, in a few lines of code, basically, I was able to download the list from my old system, download list from Google Groups, turn each of those using a set comprehension into a set, do set 1 minus set 2, grab a 100 people, and there you go. Now I have a 100 people I'm gonna move today.
And and so it's those sorts of applications that are just so trivially easy to do in Python that I I find my like, that this is, like, clear that I would use it for. Yeah. Yeah. Yeah. But, like, system stuff, systems, embedded, web, still for me, I think I I would look at other languages first. But that might happen less and less over the coming years. I wouldn't be surprised, in fact.
[00:52:32] Unknown:
Right. I'm I'm glad you mentioned Closure. I I know I find that language particularly exciting as well, because of the software transactional memory aspect, especially when you start to realize that the way it handles data structures being atomic by default, like threading just becomes, you know, concurrency just becomes such a dramatically easier problem to reason about. I think that is a really cool concept and it isn't and that's gonna be 1 of my picks is 1 of his talks where he discusses some of the aspects of that. It's a really cool talk. Excellent. Excellent.
So let's, unless anybody has anything else, let's move on to the picks, shall we? Reuben, why don't you list your picks?
[00:53:10] Unknown:
Okay. So I'm going to mention a few things here. First of all, so I I run a few different in addition in my copious free time, right, to my training and my development work and book writing and whatnot. So I've got this site that I've been running for a few year a few years. A few months now. It's about 6 months called dailytechvideo. So it's dailytechvideo.com. And the idea is that every day, I find a really great conference talk or other video that explains something typically about software, typically about open source dynamic languages or databases or web stuff. Because, hey. What do you know? I'm interested in open source dynamic languages and databases and web stuff. And, I have a little intro, and I describe the talk. And that's been going on, as I said, for a while. And, so far, it's been getting some attention, and I'd be very curious to hear from people what they think and, if there are any talks that they're interested in. Certainly, there are plenty of Python talks in there, not surprisingly.
Number 2 oh, well, anyway, I'll I'll just move on to sort of other interesting picks. So I've been, among the places I go to do training is in China. I've been there, I guess, 6 times, 7 times in the last 3 years. I'm going twice more this year. And I just think it's super fun and super cool. I'm learning Chinese. I I just really, really enjoy traveling there. And so part of my obsession has been reading books about China and interesting analysis. And so a book that I read just recently, by Evan Osnos, who was the New Yorker's correspondent in China, it's called Age of Ambition, Chasing Fortune, Truth, and Faith in the New China. Brilliantly written, brilliantly recorded, fascinating book. Either if you do go to China or if you don't go to China, it's still worth reading about what is really going on there and how is the government trying to influence people, influence policy, and how are people sort of pushing back? And in what ways is it the way we would expect in the west and in what ways is it not? Peter Hessler also wrote some great books. He's another, good person who wrote about that. But I guess my final pick, it's only here once. Right? So I've gotta, like, give you the whole surveying. It's this book that came out a few a a few years ago, actually.
It's called mindless eating, why we why we eat more than we think. And it's this guy named Brian Wensink who is a professor of marketing at Cornell, and he has done some of the most brilliant psychology experiments I've ever heard of. Because basically what he does is he's trying to figure out what influences people to eat more or to eat less. So for instance, he'll go to a restaurant, but not just any restaurant, a test restaurant that's used by the restaurant school at Cornell. So it's designed for people to do experiments, usually experiments in management.
And half of the room will hear 1 type of music, and the other half of the room will hear another type of music. And then they measure how much does the music affect how much food you order, and it actually has an effect. Or how much will you spend? Or what happens if you have empty plates? And so on and so forth. And so I I just find, like, the the experiments were brilliantly designed, hilariously funny, and, very insightful to human behavior. And I think I've covered now the world and psychology and computer stuff, so there's really nothing else that else left to, to recommend. So the the the those are my picks.
[00:56:22] Unknown:
That last pick is is awesome, I have to say. I mean, with, you know, obesity being viewed as kind of a worldwide problem in the developed world at least, you know, it's it would be really interesting to see some of the insights as far as why people do what they do. Very cool. So, those are some great picks. I'll move along to my picks now. I usually have a beer pick because I like craft beer, better for worse. And, I just encountered a local beer or comparatively local. I live in the Boston area. And so this is from Spencer, Massachusetts Town closer, you know, more around Mr. County, where I grew up.
Spencer Trappist Ale, the Trappist monks there brew a really nice Belgian beer. And a lot of the time, I find that American breweries trying to do Belgian style beers, kinda with a few exceptions, fall flat in the face. Because the thing that makes Belgian beers kind of amazing is that they have this incredible sort of depth and fruitiness and and real complexity. Like, you know, it comes from the yeasts in those breweries being, you know, breeding in captivity for generation after generation, creating these just awesome flavors. And the trap is to kinda nailed it with this. It's it's 1 of my favorite domestic Belgian style ales and and I highly recommend it.
So as far as technical picks, as I mentioned, Reuben inspired me to recommend pick Rich Hickey's talk, the value of values. And, this was a keynote for, I think, either a closure or a JVM conference where he basically talks about how so many of our basically, all of our current programming languages were designed around this place based programming paradigm. You know, was a memory saving technique where you had this place. It was a variable and you permuted the state, of that of that value variable to make various things happen. But in the modern era where we have gigabytes of memory, there's kind of no point to that model anymore and there's a new model that can really change the way you think about solving problems and make your life dramatically easier. So I love that talk. I recommend it highly.
The next pick is a, a VIM plugin. My VIM is my editor of choice at least for now. I I like it quite a bit. I thought I liked you guys. Boy. Tobias uses emacs. You're all good. You have an emacs lover in our bit. And I used EMAX for years. I just I I got to the point where this shows how old I am. Back at the time, you know, we had old pre Intel Unix class workstations with very limited, you know, amounts of memory and disk allocated per user. And and I just got to the point where waiting for emacs to load was just like, I feel like I'm spending years of my life, which is really silly now because on our again, in our modern machines, there's absolutely no, like, emacs comes up like poof, you know, no problem at all. But I I hit by that point, I had switched to Vim and my my brain kind of works in Vim. But You Complete Me is a really neat editor for doing, auto completion, syntax based and otherwise.
And it it's it's, written in c plus plus which is kinda nice as opposed to some of the others which are written in higher level languages like Lua or or and the like. So it's pretty snappy and it it does the job. Building it and installing it is a bit of a pain but it's worth the it's worth the exercise to get there, at least in my limited experience. That's the correct 1. It's actually written in Python and the compilation step is actually just for the c plus plus c and c plus plus bindings for it. Oh, really? Oh, I didn't know that. Oh, very cool. Well, it's pretty snappy in any case. Thank you, Tobias.
E Tobias actually recommended this to me earlier, so I was kinda passing that along. And my last pick is, something because I'm mostly a Mac guy. I, you know, do most of my day to day work on Linux servers but I love having a Mac as my primary desktop environment. There's this awesome little tool called SizeUp that lets you sort of assign, it basically lets you manipulate, OSX Windows in any way you can possibly, you know, imagine flipping them from monitor to monitor, adjusting their size and position etcetera etcetera all with, you know, a keystroke.
And for me, I'm I'm partially blind and mice are like anatomy to me. Like, if I have to touch the mouse, my productivity takes a significant nosedive. So having a small tool like this, and it is commercial, but, you know, it costs some really small amount of money. I forget exactly what, is huge because I can really sort of, like, drive my environment like a Corvette as opposed to flailing around with the mouse like a really hapless person that I am. So, I think that's about it for pics for me. Tobias, how about yours?
[01:01:13] Unknown:
So harking back to the theme of practicing and using practice as a way to really learn a language, there's a really great web based environment called Check. Io that is, somewhat gamified way of performing a number of different practice problems. So it's got a nice really nice visual aspect to it, and there are different islands. And each island has a different sort of a theme to it. And each of the problems has a little bit of a story blurb to go with it that presents the particular problem that you're trying to solve using Python. And 1 of the things that really makes it great is that once you've submitted a solution, you can put it up for review, and other people in the community can post reviews on your code to either, you know, congratulate you on a job well done or to give you tips on different ways that you could achieve the same result, and you can also look at other people's submissions so that you can learn that way. You know, you're all solving the same problem and you can get an idea as to the different ways people are approaching it, so it's really interesting.
Guido actually occasionally hops in and provides some reviews of people's codes. So
[01:02:25] Unknown:
Oh my god. That sounds terrifying.
[01:02:30] Unknown:
So, yeah, it's a cool little tool. I haven't had as much time to use it recently as I would like, but definitely worth a look, particularly for people who are looking for a way to get some practice in the language, but don't necessarily have a project that they're working on with it. My next pick is I guess you could kind of call it a toy, but it's something called snap circuits. And what it is is a way to introduce people to the world of electronics. So rather than having to have a soldering gun and a bunch of spools of wire to build different circuits, it uses snaps just like you would find on your clothing, and it's got a grid based board that the different components snap onto, and then they snap to each other to form the actual circuit. So it has batteries, and then it'll have photoresistors, regular resistors, DC motors, and all kinds of different components. And 1 of the things that's really great about it is that you can actually start with a really small base kits to get a feel of something that'll work for you or your kids. I actually got it for my my older son.
And then they have expansion kits. So you can rather than having to go out and buy the big kit all in 1, spend the extra money, you can actually just get an expansion kit that'll turn your small kit into the bigger 1. So it's a really great idea, really great execution, and it also comes with a project booklet of different circuits that you can use and teaches you about why it works the way it does. For my next pick, I recently got a new Android tablet, and I spent a little spent a little while researching it, trying to figure out which 1 to get. I ended up going for the Nvidia Shield tablet. So it's marketed as a gaming tablet, but I don't use it as such.
It's just a really powerful, really great tablet, 8 inch. It comes with a built in stylus, which is really useful for taking down quick notes where I would otherwise pull out a notepad and a pen. It's powerful. It's got 2 gigs of RAM and, some crazy number of cores with a NVIDIA GPU built into it. It's got a great screen. And for and for all that, it's actually really affordable price. And then the other pick that I'm gonna choose is the Samsung Go mic, which is what I actually have been using to record these episodes. It's really nice, well designed microphone, very small and compact, easy to transport.
And 1 of the really nice things is that if you get 1 of the USB on the go adapters, you can actually plug the microphone into your tablet and have a portable recording studio. And my last pick, we recently signed up for, something called Zoho Apps, which is sort of a competitor to Google Apps, but it has a free tier as well as number of paid tiers and has a really pretty impressive suite of different products that you can use along with it. Most recently, I was poking around and found out that they actually have a password vault that you can use for sharing credentials between different people in an organization. It has mail, docs, calendar, and overall, it seems to be really well executed.
[01:05:41] Unknown:
So Yeah. I'm I'm pretty impressed with that 1 as well actually. Tobias prodded me into hit switching to it from from the goog for our show notes and, for, you know, our internal documents and the like. And I'm pretty impressed thus far. It's pretty it's pretty well put together.
[01:05:58] Unknown:
Alright. So, Reuben, we wanna thank you very much for taking the time to join us and speak with us today. And for anybody who would like to follow you or find out more about what you're up to, what would be the best way to find you or contact you?
[01:06:14] Unknown:
So my website learner.c0.il. From there, you can get to my blog, log.learner.c0.il, strangely enough. I'm on Twitter as atruvinmlerner. And so basically, everything I do sort of publicly, whether it's webinars, books, announcements, blog posts, either my blog or my Twitter feed or both, well, we'll have them. And I'd be delighted to hear from people, email, Twitter, you name it. I'm always delighted to hear from people who have questions or comments or just wanna get in touch and say hi.
[01:06:47] Unknown:
Great.
[01:06:49] Unknown:
Yes. Thank you very much for for for, taking the time to talk to us, Ruben. It's been it's been really great. My pleasure. Thanks so much for having me on, and good luck, with the podcast. I know it's relatively new, but hopefully, it'll be a big success.
[01:07:01] Unknown:
Thank you. We're hoping so as well.
Hello, and welcome to another episode of podcast.init. We are recording today on April 21, 2015. We have Tobias Macy and Chris Patti as your hosts. And today we're interviewing Reuben Lerner.
[00:00:29] Unknown:
So, Reuben, why don't you introduce yourself?
[00:00:32] Unknown:
Sure. So my name is Reuben. I've been a software developer now for, I guess, more than 20 years. Over the last few years, I've been doing, I would say, less and less project and development work and more and more training to such a degree that now I would say a good 90% of my work is doing training, and a huge proportion of that training is in Python. But, like, aside that, I grew up, as you can hear, in the US. I went to high school and college there. I lived in Israel though, halfway between Tel Aviv and Jerusalem and a city called Modim, since 99.
[00:01:08] Unknown:
That's very cool. Israel seems, from everything that I've heard, like a really neat place to live. It's such an interesting confluence of of cultures, and, obviously, it's in a really sort of interesting for better or for worse region. What brought you there? How did you end up deciding to move there?
[00:01:26] Unknown:
Sure. I'm I'm happy to talk about it. How long do we have? But, look, I I would I would say, to sort of put it in a nutshell, it's this way. I went to Jewish schools and Jewish camps, and the basic sort of history lesson that we got there was Jews that wanted to live in Israel over 2000 years, Wouldn't it be great if we could go back? And I sort of looked around and said, actually, guys, we can. We have a country again. You you might not have noticed. And and and the fact that, as someone in the high-tech world, I could make a decent living here just made it a a more compelling case. So I came here. My plan was basically to come to Israel as soon after college as possible. And about 2 and a half years after graduating, I paid off my loans.
And through a lot of frugal living, I moved to Israel. And, I must say I've been very, very pleased here on all fronts. I mean, it's I'm not gonna claim that there are no problems in Israel, but I feel like, far from it. But I feel like these are the sort of the sorts of problems that I wanna wrestle with on a sort of personal national basis. And, we lived in Chicago for 4 years while I was doing my PhD coursework at Northwestern. And, much as I enjoyed Chicago I really enjoyed Chicago. Much under I I enjoyed living back in the US for a little while, That only cemented my my feelings that the US is a nice place. It's not here. But, but I actually am very comfortable with my decision to move to Israel.
[00:02:49] Unknown:
Very cool.
[00:02:51] Unknown:
So how did you get introduced to Python? What when did you first come across it, and what made you wanna stick with it?
[00:02:59] Unknown:
I'm not I know I've been thinking about this actually. I'm not a 100% sure when it was. So I'll I'll give you a little background. So I I went to MIT undergrad and, you have to do an undergraduate thesis when you're there. And I did something, this was just before the web started, my undergrad thesis was this new idea that you can have 1 program that spoke many different protocols. And it really barely kind of worked, but that's okay. It was an undergrad thesis. But in order to get that going, I went to a local bookstore, and I bought 2 books. 1 was on Sed and Auk, and the other was on Pearl.
And so I was sort of really getting into Perl and I did all sorts of stuff with Perl. And I knew at that point, this was in the early nineties, there was a lot of rivalry between the pro world and the Python world. And it just sort of, out of necessity and out of interest, I started learning about Python as well. And I still sort of saw myself as more of a pearl guy and then sort of pearl committed suicide, and so I said, well, you know, Python is actually doing pretty great. Maybe I can do some stuff there. And so it's probably been a good, certainly more than 15 years. I I would say it's about 20 years at this point that I've been using Python on a regular basis.
Sometimes more regular than others. So there was a period where I did tons of work in Python. There's a period of work where a period of time where I did tons of work in Ruby. I would say over the last, yeah, 5, 6 years that I've been getting more and more into doing training, the demand for Python training has been so extensive that many of the people who know me for doing Ruby are sort of surprised at how strong I am in Python. But I I see, actually, the community and the language and the the business opportunities, quite frankly, just growing and growing in Python, which is not as true for Ruby, I'd say, for now.
[00:04:41] Unknown:
Yeah. I I definitely agree, actually. I think I think that while Ruby is thriving in its niches in terms of Ruby on Rails and, and also in infrastructure as code with Chef, I think Python is is definitely gaining ground in terms of it's being used in so many more diverse contexts like in the sciences and, you know, and and obviously, there's there's web quite a bit of web programming being done with it, but also it's also doing infrastructure as code with Ansible and Salt. And, you know, it's being embedded into a 1, 000 different projects. And and and people are just recognizing that it's a really sort of good general purpose language that's easy to learn and and has a great deal of depth for you to grow into as you as you learn it more fully. So I I definitely agree.
[00:05:28] Unknown:
Absolutely. I'll I'll I'll say along those lines, by the way, that when I started doing training in Python, teaching classes, I was convinced that all of my students would be web people. So I was like, well that's what I do with it, right? So that's what everyone must be doing with it. And I could not have been further from the the truth. The overwhelming majority of people who are doing the were in my training are in, you know, automation, they're in testing, they're in big data analysis. All sorts of fields which, as you said now, are just growing and growing in the Python space, and are helping the language to really extend its tentacles, for lack of a better term, into all sorts of new areas that that I never would have imagined. And quite frankly, that I never really learned about before before, I was forced to teach it and deal with these people.
[00:06:13] Unknown:
Right. That's great. It and that kind of dovetails with our next question. How did you break into the field of providing Python trainings? How did you sort of get your start and make an make a name for yourself and and, have people beating down your door?
[00:06:27] Unknown:
Yeah. It's it's it's kind of wild. So I've been doing training so so basically, so I moved to Israel in 95, so it's 20 years ago. And I already had consulting work from my previous employer in the US, Time Warner. And we had a fantastic relationship. I still have a good relationship with many of the people I knew from there. And so I arrived doing Perl and Linux, and I was doing all sorts of stuff in those those fields. And people said to me, well, it's nice that you're doing the development. Would you mind giving us some training in this? And so I had my toes in the training water for a while, and and I did a little Python training as well here and there, but not that much. But the real Python training tsunami happened probably about 6 years ago.
I was still working on my dissertation. I really didn't wanna have to deal with the training marketing. And I figured if I hitched my my wagon to a a bigger horse as it were, hard to a bigger wagon, I don't know what the metaphor is. And then even then maybe I could, maybe I could finish my dissertation faster and reach some new clients. And so I I spoke with a company called John Bryce, which is sort of the 900 pound gorilla of training in Israel. And I sent and and I said I'd like to do Ruby on Rails training. And they said, yeah, you know, this Ruby thing, it's kind of a flash in the pan. We don't think there's really room for training in it, but send us your resume. And within hours, they called me and they said, oh my god. You know how to do Python.
We must have to do Python training. And since then, I've been doing between 2 and 3 courses a month, almost nonstop. And right now, we're recording this late April, and I'm almost solidly booked through the end of December with training. It's just Wow. Nuts. It it's and I love it. I really it energizes me, like, I mean, today. So I slept 4 hours last night because I was trying to get an article done for Linux Journal. I talked for 8 hours today, came home, finished the article, just did our podcast, talking to you guys, and I'm a zombie. No. No. And and when truth be told, when I'm training, it gives me such energy. I love it. I love the questions people have. I love interacting with them. I love seeing those moments or oh my god moments. Like, you can do all that in 1 or 2 lines? And of course, the point in Python is, yes, you can, and you can read it 6 months later, which was not not necessarily true for Perl or I would say even sometimes for Ruby. Right. So so training was sort of a offshoot of my inter interactions with John Bryce. And recently, I decided to sort of now that I finished the dissertation, finished the PhD, I've returned to doing training on my own through my own company directly, and that has just increased the demand even more, much to my pleasant surprise.
[00:08:56] Unknown:
Great. Yeah. It's interesting to hear from the perspective of somebody providing training how much of a demand there really is for Python because, you know, you see all these different reports that come out about the comparative popularity of various various programming languages, and they all can be taken with a bit of a grain of salt. But having that type of perspective on which languages are actually in demand on by larger companies is really interesting, particularly since you're saying how a number of them were really terribly interested in Ruby on Rails, but they they really wanna learn about Python. So good to hear. Oh, for sure. So and I'll tell you.
[00:09:33] Unknown:
First of all, I I think someone in each of these big multinational companies and, I mean, companies I train for, like, I I do training in Cisco, HP, VMware, you know, EMC. These big big kind of Zendesk. These big companies where someone I think at the top basically said, we have to do some standardization. We have to choose a a smaller subset of languages to work with. And Python is good for a lot of people, and so let's just run with it. And so everything from internal web apps to big data to to, testing and everything, they're doing a lot of standardization on Python. And not only are they doing this in a lot of companies, but these kind of the demand is almost insatiable. It turns out that when I'm, say, at Cisco giving training, I'll often meet someone else, You know, new person, I'll say, oh, what are you doing here? Oh, I'm giving Python training.
Like, we're both there on the same day and then then this is really, the demand is almost insatiable. And I would say it's gonna grow before it shrinks in part because such a huge number of universities are now teaching Python as an intro language. Yep. And you know that some ridiculously large proportion of those students are gonna finish school, you know, graduate from college, go off and do startups, and what language are they gonna use? Well, clearly, it's gonna be Python because that's the 1 they know best. Yep. And so we're gonna see another 5 to 10 years, I think, of this, at least.
[00:10:48] Unknown:
And unlike list for scheme, which used to be the kind of de facto standard for intro courses in in at least the the big hardcore CS schools or Java, I guess. I should Java, you know, certainly had commercial use, but lists for a scheme was really kind of, you know certainly, there have been successful commercial enterprises conducted with it, but it's not exactly what you consider a mainstream language. And I and I just wanna say 1 thing about that those language popularity polls that we see. So many times when you actually look at what metric those polls use for, like, how they determine which language is most popular, it's something really stupid and flawed, quite honestly. Like, it's like number of lines committed to GitHub project over the last 6 months. And I mean, you know, like, that's that's That's a win.
Exactly. Exactly. Like, that's certainly or these days JavaScript. That certainly represents a certain subset of the of the computing populace, but by no means is it, like, comprehensively
[00:11:46] Unknown:
showing what language are actually most popular in use out in the world. Well, it's it's it's funny, by the way, that you mentioned Lisp and Scheme. So, like, as I said, I went to MIT, and so I was brainwashed into believing that Lisp is the best language ever, and I continue to believe that. And it actually sort of hurt me inside a bit, when they said they were moving away from Scheme toward Python. And the argument they used was basically the intro course has changed because computing has changed, and what we wanna teach our students has changed. And we can get those ideas across better with Python than with Lisp. I'm not a 100% sure that I agree with that because I really do think there are many things I learned both in that course and from Lisp in general that have been so useful. I didn't recognize at the time, of course. At the age of 18, you don't recognize anything. But Right. Years later, I'm like, wow.
That was such a useful insight that has carried me through, and I use some of those things in my teaching even now nowadays. So I still think people should learn Lisp, but it is pretty great that they can indeed use a practical language that has theoretical depth in an intro CS course.
[00:12:49] Unknown:
So out of curiosity, when you're performing these Python trainings to these big companies, is there a particular language that most of the most of your students are coming from, or is it just sort of a mishmash of various languages languages that they've all used before?
[00:13:05] Unknown:
Well, look. Most of my training is in Israel, and Israel has a very strong dotnetmicrosoftfocus. And a lot of companies I deal with are hardware companies, which means they have a c and a c plus plus focus. And so the sort of more, I don't know, high level programmers among them are the people who've been doing Java, or I guess like c sharp. So it's rare. It happens, I would say maybe 10%, 20% of my students have a background in Ruby, JavaScript, you know, some some sort of high level, language that that I think gives them a closer insight into how Python works. So for a lot of them, this whole idea, like, I I always have to tell them that you're learning not just the language, but the approach. That there's no such thing here as a compiler. Yep. So you can't just write the file, throw it at the compiler, and hope that your errors will be found. You actually you actually have to think of it and you have to run it, and you have to work with the interactive shell with with IPython so that you can test your things and do it iteratively.
Yep.
[00:14:05] Unknown:
Yeah. It's definitely very much diff 2 different things of learning a language and what it is and what the semantics are versus how learning how to use the language in in in an idiomatic manner. So
[00:14:20] Unknown:
Right. And I would say that over the years, I've been learning what the idioms are that surprise people or that are most useful to them, and I've tried more and more to gear my training in that direction. For instance, I used to almost never talk about scope. It's like scoping in Python, it's so obvious, until I discovered it's not. It's not to people who are not used to it. And so now I have a long section where I talk about scoping with people, and I explain to them different kinds of variables and l e g b, and how this works, and the sort of fun tricks you can play with that as well. And and I think that those insights, maybe they're not gonna be redefining true to false and false to true in their day to day work.
I certainly hope not. Although, I do suggest that they do it to someone they don't like when they go to get a cup of coffee. But but, you know, understanding l e g b can really give you deep insights into how the language works and what's going wrong when you're trying something.
[00:15:15] Unknown:
Right. I'm I'm sure. And and speaking to your your point about, what's idiomatic, in different languages, that was I mean, I was a Ruby guy for years years years. I I've only been kind of a a Python convert. Although, I still love Ruby for the last, you know, I don't know, 4, 5 months or so. And that was 1 of the most challenging aspects of learning Python for me is so many of the concepts are very similar, but the idioms are so different. And in in kind of if you're coming from a different environment, you're used to different things unintuitive ways like the, you know, no implicit return thing. I know it's a small thing and most Python Pythonistas are like, well, why would you do it any other way? But when you use the Ruby where implicit return happens, it it it can, you know, lead to some hair pulling and, like, why won't it just work moments until
[00:16:06] Unknown:
yeah. That that actually, I must say, that drives me totally bonkers. And maybe it's just my, like, you know, Lisp, Ruby, even Pearl, Persona coming out. But, like, come on. Can't we just have implicit return? And I understand, no, everything has to be explicit. But, but I I really actually do miss that. And they're very I mean, also the whole thing where when you do assignments, like, or or I would say even, like, you know, you're sorting a list where it returns none. Like, I love getting things back and then being able to chain them. And, yes, we we have sorted and so forth, but I don't know. That's behavior that I just sort of shrug my shoulders at and say, well and I tell my class and I say, well, they never called me to ask what I thought. So
[00:16:50] Unknown:
that's the that's the both the the blessing and the curse of having a benevolent dictator for life. Right? As unfortunately, everybody has an opinion, but his is the only 1 that really matters.
[00:16:59] Unknown:
Yes. Precisely.
[00:17:02] Unknown:
So what are some of the biggest obstacles that people encounter speaking of idioms and and idiomatic, code? What are some of the biggest obstacles that people encounter when they're learning Python? Oh,
[00:17:15] Unknown:
So first of all, the whole dynamic typing thing, I think, really takes them by surprise and and sort of gives them the chills. You know? So, like, just, I guess yesterday, I was doing yesterday and today, I gave the 1st day of an intro Python course to to a company here in Israel. And both days, I think because people were coming from these statically compiled languages, both days people I I have I have this, 1 1 of my 1 of the exercises I give them is just sort of a number guessing game. So get raw input from user, and we're almost always using Python 2, 27. And so, you know, raw input, get a string, and now compare with the randomly generated number with, from the random module.
And I do this on purpose because I know they're gonna get tripped up, and they're gonna remember the hard way that raw input always returns a string. And so someone said to myself, why don't we just declare the variable to be an integer, and then automatically raw input, when it's assigned to that to that variable, it'll become an integer. I was like, no, no, no. That's not the way it works. You can't have a variable that's a certain type. And so the fact that variables aren't type, the fact that parameters, which are variables aren't type, just gives them the willies. Similarly, I think oh, you know what's what's hard for them also? The whole splat argument thing. That and and keyword arguments. Yep. They think it's super cool
[00:18:31] Unknown:
and they cannot wrap their heads around it. Either it's hard for them or they don't they don't know why they would want it. I'll totally admit that I totally love it. I think it's a great feature, but I have to admit that I find it hard to wrap head around sometimes. And whenever I see it in code, I have to be like, what what's this doing again? What what you know, so it it's definitely I can definitely appreciate that it's 1 of those I mean, and for you, for someone who comes from a language like Lisp, it's like, well, of course, you have dynamic arguments. Like, why? Why would you wanna do it any other way? So it's it's a great feature but it can be it can when you first encounter it or even after you first encounter it, it it it can feel kind of alien.
[00:19:13] Unknown:
Yeah. It definitely took a little while for that to sink in for me when I first started using Python.
[00:19:18] Unknown:
Mhmm. Mhmm.
[00:19:20] Unknown:
Yeah. And so, I mean, 1 of the exercises that I give is, to have an XML generator, in a function. And so I say, like, you know, so the the tag name should be the first parameter, and the content should be the second parameter, and then you can take any number of keyword arguments, and those are turned into attributes inside the opening tag. And that usually confuses them because they say, wait a second, where am I supposed to use the splat? Right? Where am I supposed to get any number of arguments? It takes them a while to realize, well, first of all, just because you've learned about a tool doesn't mean you have to use it. But second of all, in that particular case, getting a default argument is typically more appropriate and more useful than having the splat there, you know, splat arks. Yep. But the keyword, you know, keyword arguments, well, that's just super handy. And then you can have this API that looks nice and does something spiffy behind the scenes.
What's another what are other things that drive them nuts? Oh, I know. The fact that objects are totally exposed and open. Right? Right? Like so I even go I even go through the motions of, okay, here's our person object, let's create a getter and a setter. Then I'm like, no. Do not use these. Erase these getters and setters, we don't need them. And people will say, but but but but but we're supposed to have, you know, our objects are supposed to be black boxes. And I say, well, not really in Python. Yep. But, but, but, but, but, but, what if we want to have programmatic access or change the API over time, evolve it? Wouldn't that be better to have a getter or setter? I say, well, actually the way Python approaches this is a property. Typically my intro classes don't even get to properties. It depends on how, sort of, how the class is structured, but usually not. But I say, like, Python does have answers to these things, but they're different than the answers that you're used to. And just because the object system doesn't work or just because the approach isn't what you're used to, it doesn't make it wrong. It just makes it different, and it's a different set of trade offs.
[00:21:05] Unknown:
That's that's really interesting you say that. Properties are 1 of the things that I I kind of, like, you know, as I said, as I admitted already, I'm kind of a Python noob still. I've been using it for a few months and I I can certainly, you know, tootle along and write my code day to day and it but there are various aspects of it that I haven't quite wrapped my head around yet. And and that leads me to wonder, you know, many languages like there's almost nothing new under the sun in computer science. Right? Like, every language can trace various of its features back to some lineage of somewhere else. Where does Python's object system come from? Like, will that that aspect of properties and objects working differently than you would see.
Where do you think it it drew its object oriented inspiration from?
[00:21:49] Unknown:
Well, interesting you say that, because I've always said and thought, and I think it's even true, that a lot of the Python object system came, from, Smalltalk. So you can I mean I mean, so, you know, you you came from Ruby? You've spent some time in Ruby. Like, truth be told, if I have to teach Ruby and I have to teach Python, I often will come up with a new exercise in 1 language and use it in the other because the languages are, under the surface, very similar in some ways. And the object system is very similar in some ways, except Python somewhere said no, no, no. Instead of doing everything through messages, everything through methods, we're gonna turn that around, and we're gonna make everything look like data access. And so, like, properties are basically the inverse of Ruby's attributes.
Where Ruby attributes, we make data look like methods. Right? And and Right. In Python we make our methods look like data. And I've got to assume that it was Guido or someone else or maybe 1 of the languages that he learned. He just really liked that approach. And it definitely is a bit of a bastardization or, like, a real revolution from what small talk did. And and I don't know. I don't know. It's it's it's an interesting approach. There's sometimes when I sort of roll my eyes and say really? We have to do it this way? But the whole object system I mean, basically, if you understand how attributes work, then you understand the hold on object system and inheritance, for instance, just comes straight out of that.
You know, there's no special rule for inheritance. It's just, an extension of or a special case of attribute lookup. And that, I think, is really elegant. But where did it come from exactly?
[00:23:30] Unknown:
I don't know. That's a good question. I'd love to find out. Yeah. Maybe 1 of our listeners can tell us if there's gotta be some language history buffs out there who can who can school us on this.
[00:23:41] Unknown:
Oh, I'm sure. Yes. I'm sure another thing that people, particularly coming from things like c plus plus or Java, have trouble with is the lack of protected and private methods in Python.
[00:23:54] Unknown:
Oh my god. They go nuts over that. Right? Right. I I I mean, right. Right. Because they they sort of wonder, how is this possible? How could this language I mean, so it has dynamic typing. Everything is open. Nothing is private or protected. And especially, like, many of the people whom I teach, are in the security industry. And to them, this whole notion of, well, we're just gonna be really optimistic and nice and friendly, and everything will work great. And they say, are you kidding me? That's like, yo, and does that include everything we do professionally? Yep. And I say well maybe, but it's worked pretty well for 2 decades, you know? Right.
[00:24:32] Unknown:
And interestingly too, Python is actually quite popular in the security industry as well.
[00:24:37] Unknown:
Right. So I I don't know. I don't know. It's it's very, I I I can't explain it. I mean, I do tell them that if you really want I mean, there's always a way around it. But if you really want sort of extra security or pretend that things are private or protected, you can always, you know, you can always use something like a descriptor. Mhmm. But truth be told, how many people are gonna do that? Almost none. I don't know how I don't I mean, I'm sure we're gonna hear from people now. Right? But, like, how often do people really use descriptors after all? They're super cool, but Yep. I I think I think it's, you know, maybe 5% of the population. And that 5% might need it. Yep. But I think it's a it's a relative rarity.
[00:25:18] Unknown:
Once again, I think it comes down to just having to think about different ways of structuring your systems and your code, right, around this new model, this new way of working. I'm sure it's just a matter of getting people to change their mind about things is is the hard part.
[00:25:34] Unknown:
Yes. Yes. Oh, here's another thing that that that people are surprised by, and sort of intrigued by, which is, of course, comprehensions. List comprehensions, set comprehensions, and dictionary comprehensions, where they see it as almost like black magic. And, you know, they see so I give lots of examples of what we can do. We usually, depending on the length of the course, the type of the course, we then practice it to some degree or another. But I know that people don't get it. Like, they don't see the sort of, okay. I have a problem. A comprehension is my solution, and this is what I'm gonna get back. I think part of it is just sort of years of training where if you work with functional languages or, you know, if if you use these sorts of tools like map and and, you know, reduce filter for years, then you just sort of see those as solutions to a huge variety of problems.
But for a lot of people, all they see is this wacky syntax, and and they're not quite sure what they're doing or how they're getting it, but they're getting results back that don't quite make sense.
[00:26:32] Unknown:
Yeah. I was gonna say that for me, list comprehensions and dig like, comprehensions in general are 1 of the Python features that I find myself struggling with. Not because I can't understand them when someone else uses them and I see them in source code and I say, comprehension, it does this and thus. But because the the syntax is so alien to me that when I find I need to do something and I'll, you know, hit a code review and they'll say, well, gee, a comprehension could do this a lot more cleanly and elegantly. And it's like, oh, yeah. I just I never would have thought of that because it's just this for me, in my, you know, really limited way of thinking, it's just this bizarro world thing off in a corner somewhere that I haven't quite embraced yet. And I can only imagine other newbies have a similar challenge with them.
[00:27:17] Unknown:
Yeah. Yeah. Sure. I I often tell my students in Israel that we have an advantage because it helps to read a Liskov branch from right to left. That's good. Actually, just recently, like, a week or 2 ago, I I've gotta write this in a blog post. But I think that it can help to think of a list comprehension or a comprehension in terms of SQL because a lot of people know SQL. If you think of, like, the and I've also started writing my comprehensions in 3 lines, breaking it up. So you've got the you've got the expression you get back, and then you've got the source that you're iterating over, and then you've got your if statement. And I said and and I realized that if you sort of make that analogous to SQL, it's like a select call. Right? You've got your select from some source where and you're filtering it out. And once I made that analogy for people, like, really, just in the last few weeks I sort of came up with this, that I think helped to solidify their understanding of the syntax. It's still a little weird for them, but at least it sort of became close to something they're familiar with. No. I I totally agree. I think that's actually quite brilliant because years years ago, I worked for,
[00:28:20] Unknown:
man, I I worked for a couple of years in the financial service industry, and my boss at the time was 1 of these brilliant SQL hackers just like, you know, he said, SQL is like go. You can learn the rules in 5 minutes, but it could take years years to really appreciate all the all the all the strategies involved. And he he actually taught me a way of of structuring SQL, you know, query statements in exactly the same format that you're kinda talking about, like, this really rigid format with the the select part of the clause up top and then, you know, from is in the next line and where is in the line after that. And this is really sort of, like, almost visual way of representing the syntax. Right? So as opposed to this big long globby thing, like, it kind of the the format that you use shows you what the code is trying to do by virtue of the way it's laid out. And it sounds like this way that you're talking about of of of laying out list comprehensions does the same thing.
[00:29:22] Unknown:
Yeah. Yeah. Oh, okay. Now I definitely have to write this up at some point. Yeah. You do because I wanna read it.
[00:29:29] Unknown:
Yeah. It's definitely a very interesting metaphor. It's, thinking about it, it's that you're very intuitive when you approach it in that manner. So, yeah, that's great. So another question we have is, how does teaching Python differ from teaching other languages? Are there different approaches that you would take for when you're teaching a Python course versus, say, a Ruby or a Pearl course?
[00:29:56] Unknown:
So first of all, like, the the Ruby and Python courses I teach, at least the language parts, like, it's not doing, you know, web stuff or something. Quite frankly, I just steal from each language. I I really see the languages as sort of similar enough to each other. Obviously, there are differences. Obviously, so so here for instance, when when I'm talking about Ruby, I have to talk about blocks. I have to talk basically about functional programming way earlier. So with my Python course, I basically say, listen folks, this section of functional programming on comprehensions and passing parameters, which are functions, like, this is the hardest part of the course. And if you don't get it, it's not you. And and you don't need it to be a Python programmer. But in Ruby, if you don't get blocks, you're sunk. Mhmm. So so that's 1 difference.
Trying to think what else. I think in Python, you could go way, way farther also without creating classes. Right? You don't need to create classes. You you don't need to create methods either. And so we can sort of I I spent the first day to day and a half of my Python courses just talking like we don't even create functions, we're just using the built in data structures and methods. And then we do functions. And then we talk about objects at the end. In part because I think it's really important that people get these basics down, in part because you can. Yep. But again, in Ruby, you sort of need to be mixing and matching a lot more to get the so so that people can get it. Because if you don't know what a class is in Ruby, once again, you're sort of
[00:31:18] Unknown:
sung. I totally agree. And I actually think I think that, that's kind of 1 of the the awkward bits around learning Ruby because I've certainly encountered quite a number of of introduction to Ruby, learning Ruby kind of books where they either show objects right upfront or they wait till the very very very very very end of the book. And and in Ruby's case at least, you get to the end of the book and you get to objects and you're like, why didn't you teach me that in chapter 1 because it would have made a whole lot of things. A whole lot clearer and and you know easier and, I can I can see what you mean though? Python kind of has different aspect to its soul and that you really don't need to use objects for a significant amount of like great procedural coding with some really, you know, deep, useful data structures, you really don't need to use objects unless the the problem domain really calls for it.
[00:32:14] Unknown:
Mhmm. Right. We don't even had some sort of blog post, I think about a year ago, maybe 2 or 3 years ago at this point, where he he was asked how do I make my Python programs faster? And my guess is he's asked this so often. They finally just got sick of it. He said, okay, folks. I'm gonna write down my notes. And 1 1 of the first things he wrote was don't use objects. Like just use the built in data structures. They're fast, they work, They're intuitive. They've been really highly refined and optimized over the years. And and why not? And that's something else people sort of need to shed. That if you're coming from, say, the Java or the c sharp world, you know, someone wants to write hello world, their first instinct is, oh, gotta write a class. And at the time that we saw, no, no, no, slow down. What problem are you trying to solve? And and what the analogy I often use is, like, you wanna have a a toolbox, and then pick the right tool out of the toolbox, not just pick the first thing that that comes to mind.
[00:33:09] Unknown:
Right. Absolutely. And then it also strikes me listening to you that, languages like closure as a for instance, which, you know, is enjoying quite a burst in popularity lately. It doesn't have objects either. And and, you know, people are just using the data structures that it pretty much provides and and using those as building blocks. And obviously, people are doing some pretty amazing, pretty complex things once again without objects. So it's just a matter of sort of breaking out of your usual mode of thought and embracing a different a completely different model for doing your work.
Actually, thank you. You you inspired a a pick that I hadn't thought of previously that I'll put in our pick section.
[00:33:49] Unknown:
Oh, good.
[00:33:52] Unknown:
So what sorts of materials or medium do you use for training people in Python?
[00:33:59] Unknown:
So, this has been going through a bit of an evolution over the years and I'm always looking for for new things. So I I'm a big emacs user. Right? I went to MIT, went through the brainwashing process. Back when I was there, like, back when I was there, even the secretaries used emacs. So, like, obviously, the students were gonna use it. And, you know, my my dotemacs file has been steadily growing over 20 plus years. Every so often I prune it. Every so often I say, really? What's this doing in here? But I just use that. And and I tell my students, you don't have to use emacs. Right? Like, there are some weird people who don't. So I'm Sickos. Sickos. That's what I call them. I actually tell my students they should use PyCharm just because they need something that's a little, shallower learning curve.
So I use emacs, and then I used to use just the regular old Python shell. And someone said to me, we weren't using IPython. I said, oh, yeah. I've heard of it. I'll try it. And of course I tried, I said, oh my God, this is so much better. But I could not use IPython notebook just because I do a a lot of my examples, a lot of my demos are with files. Oh, yeah. And then at some point don't know exactly when, but at some point the iPad notebook let you do files. I said, oh, wow. That's amazing. And so literally a month or 2 ago, I switched to doing all of my live coding demos, and I have a lot of them when I'm teaching. Because if people ask me a question, I want them also to get the feeling that if they have a question when they're working, they should turn to IPython, and they should try it. What happens if the only answer to that is, let me try? Not, oh, boy, I should look it up. Now looking it up is not bad, but but that's why you have this this beautiful sandbox of the interactive, you know, the REPL.
So I I've lately, over the last, I think, month or 2, I've been using a hyphen notebook. And then my my my standard thing at the end of each day is people send me email who are in my class, and I send them a zip file with all the exercises to this like, basically solutions that I've solved in front of them of the exercises, plus the slides in pdf, plus now I can send them the IPython notebook, and they can then replay everything that I demoed to them in the lecture. So IPython notebook has become, like, an essential part of my teaching as well. A third thing is the Python tutor. I don't know if you're familiar with the Python tutor site.
Pythontutor.com. Oh my god. It's amazing. It's ama I I forgot the name of the person who did it. It's beautiful and fantastic. The number of occasions at which someone says, yeah. But why so for instance, I I have an example I often use where I create a small list, you know, my list equals a, b, c. And then I create a larger list, like, big list equals my list, my list, my list. So now we have 4 names for the same list. And I show them that if you change index 0 0 of the big list, you're really changing the original my list as well. At this point, people's noses sort of wrinkle and they are kind of wondering what's going on. And I pulled the Python tutor which has a dynamic, dynamically generated graphical display of the innards of your Python program, and they can see the arrows, they can see the boxes, and it just becomes instantly clear.
[00:36:53] Unknown:
Wow. That's that's really that's really awesome. I I did not know about that and I will definitely plan some quality time to go play with that because as I said, there are definitely a few Python concepts that I could use some brushing up with and that sounds like a really useful tool. Thank you.
[00:37:09] Unknown:
Sure. Sure. I've I've come across it before, but, it's been a while since I've had call to use it. So definitely thank you for the reminder. So I understand that you recently wrote a book called practice make Python, if I'm correct. And I'm just wondering if that's something that you generally use as a follow-up reference for your trainings.
[00:37:32] Unknown:
So, it was basically suggested by my students. I think it was about a year ago, a little less than a year ago. Over the course of 2 weeks, after every class or during the breaks, people would say to me, okay, listen. We're taking a 4 day course. That's great. But there's always gonna be this gap between finishing the course and then wanting to use the information in our actual work. Where can we go to get exercises? I said, well, you know, there's Zed Shaw's learning Python the hard way. And they said, yeah. Yeah. We've done that. Okay. Next. I said, I don't know, but it sounds like a business opportunity.
So basically, I said what I asked them what would happen if I gave you a book or sold you a book with 50 exercises that would force you to really think in Python, and then you would have to work at it but it would probably give you some benefit? And they all said, oh my god. I would definitely get that. Now they're all liars because they didn't all get that. But I will hunt them down. But, basically, what I do is I I wrote up 50 of the exercises that I most like using in my courses either as demos or as exercises that I see give people that moment that they're forced to work. And sometimes the solution is as little as 1 or 2 lines.
But getting to those 1 or 2 lines is the magic and is where the learning really comes from. And so I I wrapped up the book. I guess I finished writing it about, I don't know, probably January or something, January or February. And I've been slowly, very slowly but surely making videos to accompany it for people who want that package. But that's just time consuming and I'm so busy with other things. It's taking way longer than I would like. But the the book is not a tutorial, because I I really think that there are enough tutorials out there in Python. The world doesn't need another tutorial. The world needs something for after you're done with the tutorial. And so what I call my book is it's like your second Python book, or it's the book to read after you've taken a course.
[00:39:23] Unknown:
That's really awesome because I I I'm definitely in that category of I've read some of the tutorials. I read, you know, dive into Python. And as I say, I've been using it at work now for 4 or 5 months. And and so I'm definitely past the intro phase, but I'm not really to the point where, like, you know, when you're in that kind of tentative stage where you're not quite comfortable with every aspect of it and it's not like it doesn't feel like that really well used tool that like, you know, just sort of, like, fits in your hand like it was meant to always be there. I'm not there yet and I think something like this book could be incredibly useful to get me there.
[00:40:00] Unknown:
Good. I hope so. And and I've been very fortunate also. A lot of people who have read it have, emailed me with corrections or suggestions or insights. And and I like that. And and and also when I'm teaching, like, from my perspective, what's what's most important both from my perspective as a teacher, but also for the learning process is the interactions. It's the asking questions, it's the wrestling with things, it's the talking it out talking it through. So, fortunately, in Israel people are not bashful, and they are more than happy to say that's stupid or that's a terrible idea or what do you think about this and really challenge me.
But I really think that that helps with the learning. And, so I've also been learning from the people who've written the book and sending me all suggestions. And so, if anyone out there gets, you know, gets the book and and has ideas, suggestions, improvements, that would be fantastic. I mean, I would say easily easily half or more, probably even 2 thirds of the exercises were either inspired by or improved on by students in my classes who gave me feedback and and really helped me to refine them.
[00:41:01] Unknown:
That's very cool. And speaking of getting the book, Reuben has very kindly offered a, discount code, which we'll be passing on to our listeners. You can find it in the show notes rather than us trying to say it and and having it come across garbled or anything. We'll just put a link to the book and the awesome discount code there for in case you wanna avail yourself of this resource. So, in your freelance work, what portion of your projects use Python?
[00:41:29] Unknown:
Interesting. You should say that. So so that's, of course, the question. So for years, actually, it was kind of embarrassing that I was doing most of my freelance work in Ruby and most of my training in Python. Obviously, I was using Python in multiple different ways, but it was sort of like this, you know, Bruce Wayne Batman kinda thing, I guess. I'm not sure which Python fits it to, so I'll let you guys figure out the analogy where. I've always had some clients who use Python, sometimes more, sometimes less. There have always been some people using it for whether it's database work or web stuff. And, certainly, I've always done some projects on my own with it. But truth be told, it's really only since I've started getting heavily into the training that I've been diving myself into Python and using it for more and more things and trying to find sort of the the corners of of different stuff. So, recently, I've been asked to do more and more training using NumPy, SciPy, big data types of things.
So there, I've started just sort of doing it on my own. But the number of actual paid projects I've done over the I actually, that's not true. In the last 5 years, the number of paid projects I've done in Python, I would guess is about 10%, 20% at most. There was a period maybe 10 years ago when all of it was in Python. I did some stuff on the web with XO. I did some stuff just with databases, with Postgres, with all sorts of analysis. So it sort of come comes and goes. And I I think this is 1 of those periods now where it's what's coming. Like, I I think it's safe to say that over the next year, probably, the overwhelming majority of my work will my project work will be in Python.
[00:42:57] Unknown:
You know, listen, as far as, you know, you mentioned you you're embarrassed to say whatever. Don't be. As far as I'm concerned, it's tool to task. Right? Like, I mean, if your clients are willing to pay you and they want Ruby, and that's the kind of work that you, you know, wanna be doing or need to be doing, then by all means, use Ruby. As far as I'm concerned, I love Python. I think it's a great language. I love Ruby. I think it's a great language, but they're just tools. Like, I think that this kind of, like, crazed partisanship is something that we can leave behind.
I think I think especially in the polyglot era that we're kind of entering, so many companies now are as much as, you know, some are standardizing a lot or kinda saying like, well, what is Python good for? Let's use it for that. What is, you know, Closure good for? Let's use it for that or whatever the case may be. And I think that's an attitude that we should all embrace. I I I agree. I wrote this blog post probably like a year or 2 ago where I I said,
[00:43:51] Unknown:
I I made the analogy that Ruby is Oscar and Python is Felix from the Oscar.
[00:43:58] Unknown:
That is totally apt.
[00:44:01] Unknown:
And and, you know, you can learn from both of them and you can join both of them and each of them has their quirks. But but the the the the, like, knowing both is really where the the the the interesting, things happen.
[00:44:15] Unknown:
So just wondering if you've seen a change in the demand for Python skills in the time between when you first started using it or using it professionally at least and most recently. Would it have been up, down, or both?
[00:44:29] Unknown:
Up, up, up, up, up. It's it's crazy. So, you know, back in the stone age, you know, 20 years ago when I started using Python you know, when I when I got to Israel, basically, and I said to people I do you know, at that point, it was mostly Pearl and Linux. People looked at me like I had, you know, fallen off from the moon. Like, Pearl, Linux, open source? What is this thing? Oh, yeah. It's that it's that thing that's not Windows. And the fact that only Windows and decent Hebrew support only made it harder for it to break in.
But over the years, I've seen a growing interest in Python, and then it was like this explosion about 5 years ago. It was just it's just unbelievable. There's now, as I said, insatiable demand that, I even had these guys. I gave a talk about Ruby, I guess, about 2 years ago. And there were 2 people who came there, and afterwards, they came up to me and they said, listen. We're not really interested in Ruby. We're really interested in Python, and we're hoping that someone who came to your talk who knows Ruby will be interested in learning Python and working for us because we can't find anyone. Like, the demand is so crazy. They were, like, poaching people from other languages.
And and I said, I I have bad news for you guys. The only thing rarer in Israel than a Python programmer is a Ruby programmer. So, good luck with that approach. But the the the demand is growing as I think the as I think for for a variety of reasons. First of all, companies are taking it seriously. They're realizing this is not a toy language. This is a serious language you can use to solve serious business problems. And and, I mean, what I have to tell people is in the sixties seventies, what we cared about with programming was that the darn thing worked. If it worked, we were delighted. In the eighties nineties, what we cared about was, did it work fast?
And nowadays, what we worry about is is it maintainable, and does it let my programmers achieve maximum velocity? And so, Python just hits the sweet spot on that, because nowadays people are expensive and computers are cheap. And so if I can get a 10 times or 5 times, even 2 times increase in my programmer productivity, but it means I have to spend 20% more on on servers, Who cares? Right? Like, that's totally worthwhile. And a lot of the companies, I think, have done the math and said, yeah. That's good for us. Why should we spend tons of money? A lot of people come to come from MATLAB. Right? I've been surprised by the number of people I teach you are MATLAB users. They're like, yeah. We're gonna use scipy and NumPy because it's free. And do you know how much it costs to get these libraries in MATLAB? I said, actually, I have no idea. They said, oh, they cost a lot per seat, per year.
So so the it's really it's astonishing. It's astonishing to see the number of companies, people, places that are interested in Python. And, really, I think it's just it's just
[00:47:13] Unknown:
growing. I bet. And it must be really exciting actually for those people moving to Python from MATLAB because MATLAB is an awesome tool. But with something like Python, you have this incredibly rich ecosystem of not only can you do your numerical analysis, but you can bring in, like, you know, statistics and data analysis with Panda or, like, you know, or or image processing with PIL or 1 of these other tools. And, I mean, you just have this amazing, you know, plethora of of tools to draw from and you don't have to think in terms of well, gee, if I wanna use this, I'm gonna have to pay another $5, 000 or I I have no concept as the amounts involved. Money just isn't an issue because most of them are free.
It's gotta be incredibly liberating for them.
[00:47:57] Unknown:
Right. Right. They no longer have to make decisions on do we have the budget to use this? It's is this is this the most appropriate tool? And people just like the language. They they they like it. They like its breadth. They like its depth. They like the community. And you see, I mean, in addition to for all the specific stuff, just today I had people in my class who, who are big users of R. Now I used R in my dissertation analysis. I love R. It's really great. And R's big claim to fame is that it does and it's a statistics language. It's a great language for that. And it has a huge sort of like, you know, PyPI has a huge number of packages. So r has a similar number of packages than what they call c, yeah, CRAN.
Lots of packages for doing statistical analysis. But I see little by little by little, people are contributing to Python, to scipy, numpy, and all those packages. And I think in a few years, we might see Python eating R's lunch in that sense. It can't yet because it doesn't have the same plethora of modules, but it's getting there for enough people. And then you're gonna have another bunch of people who who are just, like, you know, stoked to use Python and are contributing to the community also. It's it's almost a a matter of increasing returns.
[00:49:09] Unknown:
Yeah. I've heard anecdotally about a lot of people moving from R to Python, particularly when they want to productionize what they're what they've been working on. So they may use R for doing the research and development phase of a project, but when then when they actually need to handle larger volumes of data, they move it over to Python because my understanding is that when you start loading large datasets into r, it just really starts to slow down. So
[00:49:33] Unknown:
Yeah. That's not the reason my dissertation was so late, but I'm willing to blame that.
[00:49:41] Unknown:
That's great. So what kinds of projects might you encounter that would cause you to choose a different programming language from Python?
[00:49:51] Unknown:
Question. Well, first of all, there's just, like, the the fun and experimenting kind of thing. Right? Like, so I I really I I wanna try more closure and and play with that, especially it's software transactional memory, which I would not be surprised if it ends up in in Python at some point in the future, but obviously doesn't exist now, because it just seems like an incredibly cool concept, fun thing to play with. And, of course, it's Lisp, so it must be good. Look. If I were writing and and no 1 should ever trust me if I do write such a thing. Right? But if I were writing an system, if I were writing a desktop application, 1 of those things, where speed is really crucial, then I think, you know, I would I would choose a a real systems programming language. If I'm writing something that needed to scale massively or that really, really, really needed threads that were truly parallel and could not use processes, I would use something else.
I still because I've used Ruby and because I've used Rails and Sinatra for so many years, that's still sort of my first inclination of what to use for web stuff. So my website, for instance, runs in Sinatra. And, you know, it's totally great. It works fine for my purposes. If I were doing it from scratch today, would I use Flask maybe? Maybe. Maybe not. Who knows? But I would say for the the like, your average project like, here, for instance, here's a here's a, story. So I run I live in the city of Modi'in halfway between Tel Aviv and Jerusalem. And when I got to the city in 99, I started or I I guess I I sort of took over an email list for people who live here.
15, I guess, you know, 16 years later, we now have 3, 000 people on the email list. And it's, you know, a local forum. And I decided a few months ago that it was just not worth my while to run an email server of my own anymore. So I decided to move everyone to Google Groups. Well, Google Groups only lets you I asked people to move themselves. Half of them did that. So that left me with 1500 people to move. And Google Groups only lets you add a 100 people at a time manually each day. So I wrote I was like, well, how can I figure this out? I know. I'll use Python. I know. I'll use sets. And, like, in a few lines of code, basically, I was able to download the list from my old system, download list from Google Groups, turn each of those using a set comprehension into a set, do set 1 minus set 2, grab a 100 people, and there you go. Now I have a 100 people I'm gonna move today.
And and so it's those sorts of applications that are just so trivially easy to do in Python that I I find my like, that this is, like, clear that I would use it for. Yeah. Yeah. Yeah. But, like, system stuff, systems, embedded, web, still for me, I think I I would look at other languages first. But that might happen less and less over the coming years. I wouldn't be surprised, in fact.
[00:52:32] Unknown:
Right. I'm I'm glad you mentioned Closure. I I know I find that language particularly exciting as well, because of the software transactional memory aspect, especially when you start to realize that the way it handles data structures being atomic by default, like threading just becomes, you know, concurrency just becomes such a dramatically easier problem to reason about. I think that is a really cool concept and it isn't and that's gonna be 1 of my picks is 1 of his talks where he discusses some of the aspects of that. It's a really cool talk. Excellent. Excellent.
So let's, unless anybody has anything else, let's move on to the picks, shall we? Reuben, why don't you list your picks?
[00:53:10] Unknown:
Okay. So I'm going to mention a few things here. First of all, so I I run a few different in addition in my copious free time, right, to my training and my development work and book writing and whatnot. So I've got this site that I've been running for a few year a few years. A few months now. It's about 6 months called dailytechvideo. So it's dailytechvideo.com. And the idea is that every day, I find a really great conference talk or other video that explains something typically about software, typically about open source dynamic languages or databases or web stuff. Because, hey. What do you know? I'm interested in open source dynamic languages and databases and web stuff. And, I have a little intro, and I describe the talk. And that's been going on, as I said, for a while. And, so far, it's been getting some attention, and I'd be very curious to hear from people what they think and, if there are any talks that they're interested in. Certainly, there are plenty of Python talks in there, not surprisingly.
Number 2 oh, well, anyway, I'll I'll just move on to sort of other interesting picks. So I've been, among the places I go to do training is in China. I've been there, I guess, 6 times, 7 times in the last 3 years. I'm going twice more this year. And I just think it's super fun and super cool. I'm learning Chinese. I I just really, really enjoy traveling there. And so part of my obsession has been reading books about China and interesting analysis. And so a book that I read just recently, by Evan Osnos, who was the New Yorker's correspondent in China, it's called Age of Ambition, Chasing Fortune, Truth, and Faith in the New China. Brilliantly written, brilliantly recorded, fascinating book. Either if you do go to China or if you don't go to China, it's still worth reading about what is really going on there and how is the government trying to influence people, influence policy, and how are people sort of pushing back? And in what ways is it the way we would expect in the west and in what ways is it not? Peter Hessler also wrote some great books. He's another, good person who wrote about that. But I guess my final pick, it's only here once. Right? So I've gotta, like, give you the whole surveying. It's this book that came out a few a a few years ago, actually.
It's called mindless eating, why we why we eat more than we think. And it's this guy named Brian Wensink who is a professor of marketing at Cornell, and he has done some of the most brilliant psychology experiments I've ever heard of. Because basically what he does is he's trying to figure out what influences people to eat more or to eat less. So for instance, he'll go to a restaurant, but not just any restaurant, a test restaurant that's used by the restaurant school at Cornell. So it's designed for people to do experiments, usually experiments in management.
And half of the room will hear 1 type of music, and the other half of the room will hear another type of music. And then they measure how much does the music affect how much food you order, and it actually has an effect. Or how much will you spend? Or what happens if you have empty plates? And so on and so forth. And so I I just find, like, the the experiments were brilliantly designed, hilariously funny, and, very insightful to human behavior. And I think I've covered now the world and psychology and computer stuff, so there's really nothing else that else left to, to recommend. So the the the those are my picks.
[00:56:22] Unknown:
That last pick is is awesome, I have to say. I mean, with, you know, obesity being viewed as kind of a worldwide problem in the developed world at least, you know, it's it would be really interesting to see some of the insights as far as why people do what they do. Very cool. So, those are some great picks. I'll move along to my picks now. I usually have a beer pick because I like craft beer, better for worse. And, I just encountered a local beer or comparatively local. I live in the Boston area. And so this is from Spencer, Massachusetts Town closer, you know, more around Mr. County, where I grew up.
Spencer Trappist Ale, the Trappist monks there brew a really nice Belgian beer. And a lot of the time, I find that American breweries trying to do Belgian style beers, kinda with a few exceptions, fall flat in the face. Because the thing that makes Belgian beers kind of amazing is that they have this incredible sort of depth and fruitiness and and real complexity. Like, you know, it comes from the yeasts in those breweries being, you know, breeding in captivity for generation after generation, creating these just awesome flavors. And the trap is to kinda nailed it with this. It's it's 1 of my favorite domestic Belgian style ales and and I highly recommend it.
So as far as technical picks, as I mentioned, Reuben inspired me to recommend pick Rich Hickey's talk, the value of values. And, this was a keynote for, I think, either a closure or a JVM conference where he basically talks about how so many of our basically, all of our current programming languages were designed around this place based programming paradigm. You know, was a memory saving technique where you had this place. It was a variable and you permuted the state, of that of that value variable to make various things happen. But in the modern era where we have gigabytes of memory, there's kind of no point to that model anymore and there's a new model that can really change the way you think about solving problems and make your life dramatically easier. So I love that talk. I recommend it highly.
The next pick is a, a VIM plugin. My VIM is my editor of choice at least for now. I I like it quite a bit. I thought I liked you guys. Boy. Tobias uses emacs. You're all good. You have an emacs lover in our bit. And I used EMAX for years. I just I I got to the point where this shows how old I am. Back at the time, you know, we had old pre Intel Unix class workstations with very limited, you know, amounts of memory and disk allocated per user. And and I just got to the point where waiting for emacs to load was just like, I feel like I'm spending years of my life, which is really silly now because on our again, in our modern machines, there's absolutely no, like, emacs comes up like poof, you know, no problem at all. But I I hit by that point, I had switched to Vim and my my brain kind of works in Vim. But You Complete Me is a really neat editor for doing, auto completion, syntax based and otherwise.
And it it's it's, written in c plus plus which is kinda nice as opposed to some of the others which are written in higher level languages like Lua or or and the like. So it's pretty snappy and it it does the job. Building it and installing it is a bit of a pain but it's worth the it's worth the exercise to get there, at least in my limited experience. That's the correct 1. It's actually written in Python and the compilation step is actually just for the c plus plus c and c plus plus bindings for it. Oh, really? Oh, I didn't know that. Oh, very cool. Well, it's pretty snappy in any case. Thank you, Tobias.
E Tobias actually recommended this to me earlier, so I was kinda passing that along. And my last pick is, something because I'm mostly a Mac guy. I, you know, do most of my day to day work on Linux servers but I love having a Mac as my primary desktop environment. There's this awesome little tool called SizeUp that lets you sort of assign, it basically lets you manipulate, OSX Windows in any way you can possibly, you know, imagine flipping them from monitor to monitor, adjusting their size and position etcetera etcetera all with, you know, a keystroke.
And for me, I'm I'm partially blind and mice are like anatomy to me. Like, if I have to touch the mouse, my productivity takes a significant nosedive. So having a small tool like this, and it is commercial, but, you know, it costs some really small amount of money. I forget exactly what, is huge because I can really sort of, like, drive my environment like a Corvette as opposed to flailing around with the mouse like a really hapless person that I am. So, I think that's about it for pics for me. Tobias, how about yours?
[01:01:13] Unknown:
So harking back to the theme of practicing and using practice as a way to really learn a language, there's a really great web based environment called Check. Io that is, somewhat gamified way of performing a number of different practice problems. So it's got a nice really nice visual aspect to it, and there are different islands. And each island has a different sort of a theme to it. And each of the problems has a little bit of a story blurb to go with it that presents the particular problem that you're trying to solve using Python. And 1 of the things that really makes it great is that once you've submitted a solution, you can put it up for review, and other people in the community can post reviews on your code to either, you know, congratulate you on a job well done or to give you tips on different ways that you could achieve the same result, and you can also look at other people's submissions so that you can learn that way. You know, you're all solving the same problem and you can get an idea as to the different ways people are approaching it, so it's really interesting.
Guido actually occasionally hops in and provides some reviews of people's codes. So
[01:02:25] Unknown:
Oh my god. That sounds terrifying.
[01:02:30] Unknown:
So, yeah, it's a cool little tool. I haven't had as much time to use it recently as I would like, but definitely worth a look, particularly for people who are looking for a way to get some practice in the language, but don't necessarily have a project that they're working on with it. My next pick is I guess you could kind of call it a toy, but it's something called snap circuits. And what it is is a way to introduce people to the world of electronics. So rather than having to have a soldering gun and a bunch of spools of wire to build different circuits, it uses snaps just like you would find on your clothing, and it's got a grid based board that the different components snap onto, and then they snap to each other to form the actual circuit. So it has batteries, and then it'll have photoresistors, regular resistors, DC motors, and all kinds of different components. And 1 of the things that's really great about it is that you can actually start with a really small base kits to get a feel of something that'll work for you or your kids. I actually got it for my my older son.
And then they have expansion kits. So you can rather than having to go out and buy the big kit all in 1, spend the extra money, you can actually just get an expansion kit that'll turn your small kit into the bigger 1. So it's a really great idea, really great execution, and it also comes with a project booklet of different circuits that you can use and teaches you about why it works the way it does. For my next pick, I recently got a new Android tablet, and I spent a little spent a little while researching it, trying to figure out which 1 to get. I ended up going for the Nvidia Shield tablet. So it's marketed as a gaming tablet, but I don't use it as such.
It's just a really powerful, really great tablet, 8 inch. It comes with a built in stylus, which is really useful for taking down quick notes where I would otherwise pull out a notepad and a pen. It's powerful. It's got 2 gigs of RAM and, some crazy number of cores with a NVIDIA GPU built into it. It's got a great screen. And for and for all that, it's actually really affordable price. And then the other pick that I'm gonna choose is the Samsung Go mic, which is what I actually have been using to record these episodes. It's really nice, well designed microphone, very small and compact, easy to transport.
And 1 of the really nice things is that if you get 1 of the USB on the go adapters, you can actually plug the microphone into your tablet and have a portable recording studio. And my last pick, we recently signed up for, something called Zoho Apps, which is sort of a competitor to Google Apps, but it has a free tier as well as number of paid tiers and has a really pretty impressive suite of different products that you can use along with it. Most recently, I was poking around and found out that they actually have a password vault that you can use for sharing credentials between different people in an organization. It has mail, docs, calendar, and overall, it seems to be really well executed.
[01:05:41] Unknown:
So Yeah. I'm I'm pretty impressed with that 1 as well actually. Tobias prodded me into hit switching to it from from the goog for our show notes and, for, you know, our internal documents and the like. And I'm pretty impressed thus far. It's pretty it's pretty well put together.
[01:05:58] Unknown:
Alright. So, Reuben, we wanna thank you very much for taking the time to join us and speak with us today. And for anybody who would like to follow you or find out more about what you're up to, what would be the best way to find you or contact you?
[01:06:14] Unknown:
So my website learner.c0.il. From there, you can get to my blog, log.learner.c0.il, strangely enough. I'm on Twitter as atruvinmlerner. And so basically, everything I do sort of publicly, whether it's webinars, books, announcements, blog posts, either my blog or my Twitter feed or both, well, we'll have them. And I'd be delighted to hear from people, email, Twitter, you name it. I'm always delighted to hear from people who have questions or comments or just wanna get in touch and say hi.
[01:06:47] Unknown:
Great.
[01:06:49] Unknown:
Yes. Thank you very much for for for, taking the time to talk to us, Ruben. It's been it's been really great. My pleasure. Thanks so much for having me on, and good luck, with the podcast. I know it's relatively new, but hopefully, it'll be a big success.
[01:07:01] Unknown:
Thank you. We're hoping so as well.
Introduction and Hosts
Interview with Reuven Lerner
Reuven's Background and Move to Israel
Introduction to Python
Reuven's Journey with Python
Breaking into Python Training
Demand for Python Training
Challenges in Learning Python
Python's Object System and Idioms
Teaching Python vs Other Languages
Training Materials and Methods
Reuven's Book: Practice Makes Python
Freelance Work and Python Usage
Demand for Python Skills
Choosing Other Languages Over Python
Picks and Recommendations