- Podcasts
- Programming Throwdown
- OpenSCAD
About this episodeThis show covers OpenSCAD and 3d modeling. Tools of the show: Jason: uSelect iDownload Patrick: Skulls of the Shogun. Books of the show…
This show covers OpenSCAD and 3d modeling. Tools of the show: Jason: uSelect iDownload Patrick: Skulls of the Shogun. Books of the show: Jason: My Friend Dahmer http://amzn.to/1eOLNL8 Patrick: Make Magazine http://makezine.com/
★ Support this podcast on Patreon ★Transcript
From the publisherThis transcript comes from the podcast’s own feed, shown as the publisher wrote it.
OpenSCAD
Yeah, yeah. Ask me on Stack Exchange. But yeah, I've been answering questions on like Math, Stack Exchange, and Stack Overflow and Quora, and it's been interesting. It's kind of fun. One thing I noticed is, you know, I've met people who have, you know, a bazillion points in Stack Overflow. And I realized that at a certain level, it becomes almost like a click. It's kind of weird. Like, you know, I was asking people, 'How do you get so many points?' And I guess at some level, people start, like, you can basically invest your points in questions. And so the questions that are really, really hard to answer or that are, say, like, very nebulous. You know, a bunch of people with a lot of points will answer. And someone will pick one of them and that person will get even more points. And so it becomes like you kind of have to know the right people. And I realized, like, almost everything when you get to a high enough level devolves into a click. Like, for example, I worked with a guy on my last team who was the World Junior Chess Champion. And, you know, he was like a grandmaster and he had a huge, you know, chess rating. I don't know what it was, but it was probably like, I don't even know what the ratings range are. But it was, you know, obviously one of the top in the world.
He was basically saying it's kind of like a click. You know, you have to go to the right tournaments. You have to socialize with the right people so you get invited. See, that's part of it is you have to get invited to the tournaments so that you can get the rating so you can be the best. Now, like, theoretically, if you won every single game, like a tournament, you know, if you beat everybody who you ever faced, then theoretically, you know, the next highest person should feel rather compelled to play you. Right? But in practice, like, it just doesn't work that way. A lot of it comes down to sort of networking and meeting the right people and all of that. And I realized that, like, even on the Internet, things like Quora and Stack Exchange actually work the same way when you get to a certain level.
But that's what I always say about the movie industry. Right? Like that, you know, people want to be actors or actresses. And there's like the lightning striking chance that you will be found. But that for the most part, it's about knowing people and having an in and getting the roles. And then people want to take like a safe bet. So like they want to take you because for a small movie role because you were in a commercial. And I want to take you for a big movie role because you were in a medium movie role. Right? And so like, you have to start somewhere. But if you start at the bottom, it takes a long time to get to the top.
Yeah, exactly. And I mean, this idea that like doing the thing that that that they're trying to evaluate, whether it's chess or answering questions or whatever, like is not sufficient. You know, like you could, as I say, you could just beat absolutely everybody in chess and never become the world champion just because you wouldn't have access to the people who would get you the higher rating. And I feel like most systems in the world, most social systems work this way. And that realizing that that is even true on the Internet was just fascinating.
Yeah. So I realize the, you know, I would answer anything just about. I mean, I would answer the dumb question. But the volume of people who are there to answer dumb questions is so large that I never get the opportunity. You know, like, I'm just not checking it often enough. Or even if I do, I can just tell, like, you know, someone answers—someone asks, you know, why is my homework assignment code not working? And there's a divide by zero. Like by the time I, like, I'm usually on my phone, I'm usually traveling. You know, by the time I get to a place where I can answer the question, someone like 10 other people have already answered it, you know. So I'm sort of forced into answering the deeper questions, which is kind of more fun anyways, right? So one of those questions.
Well, you know, actually, the reason why I do it isn't to help society, but it's because maybe—maybe this is connected to why I answer the harder questions is that I want to provoke a discussion with people who think I'm wrong. Either that or I want to know I'm right about something that's like pretty nebulous. So, for example, I answered this question on Quora, and it was effectively like, how do I start a machine learning startup? The question was—this guy said, I was given the lead Machine Learning Engineer at a startup, but I'm basically never—I'm relatively new to machine learning.
always include if created Skynet fitness minus 999 just to make sure that his genetic algorithm knows it's been punished if it creates Skynet. But it's fun. People can vote on your question. And the other thing is there's really interesting in-depth answers to sort of more of these meta questions like, you know, what library should I use to do X? And there might be five choices. And people who wrote those libraries answer. It's kind of cool. And then they start a debate.
I always wonder that. Like, I see posts on, like, Hacker News or other places. And it's like, hi, I'm the author of this. Or I'm the guy who this page is about. Like, if they didn't post it themselves. And then they say stuff. And I'm always wondering, like, I guess I view it slightly different than, like, a blog post author. Like, giving, like, oh, thank you for the—I misspelled the word. I'm fixing it. And about people, like, defending or re-explaining. Like, I guess it's good. Like, it helps improve the thing. Like, often they'll go edit the page to be more clear or whatever. But other times, like, they just get involved in an argument. And it's kind of like, I don't know. Like, if I did it, I think I'd kind of just do it and leave it out there. Like, I kind of don't want to. Can I read the responses?
Yeah, well, this is, you know, like, this is why the kind of people who enjoy that are the people who invent programming languages. We talked about this one time. Like, you know, you think about, like, it's never occurred, at least not to me, to invent, to make a new programming language. And we've seen plenty of languages come and go through our lifetime. So it's not like all the good ones were taken or anything like that. But, you know, I wondered why, like, why is it that we've never tried to invent a language? I think what it comes down to is I don't care enough. Like, most languages do what I want. And there's already plenty of them out there. We can talk about languages for shows forever. But, like, there's enough tools that I can always get a job done somehow. And the kind of person who, like, cannot deal with the tool set as it is and needs another tool, that's also the kind of person who would fight to the death on Quora or Hacker News or whatever to defend, like, their library or their tool or what have you, you know? Like, those qualities have to be tied together, right?
And right after that, actually, and I wrote it down. You interviewed somewhere. I wrote. I can't disclose that information. Okay. If I had, I would feel really bad for that person, as I always do. No. So, I came across this right afterwards, and I wrote it down because this is going to be good, and I'm going to remember it for the next episode. But there was an article. I don't know anything about this site. I guess I should have read it and seen if the site itself is any good. I did read the article. But it says it's choosing a programming language to do your interview. So, if you're going to do a programming interview, how do you choose a language? And the website is codingforinterviews.com. I have no idea what it's about. Anyways, but the article is interesting. Yeah, this is cool. And it basically says like what should you think about? And you know, they had some good points, which is like you should look up if your company has a strong preference, the one you're interviewing with. And they show like Facebook, Google, Amazon, Microsoft. Here's the like strong preferences or whatever. And then once you do that, you should practice and then know common, like very common things. And they have some good stuff in here that I wouldn't have always thought about, like throwing exceptions. It's like do people throw exceptions in that language? And like what is kind of like the way people do it or don't? And about casting, like being careful about how to cast back and forth between stuff in the language you choose. And then they have an interesting point. Have some opinions about it. Like what do you like about it? What do you don't like about it? And I've actually had that in every interview pretty much I've ever done, at least at one point. Somebody asked me like why do you like that language? Or what's the thing you dislike most or whatever? Basically wanting you to be passionate. And I don't know as like an interviewer, like how good of a question that is. Because I think it's perfectly fine for people to like have been using a language and not think deeply about the language. And I don't know that, for me, that says anything about them as a person that like they didn't think deeply about the flaws of the language they're in. Yeah, I
think it's the kind of question that like has many good answers. You know, if someone was to say like I really love Java because it has like static typing and I've been burned so many times or whatever. Like, has some insightful answer that would be good. And if somebody said, I just want to use like whatever tool is best for the job and kind of went about it that way, it's fine too.
Yeah, I work too hard. Yeah, yeah. It's like these things. And they think they're being like, ha ha, like I made it a positive. But if you like really do admit some like deep flaw, like, I don't know. Like, you leave the person. I interviewed or filled out an application for Best Buy one time when I was a teenager or whatever. Okay. I was like 18 or 19. And they make you take this like personality test or whatever. Do they really? As part of it on the computer. Yeah, yeah. And they ask you like, your co-worker has stolen something. Like, what will you do? Like, will you rat him out? Will you? No, they didn't say that. But like, on like a severity, like how bad is this? Like, you found out your co-worker, you know, takes pens from the office and uses them at home. Like, what's your moral reaction to that or whatever? And it's like, kind of disturbing because your immediate thing is like, you want to say like, oh, stealing is bad. Like, I report him to the police. But then it's like, well, I don't
One time, this is kind of an aside, but I went to CompUSA and, you know, I somehow it came up. I was like buying a video card, and at the time they had a service assistant, like, you know, get the video card from the back and give it to you and talk to you or whatever. I think Fry still does this, and they get a commission or whatever, which I don't like. Oh, I hate that. Yeah, I absolutely hate it. But something came up about drivers. This one has good drivers or something. And I said, oh, you know, I use Linux. It doesn't matter. And he goes, like, 'Oh, other than—I'm sounding cool—like, why would anybody use Linux?' I was like,
Get out of here. Because I don't want to download my Unix tools that we spent a whole show talking about. I want them to just be there. But actually, you know, what I told him was, I was like, 'You know, when you're in school, and they teach you, there's like the half-ass way of doing things. And then there's like the okay way and the great way. It's like Windows does the half-ass way, and Linux does the great way.' Like when you learn about—yeah, it's true—when you learn about swap file management or managing dynamic libraries, you take your operating system 101 course in college. There's always like three different ways to solve the problem: there's like the terrible way; there's the way that people implemented while they were thinking of the right way, and it's okay, but it's not that great. And then there's the right way that's just way better than either of the other two. And Linux always does the third one, and Windows always does the first one.' And that argument didn't work either. The guy at CompUSA just laughed or whatever. Anyways.
Yeah, exactly. It is literally a group, a collection of math visualizations. So I'm through the Math Stack Exchange and through Google Plus. And I've been following a lot of geeky math people on the internet. Nerd. And throughout the weeks I've been doing this, I've come across some amazing visualizations. And I wanted to kind of share those with you. Obviously, they're very hard to talk about, but I'll try briefly. Can
So they have like the binomial theorem where it's like A plus B parentheses squared. And they like distribute the squared, you know, through A and B. So it becomes like A squared plus 2AB plus B squared. Like all these kind of things that you learn in like middle school or high school. But they actually take shapes. And the shapes have an area of like A squared or B squared. And actually show you how the shapes kind of come together and why that makes sense. They do this for the Pythagorean theorem, and a couple other things. And I thought it was pretty cool. I actually joined the Math Google Plus community. And they have a section just for these cool visualizations that they post every like few days or so. And it's just kind of cool to look at. Some people have some really creative ways of looking at things. It's very cool.
Yeah. I think sometimes like people other than like the math they do in grade school or whatever. Like the more advanced math. The only way we know it is through like the pictures that end up in the journal papers or whatever. Like the stuff that ends up in popular news will have like a picture. Like new way of dealing with high dimensionality, and like show some cool picture or whatever. And people will be like, 'Oh, cool.' So like the more pictures you have, I guess the more cool people think your math is.
Yeah. And as we were talking about before the show, like I feel like the people actually learned these theorems through these pictures. You know, I mean the Greco-Romans who discovered, you know, Pythagorean theorem—which, you know, Pythagoras did not discover the Pythagorean theorem. It's like a common misconception. It's just named after him because he ran the school or whatever. But at any rate, You know, they probably, you know, did this. Like they had a bunch of triangles and squares and, you know, on sheets of wood or something, and visualized almost all of these theorems I'm imagining. So it's kind of cool to read to like to reinvent that yourself through these pictures. And if you can't do that, you can at least use Wolfram Language.
And anyways, yeah, so base 60. And it's crazy. And we still have like vestiges of it left over until today. Oh, that's really interesting. Anyway, so maybe I'll add the link here and we can put it in the show notes. But there's this documentary from the BBC on math if you can make it through it. Okay, so Wolfram Language. I saw it. It came out actually just last week, I believe. Wolfram. I forget the guy's first name. I think his last name is Wolfram. Stephen Wolfram. Stephen Wolfram, the guy who has Wolfram Alpha. Do we call it a search engine? I don't remember what they call it. I think it's
So he has like that is supposed to be based on this thing he's been working on. And he has a book. I think it might even be online that describes his kind of theory of working with math and this kind of stuff. He does a lot more than just make a software package for doing math processing. Like, he's trying to do more. And he has a programming language he's been working on, and part of it is a functional description. And then he's trying to integrate it with a lot of other stuff. So you can say like it understands things about location. So if you say 'capitals of states,' or 'capitals of states in the United States,' or some specification, you can get like 'here are all the capital cities.' And then you can do things like population of cities, and the language itself knows how to go fetch that information and natively display it to you. And then like you know shows things about kind of having some graphic and then having it parameterized and doing it in only like a couple lines of code. So there's a YouTube video we'll put it in the show notes. You may have already seen it, The Wolfram Language. And it has all these different pieces and this real slick video he shows, and it does seem kind of interesting. It seems very different. Like I don't know how I feel about it because there is like the language itself, but then there's all this other stuff as well, which we talked about like Python being batteries included, but here even going further than just like 'here's other libraries of code.' But like data—I guess that's the thing. It's like this talks about having kind of data be a part of the language where you can natively know bits of data. And that's not normal for a language at least like not the way I think about it.
That's pretty amazing. When somebody gives you a language—a compiler as it were, an interpreter—that has so much stuff that won't even really fit on your computer. Like I think it has to be connected to the web to be able to get some of this information because otherwise it would just be massive, I would assume.
Yeah, but it's one of those things too. Like I scratch my head and think, 'Although it's nifty.' But it's like if you ever try to do voice search on Android or iOS and you try to say a specific command in a certain way that's the most natural to you, it doesn't always work. Yeah, right? Because like it's expecting a different keyword. And as soon as you know the keyword, it does a pretty good job of understanding what you're saying. Like 'take me home' might not work initially. I think it does work now. You have to say 'navigate home.' Like it knows what home is, but not conceptually. It just knows it as like a keyword. And so you have to say 'navigate home,' but saying like 'take me home' or 'how do I get home'? Unless it's programmed to know that, it can't figure it out.
Yeah, I mean, do you think that like sometimes I wonder if you can solve this purely through just statistics of people's interactions? So in other words, like enough people say 'take me home,' and then that fails. And then they say 'get directions to home.' That like over time can learn that 'take me home'—well, some stuff does that.
Like you know. I mean when I was an undergrad, there was this whole course on like Natural Language Processing. And all of this crazy amount of like frames and all this like human, you know, like part-of-speech tagging. All of this crazy stuff that people did, all these heuristics they use. And sometimes I wonder if you really need any of that, or if you can do almost everything through just inference, if you had enough data, right? Yeah, I don't know. It's tough.
But the reason I was bringing up this other stuff or whatever about, you know, voice search is to say like NLP from language, like all these amazing things, but there's a lot of stuff to memorize. There's no way you can memorize it. So like the same thing happens even if you write in Java, right? You probably unless you're really good, like memorize every aspect of all the parts of Java. But the parts to do like a lot of stuff you can know, like you can know the majority of the language and the nuances. But with something like this, it would probably change often, I would assume, like because of the data part, like you would have now we have—I don't know—species of animals. Oh, okay. Well, now like here's the keywords for that. It's like you would constantly have to be in the mode of like looking stuff up to know what keyword to use to get at that data. Yeah. And then that data may or may not be available, right? Versus just like sitting down and saying, 'Okay, I have this small set of pieces,' and figuring out how to arrange them to do what I want.
Yeah. But check out the video. It's cool. Yeah. It has some partnership, I think. I'm trying to remember now. I didn't look at it right before the show, but they have something where they're doing with the Raspberry Pis. Like Raspberry Pi ships with a version of Wolfram something. Oh, interesting. And I think they're going to try to do this as well, some partnership with them.
I used Wolfram Alpha recently to. I needed to calculate like the—I needed to sample from the cumulative distribution function of normal distribution. So you end up having to—there's this function called ERF. Like E-R-F. I think it stands for like error rate function. And the function is defined in terms of itself. It's like ERF of X is equal to blah blah blah times e to the ERF of X over 2. And so I'm just like, 'What?' So and I had to like integrate that. I was like, 'What?' So I went on Wolfram Alpha, and it's amazing actually. They show you how to do it. It's really impressive. Like there's a—there's a technique you can use which of course you can't—you can't get the exact answer, you know? Just you can tell right away that like a recurrence like this, like it's never going to end, you know? It's like one of these infinite series, right? But but it shows you like what people do like in industry and stuff to get answers. And I was really impressed by Wolfram Alpha.
Book of the show. So my book's actually a comic book. I thought it was pretty cool. It's called My Friend Dahmer, and it's written by somebody who went to high school with Jeffrey Dahmer, who is a notorious murderer slash cannibal. Wait, what? Yeah. I mean basically, you know, shortly after high school, you know, throughout high school he was pretty crazy. And you know, he just kind of got worse and worse. And then within a few years of high school graduating high school, he— He killed this lady who was jogging near his house.
No. Well, this is a real story. What I'm talking about now really happened. And literally cannibalized this poor lady. And and and and then he proceeded to murder and cannibalize people until he was caught. And he ended up getting the electric chair. But the book is... The comic book is illustrated, you know. It's written from the perspective of this guy who went to high school with him. And it's really interesting. It's all about basically, you know, this was I guess in the 70s. And you know, I think people are much more in touch with like mental disabilities and and you know these things are taken much more seriously, especially after Columbine. And so on and so forth. And just in general, people are much more—like—empathic towards these kind of mental problems than they were back then. And it just... It just, you know, he just goes through just like the person was like he was pretty bad when he was like 14. He was already kind of messed up. And then throughout high school how like things really just go from bad to worse. And everyone's just kind of making fun of it, you know, like his classmates and stuff are just kind of making fun of the situation. But really, it's just very serious that he's kind of messed up, you know. And you know, and the show ends with them all graduating high school, and then there's a short narrative about, you know, what happens after that. But I just... The whole thing was it was of course very somber, but it was also really interesting. And you know, the guy starts the comic book by saying, 'You know, I'm self-publishing this book because nobody would publish it for me. You know, nobody wanted to get near this subject because they thought it was like too touchy and they didn't want to deal with the, you know, the problems, the fallout, or whatever.' So so I paid for the publishing myself. And that kind of gets your attention, right? And then from then on, the whole thing is actually pretty interesting. And it's not too like, you know, the whole thing takes place before, you know, murdering people, so it's not graphic or bloody or anything like that. But it's—like—it's actually like. It's a very somber story and it's actually really interesting, so I recommend reading it.
But we have to look it up. So I think they come out with four—four a year, so quarterly, I believe. This is how often it comes out. I'm not. I'd have to look it up again. But they have a lot of really awesome, like DIY projects and articles and talking to people doing that kind of thing. So, like recently I was reading—I think Issue 36 or whatever. I think they're on Issue 37 right now. And they were talking about the Internet of Things. They were talking to some people who are doing a startup about Internet of Things and kind of what that means and what it's about and how they did it. And then they have like typically a couple tutorials on how to build something. So the one I was reading about was doing fusion in a jar, and oh nice. I really want to try it. Like it seems really awesome, and you get this kind of glowing. Star basically in a jar. But you, it requires like all sorts of crazy equipment, right? Not crazy, but like I don't have the equipment. So things like vacuum pumps and neon sign transformers and you know some special materials. But when you do it, it's just like wow. This is the kind of thing. Like I wish I could have done this for like science fair stuff. Yeah, it would have been like, you know, amazing or whatever. And then they have, you know, less less crazy stuff. But even just to like sit there and read through it and think about it and kind of, you know, just be in that culture of like how to make something that you may have thought required like a factory to make it. And you know, making it yourself. That kind of spirit is I like. I like it a lot. I like reading the magazine.
Yeah. I mean I think that's it's really interesting that like you know I felt like when I was really interested in these kind of things, you know, when we were both working together like on the East Coast, you know, at the time 3D printers were not popular at all. And I built like a lot of electronic kind of things, but I never got to actually enclose any of the electronics and make something which I would work day to day, you know. And I just think it's absolutely amazing how, you know, what five six years later we could actually you know fabricate something that would be like almost professional quality, you know, just for, you know, a few thousand dollars of equipment, right? Yeah. It's pretty amazing.
And it ties in with our theme which we'll talk about in a minute, our show topic. But yeah, I mean stuff is changing. So eight years ago it started—just just shy of eight years ago, January 2005. So I was off. But yeah, if you've never checked it out before, they have a blog and they post like, you know, projects people do and authors write.
Yeah. I mean, it's a lot of material, and stuff is longer form. And yeah, it's hard, right? Because sometimes I go to, what am I going to read? And it's like you can read comic books, right? But they're also somewhat expensive for how long it takes to read. Like a single comic book, which is something I never quite understood. Like for me. Oh, by or at least the ones that come, like Batman every week or every month. Oh yeah. Yeah, like the superhero comics. And it's like what? I don't know what its prices are now—like four dollars for an issue or something. And it's like but I can read that issue very quickly. Yeah. No, that's just to get the story. Now I can go back and look at the pictures and think about it, right? Longer or whatever. But like just reading the story through is very quick. But for ten dollars, I can buy a eight hundred page science fiction novel, you know, that will take me like months to read.
Yeah. Yeah. Exactly. Yeah. I never—you know, even now with the digital era, the prices are more reasonable, but still, you know, the whole superhero comic thing, I agree. I think the pricing model is just ridiculous. And part of it too is like I think the people who get those comics, they're they get it mainly for the art, you know. Because the story—I'm probably going to offend every comic book follower—but I mean, the story on superhero comics, I just never could really get that into it. It never was that compelling, you know.
Yeah. I don't know. I always wanted to be into comic books, but my parents never really offered to buy them for me or take me where they were bought, and there wasn't any place close to me. I gotcha. And so like I never really got into it. And then as an adult, there's still somewhat of a stigma attached to it, like.
Tool of the show. So my tool of the show is you select. I download, which is pretty cool. It's a it's a plugin for Chrome. I don't know if anyone else has had this problem or if it's just me. But if you have, you ever go to those web pages, you know, most of the time? It might be like internal, like like the Hadoop, you know, front end, or whatever, or some kind of page, but it just it has a ton of links. Like I'll give you another example: The Google Books dataset, which is available for download, is literally like a hundred links. Like you have to click on one by one. And so I found this pretty awesome link that basically is sort of like you kind of click and drag a lasso as if you're going to take a screenshot or something like that. But then after this lasso, it colors anything inside that lasso yellow, and any links yellow. And then if you hit Shift + Enter, it'll open all of those links in a new window. So in other words, like if you had this plugin, you could click the plugin on top right, select all the links for Hacker News front page, Shift + Enter, and they'll all open in a different tab. And if you hit Alt + Enter, it automatically downloads them all. And it has some built-in download manager so it like breaks it up into chunks. It does like really efficiently. And so on and so forth. So I thought this was pretty cool, and I had to use it rather recently. But it worked extremely well. And it's pretty lightweight. It's just a Chrome plugin. So give it a shot.
All right. So I was just realizing, I might have said this one last time. I was looking back at the log for my tool of the show, but it looks like it got copied from the previous one. So it said KiCad twice in a row. So I have no idea what I said last time. But if it was this one, it makes it that much better that I still think it's thought about it this time. Okay. And that's a game: Skulls of the Shogun. And Jason's about to tell me that this is my.
This is a game. It used to be on the Xbox, I think the Xbox 360, I guess. Arcade. And now it's on iOS. I don't know if it's on Android. I didn't look. I'm terrible. I don't do the Android thing as much as I guess I should, as a Jason's going to make fun of me that I'm basically the Linux guy non-Linux guy. Oh well. That's okay. Wait. So on iOS, Skulls of the Shogun. Wait. But
Okay. Alright. Good. Good. I feel better now. I'm just giving you a hard time. I feel better now. So, if I now shift slightly to say that what I'm using is Black Bear, no. Okay. Skulls of the Shogun. Oh god, it's a strategy game on iOS. And I was—we had a conversation a couple episodes back where I was saying like I always want to be good at strategy games, and I'm always terrible at them. And for some reason, I do well at this game. It's a turn-based strategy game where you are like a Shogun who has died and went to the afterlife, but someone—one of your enemies that you killed—went there before you obviously and claimed to be you. And like, there was like a special place in the afterlife set up for you because you were such a good Shogun. But instead, he's claimed this place or whatever. And so now you're like fighting through the afterlife to get to him so that you can become who? Like reclaim yourself or something. Wow.
No, it's really—it's really like goofy. Okay, it's not that serious. And the animation style is crazy. And it's all this kind of like skeleton zombie-ish people or whatever, but you have like kind of the Shogun style. Like you have I don't know if that's a style, but like you know you have samurai and you have guys on horseback and guys with bows and arrows, and your Shogun who's like very powerful. But if he dies, you lose. And so like you want to use them, but like you can't put them at risk. And they have some interesting mechanics. Like if you're next to a cliff when you hit someone, they get like pushed back a little, and if they fall off the cliff, they die. So you can try to—there are approaches where there's like narrow stuff, and you have to be careful about who goes through so that your people don't get knocked off the cliff. But for some reason, this strategy game I seem to be doing okay. It's probably because I have it on easy setting.
Okay. But yeah, so what about the trailer? So if you watch the trailer, it's like a mashup of like yes. Okay, this is pretty much like the trailer. It's a mashup of like every '80s and '90s video game commercial. If there ever was one like this. And it's just like that's amazing. You should definitely watch the trailer if you grew up in the '80s and '90s, at least in America. And I keep giving that caveat. I should stop. People should just assume that. But people were making fun of it, like this is stupid, and it's chintzy and cheesy. It's like no, I remember all the G.I. Joe commercials that were exactly like that growing up. And so anyways, then I bought it, and it was like the comedy is very similar. And you know they break the third wall sometimes or whatever. Like they talk to you, I guess, or whatever. They make fun of themselves anyway. So and the gameplay is nice, and it's approachable, I'll say that. That means easy enough for me to do well at. But okay, so it's approachable, and I like it, and I've been playing. I haven't beat it yet, but I think I'm pretty close to the end. So check it out: Skulls of the Shogun if you like strategy games and don't want to be humiliated. Is it how much does it cost? Do you remember? Oh, I think it's like five dollars. Okay, that's not bad. So but it's a—I mean, I play it on my iPad, and it's beautiful. It's nice, and I've gotten so many hours out of it. I had to spend a lot of time at jury duty, and I definitely was playing this when when I wasn't supposed to be doing anything.
open. An open SCAB. An open SCAB. So, So we'll talk a little bit about like 3D modeling, 3D models in general. So this is a programming language used for creating 3D models. And 3D models are interesting because there's lots of ways to create them. You can create them with what's called Computer-Aided Design tools (CAD), which are things like SolidWorks or I guess even things like Maya, or Blender, or other things where you create shapes and you shift them and move them interactively with your mouse. But we're programmers. That's boring and hard and artistic, and we're none of those things. I'm none of those things. So OpenSCAD is a programming language to create the same kinds of things—these 3D models. And 3D models ultimately you're trying to represent some shape or object or thing you want to build or make or use in a video game, and you're trying to make like some abstract representation of what we'll call the real world. And one of the interesting things I like about the languages that try to describe these is that you know they can be really pure. So if you have a sphere in real life, in the real world, no perfect sphere exists, right? So like, in the real world, you've never encountered one because it would have to be perfectly smooth and have perfect roundness, and ultimately you can't because they're made of molecules, and the molecules have size and shape. And so you'll never have something which is a perfect sphere. Somebody's going to correct me with some example of something that's a perfect sphere, but it's okay.
Okay. All right. Sounds good. All right. Good. So but like, in this language, you can represent something that's a perfect sphere, right? That has is very uniform and smooth. And then you can do things with it, like take another sphere and join the two together and make a two-sphere thing. And if you build up shapes, you begin to come up with complex objects or you know shift shapes around. And we'll talk about more specifics of that later. But I always... I'm terrible at drawing. I think Jason does drawing. So he maybe can tell us more about this definitely.
So, drawing, you know? Like I always, like when I try to read how to draw, and they're always like, start by breaking down the scene into shapes. So, like you have a head, and a head is a circle, and the ears are squished circles and ovals, and stuff like this. And they always like show the you draw these like square and a couple lines and some circles. And then like two steps later, you have like a perfectly drawn guy riding a horse. There's
always that. It's like what? There's always that one step. Like it's like okay, I see it. I see it. And then they're like now fill in the details. And that those are like the four or five words of death. Like when you see in any art instruction book, 'Now fill in the details.' The details include like going to college, getting a degree in art, and coming back and finishing the drawing.
Yeah, I'm not sure that's true. But yeah, so I mean but this OpenSCAD, these things that represent trying to make 3D models from basic shapes and operations, it kind of to me represents the same thing. Like if I'm trying to build a model of my kitchen table, at first I'd say oh okay, it's just a rectangular prism and four rectangular prisms for legs. But no table really looks like that. It looks boring and terrible. So then you have to like chamfer the corners, like put a little round over on them. You need like a little bead detail around the bottom, and there's like an apron around underneath the tabletop, and there's like an inlay, right? And you begin to. But all those things are also simple. And so like if I can simply build up to the object I'm trying to represent, to me I feel like that's an easier approach than when I've tried to do like the modeling, and for some reason it doesn't work for me.
Yeah. I mean the other thing too, right? Is like Blender and Maya and these tools like ZBrush and so on. You know, they're meant to be like creative tools by artists who want to draw, like most of the time you know cartoon-y non-photorealistic things, right? And they don't work very well if you need to build something precise, like a table that shouldn't wobble, right? No. That's a good
Right. But the opposite is also true. Where like you know in Blender and these tools it's not really designed for precision. And so you're kind of expected that if you draw like a bear, that the four legs aren't going to touch the ground in exactly the same spot. You know, you're probably using you know like a tablet, a Wacom or something. And you know it's it's I'm sure if you zoomed in really closely on you know any model in you know World of Warcraft or any of these games that you know the legs wouldn't all line up perfectly. And things like that. Or an intern
mean, Blender actually has NURBS support. And then, but I'm assuming, yeah, before it goes to your graphics card, it gets turned into polygons, or sorry, to triangles. But, you know, usually most of these models are done by taking, say, triangles and putting a bunch of them together, right? But there's also this other way. And it's kind of like, you know how like you can use Photoshop, and at the end of the day, you're drawing pixels, you know? Like, you might draw a line or a circle in Photoshop, but it's really just, you know, a bunch of pixels. And Photoshop is clever enough to take the concept of a circle and the equations that define a circle and turn it into a bunch of black and white dots, right? But then you also have, you know, like Illustrator, right? Where it actually stores the equation of a circle, and then at runtime, you know, anytime you do anything to that circle, you know, on the fly, it's turning the equation of the circle into pixels. So NURBS takes that idea and extends it to 3D. So a NURBS, it stands for non-uniform rational B spline.
And basically what it is is just in the same way. It's a you know, a mathematical explanation of a curve, of a sphere, or a torus, or what have you. And it can define arbitrarily complex shapes using these splines that are connected together through control points. But then again, like it's not, you know, a bunch of triangles. It's this equation that then you can resolve into triangles anytime you want.
So OpenSCAD has—you start with some shape. We talked about this. But you can have like a 2D shape, a 3D shape. And if you start with a 2D shape, you typically I don't the terminology, extrude it. You kind of like stretch it in some way or some fashion, some transformation. So if you take a square and you move orthogonal to the plane the square is in up, you make a cube—well, or some rectangular prism, I guess. And you can stretch it. But if you move the square through like a curve, you get a curvy shape. Or a circle through a curve, you get like a pipe or a tube. So you can start with 2D shapes because the 3D shapes are often, you know, start as 2D shapes or 3D and they have, you know, primitive shapes. So they have circle, square, you know, they have primitive 3D shapes. So you have things that are like sphere and cylinder, polyhedron. Oh. And these are your you know basic building blocks. And then when you combine them with the translations like we talked about, then you can move them, shift them around, stretch them and transformations could be like scale it, like make it bigger, or rotate it, like spin it around, translate it, move it, move it side to side. And these are the kind of things that the transformations. And when you combine them, and we'll talk a little come back to transformations in a second, you combine them with like Boolean operations. So if I have like one circle, another circle, and I union them together, I join them together. Or let's say three. I have three circles and I join them together just so you can make a snowman, you know, with three circles—three or three spheres, sorry, or circles, yeah, right? Joined on top of each other. Or if I difference, you know, to one sphere from another sphere, I can take a bite out of the sphere. Or, you know, a square to a sphere. You can start to build up with these basic Boolean operations and the shapes and the transformations. You can start to build up very complex shapes. And there are different kinds of transformations like we talked about, and just like basic ones like scale and rotate, shift, slide. But then there are more complex ones. It's like a fine transformation. So what is an a fine transformation?
So an affine transformation is one that it preserves points, straight lines, and planes. So the idea is like, you know, if you have n points and you do the transformation, then you have n points. You know, it doesn't like collapse the space or anything like that. And if a line is straight as a result of transformation, the line will still be straight. So there won't be any kind of weird, radial warping or anything like that. So most transformations are either affine transformations, are either you know, translations, so like you move something, you know, slide it; rotations, so you kind of rotate it around some pivot point; or you know, kind of shear operations, like scaling or just scaling in one dimension or things like that. And it turns out that most of what you need to do, like if you have several basic primitives, like squares, rectangles, things like that, and you have access to affine transformations that you can create, you know, just about anything. Then there's yeah, there's 3D transformations, like the Euler transformations. If you've ever done anything with like control theory, like with gimbals or you know controlling like an arm for a robot or something like that, you could think of sort of even like if you move your hand around, you can kind of like twist your hand, right? But then you can kind of move your hand from side to side, like if you were waving but your wrist was locked, right? You could kind of just wave your hand or you can move your hand kind of up and down, like if you go to like grab your mouse. You kind of like tilt your hand down. So this is like the three axes which you can move your arm. And so you can do like Euler 3D transformations where you specify these axes. They're called roll, pitch, and yaw. But then you end up in these it just if you follow the math that kind of breaks down, and you can end up in what's called gimbal lock. Can you do you want to describe Gimbal lock? You probably know more about it than I do. Actually, I don't think I do. Okay.
Yeah. I think Gimbal lock is where here you can look it up and I'll try to explain it, and then you can correct me when I'm wrong. But I think Gimbal lock is where you end up in a situation where doing one of those transformations doesn't change anything. Like, for example. Let's say you're looking straight up in the air. If you kind of like if you turn your head. Let me see if I get this right. This is a tough thing to explain.
In the air. Then oh yeah, if you're looking straight up in the air, then if you like lean your head from side to side, nothing changes because you're already straight up in the air. Something like that. Like you can you can be in a position where if you put one of the axes in a certain way, you can make it so the one of the three axes is a no-op. And the reason why this is a problem is because the value of that axis like doesn't matter. It's undefined. And that causes chaos. Like like that value can oscillate wildly and the picture won't change. So, so like the system is stable even though that value can be anything. And it causes just complete chaos. And control theory. So did I get that right?
And it causes mathematical chaos. And it happened in Apollo 11. So on Apollo 11, yeah, they had a problem where they got into an orientation near 85 degrees of pitch that the stabilization loop got messed up. Oh, and so they were supposed to, like, it was supposed to, the gimbal was supposed to, like, flip around at that time or whatever. But it for some reason got messed up and froze. And so they had to manually, like move, move it or whatever.
You can imagine, like if in general, right? Like if a number can be anything and on the outside it doesn't matter, then over time that number will just assume any value. And then what happens is eventually things change in the system, and all of a sudden that number matters. But it's four billion, and it's just the system just doesn't know what to do with four billion. It just collapses. So they came up with this idea of quaternions. And again, this is really hard to explain. I'm not going to do it justice. But basically, the idea is you assume that there's a fourth dimension. Yeah. And you do all of your math assuming this fourth dimension. And this fourth dimension ends up, um, you also normalize by the fourth dimension. So in other words, you know if you have a if you have a vector in general or if you have a list of numbers in general, you can do this thing called normalizing where the biggest number becomes one and all the other numbers become some fraction of the biggest number, right? So like you talk about like normalizing people's grades or like you know grading on the curve or something like that, right? When you grade on the curve, what you're doing is you're taking the highest person—let's say he got an 80. So that means everyone else's grade is over 80. And that guy who got an 80 gets a hundred percent, right? So you have this fourth dimension that doesn't really exist, like you can't visualize it, but it's there for all the calculations. And you're constantly normalizing by all four of the dimensions. And so it keeps even when you have gimbal lock in the three dimensions, the fourth dimension keeps everything from going crazy. That's that's the best way I can explain it.
Another advantage of OpenSCAD over other modeling programs is that you can define stuff—that's basically a formula, right? So like the height is two times the width. And then somebody can simply define what how high they want the thing to be and it automatically generates it at the appropriate width. Oh, that's cool. I didn't know. So for like 3D printing, this is this is pretty cool, right? So typically you might be able to scale something, right? So like you have a model of Jason's head and you're going to 3D print it, and you can apply a basic scale which just says all the points in the 3D model, like expand them the same amount from origin or whatever. And then you get an accurate representation of a bigger Jason's head. But what if you had things that you know wanted to move in relation to one another? And so you had like gears. And if you scale the gears, maybe the meshing of the gears changes. Oh, I see. Right. And so you can end up with complexing or you only want to scale, you know, in one dimension, but you want the all the gears to stay, you know? The gears need to can't be scaled in one dimension, right? Like they have to be round, right? You have to be a perfect circle, close to a perfect circle. And so if you wanted to scale the thing in one dimension, you would need to do something else. And so parameterizing that allows you to handle these kinds of things.
There's also a tool really similar to OpenSCAD called Implicit CAD, which is written in Haskell. Which is cool. And it's actually one of the few like commonly used things that I could think of that was written in Haskell. Yeah. Right? Not that that's like a knock against just like you know sometimes you people say like oh what's written in that language. Well, this is written Implicit CAD. It's written in Haskell and is very similar to OpenSCAD.
So yeah, so the language itself though, like... And apparently I wasn't the only one. Like I saw other people saying the same thing. Immediately made me remember when I was in college and doing ray tracing. So always, like, I took a computer graphics class, and it's very classical. Like you have to learn about lighting and about ray tracing. And the most common or one of the most common ray tracers that people use is POV-Ray. And oh, I remember that they have a scene description language where it's the same thing. You describe objects, and then you make a picture that represents what the scene would look like from a specific point of view. So the only thing additional from like what OpenSCAD does is you define a camera angle, like things that describe the camera basically, and lighting. But aside from that, like the objects are just the same. They just describe a scene. But you have special things which are light source, one special thing I guess, which is a camera. And they become very similar after that. Like you're using basic shapes and primitives and transformations to build up a scene. A scene.
Not all of them. Or they could be. Some of them. Yeah. Yeah. Gotcha. Yeah. Cool. Cool. But yeah, for sure. Like I mean, typically these things, like actually I don't know if OpenSCAD supports it, but I know like POV-Ray. Like you can import a model. So if you have like a 3D surface mesh—I guess they're called meshes, a mesh, right?—like with a texture, you can import it into the scene. And hopefully it's, you know, small enough where you can't discern the triangles, but it'll bounce the rays off of it just the same.
Yep. So it's very useful for that. Like wanting to get started in like 3D printing and like, oh, I want to be able to make my own models to 3D print, but I don't want to have to learn a modeling program. And so this is what I came across. And so this is... Oh, interesting. This is my endeavor I'm embarking upon.
Yeah. So you get them. Yeah. Like I've seen them, you know, like $400, $500, like this one called Printer Bot (without the E), PrinterBot. Anyways, check it out. PrinterBot. Yeah. So they have cheaper ones, and they're coming down all the time. And one of the cool things is there are 3D printers designed in OpenSCAD. Oh, nice. So you could get—and it kind of, it's cool because it kind of works in with the whole bootstrapping thing, like self-repair wrap is about this, like self-replicating. And so, you write a description in OpenSCAD and if you have any way of making the shapes that are described in OpenSCAD parametrically of whatever size you want, then you make the first one, and then you have a 3D printer of which you could print more. Or—but of course, there are typically some things which aren't printable that are.
Yeah. So it's very similar. I mean, my impressions of it using this is very similar to kind of the way if you've ever done ray tracing. It's very similar. So you kind of edit your code, and you kind of have like, you click a little button, and you know, or even interactively, it'll show you kind of like the updates you're making. Can't remember. Okay. But yeah. So, similar. Yeah. When you go to actually make the thing or generate some other representation of it than the raw, like mathematical description, it may do a more complete because ultimately, you need to like if you're doing a 3D printer, you need to tell the machine the exact coordinates to go to. But you can't tell it like 'make this perfect circle,' because it can't. It has only finite resolution.
Yeah. We found out the Google Plus page has what? 300 plus ones? No, 900. 900. 900. Really? Yes. Oh. Oh, I'm so sorry. I thought you were pulling my leg. It literally—I just looked it up. We have 900 plus ones. Yes. That is absolutely amazing. We... we love you guys. I have no idea what it's counting.
Yeah. The next podcast will be on Hacks. We don't have time to do the rest. But we appreciate all of your support. And you know, we definitely look forward to doing—to keeping these podcasts going. They've been a lot of fun for us. So keep writing in with your questions. You know, I really like answering them on G+. Yeah.
All right. Catch you guys later. 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 to Patrick and I, and share alike in kind.
