The Stack Overflow Podcast

Paul Explains It All

Episode Summary

This week, Ben and Paul are flying as a duo, a true dad-cast. We walk through the slow build of increasingly complex keyboard macros, followed by the inevitable cleansing and renewal of an empty slate. Pus, type systems and type safety, the galaxy brain edition.

Episode Transcription

Paul Ford It's just us today. 


 

Ben Popper It's just...a dad-cast today.


 

PF Just a dad-cast, just programmer Stack-dads. 


 

BP Just, just programmer and newb. 


 

PF Programmer and noob! It's good. Just desperately trying to help each other along in a crazy mixed up world.


 

[INTRO MUSIC]


 

BP Nothing's more important than a great customer experience, but sometimes services get disrupted. xMatters helps teams resolve issues fast, before they impact customers. Learn why millions trust  xMatters to keep their digital services up and running at xmatters.com/stack.


 

BP Alright, Paul, it seems like Sara and Cassidy were not available today. So I'm just going to ask some questions. Cause I'm still poking around in like the very beginning of my coding education. I haven't written a Ben Popper is the Worst Coder column in a while, but I'm about to restart because they started sticking them in these emails that we send to people who, if you, if you just signed up for Stack Overflow in your new user, you get an email from us being like, Hey, new user, here's some resources. One of which is my column, embarrassing myself. So it's like, you know, you're not alone. Look at Ben Popper.


 

PF Oh, it's going to be like, I'll just be the living FAQ for this episode.


 

BP Yeah. So I'm going to ask you some questions. There's some things I think I understand, like...type...safety? Or type systems, but you'll explain it to me.


 

PF Oooh! I can't wait to outrage everyone with my basic comprehension of type systems. Um, absolutely. Let's do this. Let's, let me answer all of your programming questions [okay] in an incredibly authoritative way that everyone will know is the right way.


 

BP Perfect. But first I have to ask you one question about keyboard shortcuts, [alright] and then we'll jump in. Alright, here we go. So Paul recently I've been leaning into little keyboard shortcuts. I found there's a few nice ones on Garage Band and I've been using some as I try to desperately claw my way to inbox zero. You recently told me that you backup all of your Gmail locally because you're ''that kind of person''. So I'm going to guess you maybe have a few keyboard shortcuts that you use or you designed yourself?


 

02:02
 


 

PF Well, okay. First of all, keyboard shortcuts are absolutely the gateway to programming [Ben laughs] because their macros, their little reproducible units of the computer doing something. And you're like, Oh, if I say less, but it does more. That's a good feeling. [Right] And that is the absolute true soul essence of engineering. Like I'm going to do a little bit and it will, it will magnify my intent. So like my cofounder at Postlight, where I'm the other cofounder, his start was in Windows automation. Like when, cause he was doing legal documents, that's how he got into tech. So anyway, congratulations, you're more and more of a programmer. This is part of the path.


 

BP I think, yeah, this is my mind slowly shifting. And I'm being assimilated into the Borg without knowing it.


 

PF I mean, there's a few things going on and the first is like anything that requires a lot of customization is probably badly designed. So that's an unpopular opinion. The second thing is, you know, I had somebody cause I, I used this text editor that's been around for about 30 years now called Emacs. It's probably one of the most customizable pieces of software. It's essentially a programming language [yeah] that, that fakes being an editor. And they asked me, you know, could I get your configuration file? You should share it. And I realized that about five years ago, .emacs files and configuration files are like a huge part of that culture. Like just, Whoa, how did you do it? What do you do? What's your setup? And I realized about five years ago, I just kind of went with the defaults and erased everything. And like there's a few things I've set, cause I use it to read and manage and triaged my emails. yeah] So like my email address and account information is kind of securely in there. And there's a few other things like that, but it's all just incredibly clear personal information. And then I just use the standards for everything and train my fingers around it. So there's this point where you get, I think almost to the other side where you go, yeah, no, I don't want to deal with any of that, but it is a 15 year process of customizing your tech, your everything to get it just the way you want it. And then you go, yeah, whatever.


 

04:04
 


 

BP I mean, that's the cycle, right? Like I've been through that where I'm building something up, I'm customizing it a lot. I'm making it order just the way I want, because I think I'm getting somewhere. And then you get past that point where you're at the point of clutter and right over overly engineered in that you say, okay, the only way to solve this problem is to wipe the slate clean and start again. Like that's a, that's kind of something you go through. Maybe probably an engineering. Also for me, it's like, I'm talking about the way I organize my desk or my house or my documents folder. You know what I mean?


 

