Podcast Lookup

Debugging

Programming Throwdown

  • June 3, 2015
  • 1 h 39 min
  • Episode 43
Episode page
About this episodeThis show covers Debugging: how to fix and maintain code across any language. Book of the Show Jason & Patrick: Mindhacking…

This show covers Debugging: how to fix and maintain code across any language. Book of the Show Jason & Patrick: Mindhacking http://www.mindhacki.ng/

★ Support this podcast on Patreon ★

Transcript

From the publisher

This transcript comes from the podcast’s own feed, shown as the publisher wrote it.

Debugging

00:00—
  1. A

    Hosting provided by HostTornado. They offer website hosting packages, dedicated servers, and VPS solutions. HostT.net. Programming Throwdown, Episode 43: Debugging. Take it away, Patrick.

  2. B

    I want to start off with a rant. I'm a very ranty person, so this is easy for me. This one is every time.

  3. A

    Are you a ranty person?

  4. B

    Yes, that's true. I rant a lot.

  5. A

    I need to see these long emails that you send to your co-workers.

  6. B

    No, I do it verbally because emails can be reproduced and held against you versus someone just recollecting what you said. You're a very shrewd ranter. I didn't say that. The worst is don't put in an email. I don't want to talk about this in email. It sounds like proof you were doing something bad.

  7. A

    Yeah, don't ever write an email saying, like, the lawyers will have a field day with this. Like, don't do that, please.

  8. B

    Yeah, so my thing is every time someone at work or on the internet or whatever says, I have a really easy programming problem that I think every programmer should be able to solve. And my rant is that, so I work at a company that does technical interviews. So if you do an interview for my company, then you have to actually like program as part of the interview. And I try to be very sensitive to the fact that programming during an interview is a very, very tough thing to do. And not everyone does, but I try to be very sensitive to that fact because a lot of times when other people who do interviews tell me their interview problems, I think, well, I don't know how to solve that. And the truth is, if I sat in the room and like tried, like, had to do it, I probably could work through it. But I think my problem, and I think a lot of other people have this problem, is that there can be edge cases, which even the person asking the problem either is being nefarious in having there or hasn't even thought of themselves.

  9. A

    Yeah, I had this situation where someone asked me to solve some interview question, and then at some point during the interview, they realized that they had just created a very bad question and didn't know it. And it's not hard to do. It's super easy to make this mistake because, like, it's like anything, right? You don't see, like, all the possible nuances that could happen.

  10. B

    So the classic one I remember is that I was in an association for computing machinery programming competition in college, and we went to one of the competitions with other schools, and there was a question about they gave you a layout of supposedly an unfolded cube. So if you took a cube and you kind of like if it was made of paper, and you unfolded it at the various faces laying on the table, and it forms a pattern, right? And there's, you know, various different patterns that form cubes, the easiest one being four squares in a row and then two wings kind of on opposite sides of the line. So if you have four squares in a row, one over, one under. Like, that's, but there are actually other valid patterns which form squares. Right. And so when we looked at this problem, they give you a pattern, and you had to say whether or not it formed a complete cube. I

  11. A

    Actually remember solving exactly that problem. It was like the Southeast Regional Qualifier, right?

  12. B

    It might have been. We may have. Yeah. You and I didn't know each other then, but we may have both been there at this time. Oh, interesting. So this was a problem presented, and one of the teams from our school afterwards, you know, talked about, oh, yeah, we solved this really easy. You just, you know, look for four in a row horizontally or four vertically, and then the two wings, and then you'll know is a cube, and if it's not, it's not. And they actually got it right submitting that solution. And then we pointed out, like, yeah, but there's edge cases where it's much more difficult to solve. Like, you actually have to think about it in a more nuanced manner. So our team didn't even end up attempting it to solve the problem because, you know, we thought, like, oh, it would take a long time to figure out how to actually do all these edge cases. And it was probably solvable. But it turned out you didn't need to because the test set they used only had the most easy case in it: this, you know, four in a row in two wings.

  13. A

    It was super disappointing. I happen to remember—I mean, not to go on, like, a rant on a rant—but that specific year, that year I did particularly bad in the competition. Our team did particularly bad. And I remember a lot of the problems, like, I remember there being problems with the competition. Like, that was one of them. Like, that one I think we solved, but it took a long time, and other people solved it immediately, and we couldn't figure out why. Yeah, this is why. Yeah, there was some other one where just there was an error in the test set, and no team got it right, but it was kind of BS. Like, oh, man. Yeah, I hated that year.

  14. B

    Yeah, I did bad that year. But, okay, so the reason that this rant is spawned is because I was reading—I don't remember Hacker News or Reddit—and this thing came across a website. We'll have it linked in the show notes. Oh, this is a weird name. The blog is svpino.com? Yeah, I

  15. A

    think it's his name.

  16. B

    Oh, okay. I don't know how to say that, and I don't know what the blog. I never read any other articles.

  17. A

    It's Santiago L. Valderrama. Okay.

  18. B

    So I can't recommend, if anything else on the website, it's good. But this particular post that he got—that became pretty popular was: Five programming problems every software engineer should be able to solve in less than an hour. And so I'm not sure if he means hour total or hour each. But he basically talks about people. This is the, if you ever hear the FizzBuzz rant, like, oh, every programmer should be able to solve this FizzBuzz problem. You can look it up. Anyways, people apply for programming jobs, and they can't actually write just a for loop. I want a for loop. This

  19. A

    is, like, this is actually a real problem. I mean, think about it. Like, you can get somebody who, no matter what they have on paper, like, it's always possible. And it's even sometimes, like, probable that you will get someone who applies who, like, literally does not know how to program. I mean, you can go through an entire Computer Science degree. Like, it's actually harder in the U.S., but especially more in, like, Europe and Asia. You can get, like, a Ph.D. in Computer Science and never have written a single program. It's entirely possible.

  20. B

    It is true. I do give interview questions sometimes. And the way to start off is, you know, it kind of starts with, like, essentially write a for loop that goes through an array and looks for a specific number, right? No tricks, no anything. And, yeah, a lot of people can't get—who have Computer Science degrees can't get that question. And, again, I'm sensitive to the fact that in interviews it's very hard. But, okay, so he gives a couple, you know, he gives up five problems. And the first two are really straightforward. The third one is pretty easy: Calculate Fibonacci numbers. Okay, that's actually straightforward. I mean,

  21. A

    you can't use the brute force recursion way.

  22. B

    For only the first hundred, so you actually can.

  23. A

    Yeah, two to the hundredth. That's, like, pretty huge still, right?

  24. B

    No, but on a modern computer, I think you're fine for the first hundred. Okay, fair enough. Also, I think he wants you to do it. It looks like he's trying to say iteratively, so you actually can just go through the whole list. So you can just.

  25. A

    Wait, two to

  26. B

    The hundredth is still pretty massive. No, it's not two to the hundred. No, that's a complexity.

  27. A

    Yeah, if you want the first hundred Fibonacci numbers, then, like, each, it's a split, right?

  28. B

    Well, yes, if you calculate the hundredth number recursively, naively.

  29. A

    Yeah.

  30. B

    Right. That's true. But if you're doing it iteratively, you just have to keep an array and add the previous two numbers.

  31. A

    No, no, I get that.

  32. B

    But I'm saying, like, yeah, yeah,

  33. A

    Yeah.

  34. B

    But what I'm saying is he's not asking for the nth number. He's actually saying print the first 100 in a row. Oh, I see. So most people would figure out. Which leads you to doing it iteratively. Okay, fair.

  35. A

    Enough. Fair enough.

  36. B

    So I don't actually know to do a hundred, maybe or maybe not. I don't know. Okay, but, okay, that's why I'm saying that one maybe, maybe not. Okay. Right. Then the problem four, which I won't describe, you can go read, but basically he gives you a set of numbers, an array of numbers: 50, 2, 1, 9, you know, different numbers. And he's saying arrange them in any way possible to form the largest number if you kind of concatenate the digits together. Oh, okay. And he's saying this is, like, oh, this is really easy. He presents, you know, he at some point presented a solution that turned out not to even be correct. Yeah, this seems, like, extremely freaking hard. That's what I thought, too. And I was like, oh, I feel really bad because a random person on the internet says this is an easy question, and I don't know that I could get it.

  37. A

    I think this is, yeah, I mean, obviously, like, the numbers won't have that many digits, but I'm pretty sure this is, like, NP-complete where N is, like, the number of digits. So, like, this could get hard, right? Yes.

  38. B

    And it depends. Like, he doesn't give a bound here that, like, could the numbers each be, or the numbers in the array—there'd be 100 numbers in the array? Like, yeah, right. I don't know. And then the last one is he gives you a list of numbers, and you're supposed to put pluses or minuses between them arbitrarily so that their sum is 100. Again, this is not straight. Like, to me, this is not. That's an NP-complete problem as well. This is not.

  39. A

    Easy. Actually, you might be able to use dynamic programming. But, yeah, you're right. Like, there's no way. But these are not on FizzBuzz. Nobody I know can do all of these in an hour, first time, get it correct. And most people won't be able to do number five in an hour.

  40. B

    Yes. So, my rant is simply that a lot of people say, oh, you know, you should be able to do this in an hour. This is easy for interviewing. Just be careful and don't, like, feel bad about yourself because, like, some random guy on the internet says you should be able to, like, oh, this is easy. And it turns out he may not even be right. Like, and like Jason was pointing out, I also have seen people who said, 'This is an easy problem,' told me what their interview problem was, told me what they think the solution is, and then I point out ways their solution is broken. And then, like, oh, I forgot about those ways, you know, or something. So, people sometimes like to say things are easy when they're really not.

  41. A

    Yeah. Yeah, definitely. That's actually a good point. It's very hard in general to figure out how difficult something is. And, I mean, it's true for interview, coming up with interview questions, but it also kind of is a metaphor for just being an engineer, especially, you know, when you have kind of time constraints or when you have to impose, define time constraints. Like, someone tells you, like, 'How long is this going to take?' That's a super hard question to answer.

  42. B

    And the good news is, like, in real life, a lot of these problems I would solve by, like, we were saying, you know, how big can the array be before, you know, it kind of takes too long. It's like the way I would code it in real life, which you can't do in an interview, would be, oh, well, I'll code it the naive way, and then I'll put, you know, the checks to make sure that the input amount I'll have is less than what I know runs in a reasonable time. And then, basically, we'll try to catch when it goes to something more. So, initially, like, oh, there's only five things in the system, but one day there may be 100. Well, the algorithm only works when there's 10. Well, I'm not going to write the algorithm that works for 100 off the bat. I'll write the one that works for, like, 10, and then I'll just make sure the code self-documents and checks that it's less than 10. And when it's greater than 10, we basically have to go rewrite it.

  43. A

    Yep.

  44. B

    And maybe I'm a terrible person for doing that, but I don't want to get analysis paralysis. And too often, people spend the time writing the optimal for size million, and they never end up being past size five or whatever.

  45. A

    Right. So, the guy ends up writing the dynamic programming solution in his blog, but this is a perfect example of, like, you know, our point, right? Yeah. The point Patrick's making is he solves the problem using Dynamic Programming, and he probably feels really clever and everything, but he calls his function F. It's like, now nobody can understand, like, you know, what his code is. There's no documentation, right? Yeah.

  46. B

    Well, the point is, he starts off with the context for it: people who only know how to write CSS and HTML shouldn't be called a programmer. You shouldn't be able to call yourself a programmer unless you can solve this problem. And that's just a really—that's a bar far higher than I would put for calling yourself a programmer. Now, it may be that your company doesn't want to hire someone who can't do dynamic programming. Sure, fine, whatever. That's up for debate. But that doesn't mean they're not a programmer or a good programmer because they can't come up with dynamic programming solutions.

  47. A

    I mean, at the end of the day, computers are cheap, and you know, making something that's easy to read and making it so that if you quit, the person behind you can take your place is way more important than writing the best dynamic programming solution, right?

  48. B

    Yeah, I can count on one, maybe two hands, the number of times in my entire career where I've needed to use—like, the algorithm I chose actually made an impactful difference.

  49. A

    Yeah.

  50. B

    Most of the times it doesn't matter. Architecture can matter sometimes, but, like, true textbook algorithms. Anyways, so my anti-rant: if you really want to go through programming problems with data sets and that, other people have done, we have some resources. One is TopCoder, which is—even if you don't do the competitions offered by TopCoder, they have past problem sets and the example inputs and outputs, so you can actually submit your code and see if it works or not. And they give a pretty—what I find to be pretty accurate, although it's still pretty difficult, but the ones they say are easy are typically pretty easy. Yeah. Now, hard ones could be really, really hard, but the easy ones...

  51. A

    Well, one thing about TopCoder is they have the editorials, so the people who write the problems also take the best solution, and they're good about not just taking their own solution. Like, actually, at the end of the contest, they look at all the solutions, and they find the most interesting one, and they document it, and literally write an editorial, like, with links to Wikipedia and Math StackExchange and everything. So, like, you could do a TopCoder contest and then go back and look at the editorial and learn what you didn't know. It's very awesome. The other ones are good, too. We'll link all three of them. Yep. But TopCoder, by far, is the best for this reason. Yep.

  52. B

    Cool. Oh, man. My news article's up first, and it's time for the news. All right. The first link I have, which is not really news, is NAND to Tetris. So, NAND is a type of logic gate, a NOT-AND. So, it's an AND with a NOT. And it is one of the gates—NOR being the other one, I think—where you can build every other logic gate out of NAND. So, NOTs, ORs, ANDs, exclusive ORs can be built entirely from NAND gates. So, once you understand how a NAND gate works, you can combine them to form all other bits of logic. And once you understand how the bits of logic work, you can build circuits and then computers. And so, this takes you—this massively online course, MOOC? M-O-O-C. Yeah, right. Massive online something course. Offered? I don't

  53. A

    Know. Actually, I'll look it up.

  54. B

    On Coursera. So, I haven't taken this one, but I skimmed through the accompanying textbook. And I've heard some good stuff about this.

  55. A

    Oh, massive, Massive Open Online

  56. B

    courses. Oh, open. Open. Okay. So, is this free? I don't know how long it's been out. And I can't recommend whether or not the actual videos in the course that we'll link is good. But they have books. And it takes you all the way from NAND logic through building a microprocessor, writing assembly for that microprocessor. And this is my understanding through mostly through simulators versus actual chips. But the idea is still there about system microcontroller architecture, assembly. And I guess supposedly at the end, you actually make a Tetris game on your processor that you've built from NAND gates. And I think this is something I did, something—of course, pretty similar to this. Only it wasn't so awesomely named. Or we didn't make Tetris at the end. But I did something similar where you go from all the way to logic gates up to a microprocessor. You know, you're on your own from scratch. And that was really insightful into learning about how processors work and tradeoffs and decisions that are made in processor design. Cool. So if you're a low-level person or you want to learn more about it, I recommend it. If you're a high-level person, I don't know. Maybe.

  57. A

    Do we ever—I don't think we ever explain—if we haven't—if we've ever explained it, it's definitely been years ago. But just to—so low-level doesn't mean that, like, low on the totem pole or anything like that. Low-level means that you're working closer to the metal. It means—no, we talked about this, right? The guys doing CUDA who are getting rich. Oh, okay. Yeah. No, it means lower. It means closer to the metal, which is a—which is a—you paraphrase or whatever you call it, a metaphor for, you know, writing, you know, like, assembly code, C code. Things which are—things which where the code looks very—which looks more similar to machine code than something that's very high-level, like Prologue or something like that.

  58. B

    Yeah, well, it's also something more, too, to me, like, you could write C Linux applications, and I wouldn't really call that low-level per se. But, like, if you're writing Linux, or you're writing Linux drivers, or you're writing stuff that runs without an operating system, or controls hardware, you know, talks out to PCI bus stuff, or—right? Like, these kinds of things that involve hardware, and you need to, for instance, read vendor-supplied data sheets for hardware components, or worry about clock cycles that stuff takes, you know? Like, that kind of stuff becomes low-level, yeah.

  59. A

    Yeah, that makes sense. So, mine is creating art for engineers, and so—

  60. B

    Wait, wait. Art to be enjoyed by engineers?

  61. A

    No, this is sort of, like, for engineers in the sense of, like, there'd be a book for dummies. Oh, okay. So, this is, like, yeah, creating art for art dummies.

  62. B

    So, teaching engineers how to create art.

  63. A

    Exactly. Yeah, that's right. And so—My code is art. I read through this. I haven't gone through in great detail yet, but I do think it's pretty cool. It's written in a very sort of—it takes sort of the affirmative—is that what that's called? Or the imperative. It takes sort of an imperative stance, where it's, like, kind of—it's all written in a second person, like, do this, don't do that, don't forget to do that. It's kind of cool. And, yeah, I thought it was a pretty cool article. You know, as I said in the previous show, kind of getting more into drawing is, like, a hobby and things like that. So, this fit well with that for me. So, yeah, if you're interested in doing some drawing, releasing your creative energy, check out this article. It's pretty cool.

  64. B

    How is your drawing journey going?

  65. A

    It's going pretty good. Actually, I—yeah, I've been—I'm bringing pretty close. So, you know, I'm drawing—basically, I have—I have a list of photographs that I want to make drawings of. Like, not a—I don't literally want to trace the photograph, but I just want to do a sketch of it. And so, I'm kind of making my way through it. And I should be done in, you know, maybe, like, a couple of months.

  66. B

    you do, like, photorealistic drawing?

  67. A

    No, they're meant to be abstract, but the photographs are meant to be, like, an inspiration for the drawing. So, yeah, I'll have to show you some. Okay. Maybe I'll post one to the blog or something.

  68. B

    Totally on topic. Yeah, right. So, my next link is Google put out a how to become a software engineer. But I thought this was kind of interesting because a lot of people would like to work at Google. And so, people talk about that a lot. And there's a lot of online writing about getting into Google or not. And so, this is Google's recommendation on academic learnings—is what they call it. And they basically go through, you know, some links to Udacity courses, Coursera courses, MIT courses for object-oriented programming, you know, learning C++, Java, Python, other languages, how to test, test methodologies. Like, a lot of the stuff we talk about in this show, how to build compilers, a lot of things that they, you know, I guess, feel is important for engineers who work there. I'm

  69. A

    surprised they put learn Artificial Intelligence as, like, a staple.

  70. B

    So, when I read this, like, read through this and tried to understand it, well, first of all, using the guide, checking off all items on this guide does not guarantee a job at Google. I think legitimately honest checking off all these items would take a lifetime. Yeah, right. To actually learn every single item on here. And then, to be, I think what they're saying is, like, these are the areas you want to at least be high-level familiar with. And, you know, more than one or two of them, you probably should be pretty good at. Gotcha. Or do. Some of them are just things to do. Anyways, but we'll have the link in the show notes. And it is interesting. If nothing more than it has a lot of links to good mooks. Oh, word of the show, apparently. Like, Massive Open Online Courses—free. That's right. Free courses for you to take. Like, there's, I didn't know this, a Coursera course on compilers, cryptography, heterogeneous parallel processing. That would be very cool, man. That would be GPUs, which we've talked about. One of the ways. Anyways, so check it out.

  71. A

    What does heterogeneous mean in that context?

  72. B

    It just means instead of, like, lots of cores which are the same, you have different cores which have different specialties. Like, GPUs are good at some things versus a CPU is good at others. So, therefore, a system with both is heterogeneous. And you have to what is that? You have to divide the work so that the best parts run on the best things.

  73. A

    Gotcha. That makes sense. Cool, man. Very cool. That's a great resource. So, yeah, so I checked this out recently. It's called Docker, and it's the final news story. It's pretty cool. Basically, so imagine, you know, you build some cool website, like, in Java or something. And you get it running on your laptop, and you can connect to localhost and visit your website. And you have a database that's also running on your laptop. And everything's pretty cool. And then you, you know, take your code, move it to the server, and it totally blows up. And you say, well, what happened? And you find out, oh, the server's running a different version of Linux. The server's running a different version of the database. It's running a different version of Java, and that version doesn't support your thing. So on and so forth, right? And it's super frustrating. So, Python had this pretty cool thing a while back, which still exists, but it's been around for a while, called virtualenv. Virtualenv, which was basically like a Python environment in a directory. So, you could have some directory that has a Python build in it, and a bunch of other stuff in it. And then you could say virtualenv in the directory, and it would put you in that environment, and it would sort of freeze your version of Python. Ruby has RVM, which is very similar. So you can, you can like now when you send your code to the server, you also send Ruby itself. And so you're guaranteeing that the Ruby you run on the server is the same Ruby you ran on your laptop when you're testing it, right? So Docker kind of takes that idea to the extreme. So they have containers for everything. They have, like, a database container. They have a Ruby container, Python container, so on and so forth. And you sort of depend on these containers when you build your application, which is also a container. So then when you go to the database, when you go to the server to run your application, you just tell it, look, I want exactly these versions of Java and Python and all that stuff. And it handles it for you. And so what you end up with on the server is, you know, you might have a server running, you might have a computer running like 10 different web servers on it. And so it has 10 different versions of Java, 10 different versions of Python, so on and so forth. And Docker kind of manages all of that so that they don't conflict with each other. And everyone gets exactly the environment that they had when they were developing. So it's pretty awesome. It's picked up a lot of steam. There was kind of like things that sort of hokey things that kind of did similar, similar as this. But they weren't really, they didn't work 100%. And this kind of was the first thing that really was extremely solid, and so it took off. Definitely check it out. It's pretty awesome.

  74. B

    I have not used Docker before, but I, it's become all the buzz. I hear about it all the time now.

  75. A

    Yeah, it's pretty sweet. I to be honest, I've only done kind of as the bare minimal, like, I'm running some simple internal stuff at work on it. I haven't used it in like a heavy production environment. But it did exactly what I wanted it to do, which is, which is pretty cool.

  76. B

    Nice. Well, it's time for Book of the Show. And this week we have a special guest. But first, this won't be applicable to the special guest interview, our first ever interview. Congratulations to us. Yeah. But I want to remind people that we still have our Audible 30-day free, or I guess one book, free trial going on. So if you want to check that out, you can go to www.audibletrial.com/programmingthrowdown. Check out some books. We typically every show offer, at least I offer, awesome science fiction and fantasy recommendations. Jason typically takes the high road and offers something to make you a better person. But yeah. Anyways, so you can check that out, audibletrial.com/programmingthrowdown. But this week we have a special interview with Sir John Hargrave. That's

  77. A

    Right. As Patrick said, it's our inaugural interview. And we actually have Sir John Hargrave here to talk about his book Mind Hacking. I took a look at it, and it's pretty cool. It's basically—and you would definitely do a better summary than I would—but from just going through making a pass at it, it looked like we serve a book about how all of us can try to sort of open up our mind, be more creative, tackle projects a little bit with more diligence and follow-through, and things like that. And so I'm excited to finish it. I'm about halfway through.

  78. B

    Yeah, that's great. Thanks for having me on. I've been sitting here in the background for the entire show waiting for my segment, so it's good to be on in the green room. Great hors d'oeuvres back there, by the way.

  79. A

    Cool. Those crackles of energy.

  80. B

    Mind Hacking is all about reprogramming your mind. And I'm excited to be on your show because Mind Hacking is really the greatest programming language you can learn because your mind is behind everything you do. So in the book, we talk a lot about debugging your mind—so basically getting rid of the negative thought loops that hold you back, but then reprogramming those thoughts, like reprogramming a computer, to really help you not only achieve your goals but to feel great and improve your life.

  81. A

    Cool. I know a lot of the people who are listening to the show—they're either getting into programming and these kinds of things for the first time as part of a college endeavor or a late high school endeavor, or they are people who kind of picked a different profession. We've seen everything from chemical engineering to someone who manufactures lightsabers for a living. And they just started off as a hobby and they want to take it to the next level and they want to do something more important with it or bigger with it, or just learn and enhance their body of knowledge. And so I think this book is pretty cool for that.

  82. B

    Yeah. And that's my background too. You know, I came of age just as personal computers were starting to take off. In the beginning of the book, I talk a lot about my experiences with my first programming classes. By the end of the semester of my first programming class, I was teaching the teachers and I talk a lot about exploring things like a semi-legal phone switching software, but I got involved with it—let you make free phone calls. And just that sense of playfulness and curiosity and fun that really characterized the early personal computing revolution. So I can really relate to your audience. And I love that sense of learning something new and then also of exploration of what computers can do. And that's really that same sense of curiosity and fun that I tried to bring to this Mind Hacking concept, approaching our minds with that same sense of curiosity.

  83. A

    Cool. Cool. Yeah. I thought that your background definitely is worth having a discussion on. I mean, I was absolutely—I read the book first actually. I went through and then I went in and kind of dug in. It was absolutely fascinating, the sort of different things that you've been involved in. It was really quite interesting how you've been sort of in the entertainment field and then in the entrepreneurial field and then helping other people—you know, motivating other people to take advances. And the whole thing has just been fascinating. Kind of walk us through sort of the path that got you to writing this book.

  84. B

    Well, I was born on a small farm in Tennessee. As you said, I started out as a geek. So I started out as a developer early in my career. I started out with a company still around called ZDnet.com, one of the biggest computing sites out there. It really just gave me—it was a fantastic time because it was, as the internet was just starting to take off. Those years were really magical. That was really just a moment in history. And it just cemented my love for technology and all things geeky, and I ran a humor site called ZD.com for many years. I also had this business Media Shower. As the years went on, Media Shower continued to grow, and I now run that full-time. We're a content marketing company. But along the way, I really learned being an entrepreneur and also wrestling with my own demons and working toward my own goals—that my biggest enemy was my mind. It was the thing that held me back most often. And yeah, I say in the book, your mind can be your greatest friend and also your worst enemy. What we need, I am convinced as a society, is tools to learn how to manage our own minds. Think of all the effort we put into educating people about math and science and reading and writing, but we don't talk about that most basic skill of learning how to manage your own mind. And so that's really become my passion—is sharing with people here's some of the hacks or the tricks that I learned to manage my own mind and get to where I am today. And I want to help them do the same.

  85. A

    Cool. I actually—I was one of those people early in life where I didn't really care about history or in history classes or anything like that. I didn't read a lot of geeky things, a lot of kind of fiction books, but I didn't read a lot of self-help books or anything like that. At some point I realized that I was learning a lot of things the hard way and just really starting from scratch on things. Over time, especially if you have to go and get an advanced degree and you have to publish papers and things like that, you realize that it's a lot easier to build on the shoulders of giants, so to speak. Right? So that's when I started really getting into digesting a lot of information, reading a lot of information about people who are writing about their experiences, their history, and also sort of how they can what they've learned in some kind of specialty. Right? So one of my favorite books I keep going back to on the show is The Dummies Guide to Negotiation. I read that just because I was curious what a dummies book was, and I'd always been making fun of them for the label they put in and everything like that. But then it ended up being just one of the best books I've ever read in my whole life. So now I'm kind of a big fan of people who have gone through very interesting, especially very eclectic experiences, sort of learning from them and building on top of that. And so I think this is one of those books that can really help people.

  86. B

    Thanks. Yeah. I'm a fan of the For Dummies books too. DOS for Dummies was the first—I mean, that was the first For Dummies book. That was the first one I owned. DOS was of course the original PC operating system, and it was confusing if you didn't have much of a technology background. What they did that was brilliant was they just pulled in humor and they made it very accessible. They explained it in plain English, and it was funny and it had cartoons in it and lots of eye candy. And that's been—you know—basically the formula they've used for that franchising empire. And it is relevant because that's very much what we've tried to do with Mind Hacking: take this very kind of arcane sort of philosophical concept of your mind and managing your mind, but put lots of humor and put lots of real-life examples around it. We tell lots of stories of great—you know—great geeks throughout history, great technological innovations, and how we can use those to manage our own minds. So I'm glad you enjoyed it. Thank you for that, Jason. Yes.

  87. A

    So what part from the point—just kind of following the history of the book from the point where you started having this downward spiral with addiction to where the Secret Service comes knocking on your door to where you managed to beat those demons and where, in your own words, you hack your mind and you're able to get better control of yourself and your family and your destiny all the way up to running this company. So what point did you decide I'm going to write a self-help book? This is always one of these things that interests me. Like when do programming language inventors decide, screw it. I'm not going to use C++ anymore. I'm going to invent my own language? It's just a massive undertaking. And I feel like in the case of programming language inventors, a lot of them are the kind of people that they just don't settle for what's out there. They don't want to use tools that are inferior. And at some point they say, you know, this is worth the five-year investment. It's going to make for me to spin up this language and generate support. So at what point for you did it sort of click and you said, okay, I'm going to write this book and invest this time?

  88. B

    It's a great question. And I guess the best answer I can give is that I heard once someone say, 'You should only write a book if you can't help not writing the book.' So in other words, if there is a spontaneous expression that rises up within you that says, 'You must write this book,' that's a really good reason to write a book. And I think the same is true when you're developing a programming language or you're doing any kind of great creative work—that there is a drive, there's a passion that springs up from within you. And you just know, this is what I have to do. This is the next thing that I've really got to be involved with. How did you guys decide to do this podcast? You know, there was something in you that said, 'We've got to do this podcast.' And you do it and you put your heart and your passion into it. And eventually it starts to click with people. And that's how we move these things forward. So I think that's the quick answer to your question: there's a passion. There's an energy. There's an excitement that should drive us to do these great things. And when we feel it, we got to act on it.

  89. A

    Gotcha. So along those lines, and I haven't read the entire book yet. So I feel like this might be in one of those areas of the book that I haven't read near the end. But how do you—where does the sustainability come from? I mean, I feel like I have a million different side projects. And of that, you know, programming throwdown is among the few that where the sustainability is there and where it's really kind of gotten off the chopping block. And it's become kind of a real thing that we have going here. But so many other projects, kind of, they just—the momentum dies out. The idea fizzles out. And just, there's plenty of people out there who can relate to this, where they have this great idea, they have that energy. And then after a few weeks, it's gone. Or after the fun part is done, it's gone. And they can't kind of execute. So how does mind hacking help with that part of it?

  90. B

    Yeah. So in the end of the book, which you'll get to as soon as we finish this podcast tonight, we talk about the ability to act. In other words, once you kind of debug your mind, you clarify your thinking, you plan, you kind of reprogram your mind with these new values and these new goals. Well, then how do you make that happen? How do you bring it out into the world? And what you're asking is, how do you persist? So how do you continue to do it? And there's a whole chapter on this where we talk about breaking up your goals into sub-goals. We have an acronym called LASER, which talks about the best kinds of goals and how to make those repeatable and something that you can do day after day to really start to make progress toward those goals. But what generally happens is people have negative loops that kind of go on in their mind that sort of drain their mental energy. And because that's happening, they lose momentum in continuing to push on those projects. So, for example, you might be very excited about this new programming project on day one. And then day three, other concerns and worries start seeping in. We call these your negative thought loops or your negative habits. And then that starts to drain the energy that you want to put into this main project. Now, if you can cut off those sort of energy leaks from your thinking and reprogram those negative loops, you'll have more energy to keep putting into these projects that you're passionate about and make some real progress.

  91. A

    Gotcha. Yeah. I feel like a lot of it, and this is just looking back empirically at the things that I've done. And Patrick, maybe you can chime in one way or the other, whether you agree with this, is a lot of it for me has been about the philosophy. Like, the reason why Programming Throwdown is really interesting to me is that I've always wanted to teach. And I was torn between becoming a professor and going into industry. And I feel like this was a way to sort of get the best of both worlds, to kind of teach myself and teach other people about programming, and then also to kind of have an industry job. And I think that because there's sort of a philosophical reason behind it, that's what sort of keeps it going when you're in, I guess, as you say, one of these negative loops where you have to spend, you know, four hours putting together the show, and then at the end the notes, you know, your computer crashes and you lose all your notes, and you have to spend another four hours redoing it. And when those things happen, it's this sort of philosophy that sort of is that positive light that keeps shining, that keeps you going through the parts that aren't very fun.

  92. B

    Yeah, you're helping people, right? And that's, I think, what you're saying is that you're providing a real value, a service with this podcast. And in the book, we talk about collaboration, and we talk about, you know, that's another great way of staying focused on these goals is collaborating or thinking about what can I give back and how can I help people and how can I work with people to do something that's greater than myself.

  93. A

    Yeah, or even, you know, if you're, even if it is more self-centered, like your goal is to make an awesome, you know, to-do list website. That's often one thing that we tell people when they ask, you know, what's the first thing I can build? Even if that is your goal, it's good to sort of stay focused on that. Like, instead of saying, I'm going to make the fastest, you know, game engine I can, and then you end up with, you know, a small piece of a game engine. If the goal is sort of like very abstract and kind of philosophical, you can try to—then you're fine sort of maybe cutting corners here and there or doing the not-so-pretty solution or things like that because the goal is something that's, that's kind of much more high level.

  94. B

    Yeah, in the book, there's a whole section about just barely good enough, right? J-B-G-E. So the object is to get code or to get projects that are just barely good enough. It's the same concept as kind of agile development. We want to just get something out. So many of us suffer from perfectionism. We suffer from, you know, wanting everything to be perfect before we can feel like it's worthy of being released. But if we can adopt an attitude of, I just want to move the ball forward. I want to take a small step today toward this goal. I want to just get something produced and get it live and get it out there. And then I can iterate, right? I can continue to improve based on feedback that I receive. And that's why I would say to anybody listening to this podcast, it's a lot of work to produce content. And what Jason and Patrick do is it takes a lot of time for, you know, this hour that you're listening to it here. Many hours are going on behind the scenes. So the best thing you can do for any of your favorite content producers is thank them, is just give them positive feedback. When you do that, it really is incredibly motivating. And in many ways, it's like the only reward that you're really getting. Yes, it's nice to go read all those iTunes reviews, at least the positive ones anyways.

  95. A

    Yeah, definitely. Cool. Patrick, do you have any questions?

  96. B

    I was just going to comment. The Minimally Viable Product, Lean Startup, is the other idea that goes along with what we're talking about. And if you've never read about that before, it's also a good read along the same topic.

  97. A

    Yeah, I think we had that as one of the books of the show, The Lean Startup. But yeah, that's a fantastic book. It's one that a lot of people keep going back to. And at least here, it always seems like everyone's kind of read that book. So that's always a good sign.

  98. B

    The Lean Startup is one of the foundational books behind our company, Media Shower. We talk about it in employee training whenever we bring on new folks. And I think it's a fantastic book that really does drive home that point of it's much better to get something live than to get it perfect. Just get it done. Don't get it perfect. But also constantly improve, constantly iterate on it, and just keep chipping away and making your product better and better.

  99. A

    Yeah, I feel like there's this misconception that the Minimally Viable Product means you're not working hard enough. But it's really that you're working so hard and so fast that you can change directions quickly. And it's more that you're still running but not in a straight line. You're constantly pivoting as you learn more and as you iterate. And that's just supremely important.

  100. B

    Yeah, the misnomer about, I say in the book, 'in just barely good enough' is that, as you said, it's pretty low quality. It's just barely good enough. It's not very good. But the truth is it's actually the best possible because you get the most accomplished with the minimum amount of effort. So from an efficiency standpoint or from an elegant standpoint, it is the most efficient, best solution. And it's self-recognizing that no strategy survives first contact with the enemy, right? So you're trying to make something for someone else. And when you finally put something out there, it won't be right. Yeah, that's right. Exactly. Yeah, that's a great point. You need to get that feedback.

  101. A

    Yeah, thanks a lot for coming on the show. The book is fascinating. I'm going to read the other half right now. Actually, by the time you guys listen to this, I would have already read the other half. And you haven't even started yet. So you guys out there have to catch up. Cool. Excellent, Sir John Hargrave. It was great having you on the show, on our Book of the Show, and also our first interview ever on Programming Throwdown. So thank you for bearing with us while we had our inaugural interview and got everything going here.

  102. B

    It was my pleasure. And I'm going to go back off to the green room now. It's off to the right, down the hall to the right.

  103. A

    Yeah, that's right. The long hallway, just past the mansion, the stables, and the helicopter pad. All right. Thanks, guys. All right. Thanks a lot. Have a good one. Time for Tool of the Show. Tool of the Show. So I don't think we talked about this one in our Unix commands show. We probably did, but it's awesome

  104. B

    enough to use again.

  105. A

    That's right. If you're using Baboon, which you should be after our last show on Windows, or you are running Mac or Linux, you have access to this amazing utility. And if you're ever using CP, you probably should be using RS, which you alias to RSync. That was a mouthful. So RSync is basically CP on steroids. So, you know, first of all, any command CP can do, RS can do, just naturally. It's faster. It also, well, in certain cases, it's faster. It's not always faster. But also, it has some pretty awesome capabilities. So if you do RSync-RAZ, then what it will do is it will look at the destination and look at the source and only copy what's changed. So that's pretty cool if you're copying, like, to a server and maybe you're doing it every day or something like that. Definitely use RSync, right? You don't want to waste all that bandwidth. It has a number of other really cool features. It can do, like, one-way synchronization. It can do, like, clobbering or no clobbering, which means if you delete something on the source, it will delete it on the destination, so on and so forth. Basically, it has a ton of functionality like this. You know, it can do it across computers. Like, you can actually RSync to an SSH endpoint. You don't have to RSync just from one directory to the other. I think some versions can even RSync to FTP servers. Like, it's kind of crazy, but I know it can do SSH. And, yeah, I use it all the time. I think it's pretty great. RSync. Yeah, all one word.

  106. B

    The letter R.

  107. A

    R-S-N-Y-C. Yeah.

  108. B

    My tool of the show is not a software tool. It is a multimeter, multimeter, depending on how you say it. Oh, I was

  109. A

    Wondering if, like, you were going to say, oh, this is an Android app or an iOS app.

  110. B

    Nope. This is a good old-fashioned, lives-in-your-toolbox electrical measuring device.

  111. A

    Nice. I have one behind me, but I won't get it out. Do you?

  112. B

    Oh. Well, it won't come. We won't be able to see it in the audio version anyways, so. Fair enough. So, the reason why this is my tool of the show is because, although we're software engineers, it is very useful sometimes. Wow. That was a lot of caveats. It is. I find it to be useful to have and know how to use a multimeter, multimeter, because.

  113. A

    I'm going to look it up.

  114. B

    No, I looked it up. It's actually both, which is why I'm saying both. Oh. So, I asked Google, 'Define multimeter,' and I switch back and forth on how I say it. Okay. Anyways, a multimeter allows you to measure voltage, resistance sometimes. The other, it's called, you know, a multimeter because it measures different things, and you're able to, for instance, if you have like around the house, I have them just to measure like is this battery dead or not, and you can buy those specific battery testers, or you can just measure the voltage with your multimeter. Also, I use it for like doing conductivity testing, like if I have like a wire—like, you know, be really careful. I shouldn't recommend what I do with it because if you're doing electrical stuff around your house, be really safe and make sure the power is off. Yeah, I mean go to

  115. A

    your fuse box? Know what your fuse box is? Yes, but

  116. B

    yes, I use it a lot around the house, but also at work. I do low-level programming, so often I have hardware, and it's important for me to be able to tell like various voltages on my development boards that we have, and so I need to be able to tell if you know something is on or off, what's the power draw on a given region of the board—these kinds of things. And so I find this tool indispensable, and it really makes people you work with who are in other disciplines, you know, appreciate that, you know, more than just your niche. So a lot of people think, you know, software engineers just know software, and then when you kind of know how to use tools properly, then they, you know, kind of gives you a little bit more

  117. A

    Respect? Hey, definitely get some street

  118. B

    cred. Yeah, all the cool kids are using them.

  119. A

    Yeah, all the cool kids are using multimeters.

  120. B

    Ah, yes. So cool. That's my

  121. A

    tool of the week.

  122. B

    Probably useless.

  123. A

    Do you have any? Do you have any? So actually, I was wondering to ask you this. A little bit of side note, but if I was to get any of these sort of starter kits, like a BeagleBoard or Raspberry Pi, uh NerdKit, uh like which of these should I get? So as somebody who knows virtually nothing about this?

  124. B

    So I mean, like Raspberry Pi and BeagleBone are kind of the same thing in my opinion. Like they're—they are different, but they're at the same level, which is their, you know, small Linux computers. And so if you want to do both powerful Linux internety things, um, and also be able to control hardware, they're really good.

  125. A

    Do they have the I2C connector and all that stuff? Yeah?

  126. B

    I think they have it brought out to a GPIO header, like a set of pins, so you can talk I2C to other devices. Um, and then there's lots of libraries for doing that. Of course, personally, I find doing I2C and Linux to just be overcomplicated. Like it's not people do—do it, and there's libraries to help you do it. Um, and if you were going to develop something that you wanted to also have like displayed on your computer, for instance, or be a web server, that's the way to go. Um, but if you're looking to just learn about hardware—because personally I like doing in my spare time what I don't do in my work time—um, right? And so like if you do kind of that programming a lot, you it may be lean more towards like something that's Arduino-based because an Arduino isn't going to have an operating system. It's going to be much more just about the hardware. The programs are going to tend to be simpler. Um, they won't be able to do as much per se, but they're going to be better at timing and controlling hardware because they're—they're simpler things, and they'll also be cheaper typically. Um, gotcha? So that—that's the Arduino is what you—that's the approach I would take if you really are wanting to learn about like I2C devices, SPI devices, um blinking LEDs, that kind of stuff. I feel like it's more straightforward to get there on an Arduino than a Raspberry Pi.

  127. A

    Okay, cool. Good to know. Does Arduino have like a Wi-Fi chip? Can you—can you?

  128. B

    Do have one, but it is pretty expensive. Okay, got it. But yeah, like but then if I was going to do Wi-Fi something, I'd probably—I might go with like a Raspberry Pi because like Wi-Fi is complicated. Um, ah, okay. Right? But like you could always start on an Arduino talk to like if you're going to talk to sensors and stuff, like if you want to read a temperature and send you an email when the temperature gets over 75 degrees. Yeah, exactly. Like you could start on an Arduino for instance and like learn how to talk to the sensors, read it, and you can hook it up to your computer, right? So you can like plug in the USB cord to your computer, and it'll show up as a serial port. Then you can just write a simple program to read the temperature off the serial port, send the email. And then once that's working, like you have all the pieces that if you wanted to do it like on a Raspberry Pi, you would just strip out one little part in the middle and kind of put the other two pieces on the Raspberry Pi and do the same thing. Got it? But yeah, people forget you on your—on your Arduino, it basically I wanted to

  129. A

    So gotcha. It can. Yeah. I mean, I wanted to write something that it does world domination, but I figure like getting the temperature of your house is pretty much the same thing. Okay? And then and then stream it over?

  130. B

    Serial? Yes. So then yeah, Arduino would be fine. All right, time for our debugging discussion.

  131. A

    Debugging, debugging, debugging, debugging, debugging. Like defense debugging? Okay. Well, first, Jason, tell

  132. B

    us about the kinds of things you would need to

  133. A

    debug. Yeah, so what are the kind of problems you have as a coder? So the most obvious is a crasher, right? So you have, you know, I'm writing my temperature sensor that also takes over the world, and I divide by the current temperature, and all of a sudden it's strangely enough when it's zero degrees Celsius, my program crashes because there's a divide by zero. That's why you shouldn't use

  134. B

    Celsius? Oh, I'm putting tons of hate mail now.

  135. A

    Yeah, I mean that's also why you shouldn't use metric. Stop! Stop!

  136. B

    Stop? No, no. This is not a real belief.

  137. A

    Yeah, these are not our real opinions. Okay. So second is hang or slowness, right? So a hang is where you know it just all of a sudden—they also call it a freeze, you know? It's where it's just you've entered some bad state and just nothing. Yeah, it's

  138. B

    gonna be like an infinite loop, for instance, like it's just stuck.

  139. A

    Yeah, exactly. Or

  140. B

    infinite recursion.

  141. A

    Yeah, it's continuing, continuing just so incredibly slowly that it feels like it's frozen. Um, wrong answer where you know you expected, you know, the answer—the meaning of life—and you got 43 and a half, and it's like whoops. Um, memory or memory or thread leak. So if your program, um, over time the memory usage goes up, up, up, up, but eventually your computer runs out of memory and dies. Or if you know every few seconds you're creating a thread and you're not deleting any threads, you know, after like 30 or 40,000 of that, you'll your computer will run out of threads and blow up. Um, these are all—these are all real things that can happen, and so that's I figure here that covers the majority of the bugs. Yeah, there's

  142. B

    Other ones, like you could get the common ones, like on a computer with an operating system, like a page fault, like if you have an errant pointer, like you try to null dereference. So you have so most of these, I guess would apply—that would apply to, like, a C or C++ if you had null and you tried to dereference it, right? Typically that will get caught by the operating system, and you'll get some sort of crash. So I guess that's a crasher, but caused by a different oh.

  143. A

    Yeah, yeah, yeah. Actually no, you're right. We should have like a buffer overrun. Oh, buffer overruns are another one.

  144. B

    Yeah, yeah. So,

  145. A

    Buffer overrun is very simply, you know, you have an array of size four and you try to get, you know, the 27th element of that array. You're actually, you know, in C or a low-level language, you will get something, but it definitely won't be what you want, or you might.

  146. B

    Get a crash, depending oh.

  147. A

    I guess that's yeah, that's true. Like if you have the program protected access or protected memory space, or yeah.

  148. B

    So in the good case it crashes; in the bad case, you just get a number that is probably close to it. Could very well be a sensible number, but not what you want. Yeah, makes sense. So then the techniques for debugging. So I was telling Jason before the show, I actually consider myself to be like pretty good at debugging, mostly because I tend to be able to like track down where the problem is and like isolate it very quickly, if not fix it, not all the time, right? I'm not saying I'm like the world's best, but I just find this to be something that I enjoy and is a strength of mine. And one of the reasons is because I'm very ruthless in what I call divide and conquer, which is basically about finding out where the problem is. Not so if you know there's a problem in the code, the more of the code you can say it's not a problem, then the faster you can find what is the problem. So a lot of people, I find, try to like consider everything in the system that influences a given answer, right? So you get 43 and a half. Well, what are all the inputs that lead to give you 43 and a half? Um, and that can, you know, if you just sit there and think about it conceptually, it can take a long time versus dividing and conquering and be like going and saying, 'Okay, here's a bunch of computation,' and then I add to it this other bunch of computation, and I know what the results of, you know, the left half should be and what the results of the right half should be, and you look for which half has the wrong answer, and then you keep tracing back and you keep dividing, right? And you're eliminating whole. Yeah, I do exactly the.

  149. A

    Same thing. I just kind of thought everyone did that.

  150. B

    No, no, really. Yeah. Oh, all right. Like a lot. Of people I'm saying is like they try to look like audit the code or like think conceptually for like long periods of time and say where could be the problem versus me. I'm much more likely to just start going in and start like we're using techniques we're about to talk about, like to start hacking up the code and like look for yeah what gets the right or wrong answer and where does it go. Yeah, I'm.

  151. A

    Exactly the same, but.

  152. B

    That is not common, wow, or at least it may be. I haven't I don't observe that to be the case, and I'm not saying that way it's always faster because if you sit there and think about it meditatively, it's.

  153. A

    log in time.

  154. B

    Yeah, but if you think about it meditatively, you could get it like right away. Right? A login-login algorithm isn't always the N squared algorithm; could be faster if N is super super super small.

  155. A

    Yeah, or is it O(1) if you just look at the file and know the answer?

  156. B

    well it's the whole coefficient thing right so mine might be ordering squared but with a big coefficient or order a login algorithm but with a big coefficient and then you may have an n squared algorithm with a tiny coefficient yeah yeah anyways blah blah that was nerdy um and so yeah so i mean i've that works for some people but for me i find it very useful even conceptually just to think about like what systems are in or out of play uh in trying to find the problem

  157. A

    Uh yeah, that makes sense. Um so another technique is logging. Um obviously, like the simplest is print statements. So you know if the function takes in two ints and it's supposed to return, you know, their sum, and it's returning something completely bogus, then you want to put a print statement in that function where you print the two ints and what you think the sum is before you return. And from that, you can kind of figure out, um oops, you know my Arduino is too hot and my my sum function is not working. Um so or or you can find out that you're like that guy on the blog and you used a minus instead of a plus sign. Um another thing you can have is rolling files. So I mean obviously if you keep putting print statements, you have to do one of two things: you either have to put them in the print statement and then fix the problem and then take the print statement out. But then if you do that as your program gets bigger and bigger and bigger, you will eventually discover a problem that happened, you know, six months ago, and now you have no more kind of print statements anywhere in your code, and you have to go back and put them all in. Um so a lot of people just leave the prints in, but now your program becomes like really slow because printing to the screen um um halts the processor and things like that. So, you know, you can log to a file, and then you can say, 'Okay, I'm going to take all these print statements and dump it into a file where it can be printed really quickly because it doesn't have to go straight to my eye.' And uh and then every day I'll delete the file and start over. Um so that's pretty common is to have a lot of debug logging um and to, you know, dump it to a file or even have a level of logging that gets thrown away and you only use that level of logging when you know something's wrong.

  158. B

    Right? Or like the function actually no-ops in the case where your system logging level is set higher than the log message you're trying to output, right? So I see a lot and depending on the language you're using there's different ways of doing that. Um but logging can still be problematic because they're like as Jason pointed out, but even just printing to a file still can depending on your application be hugely expensive um relative to what you're trying to do. So if you're trying to process a million, you know, items of data and you're printing 10 things for each one, right? Like this isn't going to work. Also, it's going to be very hard to track through if only a couple of them are having problems, track through all that massive amount of data you've generated looking for problems.

  159. A

    Yeah, so sometimes you need to like take a certain function and just really dive in, and you're willing to just take an extreme amount of time to find some bug that's very nuanced. And that's where things like debuggers can really help. Um so for C and C++, there's GDB, or if you're using LLVM, if you're using the Clang compiler, there's LLDB. Um for JavaScript, there's Firebug, which is pretty cool. Um Chrome has a debugger too; it might just be called the Chrome Debugger. Um for Python, there's PDB, and for Java, there's JDB or JDWP, which is not something—excuse me, not something you would use directly, but you would use through an IDE. So, you know, if you ever like are coding Java and Eclipse and uh you're writing some web server and some function is just really hokey, and you could try to test that function isolation, you could run some simple Eclipse program in debug mode, and that's actually using this JDWP to, you know, start your program up in debug mode and then talk to it through this protocol. So Java has sort of an API for um for debugging, which is pretty cool. And so that's how these IDs work.

  160. B

    Another thing is that you know it may not be obvious that something wrong is happening, but just that your program runs slower than you expect it to. You didn't implement the dynamic programming solution and instead you implemented the N squared solution, but you still think you can get there with N squared, but you need to understand what functions are taking too long, and then you need to do what's called profiling.

  161. A

    That's right. That's right. So actually interestingly enough, Morton Nielsen posted on the um on the Google Plus page and asked us to do a show on profiling. And so uh the show on debugging was a good opportunity to talk about this. Um so yeah, if we could uh talk about profiling in a nutshell, I mean, yeah, basically profiling is where you run your program uh hopefully as in as normal an environment as possible. Obviously, you know, the act of adding profiling taints the program; you try to keep that as low as possible. And a lot of these tools are optimized for that. Um and then you uh finish your program, hopefully doing some task that's that's nominal for that program, and at the end, you get this cool dump, this this graph which shows what functions you spent the most time in, and uh, you know, what lines of code were the hot spots, and things like that. And so there

  162. B

    are a couple different ways of doing that. So um there we'll talk about some tools in a second, but there's all kind of two ways I know of doing it. One is where you essentially for every function call, you add a little bit of—you generate a little bit of metadata so in the prelude and postlude to a function. So this is like in your programming language when you go from one function to another, the compiler inserts a little bit of code in between them, or you do a little bit of code in between those two calls to say that you're calling a new function and what the current time is, and then you're returning from this function and what the you know current time is. And if you do that for all the functions, um you'll get not the correct time but relatively the correct times for how long each function takes. And then for functions which are called over and over and over again, of course they'll have lots of entries, and if you sum up all their time, even though each individual time may be very tiny, if you sum up all the times it could be a huge portion of your program. So think like a very tight inner loop calls some function for graphics processing um could end up taking a long time in aggregate, and you'll be able to catch that by essentially looking at all these every time the function call started and every time it ended. Now, the problem as Jason pointed out, depending on what other systems you interact with, like let's say you're also talking to an SQL database while doing this, you know code um there could be timeouts associated with the database, and so if your code runs really really slow because of all this extra data is generating, then your SQL, you know, query times out, uh your connection times out, and you have to start it over. And it just changes fundamentally the way your program interacts with other processes um and so it's not always desirable to do that. Although if you can do it that kind of way is the best because it gives you the complete answer. Um but the other alternative which statistically in the long run ends up being the same is random sample profiling, which means that at a specific at a random time you wake up, uh you be an interrupt or whatever, you stop your program and you ask it what current line of code it's running at. So um in embedded we often have to do this in a custom way where you have an interrupt that fires and you look at what the Program Counter that was pushed onto the stack was, which is where you'll return when your interrupt finishes, and you you know essentially put that uh return location somewhere. And then at the you know end of some interval, you go look at all those return locations and then statistically in aggregate, you know, what functions you're spending time in by randomly when you woke up and asked the processor what it was doing where was it at. Um Then you build up a picture of where you're spending time, but you could miss certain functions like if a function is only called once in a while and for a very brief period of time, you may not catch it randomly, but then you may you wouldn't care about it because it doesn't take very long to run. Yeah.

  163. A

    That makes sense. Yeah, it's like, uh, you know we talked about acceptance-rejection sampling like a few shows ago and how you could estimate the volume of a surface and all that stuff. Um, this is basically that. I mean, this is just pure acceptance sampling, but—but yeah, I mean to Patrick's point, right? If you take enough samples, then, uh, yeah, it's like a Monte Carlo approximation of the actual time, and it's much easier to implement. Yeah.

  164. B

    But it does have a flaw where with random sample profiling that if for instance, like you do a load of a lot of math operations, like you take a lot of sines or cosines and you are spending a lot of time in that code, but it's called from many different parts of the system, it will only tell you that you spent a lot of time computing cosines, but not for what purpose? Like what was the one level above function? Oh, why can't it unwind? It can't?

  165. A

    Unwind the whole.

  166. B

    It depends. So yes, it does if it unwinds the stack as well, so only if it records okay their current call stack. Yeah, right? Which we'll get to a horror story why like a lot of times in low-level embedded you can't actually get the

  167. A

    whole call stack? Oh, okay. Cool. Um, so yeah, so the uh, oh man, I was totally gonna say something. I forgot. Um, I'm sure it was important. Oh, yeah, yeah, I remember. Okay, so Boost has this pretty cool thing called scoped_timer, which is meant for the thing Patrick talked about earlier where you want to time every function, and it's just—I thought it was kind of clever. It's a timer object, and in the constructor of the object, it gets the time, and in the destructor of the object, it, you know, gets the time and takes a difference and prints it. And so the idea is like, you know, as long as you create the scoped_timer on the stack—you know, you don't use new scoped_timer. No one would ever do that. So as long as you create it on the stack, then you don't have to create the end version; like it just naturally happens when you return from the function, and you could even have, like within a function, you could put little curly braces and put a scoped_timer such that, you know, you know it's going to go out of scope.

  168. B

    I still find the like non—like the curly braces without an 'and C' or C++ you're talking about, but like yeah, curly braces for creating local scope without something at the opening curly brace. I still find that disturbing. Really, like I've seen it so many times and I still find it jarring, like such a weird notation.

  169. A

    As long as you're creating the variable right afterwards, I'm okay with it, but if you just have one kind of floating then yeah, I kind of think why did this? Why is this here?

  170. B

    There are lots of reasons for doing it. It's just always like it never jived with me. It always just

  171. A

    Okay, so uh some random tools for this. So C or C++ you're probably going to be using gprof. Um, for JavaScript, the Firefox and Chrome both have a pretty good profiler built-in. Built in one interesting thing is they'll give very different results. Um, I guess it's not that interesting because, you know, they're completely different browsers, right? But um, but like there are some things that Firefox—I think adds like counts in the profile that Chrome doesn't, and things like that. Um, Python has Profile or cProfile. I thought this is kind of interesting. Like Python has a lot of these libraries where they have like a C version. Like they have Pickle and cPickle. They have Profile and cProfile, and I always kind of thought why would you ever use Profile when the cProfile is just better in every way? The only thing I can imagine is you might not exist on every architecture or something like that. Um, so I put both in just in case, but you're almost certainly going to want to use cProfile if you're doing Python.

  172. B

    The yeah, so oh sorry for memory leaks. Um a tool I've used before is Valgrind, which is extremely interesting because you don't actually run your program on the processor when you run it through Valgrind, but Valgrind instead looks at your code and basically hijacks it. So like when it sees you using memory, it tags it so that it knows when you free it and when you don't. And this has again a problem we talked about before where it does change the timing of your code. Um But for memory allocation/deallocation is very useful because it tags all every time you allocate memory, it says when you created it, when you freed it. Um And I don't remember—I think it even maybe gives you line numbers where you did it. I can't remember now. It's been too long since I used. Oh yeah.

  173. A

    It does. It gives you it gives you line

  174. B

    Numbers, yeah. So it is a really powerful tool for Linux-based systems. I don't know if there's something equivalent in Windows, and when you're not using an operating system, there's no dice, but yeah.

  175. A

    For Mac, there's also—you can build Valgrind for Mac. For Windows, I believe you can build Valgrind, but the catch is your binary must have also been built with GCC or Clang. So, you know, if you build your binary using Visual Studio, then there's no hope. I'm no hope with Valgrind, but there are others, like Intel ASAN has a tool you can pay for. If you're already paying for Visual Studio, they probably figure paying is something you're—you like paying. Yeah, another one is AddressSanitizer. It's very similar to Valgrind; it's not as heavy. In fact, many people run AddressSanitizer all the time because it's only like I think a 30 or 40 percent hit, and most people say, 'Oh, I'd rather buy 40 percent more computers than have an address out of bounds error.' And so, so many companies run with AddressSanitizer on all the time. It's much more lightweight than Valgrind, but it only catches a subset of the errors.

  176. B

    For automated testing, you know, you can write—we all we've had it. We had a show about unit tests that's great, integration tests. There's also a great kind of testing called fuzz testing, which is essentially throwing random randomly generated data at your program. So this is really good for instance if you think about a program which accepts packets over the internet, for instance, and you say, 'Oh, I'm checking for malformed TCP packets.' Well, that's great, except you have some sort of internal finite state machine that's looking for certain bit patterns. And if I keep throwing enough random stuff at you, eventually get something that looks an awful lot like a real packet but it's flawed in some way that if you were crafting inputs, you would never think about, and you can cause all sorts of crazy crashes end up getting found every story I've ever heard about. And maybe it's confirmation bias, but every story I've ever read about someone who decided to try doing fuzz testing has always found like whole classes of errors they weren't catching in other ways.

  177. A

    Yeah, definitely. I mean, I've used Gremlins.js, which is a visual version of fuzz testing. Basically, you load Gremlins.js into your browser while you're looking at a website, and you can even do this on websites that aren't yours, which is kind of cool. Like you do this on New York Times or whatever, but you can load Gremlins.js and then you can say, 'I think it's like Gremlins.spawn,' and it will just randomly and very quickly start clicking all over the screen and typing into all the input boxes and hitting enter and clicking on all the buttons.' Did you?

  178. B

    Just recommend people to try hacking The New York Times, Jason.

  179. A

    I think I just DDoS the New York Times like thousands of people. So so—you could do this on your own website, and the short story here is, you know, I have this internal website that I use Docker for, which we can go back to that, but I ran this Gremlins on it, and it completely blew up. Like even the server died, everything died. And you know, I went through several iterations. I basically got to the point where I just like it was too hard. Like, I just the Gremlins beat me, and I still have to do a lot more work to overcome it.

  180. B

    So if you know where Jason lives, you can run Gremlins on his website and crash all his computers. Yeah, that's right, but—

  181. A

    You will be absolutely amazed, especially with JavaScript where or you know with web design where you might have a lot going on on a website, but you don't really expect all of it to be engaged at the same time. You will be amazed at how broken—you know, like Gremlins will actually click buttons that aren't visible because I mean technically someone can just make them visible in the browser and click them. Like it's possible, you know. And so if you're not handling that on the server side, it's just your thing just explodes.

  182. B

    Guys, check that out: web programming and invisible buttons. I don't even know what's going on. All right. Also tools for iOS and Android to do similar things—click randomly, click your app looking for problems. Oh, we didn't even talk about fuzz testing for like sanitation of inputs for like SQL injection and stuff like that, which is also very important. Oh yeah, because there's sources out there, there's like all sorts of Unicode characters that also do equivalent things and escaping and escaping and oh yep, all sorts of weirdness that you can do. And then of course, all of it's very important for when you're running services in production or on, you know, user devices that you have reporting crash reporting aggregate reporting—reporting some dashboard where you can go to and say, 'Did my newest release cause more crashes than normal?' Or what crashes are there? Or why are why is it crashing?'

  183. A

    Unexpected. Yeah, that's a good point. Like when you release things to, you know, millions or maybe billions of people, it's going to crash for a lot of them. You know, I mean, so crash—it's not like, you know, you're going to release something and after doing all the debugging we just talked about, you're just 100 percent right? The reality is if you're really selling to a billion people, you're going to get thousands of crash reports. Yeah.

  184. B

    I don't think—I mean, I can't say for certain, but I mean, there's all sorts of reasons that aren't even your fault that it could crash for. Right? Like misconfigured whatever. Like you're expecting some job to complete and someone pulled the power plug on their computer. Um like I mean, or—

  185. A

    Like RAM, you know, like you store an eight and you will get an eight back 99.69 percent, but I mean again, you have a billion people, so you will have that epsilon percent. You will see that epsilon percent chance realized in your crash log.

  186. B

    Or just like it's somebody running on corrupted RAM or something. Yeah, right. I mean, there are all sorts of reasons why crashes happen that aren't your fault, but if you kind of have looked at them and you understand—and it depends a lot on the circumstances—but at least you can know that it stays at a constant level, right? Like if it goes up after you've pushed to change, like that's bad. You should understand why.

  187. A

    Yep. So cool. That's sort of debugging, you know, in a nutshell. The rest we have for some interesting stories—kind of, um, we have some crazy stories, worse stories. Just kind of debugging is a lot about sitting around the fire pit, yeah? Sitting around the fire pit and sharing these incredible stories about, you know, either the heroic or the terrifying stories of debugging. Some terrible things have happened to me: are bugs that only happen in release builds. So, you know, you can't use—you know, as soon as you run Valgrind or AddressSanitizer or GDB, any of these tools, the bug goes away. It's only there when you even if you add a print statement, the bug goes away. It's like only there when you're not looking for it—timing.

  188. B

    Almost. That's terrible. Yes, they're impossible to track down.

  189. A

    Yeah, not impossible. You have to just start—you have to just start deleting parts of your code until it stops crashing. Or you know, bugs that only happen once per day or, or you know, once for some very long time. We had an issue where we had some bug. So Patrick and I used to work at a company over on the East Coast, and we had a bug where to solve it, somebody finally just sat in a hot room with some machinery for eight hours straight and never got the bug. They were literally just sitting there, and then after eight hours they finally got the bug. And then fortunately, we were able to collect enough data that time, but it had been for months. It had been crashing, but only, you know, once or twice per day, and so we were never collecting the right information to fix it.

  190. B

    Yeah, so the bugs only happen in release builds. We had a bug recently on a team I was working on where the system that we were working in, the power would essentially fluctuate depending on what you were doing, and so it would crash. But you could let—and we thought like someone said, 'Oh, I think it's this.' They added the change and it fixed it. And then they tried to send the change out for review and get it approved or whatever. And I brought up to them like, 'Well, hey, can you prove that? Like taking it back out or like changing something else doesn't also fix it?' And they just looked at me funny, went back to their desk. They tried it; it came back okay. What do you know? That you're not telling me.' And I said, 'Well, you know, I was just being pessimistic.' And it turned out that basically changing any line of code would fix the problem—almost any line. Oh no. And so what it turned out is like I was saying the power was fluctuating because an operation we were doing—like we were doing two back-to-back operations that took a lot of power, for instance—and that you know after the first one the power was kind of like sagged, and then you did the second one and it would fail. But if you altered the order or added anything in between them, the power could recover enough and would work fine. Oh my god, that like it turned out not to be a software problem but actually like physically the machine we were running on was having difficulty doing what we were asking it to. And so almost any change would fix the problem. That.

  191. A

    Was really hard to try. Oh my god, yeah. The big thing—the big another big problem that I had. So this is kind of, you know, bad coding on my part. This is like when I was very young, but I built this video game and there was some crash that happened, but it was near the end of the game. And being extremely naive, the only way I could debug it is to play the whole game. Now, it wasn't that long of a game; it's only like 30 minutes. But like yeah, I would play 30 minutes and then I would see the crash, and then I would like mess around in Visual Studio and make a little bit of progress, but not enough to totally fix it, and then I would repeat it. It was just like in hindsight it was like, 'Yeah, unit test would have been great there.' But yeah, that's another one that potentially could bite you even if you wrote unit tests.

  192. B

    I can give you—I could regale you with all sorts of hardware stories, like address bits that were stuck. So you think you're talking to one address of RAM, but you're really talking into a different one because one of the bits occasionally gets stuck. And so when you ask for, you know, address eight of the array, you're actually getting address six. Right? That wouldn't be—oh god, yeah. Yeah, so like the four bit, the yeah, four bit is the well, eight and six don't make sense, but oh yeah, if you're asking for eight and it's giving me nine because the one bit is stuck, and it's just like sometimes occasionally it gets stuck, and so when you're like indexing an array, it gets mirrored upon itself in some way. Very hard to track down.

  193. A

    Oh man, that's intense. Um

  194. B

    And then I was talking earlier about stack unwinding, and so one of the things that turns out when you're on like depending on how you run your GCC or whatever is that when you're running in like we said, like these bare metal kind of low-level programs is that GCC can become very, very efficient at stripping out a lot of stuff. And so one of the things that it starts to do is when you push—so every time you go into a function, it pushes in C or C++. Wow, that's all our debugging stories. Java must be great because I've written a lot of Java code; I have almost no interesting debugging stories about it. Well.

  195. A

    There's been interesting things, but the problem is they're had by the VM. Like the guys who write the VM have all the fun. Oh.

  196. B

    maybe and and

  197. A

    And yeah, so write your

  198. B

    code in Java because apparently you end up with no interesting debugging stories. Um, yeah, so I had GCC—when you call into a function, it pushes some bits of data onto the stack. And so in like, you know, Linux for instance, I think I'm not super familiar with it, but I think it more pushes kind of like a set format, a frame, into the stack because you have these stack frames. And so when you crash and you get like a stack dump, you can actually look through it and look for the frames, but it turns out not every function needs to push something onto the frame if you are just going into a function writing some value in memory and then going to another function. For instance, that middle function doesn't need anything pushed into the stack. And so GCC will actually just make it so that it calls through that function. Um, yeah, that's right. So this can happen, and depending on like I said, the level of optimization, it becomes worse and worse. And so GCC is incredibly—GDB is incredibly good at using GCC and examining the code and the memory and being able to unwind, but automated tools can have difficulty doing that. And so there are several cases where I end up looking at a memory dump of the stack and looking for addresses that were in the code space that were essentially function pointers or like you know return addresses by hand. Yeah, unwind the stack. Oh god, to try to find

  199. A

    Problems? So do you do the GCC dash e where it gives you the function pointers for all the functions?

  200. B

    Um, well there's lots of techniques, but no. I mean, I typically—you can have the binary and you can do like the object dump is it or um the disassembly basically. So I do a lot with assembly so I can just disassemble the code, look at the disassembly, look at the address, and you know kind of tell what it was doing. Um, but like very, very by hand. And I said there's probably some way to script it, but it ended up being just faster to do it by hand and like scan through the stack where we were and like look for things which I knew to be in code space, and then almost universally those ended up being the return

  201. A

    Addresses. Cool. Yeah, I have a friend whose dad was in Russia working in the commerce space and he was designing ATM machines. And for some reason, the ATM machine—you know, the display like hadn't even arrived yet, but they were under like incredible time pressure, and they were trying to do all the logic and things like that, and all they had was the, you know, you know that beeping the ATM makes when you put your password in and things like that. So he could alter the tone of that, but that was it. Like, like uh that was the only sort of interface between this computer and the real world. And so in desperation, he actually had it play different notes based on, you know, different issues, like like he was—he was basically putting in print statements but in audio form, and so it would say, you know, do-do-do-do-do, and you'd have to like think about what those frequencies, like what those pitches were and then say, 'Okay, yeah. I mean, he probably couldn't get it down to like the single number. I couldn't distinguish a seven from an eight,' but he'd like look at that and say, 'Okay, all right, we got into this part of the function.' And then he'd like go back. I was just like, 'Oh my god, so I've'

  202. B

    never done it, but I've almost done it. And had someone told me that they have done it before where print statement—ultimately the print handler, right? Like twiddles bits on a UART or sends it an assist call or whatever, right? So you can put your own code there. And um a person told me that they had done debugging with an LED blinking. So actually the print statement you could send, you know, via oh, on and off LED pulses and then have another computer basically like detect the light and look for on-off, on-off, on-off and basically retrieve the binary. So an LED-based UART.

  203. A

    Basically that's amazing. Like like LED read by a camera? It's like LED Morse code. Yeah, doing Morse code that was invented, you know, like 300 years ago or something, right? You could do it. Oh man. So so

  204. B

    Yeah, your friend could have actually just had a modem, right? Like it's like you know totally like trans—you could have like done stack dumps and everything, not what he was complaining about.

  205. A

    Oh my god. Man um so we have a few questions from the from the Twitch stream before we uh there are people to wrap it up. So um so someone asked, 'Why is print debugging the best form of debugging?' Andrew asks. Um so I still use a lot of print debugging for me. It's the fastest. Um I don't know if I would call it the best form of debugging because I am definitely not a good debugger like Patrick is, but uh I tend to almost always use prints, and it's just because I usually get what I need faster than stepping through with the debugger.' Um so yeah, what's your opinion on it?

  206. B

    I mean, it's a balance, right? Like I typically try one thing and then give up and try another way and go back and forth and back and forth, but I too also typically end up opting for print statements when possible. Yeah.

  207. A

    I mean, it depends on uh a lot of it depends on sort of like the dynamics of your program. Like if your program has to hit a database and do all the other things and the program itself isn't too complex, then maybe like a debugger would—it would be better every time, but uh but yeah, Patrick's right. There's really no silver bullet. It just depends on the circumstance, but I

  208. B

    think that's part of what being like—I feel like it's an old school crime detective, right? Like you have to have your hunch and when you work

  209. A

    Yeah, right when you

  210. B

    work in software, I don't know. I feel like I developed some sort of hunch. Like, you know the bits of the code you don't trust? And those are the first ones I go after. First, yeah. And I think part of being good at it is just having a more intuitive feel of where to go. It makes you get there that much faster, but picking the wrong one can just cost you tons and tons of time, right? Because you're just barking up the wrong tree.

  211. A

    Yeah, like if you—this is one thing that I've learned over the years. If you have a bug in some code, it's extremely likely you have more than one bug in the same code because what happens is that bug starts setting up sort of a false assumption for the rest of your code in that same block. And it's like—it seems like I don't know if it's just like a self-fulfilling prophecy or whatever, but I mean, we had it a month ago where we had a bug, and then sure enough, a week later we had another bug in the same function. And it just always seems to be that way. So whenever I see a bug, I become like—just really—like I just start scouring that part of the codebase because there's almost always more work to do. Someone asks, 'Should we use LLDB instead of GDB?' Um, it says to be more advanced than GDB, so I can answer this one. If you're on Mac, you have to use LLDB. You can actually build GDB, but you probably don't want to. The short answer is, LLDB is for LLVM. So if you're using, you know, Clang, C++ or you're in any of the—any of the LLVM, you know, Objective-C, any of the LLVM-based, you know, compilers, then you want to be using LLDB. Now, I think you know you can use LLDB for GCC compiled code, I believe, and I think you can go—you can actually both of them work both ways, but there's no reason to do that. Like, LLDB is going to be the best for LLVM code, and GDB for GCC code. So that's a—and Jiggy asked that, so thanks for your question.

  212. B

    Jiggy, I never used LLDB, but I don't use that really much either. So yeah, I probably OSX is the reason why most people, I think, end up on Clang recently.

  213. A

    Yeah, yeah, Clang is pretty awesome. It is.

  214. B

    Really annoying because we have some bits of our code that I work in that are compiled like the same code compiled both with GCC and Clang for different reasons, and the set of flags is not compatible between them. So there are all right so many are, but not all. And so we occasionally end up modifying like the GCC portion for some reason and then finding out like we have problems in the Clang portion.

  215. A

    Yeah, I was a late adopter to Clang for one reason, and it was that Clang didn't have support for AddressSanitizer like it had, but it wasn't built in, and it was super goofy. But they have that recently, so I actually just Homebrew installed Clang, and I'm using that for almost everything, and it's amazing. Big fan. So someone

  216. B

    was also criticizing my use of multimeter, but I did look it up on Google, and the little pronunciation key—assuming I read it right—actually said both are valid: 'multimeter' or 'multimeter'.

  217. A

    Really? Like how does a pronunciation key do?

  218. B

    So if you just type 'define multimeter' into Google, it gives you the right now. Yeah, do it. Do it. Do it. This is so fascinating. Oh, you're right. It—

  219. A

    has like the comma and the other.

  220. B

    One. Yeah, it has both 'multimeter' and 'multimeter,' and I only know that the one on the right is 'multimeter' because the one on the left has the e with the line over it, which I know is a long—yeah, I remember my high school English classes, but I'm

  221. A

    surprised you can't click on it and get a speech.

  222. B

    Vocal. Oh yeah, this is fascinating podcasting. Well, I think that's a wrap for me for today.

  223. A

    Yeah, so thanks everybody. So we should definitely say that we're close to 10,000 subscribers, which is amazing. Thank you guys! Almost there. Tell your mom, tell your friends. Yeah, like so we've never pleaded for subscribers before. I think we are leading for subscribers, I think.

  224. B

    We've pleaded before.

  225. A

    No, we haven't. I have more pride than that. I'm just kidding. No, we have no pride. We're pleading for subscribers. Get us a 10,000! We're at 97 something, so we're very—or just download it multiple times. Yeah, actually how does FeedBurner just define a subscriber?

  226. B

    It's arbitrary statistic. It's interesting because what I'm going to assume is most people download it and email it to 10 of their friends or like put it up on Dropbox or something. I don't know what all the cool kids do these days, and yeah.

  227. A

    Like everyone doing an email chain or a pyramid scheme, or

  228. B

    something whatever they're putting on floppy disks and like leaving it on their friends' desks, and then like their friends are listening to it too. So we actually have like 10x the distribution. And I'm not going to pretend that some person has it like downloading on every one of their devices, and so it's like copied

  229. A

    on 10 devices. So yeah, we need exactly 225 more subscribers to hit 10K, which would be totally awesome. So if you're listening to this,

  230. B

    and you haven't downloaded the podcast, go download it right now. Yeah.

  231. A

    I mean I'm pretty sure it does a good job de-duping, so uh I don't think you'll be another subscriber, but do it anyways. You never know. Oh dear! Oh man, okay, no, we're kidding. But seriously, we're kidding. Thank you guys for subscribing. Um, you know, you guys have been signing up for Audible through our link. We really appreciate that, and Amazon pays our Amazon—our uh—and the Amazon Book of the Show. Um, that helps pay our uh our ridiculous uh network costs um to serve it to everyone. But uh thank you guys, and uh we will catch you guys, you know, in a month or so. The intro music is Axo by Binar Pilot. Programming Throwdown is distributed under a Creative Commons Attribution-ShareAlike 2.0 license. You're free to share, copy, distribute, transmit the work, to remix, adapt the work, but you must provide an attribution uh to Patrick and I, and ShareAlike and Kind.