PF There's a great quote. It's attributed to John Wanamaker, the, the sort of department store owner. I don't know if it was him or somebody else, but you know, he knows he needs advertising [oh yeah] and like 50% of it works. He just has no idea which 50%. [yeah] The tricky thing with tech and with programming in general and the way that software development works is you actually don't know if you're solving the problem or not, or just sort of solving around the problem. And so an enormous amount of effort goes into creating a really flawless developer experience where you can be as productive as possible. And there are plenty of arguments that, that is the most meaningful thing an engineer can do because then they can build the software more quickly and with more control and more understanding and the documentation is contextual and whatever. And then there's an also an argument to be made that none of that matters. And you should just read two more books. [Ben laughs] And so, and I would say at different times in my life, I have powerfully believed both of these things. There's a great book by Rob Pike about programming and he's the person who created Go for Google, but it also sort of goes back and, you know, he talks about working with the superstars of engineering at Bell Labs. And basically what would work is you'd have a bug and someone would stand behind you and then kind of talk through the bug and then they'd figure it out. And then when they wanted to debug, they would print out lots of stuff about what the program was doing and try to figure it out from there. And it wasn't like nothing has changed in 50, 60 years. [Ben laughs]


 

06:02
 


 

BP Well instead of standing behind you, the person who is on Twitter and you tweet the problem. And then they look at it, they say, put the code over on Stack Overflow and I'll check it out there.


 

PF So this is a huge difference, right? Which is that access to very people who would explain your problem to you in ways that you might understand, used to be an unbelievably rare occurrence because there just wasn't that. And so that is real. Like, I mean, not, you know, we're on the Stack podcast and it's a marketing product for Stack, but Stack has eminently. Sometimes it's cut and paste and sometimes it actually democratizes quite a bit of knowledge and insight that otherwise isn't accessible, especially when you get to like really obscure stuff about how a C compiler works or things like that.


 

BP Or even yeah. Democratize in the sense of right, like, it's like, let's say you could do pair programming with anybody who's on the internet at any time of day. Right. And somebody can just, yeah. Who enjoys looking at code and finding little bugs is around to help. And in exchange for that, they get a little digital rep that's worth it when they apply for a job. Right. I mean, that's the, that's when the system is working at its best. 


 

PF That's right. 


 

BP Speaking of working at its best, Paul I'll do a little plug since you mentioned this, some marketing podcast. On the 17th of June. So I guess maybe that was like last week on Thursday or Friday, we let folks know, we have a new feature saying, thanks. It's a reaction feature. So you can give folks a little emoji on the side, if you want to say, thanks.


 

PF Oh you got your like button!


 

BP We got our like button. Exactly. And it, and it's those little things. So I mean, rightly, I think Stack Overflow has been criticized many times for not being welcoming or for, you know, often people sort of within that framework that we're talking about like, Hey, I have a problem. Can you help me solve it? You know, maybe trying to help, but doing what you're doing. So in a way that's a bit rude or a bit curt or whatever, but in this one, we also, you know, there's there, you know, within all of the examples, we can find hundreds of ones, you know, where people would then get helped. When you spend hours trying to figure out a coding problem only to post on Stack Overflow and get the solution with three minute within three minutes, a big, thank you. You know, and that's, somebody's posting on, on Twitter or whatever. So now we've got these little emojis in there and, uh, yeah. You know, when you make it easy for people to participate in the community in a positive way, by, by for example, including a few positive emojis and no negative ones, you'd be surprised how those little nudges add up.


 

08:12
 


 

PF You know what that does, too? It's a little bit of a check and balance. So I have a column for Wired Magazine, which I love doing, I do it once a month and I got, I got a nice piece of reader feedback the other day. And like, I've been doing this for 20 years. I actually understand reader feedback really well. And it's just somebody and I'll give you the gist of it. It was just like, ''I often have trouble with the magazine's tone and style. And those issues aside regarding your own piece, I just wanted to let you know that I enjoyed,'' you know, and you're just like, thank...you? Right? But that person is seriously trying to communicate something positive, but they also really feel a need to kind of like position themselves as a serious critic of the work and so on. And there was a time in my life. I would have thrown that across the room and now I'm just like, Oh, bring it. I enjoy it. Thank you for all the feedback. But what I would say is like when you're in a community and the general default is this kind of like rough brusk tone, people freak out. They're just like, Oh my God. And do you like when you were new at this? Cause I remember this, I remember like, you know, writing into the XSLT newsletter or the mailing list, trying to get some help on something and getting kind of a, a quick, you know, blast back about how I'd messed up. And like you, you stay awake at night thinking about that.


 

BP Oh definitely. Especially when it took so long to correspond. I mean, it was funny. I bought my kids a bunch of old comic books the other day. And one of the things that really blew me away was the length and detail in the reader's mailbox section. And so you would buy a comic book. It would come out once a week or once a month, then you would spend many, many nights composing your letter and sending it in. And then if you got lucky, one time they would write back and it would be like this experience you would fall asleep thinking about for weeks, it would like fill you with joy. And that's because they went out of their way, you know, to be kind. But often they were saying often the letters were like, I don't get this. Why did this happen this way? Can you explain this to me? And they sort of have to walk you through the minutia of all the issues you missed and the little details you didn't pick up on and hint, hint, check out this reader kind of stuff.


 

10:14
 


 

PF Listen, if you talk to somebody over the age of 60, [Ben laughs] they will tell you that the time they got the letter published in the paper, they'll remember every time somebody published their letter to the editor. Right. [right] And it's...


 

BP Social media has ruined us for this. Cause now you could just say what you want to the whole, whatever you want. 


 

PF Yeah. Nobody has. Nobody has been like, I mean, when's the last time you read the letters to the editor page in any publication, it's like buried on some corner of the website. Right? So everything is letters to the editor, including the articles. [Ben laughs] And, but now, you know, back to it, like those little emoji are a good balance because it's like, Oh wait, how, how do we feel about this? Well, these people are saying these things, but look, 50 people, you know, gave it, gave it a nice reaction and it gives you a more total portrait of the, of the culture, which is really important because you need those little signals to understand what people think and feel if they don't have the energy or the wherewithal to respond. Right. Like it doesn't. [yeah] Most people who are grateful don't have anything to add. I'm actually that way I use Stack, I rarely, I'm a fast follower programmer. So everything I do has already been solved. Like I don't, I never hit the edges. It's always like, Oh yeah, that's how you do it. And so like, gratefulness, gratefulness is great, but there is no easy way to express it.


 

BP Yeah. I mean, I think it's funny in this online card game, I play Hearthstone, you know, they limited it at first to five emotes you could do or five or six emotes. Cause they wanted to let you say something to the person you're playing with, who might, you know, often I see they're from Japan or Korea. Like their name is written in a script, you know, characters that are not my alphabet or whatever, but we can emote with each other. Oh, nice play. [right, right] You know, I lost, but there was one emote, which was sorry, which I think might have been initially meant to be like, Oh, I forgot to end my turn or whatever, but became the troll emote. You know, it was like, I just did something that made you upset sooorry. And so that then became known as the troller emote and eventually they had to take it out. So it's funny, like even when you try to limit the language, you know, when you try to put up like five or six things that are either kind or apologetic or triumphant...


 

12:17
 


 

PF Oh no it'll evolve! 


 

BP It'll evolve. People will find a way to troll. Nature finds a way.


 

[MUSIC]


 

BP So I had an, a question, you know, we've been talking a lot on the podcast about type systems and type safety. And so again, you know, I'm a total newb, but I love the idea of doing something where it's like, as I'm typing and I'm trying to get my commands right. There's this like autosuggest. And then at the end of every line, you know, before I go to the next thing, it's like, wait, did you mean to leave out this comma? [yup] So can you tell me, like, what does a type system and how is that helpful? And then I think I understand type safety being like, there's a limited number of things you could sort of like an auto correct for coding.


 

PF Well, no, you've, you've mixed a couple things up. So type systems are a very large abstract, I'd say mathematical slash semi mathematical area of inquiry whereby... so a computer doesn't know what a thing is. It knows that a thing might, it knows that there's a lot of lights, which is turning on and off. So when you tell it what you want to do, you need to tell it at some level, is this an integer? Is this a character? Is this a string? Is this a, or is this some weird combination of all of those so that, you know, like a database record and, and so on and so forth. So there's all kinds of ways. So those are your types. An integer is a type and actually, it's going to be probably an eight bit integer that could be signed or unsigned. Like there, it gets pretty specific because otherwise, if you don't know what types are, the computer really has no idea what it's doing. You can't give it an A, because the computer, as far as it can tell, if you say, add A to 7, it might mean that that means A7 is a string or it might mean that it should go get the numeric value of ASCII A and then add it to the number seven, depending on the context. And so you got to help the thing out. So some languages are very strongly typed and they really are original about that. And if you strongly type everything, you can do kind of magic. You can infer a lot of stuff. You can write less code over here and you can also catch an enormous number of errors when you're compiling the software and say, Whoa, don't do that. That'll blow up for you. So there's a great little book I'm working through called The Little Typer, which is very helpful.


 

14:29
 


 

BP This is a children's book or this is...?


 

PF It looks like a children's book. It is absolutely not a children's book. It's in a series. There's a book called The Little, um, there's The Little Lister, The Little Schemer. These are like, they teach programming in a very interesting way. It's, there's two columns in the book. They're kind of famous kind of MIT culture books through. So on the left, it's like, it asks a question and then on the right, there's an answer. And so it's this kind of Socratic thing. And so, but no, it gets deep into math really quick with types. Now, the things you're talking about with IntelliSense are more about the ability to it relates, right? It introspects the language as you are writing it and then compares it against like a set of rules and a set of syntactic rules. So essentially what it does is it's a, it's a piece of software that runs that is constantly evaluating your text. But, you know, now we have this type system and we know the rules of the language. And we know that I can't, if you didn't tell me something, if you told me over here, something's an integer, but then you want to add it to a string and you didn't actually turn the integer into a string explicitly. We might have a problem. [gotcha gotcha] And so it can put that in red wavy and, and let them know, right? So that's, that is software inferring rules from the, from the type system and everything I just said, by the way, has probably caused many, many sets of brains to pour out of people's ears. The more advanced degrees they have, the more brains have come out of their ears, right?


 

15:55
 


 

BP Send the mail to podcast@stackoverflow.com or hit them up @Ftrain on Twitter, folks. Hit 'em up.


 

PF Type systems are one of those things that people have been fighting about for 20 or 30 years.


 

BP Right. So we were talking with Ryan Kavanaugh who works on the TypeScript team at Microsoft. And I guess, right, what I was trying to understand was he was sort of saying, listen, you know, when you're building a huge application, you know, a 30, 40, 50,000 line application, I just feel like this kind of type system just kind of type safety is going to end up paying dividends, especially if there's a lot of people working on it together and you can't have things break. Cause you have something, you know, live for, you know, lots and lots of users. But he was saying, if it's not for you, it's not for you. And I find, you know, people who work in Python and in mathematical modes often aren't interested in it. So what's the flip side, like, is it more creativity or more flexibility when you don't have the type system type safety? Like what are you giving up in exchange for those structures? 


 

PF Well look, there's a lot of there, different ways to programming. So type safety means that if I say something in an interger over here and you say, and you expect it to behave like the string over here, and it's much more complicated than that, but that the computer will go, Whoa, Hey, what are you guys doing? And that is very useful. Hey folks, it seems like you don't really know what you're thinking about here, right? Because multiple people are interacting with the same kind of objects and objects in this case could be a user record or a window that pops up or your login screen. And so it's like more than one person is touching it and having rules about that and having the computer enforce those rules can be really, really helpful, but there are trade offs. It's a slow compile time. There's other stuff that comes as a trade off. But in general, like at our company, TypeScript has taken over. Like it is absolutely it's, it's a good baseline for any project involving lots of people. Dynamic typing, sometimes they call it duck typing, is just more fluid. This is an one of those endless arguments that no one wins. JavaScript is very fluid that way. Look that's the wonderful thing about Python is, is the nice thing about dynamic typing is that it creates a more interactive programming environment. And like one of the pure examples of there would be like lisp where you can go in and you're just kind of your, you write a little lisp in the, in the repel and the redeveloped print loop, and you just kind of like put that code in there and, and evaluate it. And then you mess with your functions and you rewrite them the same can be true of, uh, object oriented environments like smalltalk. Like if you see your program as a set of objects or functions that are kind of all playing with each other and you want to get in and mess around with them and you don't necessarily, you know, are you willing to let things break a little bit in the interest of figuring out what you're doing?


 

18:29
 


 

BP Right.


 

PF That's sort of the big trade off. If you know what you're doing, you're probably, and you have like a set of core business requirements and a large team working on it. Type safety is proven over and over again, to be kind of a big part of the discipline of software in the large, if you are playing and exploring dynamic typing is great.


 

BP Yeah, I like that then. No, that makes total sense. It's like, look, if you want to sit down and sketch out your vision for a house, just have fun with it. And like, let your imagination flow and like see what you come up with when it's time to do the engineering blueprint so that nothing falls down, let's put some rules and some structure in place and like some guard rails, right? 


 

PF This is great example, right? Like don't improvise, type safety is like, I'm going to get the same kind of brick. And I'm going to make sure that the PVC piping is all of the, you know, and then everything is ISO certified, right? Like that's...


 

BP Measure twice, cut once. Yeah. 


 

PF That's great. Cause you want that in a house. You don't want the house to fall down because somebody is like, we don't need PVC piping. We can, we can, you know, just use a struct. So like that part is that that's a good analogy. The only, the tricky thing for me is like, we tend to undervalue the quality of play and exploration and it's teaching value as this actually goes back to what we were talking about earlier, where like when you can get in and fool around with a live system and see how it's reacting and it can tell you what it thinks you're trying to do. And there's that feedback loop. It doesn't just help you get work done faster. It helps you understand the computer. And that is a really attractive, interesting thing when you can introspect and look at the whole system. It's one of the things I love about the web is you can inspect the element and then you can keep going deeper and deeper and deeper.


 

20:10
 


 

BP Alright, great. Uh, we chatted a little bit last week on the podcast with Cassidy and Sara about, Hey [hey!] uh, a new version of, Hey was approved this week by Apple leading up to WWDC. And I don't think you and I necessarily need to weigh in strongly with our opinion, except to say that this is clearly an issue that has provoked strong emotions in the software development community. And I think will be closely watched. So it will be interesting to see what comes out of WWDC today, or they're not, they make any mention of it or, you know, whether or not they have some things to say about the app store and its relationship to the software developers who make all the good stuff that you can buy there. And yeah, maybe, maybe next week after we learn a little bit more, we'll talk about it. But if folks have thoughts, do send them to podcast@stackoverflow.com. I'd like to hear from our listeners about what they want to hear on this. If y'all are interested.


 

PF Heck yeah!
 


 

[MUSIC]


 

BP Alright. So yeah, let's a read a lifeboat. Or if you see something on the hot network questions, you, you just have to shout out, let me know.


 

PF Alright. Well, let me take a look. How to prevent people from creating manipulative AI nanobots. [Ben laughs] Well, yeah.


 

BP You want at that one? 


 

PF Oh yeah that's a good one. Look, and then the first answer that's got five upvotes is 3D printing. A nanobot is more than just hitting print. You need the right hardware and it kind of goes from there. World-building might be my favorite. World-building...It's so good.


 

BP It's the best. It's the best. We actually have to kind of disqualify it. Cause you could always just go to world building, like you have to look around and you have to get other choices from other exchanges because world building is always the best. 


 

PF Yeah, it just, they just kill it. Cause it's all about just ridiculous situations. [yeah] You know, and then the ones that are kind of superhero or Star Wars, like, less exciting. And then, Oh, here's one that I don't even want to go into. Why does Germany have a rather small defense budget? [Paul laughs]


 

22:06
 


 

BP Hmm, there's a bit of history there, actually. 


 

PF I wonder how that could have happened. Hmmm? 


 

BP What exchange is that on?


 

PF That is on Politics. Beta.


 

BP Yes, it is a bit political.


 

BP Alright. So from our lifeboats of the week awarded two days ago to Poseidon or Poseidon. Count the number of elements in a string, separated by a comma. Thanks Poseidon. And shout out to you at 151 K rep. You've obviously answered a lot of questions. Alright, everybody, WWDC is today. If you're listening to this later this week, that means we aired our episode with Robin Ginn. They had their awesome events. So be sure to go and check that out. And you can find that a little bit more about that on our blog. Alright. My friend, thank you for being here. I would have had to do it by myself. That that might've been weird for 20 minutes. [Paul laughs]


 

PF I'm glad to answer the questions and I look forward to the clarification's from the audience. 


 

BP We're trying to get more audience participation. So the best way to do that is to make them enraged at us. 


 

PF Oh, sigh. Sigh.


 

BP Alright, everybody. Thanks so much for listening. I'm Ben Popper, director of content here at Stack Overflow. And if you want to find me online and chat I'm @BenPopper on Twitter.


 

PF I'm Paul Ford, cofounder of Postlight. We bring strategy, design and engineering to deliver platforms and experiences that drive digital transformation and check us out at postlight.com


 

[OUTRO MUSIC]