WEBVTT

0:00:00.000 --> 0:00:08.700
<v A>Hosting provided by HostTornado. They offer website hosting packages, dedicated servers, and VPS solutions. HostT.net.

0:00:16.760 --> 0:00:21.760
<v B>Programming Throwdown, Episode 31: Unix Commands. Take it away, Jason.

0:00:22.180 --> 0:01:34.520
<v A>Hey, so I had an absolutely terrifying moment over the Christmas holidays. Anyways, I moved a bunch of pictures from my camera to a USB drive that was connected to the router. And I didn't realize until now—I didn't quite think about it—but you know, like the USB drive had a journaling file system. I think it was NTFS. And so, you know, the way journaling file system works is the driver kind of like says, I forget the term for it, but it writes things to some cache. And then at some point decides to sort of flush the cache and actually write it to disk, you know. And, you know, being totally incompetent like any person who works on a modem. Like if you ever have a router, like a wireless router, it's always terrible. Like I bought tons of them; they're always terrible. So I trusted my file system to these people, which is a huge mistake. And the router, we lost power a couple of days later. I mean, this was literally days later. And the photos were just gone. And it was all the photos I'd taken of the baby, like for the first six months, you know.

0:01:34.660 --> 0:01:38.480
<v B>So wait, why did you hook it into the router in the first place? Presumably you were going to copy it off?

0:01:39.720 --> 0:02:47.380
<v A>No. Well, you know, I just thought that like I actually have a NAS. But the thing is, the NAS is a little slow to access, especially if my wife likes to look at a bunch of pictures at the same time. And so I figured if it was on the modem, it would be one less hop. When really it didn't really matter because the NAS is plugged straight into the modem. It's kind of silly. But you know, at the time you don't expect there to be this issue, right? So at any rate, I was really freaking out. And then, her computer, I tried to recover the files off her computer. But so just a quick heads up for people out there in the audience who didn't know this: I actually didn't know this for a really long time. I only learned it rather recently. But when you erase something, there's just a journal on the file system that says, hey, this file doesn't exist anymore. Like this index doesn't exist anymore. But on the physical disk, there's still electrons, and they still have, for the most part, the same kind of charge that they did when the file existed.

0:02:47.380 --> 0:02:52.760
<v B>No, electrons always have the same charge. What was that? The electrons always have the same charge. Flash.

0:02:54.320 --> 0:03:01.555
<v A>Well, so. No, I'm just giving you a hard time. No, yeah. So, well, you know what I mean. You mean

0:03:01.673 --> 0:03:09.980
<v B>The flash. The flash. The bits of flash are still flashed the same way. But it's just the header that says there's a file here has been erased. Yeah, exactly. Or been deleted.

0:03:10.540 --> 0:03:50.459
<v A>But then what happened was my wife's computer, which is what we put the pictures on before moving them to the USB drive. And it defragged. It did a defrag, like a full defrag, which it does every day. And so now, all of that electricity has been moved to a different location. And I couldn't recover anything. But then we were actually able to recover the files off of the cameras as SD card. Because you know, we don't do any defrag or anything on that. But so it was pretty scary. But at least I got all the files. I set up a cloud account since then and everything. So I have everything backed up in the cloud. And I have them

0:03:50.459 --> 0:03:58.760
<v B>on the NAS. Okay, good. But wait. So you should have been able to just run a file recovery program on the USB drive and gotten your pictures back as well.

0:03:59.620 --> 0:04:09.342
<v A>No. So I tried. But for whatever reason, it didn't work. Yeah, the USB drive just, like, I don't quite know what happened there. But,

0:04:09.409 --> 0:04:10.000
<v B>Yeah, I tried that.

0:04:10.034 --> 0:04:12.840
<v A>That was the first thing I tried. And they wouldn't recover.

0:04:14.720 --> 0:04:23.120
<v B>Yeah, okay. I would throw away your router, or just never plug—don't plug things you don't want to lose into it.

0:04:23.660 --> 0:04:27.870
<v A>Yeah. You know, why is it that no one can make a good router? It just seems like every router

0:04:28.022 --> 0:05:17.700
<v B>is terrible. No, no, it's really hard. I mean, it's like a high-performance device that's supposed to be really cheap and do, like, a lot of things, right? Like, it needs to have, like, a wireless router at least. It needs to do both be, like, a good LAN router, you know, like, switch router thing. Whatever. I'm terrible with networking stuff. But the physical, you know, port switching. But then it also needs to do that for all the Wi-Fi connections and, you know, have good RF design to have good Wi-Fi reception and transmission. I mean, it's like a lot of different things to go on. And on top of the fact that, like, I think a lot of the stuff we were using, like, the wireless, you know, 802.11b and g, and even N are what, over 10 years old. And 10 years ago, we didn't, like, in my house, there's probably 20 or more devices on the Wi-Fi at a given time.

0:05:18.440 --> 0:05:19.600
<v A>Yeah, yeah, definitely.

0:05:20.020 --> 0:05:26.220
<v B>When, you know, when they were designed, people probably had one or maybe two computers that had Wi-Fi, you know, modems on them or whatever.

0:05:27.060 --> 0:05:45.060
<v A>Yeah, they have that new, like, that 5G 802.11ac or something like that. I don't know anything about networking either. But supposedly they have a new one that just came out, which is way better. But, you know, of course, then it's like, you know, your device, the endpoint also has to support it, right? Like, whatever phone you have or whatever.

0:05:45.240 --> 0:06:23.760
<v B>Right. Yeah, your phone has to have it. Same thing, like, 5 gigahertz even. So 2.4 gigahertz is really crowded with, like, a lot of devices. Like, you know, from my house, I can see 10 or 15 different, you know, Wi-Fi routers from everybody, all the neighbors. So the space is really congested, which causes speed problems. And so 5 gigahertz is less crowded, and I believe there's more channels, so it's a little bit better. But 5 gigahertz doesn't have as good of a range as 2.4 gigahertz, and still tons of stuff doesn't support 5 gigahertz. So you can buy new products today that still don't have 5 gigahertz support in them.

0:06:24.460 --> 0:06:37.800
<v A>Oh, gotcha. Yeah, I mean, this might be the thing where like we're just a couple of generations away from them getting this right. You know, it's like this can't be that hard. It's like the mouse. You know, I feel like they got the mouse right, and then there hasn't been that many changes to it.

0:06:38.820 --> 0:07:11.020
<v B>Yeah. Well, I mean, I think there was supposed to be when they went all the TV stations went digital from analog. That space was supposed to get freed up for this kind of thing to be able to be done in that the old where TV stations used to live in the RF spectrum. But I think through various whatever the auctions and legislation got changed, and so it didn't end up being a very good idea for companies to do that. So it went to the same people that already do, like, the cell phone spectrum, basically. So it didn't really make a big change.

0:07:12.900 --> 0:07:34.180
<v B>Gotcha. All right. On to the news. News. So the first one here, it's maybe more of a that's interesting discussion. But somebody built a 32-node Raspberry Pi supercomputer cluster. And I think somebody has done this before. I'm sure we've even maybe had one of these in a previous programming throwdown where somebody did this.

0:07:34.600 --> 0:07:35.540
<v A>Yeah, I remember this.

0:07:36.040 --> 0:08:57.111
<v B>It got, like, a lot of this one, you know, got press or whatever. Somebody was trying to run. They were actually doing distributed sensor nodes. And this one had an interesting caveat where they did a good job of actually saying, like, you know, this is kind of impractical for most things. Like, a supercomputer is something different or way better. Or even just running on, you know, a couple high-performance computers might do a better job than putting all these Raspberry Pis. But the person specifically was using some, like, extra sensor and radio communications things. And they were using the general purpose I/O ports on the Raspberry Pi to interface to those things. So by having this cluster of them that way, he was able to simulate a sensor node better. Or at least that's the gist I got from the article. So I thought it was an interesting subject and kind of one of those things where I guess he said he spent about $2,000 building it. Yeah, right. Which is far cheaper than, you know, most things. So if it's the right tool for the right job, you know. I've seen people kind of spend more than, like, even, like, I was like, oh, I get a Raspberry Pi to play around with. But then you forget, like, you need the Raspberry Pi and an SD card and a, you know, Wi-Fi USB thing if you're going to use one. You know, and you, like, add up all the things. It's like, oh, man, this is actually kind of, like, going to be like $100. And what am I really going to do with it? Hmm. Yeah, that's the issue I ran.

0:08:57.111 --> 0:09:04.400
<v A>into. I was on the order, like, queue for one. But when my turn came to buy one, I just realized that, yeah, I didn't have any good ideas.

0:09:04.400 --> 0:09:25.160
<v B>Yeah, so, like, if you knew, like, oh, I'm going to use it to do this, like, it would, you know, it makes sense. Anyways, right tool for the right job. But, yeah, Raspberry Pi, supercomputer. These Raspberry Pis, I thought they would just, like, kind of be a flash in the pan and people would kind of, like, move on. But, like, they're still in the news and people are still talking about them. So yay for Raspberry Pi.

0:09:25.780 --> 0:09:33.380
<v A>Yeah, that's pretty cool. Did you see the, like, Intel came out with some really cheap, like, single board computer thing, right?

0:09:34.400 --> 0:10:14.483
<v B>So I don't know if really cheap is true. But I saw they came out with, yeah, like, a Pentium processor that's, like, Arduino compatible. Yeah, that's right. But people kind of passed over it because it's kind of not the point. Like, it didn't make a lot of sense for people to do that. But the space is heating up. Like, more and more people are making Arduino compatible boards. And the Arduino itself uses a basic microprocessor, which is only 8-bit computer and not that fast. But now there's ones with, like, 32-bit computers running, you know, significantly faster where you can do, you know, a lot more processing on them versus just, like, I'm going to blink some LEDs. Yeah,

0:10:14.854 --> 0:10:16.000
<v A>right.

0:10:16.780 --> 0:10:18.900
<v B>No, the Arduino's can do a lot more than that. But, yeah.

0:10:20.180 --> 0:10:27.280
<v A>Yeah, but, no, definitely nothing like a Raspberry Pi or, like, this Intel chip where you can do some serious, like, image processing or signal processing.

0:10:28.520 --> 0:10:33.900
<v B>Yep. So if you were going to do image processing and you created a startup to do that, you might be doomed.

0:10:34.700 --> 0:10:43.035
<v A>Yeah, that's right. So my article is pretty cool. The title is Why the World's Best Photo Startup is Going Out of Business. Went

0:10:43.170 --> 0:10:44.339
<v B>out of business.

0:10:45.079 --> 0:12:38.740
<v A>Yeah. It's called The Government. So I think that this article is, like, phenomenally interesting. It's on this app-based company called EverPix. And the idea here is they would take your photos, you know, upload them to their cloud, and then run whatever sort of image processing, classification, et cetera, to categorize your photos. And so then give you sort of a search engine for your photos. So you can say, you know, Eiffel Tower, and it would just show you photos that you might have taken over several years, over several trips to Paris of the Eiffel Tower. So it seems like a cool idea and actually was a good idea. They had a small but very loyal fan base or, I guess, customer base that were paying customers. So, you know, they did have revenue. And, you know, the too-long-don't-read summary is that they basically went out of business. So for two reasons. One is they didn't try to grow their product. So they spent a lot of time focusing on the details and, you know, going through feedback from customers, fixing bugs. And they felt like, you know, the path forward was through, you know, pleasing their current customers as much as possible, which, you know, is very noble. And, you know, I can totally empathize with that. But meanwhile, you know, Instagram and Snapchat and these other major blockbuster, you know, photo-based apps spend more of their time growing the user base. You know, log in with Facebook, get your friends to sign in, you know, more storage space if you get your friends to sign in. And they made the app free. I'm talking about their competitors. And so they kind of left this company in the dust.

0:12:39.439 --> 0:13:35.700
<v A>The other interesting thing is this was a startup, a few guys who were living in San Francisco, and they paid themselves each $200,000 a year cash salaries. And this raised a huge stink, you know, both in the article and in the comments. There's a really interesting discussion going back and forth. But it really makes you think, you know, if you have, I mean, this startup, based on what I read in the article, they would have failed anyways. So it's like at least they were able to make a decent salary. But then on the flip side of it, or I guess a great salary, I should say. But on the flip side of it, you know, a lot of people are saying, look, you took, you got $8 million in funding and you basically took most of it and kept it. Like the investors should never invest in any company that you guys make. And they're just really upset, you know. And so I thought that whole dynamic was actually really interesting.

0:13:37.700 --> 0:14:31.459
<v B>Yeah, I mean, I never had heard of this before, this article, but this startup ever picks. But, yeah, I mean, I thought that was interesting, too. Like when I was skimming the article the first time, I saw it, and I saw the salary costs were like so huge. And I was like, not just like theirs, but like in general, they were showing how much they had spent on salaries. And I was like, wow, that's really high. And as they were saying, like, oh, we're paying ourselves the equivalent of other jobs. But that's kind of one of the things I've always heard about startups saying is like you don't take an equivalent salary. You get a lot less salary because you're essentially donating some portion of your salary to the company in hopes that or you're investing it, right? So like instead of taking the money out now, you're leaving that money for the company to have more runway to get to the time when it makes tons of money. And then your investment of shares and percentage ownership of the company pays out that much more.

0:14:32.360 --> 0:14:55.680
<v A>Yeah, exactly. I mean, you know, it's true that they had this growth issue where they were charging customers and it was hard to get new customers. But, you know, if they had paid themselves like $50,000 a year instead of $200,000 a year, then maybe they'd have another year or two to sort that out. But instead, they're just like, you know, they're dead now. So I think you have the next news article.

0:14:56.740 --> 0:15:04.620
<v B>So, yeah, 3D printers at the Consumer Electronics Show. Oh, is that what that is? CES stands for it.

0:15:04.640 --> 0:15:06.500
<v A>Yeah, I never actually looked it up.

0:15:07.000 --> 0:16:16.182
<v B>I think it's Consumer Electronics Show. So I'm not super big into consumer electronics, I guess. Like some people are or whatever, like the latest phones and the latest gadgets. But it's somewhat interesting. And I am interested in 3D printers. There was a lot of news about 3D printers at this year's CES. And, you know, I was trying to read through what people were saying. It's still like, I guess, a relatively young or new industry about what's going to happen with 3D printers. And it appeals to me because a lot of hardware, a lot of software, and you get to make cool things that you hold in the end. Yeah, definitely. But there's still like a lot of questions around my mind. Like I see a lot of people who think that they will be able to have a lot of use out of 3D printers without doing any CAD work. Like no designing their own things in 3D programs. And maybe that's like 3D programs need to become much easier to use. Or like this year there was a lot of scanners coming out. Like you could scan an everyday object like in your house. Like, oh, I like this mug. I'm going to scan this mug. And then I'll have a 3D model of it. So maybe that's one avenue. But

0:16:16.182 --> 0:16:26.220
<v A>They also have the Thingiverse, right? At least the Thingomatic has the Thingiverse. And it's like a huge warehouse of 3D objects. Like I've done that before, just printed other people's objects.

0:16:26.680 --> 0:16:43.600
<v B>But how far does that get you? Like if you had bought your own 3D printer in your house and you didn't know any programming, any, you know, didn't want to do any CAD work, 3D work. Like would it, you'd justify the price like of $1,000 to only be able to print stuff that's on Thingiverse?

0:16:45.280 --> 0:17:07.619
<v A>I don't know. I mean, so the thing is like the, only if the printing itself was an activity. Like if I would get my son when he's older and the two of us would find crazy things on the internet, like on Thingiverse, like dinosaurs or whatever, and print them out. But yeah, you're right. $1,000. I mean, I'm hoping that by then the price will be more like, you know, $300 or something.

0:17:08.020 --> 0:17:56.280
<v B>Yeah, so they have $300 ones now, but they tend to involve more tinkering. Oh, bummer. So I think, yeah, maybe in another few years it will be. I just like, I just wonder what is, and several of the articles talked about this, and the one that will be in the show notes was more lengthy than most, but you still need the killer app. Like what is the thing that you want to get a 3D printer to, like you would do it, get one just to do that. And we haven't really found that yet. And maybe once we do it, it will be like, oh, of course, like this is awesome. But for now, I'm still interested because like I like electronics and tinkering, and I'm not afraid to do 3D drawing. But like the whole it's ready for the masses or it's going prime time or it's a consumer device still eludes me. Like I'm not sure that that makes any sense.

0:17:56.840 --> 0:18:27.351
<v A>Maybe the 3D printer becomes like a way for you to customize, you know, something where like, you know, you'd go to Best Buy and you would buy like a toaster, let's say. But it would just give you like the inside of the toaster. And then you could go to Thingiverse and the toaster manufacturing company has given you like a hundred different shells for the toaster, like one that looks like an Angry Bird or whatever. And you could just print whatever you wanted. Oh,

0:18:27.351 --> 0:18:29.780
<v B>Angry Bird toaster. Yes. That's what I've always wanted.

0:18:30.580 --> 0:18:36.419
<v A>Actually, you know, I think 3D printing something like a toaster is probably supremely dangerous.

0:18:36.960 --> 0:18:39.020
<v B>Well, and a bad idea because it's plastic, it'll melt.

0:18:39.379 --> 0:18:43.760
<v A>Yeah, yeah, yeah. That's exactly right. But you know what I mean? I mean, you get where I'm going with this.

0:18:43.760 --> 0:19:20.320
<v B>But I mean, even in that case, like I agree. Like I think 3D printing rapid prototyping has a use in industry and among engineers, and for rapid prototyping, right? Or like at a store, like the Best Buy, you would go buy the—they would have a kit of toaster oven innards. But instead of stocking 300 different styles of toaster oven, they would just stock one or two different insides. And then they would 3D print whichever one you chose. Yeah, exactly. Right. But that doesn't still explain why I would need one at home, unless I was going to change toaster shells every couple of months.

0:19:20.940 --> 0:19:32.200
<v A>Yeah. Yeah. But you know, maybe that's—maybe that's where it goes. Like for example, you know, you don't really need a paint mixer at home. But you know, I'm really happy when, you know, I go to Lowe's and they have one.

0:19:32.820 --> 0:19:38.160
<v B>But paint mixers aren't all talked about at CES and people saying, 'Oh, this is the wave of the future.'

0:19:39.160 --> 0:19:46.512
<v A>Well, maybe they were. Maybe they were at CES in 1932. Okay. Anyways,

0:19:46.984 --> 0:19:49.139
<v B>3D printers are cool.

0:19:49.139 --> 0:20:05.840
<v A>I mean, I guess my point is maybe it's—it's not, you know, the end goal really isn't your home. You know, like it's just for right now it's mainly for geeks and geeks like doing things themselves. But, you know, maybe the end goal is to put it in a Best Buy like you were saying.

0:20:06.080 --> 0:20:30.860
<v B>No, sure. No, I mean, to me it's extremely interesting, but I also like making my own furniture and building circuits. And so, I mean, like it makes sense to me, for me. I just like—I guess I feel like I'm atypical in that respect; most other people aren't like that, where they don't want to do that kind of stuff. So we'll see. But if you're interested in 3D printers, you should check out some of the cool stuff that was shown off at CES.

0:20:31.740 --> 0:20:50.040
<v A>Yeah, definitely. Yeah. 3D prints are actually really fun. And in learning, like, I use Blender, but whether you use Blender or what is it—Solid, there's one called SolidWorks, or SCAD, Solid CAD. Okay. Regardless of which one you use, they're all pretty cool. You can make some really fun stuff.

0:20:51.740 --> 0:20:52.600
<v B>Yep. All right.

0:20:53.560 --> 0:22:45.572
<v A>Okay. So I got a pretty cool article: 'Top 25 Oddball Interview Questions.' And it's a good lead into, you know, our nice little segue, you know, mid-show topic that we're going to keep hidden for suspense reasons. But yeah, so this website, you know, blog post from Glassdoor. So for people who don't know, Glassdoor is a website that discusses—well, the way it works is you can look around in Glassdoor and they'll give you like superficial information on different jobs, different companies, salary expectation, things like that. But then after you get a certain way through the site, they say, 'Oh, hey, you know, you have to give a little to take a little more.' And so they have you log in through like their account or Facebook, et cetera, and put in some anonymous statistics about your job, which, you know, they use to sort of keep the whole thing running. But now they've become pretty popular among job seekers or career enthusiasts, I guess. And so they have spun off this blog, and on this blog, they do a variety of different things. Every year they have 'Top Companies to Work For,' 'The Craziest Work Environment,' et cetera. And this is 'Top 25 Oddball Questions.' And it's a lot of—I've seen a lot of sites like this, and most of them focus on questions that they ask, like project managers, on the grounds that you need to be able to sort of think critically and think mathematically. So you see a lot of these, like this one in particular: 'How many cows are in Canada?' 'How many quarters would you need to reach the height of the Empire State Building?' You know, I've heard like 'how many ping pong'

0:22:45.690 --> 0:22:46.720
<v B>balls can you fill

0:22:46.720 --> 0:22:47.980
<v A>in airplanes? Stuff like that.

0:22:48.419 --> 0:23:00.879
<v B>Those are all the same type of question. Or 'How much extra gasoline would the United States consume if there was a law passed that all headlights had to be on all the time on cars when they were driving?'

0:23:01.720 --> 0:23:24.220
<v A>Right. Right. And most of the time what it comes down to is you have this very complex dynamical system. And you just need to start with trying to simplify it as much as you can. And, you know, just like, for example, the ping pong question, you start by thinking, 'How many ping pong balls can you fit in, like, a one-meter cube?'

0:23:24.439 --> 0:23:46.620
<v B>Yeah, like, basically it's just all about estimation. But it also proves on some of them you need to know a little bit more. Like, for instance, the one I said, like, headlights being on—like that there's an inefficiency in powering a generator to have the headlight on that causes you to use more gas or whatever. In addition to estimating how many cars are in the U.S. and how much do they drive and how much gas do they consume?'

0:23:47.600 --> 0:23:50.237
<v A>Right. Yeah, exactly. So,

0:23:50.237 --> 0:24:05.720
<v B>Yeah, it's pretty cool. You should be ready to answer those. Like, if that's a really common style of question—to estimate something really big that there's no way you can actually know the answer to—I don't think that's oddball. Like, I think you should really know that if you're going to do any sort of engineering interview.

0:24:06.520 --> 0:24:23.080
<v A>Yeah, definitely don't just say like 100 or something like that. You know, I mean, what they want to know—and we'll talk about this more as we go on—but what they really want to know are just the process and your methodology.

0:24:23.840 --> 0:24:30.139
<v B>Yeah, I think that's it. Like knowing you can take a seemingly impossible question and break it down piece by piece.

0:24:30.840 --> 0:24:32.965
<v A>Yeah, exactly, exactly. So, did

0:24:32.965 --> 0:24:36.560
<v B>you go through these questions? Do you know, 'So why is a tennis ball fuzzy?'

0:24:38.740 --> 0:24:46.880
<v A>Why is a tennis? I'm assuming it has something to do with the way it bounces to keep it from, like, rotating or something.

0:24:47.380 --> 0:24:56.160
<v B>I actually thought it was to slow it down or something. Yeah, to keep it from going too fast. Oh, is that the real answer? To, like, level the playing board? No, I don't know. There's actually not answers on these.

0:24:58.140 --> 0:25:00.032
<v A>They're oddball questions. Do you

0:25:00.032 --> 0:25:00.760
<v B>believe in Bigfoot?

0:25:01.754 --> 0:25:02.817
<v A>Do you believe in

0:25:02.817 --> 0:25:06.512
<v B>Bigfoot? No, that's one of these. Okay, we can stop. So,

0:25:06.512 --> 0:25:11.237
<v A>you should go through these. That's Moby Dickulous. Um, so...

0:25:11.560 --> 0:25:12.739
<v B>So, on interviewing, what

0:25:12.739 --> 0:25:13.640
<v A>are some? What's that?

0:25:14.160 --> 0:25:18.300
<v B>On interviewing. So, what are some good tips for people who are going to interview? Thank you.

0:25:18.660 --> 0:26:26.580
<v A>So, this is sort of deviating from the normal show. You know, we're definitely going to get to Unix commands, but, as you might expect, you know, that's not an entire language, although maybe it should be. But, you know, we wanted to add a little bit of spice, a little bit of interesting content. And so we decided to think, you know, what does it take to really ace an interview, right? Now, of course, you have to know, you have to know what you're talking about. You can't have a degree in Computer Science and then try to ace an interview for the legal team, right? I mean, it's just not going to happen. But, you know, with that said, there are a whole process to interviewing and to being interviewed. And, you know, the reality is that, sadly enough, there's some people who fail at that process despite the fact that they are extremely qualified, and it works the other way as well. And so, understanding the interview process is a big step towards, you know, either changing careers or interviewing other people for roles within your company.

0:26:26.900 --> 0:26:30.220
<v B>Or graduating from college and trying to get your first job.

0:26:31.060 --> 0:26:33.460
<v A>Yeah, yeah, yeah, definitely. There's no doubt.

0:26:33.580 --> 0:26:57.660
<v B>And we'll mostly be talking about—we'll go from general to specific, but like, in the beginning, it'll be applicable to everything. But then, further along, we'll start talking specifically if you have what's called a technical interview, which is an interview where they're going to ask you to solve problems or, you know, do programming in the interview. Which not every interview is that way. And if possible, you should try to find out in advance if it will be a technical interview or not.

0:26:58.400 --> 0:27:10.780
<v A>Yeah, definitely. That's a really good point. It's kind of sad, but I considered college as a career. Like, when I was thinking in my head switching careers, I guess it's because I was in college for so long. Oh,

0:27:10.780 --> 0:27:11.480
<v B>Okay.

0:27:12.140 --> 0:27:16.580
<v A>It's pretty bad. Anyways, so, you want to go first?

0:27:16.580 --> 0:28:25.958
<v B>Sure. So, I mean, like the first—and maybe this is like, I said, they're general and therefore probably more obvious in the beginning—but you should read up about the company you're interviewing with. I mean, it's kind of bad, but I've done interviews where the person comes in as kind of like, so what do you guys do? And they don't mean like, what kind of work specifically do I do? Because I've already said that. They're like, just asking like, in general, what does the company do? Or like, what products they make? And it's like, yeah, okay. That's like, you didn't look us up on the internet? You know, like, this is not good. So, definitely read up and know about, you know, like, what are the most famous products they do or the things in the news? And specifically, like, if it's a big company, it's good to find out, like, at that branch, what do they work on? So, like, if your company has, like, you know, makes furniture and in one city they make couches and in one city they make desks. You know, if you can find that out, like, that's also more helpful. Because then if you're interviewing in the city where they make desks, you're probably talking to people who work on making desks. And then, you know, you can ask specifically about that kind of stuff. Yeah.

0:28:25.958 --> 0:28:41.439
<v A>Definitely. I mean, so, Patrick and I have been interviewees several times. We've interviewed a lot of people. Probably between the two of us, we've interviewed over 150 people, just estimating.

0:28:43.086 --> 0:29:39.560
<v A>So, and one of the big things is, you know, there are some people who are there but they don't really want the job. Or, you know, they find out they don't want the job by the time they get to your interview if they've had other prior interviews the same day. And so, as an interviewer, just because of the statistics, it's very easy to sort of lump someone into the pool of people where you just feel like this, like they're just not interested. Right? Because there are a lot of people who aren't interested but are interviewing for other reasons or who knows. Right? So, yeah, you definitely, as an interviewee, you want to understand the company and be enthusiastic. And, I mean, the reality is if you don't understand what that company does, then how can you really want to work there? It doesn't really add up. But yet you find tons of people who are in that category. So, that's definitely where you want to do your homework.

0:29:41.800 --> 0:29:49.017
<v A>So, another one is it's really important to be confident and not to be intimidated. Or

0:29:49.017 --> 0:29:50.080
<v B>At least to act confident.

0:29:50.080 --> 0:31:29.800
<v A>Yeah, yeah, especially when you're doing a technical interview, just kind of keep telling yourself or just remember, meditate on this. You know, the interviewer, you know, he might have asked that same question to, say, 50 other people. Right? Or if he hasn't, he's preparing to ask that question to another 20 or 30 people. Right? So, he's going to be an expert on that question. And he might have seen just about everything that people have thrown at a certain question. Like, the guy who asks the how many ping pong balls can you, do it take to fill up a 747? Right? Like, he's probably heard 100 different answers. And so, you know, nothing is really going to faze him. And he's always—the interviewer is always going to seem like one step ahead of you because they are one step ahead of you. In fact, they're more than one step ahead of you. Right? So, don't let this intimidate you. The reality is, you know, you can go through a process and while it feels like you're kind of struggling, what you're really doing as interviewee is solving the problem. And you're solving the problem under distress because there's a lot on the line and there's a lot of time pressure. And so, that's not a bad thing, you know. I think that there are a lot of people get way too nervous in an interview setting as soon as, you know, they start saying things that are on the wrong track, you know. Don't hesitate to throw things out there that are bad and then come back to a better place and to a better solution, you know. So, that's my two cents on that.

0:31:30.140 --> 0:33:03.680
<v B>And we're going to have to speed this up a little. This will be the whole episode. But, yeah, I mean, the other thing is, like, always try to answer what they're asking but then try to finish it out, right? So, say, like, oh, okay, first here I'm describing you, like, how I'm going to attempt to solve it. Then, like, oh, here I'm writing code. Okay, now I'm done with my code. Don't be like, oh, okay, I'm finished. Say, like, okay, now I'm going to test my code. Now I'm going to, you know, like, try to evaluate if I've made any errors. And really going through that whole process is useful as well. And then, you know, make sure also, like, it's some people don't think about this, but you will almost always get asked at the end of your interview, do you have any questions? And, like, it seems kind of silly and, oh, this doesn't really matter. They're just asking me, like, to be friendly. You know, do I have any questions? But in reality, like, at least this is what I've always been told and it seems to work. People think positively about themselves. So if the interviewer is talking about themselves, they're thinking positive thoughts. So they'll think positive thoughts about the interview. And it sounds really, like, psychological or something. But if you think about it, it makes sense. So if you ask a question, like, what's your favorite part of working here? Or, you know, what do you like most about, you know, being a software engineer at Intel or wherever it is? Then the person is going to, like, say something that they're passionate about. And then that's what they're going to remember about your interview. And it seems really silly and maybe it doesn't matter. And if you have actual real legitimate questions, you can, of course, feel free to ask those as well. But at least ask some question or questions, even if you've asked other interviewers the same question that day.

0:33:05.100 --> 0:34:42.739
<v A>Yeah, definitely. I mean, that's another good point. And then we'll try to, as Patrick said, speed this up. But basically, you know, you'll often have many interviews, you know, within one day. Like, you'll have many interviewers that are coming and going through for a particular interview. And they, by design, they don't collaborate. So, you know, if you flub the first interview because of the morning and you just didn't work out, don't let that ruin your whole day, right? Go into a second interview with a blank slate because it is a blank slate. I mean, if the company, like, you know, has people sort of collaborate from one, you know, session to the next, then they're not going to end up with five sources of honest feedback, right? So most people don't do that. And so it's okay to flub an interview or, like, one part of an interview. So let's get to maybe more of the specific, like, technical parts of the interview. One big part is to do a lot of open source or at least open source your own work, especially, you know, if you're not in industry yet, if you're in academia or if you're just a student, you know, graduating from college. Take your assignments and kind of polish them, maybe put some comments and whatnot, and then open source them, right? Even just put them on GitHub just so you have an account and a presence. I think that's a really good idea. And it sort of gets you familiar with some of the tools that you'll be using when you go to industry. Definitely.

0:34:43.439 --> 0:35:34.439
<v B>It's also important to, even if you are fresh out of college or you've been out of college for a little bit longer, to go through and, like, kind of from scratch go through the common data structures and algorithms that you're likely to be asked about. And the important thing here is from scratch—like, it sounds kind of silly, but—without looking it up, without doing it or looking it up once and then trying to implement it. Because there's one thing to read about something and say, like, oh, okay, now I know about binary tree traversal. And it's another to actually sit down and write the code for it. And if you're in a coding interview, you're going to have to write the code for it. And it's best if you've written the code for it recently. And so it's a little easier to do. So things like binary trees and tree traversals, sorting. You need to know at least one algorithm that you can do from scratch.

0:35:36.379 --> 0:35:58.545
<v B>The graph algorithms, recursion, dynamic programming. And then another big one, in college it's not typically stressed. But if you go to any sort of large-scale internet company, knowing about hashing and hash maps, like, a lot. Almost every question at an internet-based company seems like it could have a solution that uses a hash map. Yeah, you're

0:35:58.545 --> 0:36:03.000
<v A>Absolutely right. You're absolutely right. There's just... Have you heard of locality-sensitive hashing?

0:36:03.000 --> 0:36:07.980
<v B>I mean, no, but the words in English make sense to me.

0:36:08.440 --> 0:36:20.820
<v A>Okay. Yeah, we'll have to talk about it some other time. But that is like the topic du jour. It seems like everybody is... Like, that seems to be the interview question of the week or something on everyone's calendar.

0:36:21.080 --> 0:36:22.400
<v B>Oh, interesting, interesting.

0:36:22.640 --> 0:37:21.819
<v A>But yeah, Patrick's absolutely right. I mean, you want to understand the fundamentals. And yeah, it doesn't hurt to code them up. I mean, you think about it. You see a lot of people practicing martial arts, like Kung Fu or Taekwondo or whatever. And they do the same kick over and over again every day. And a lot of that is kind of muscle memory. It's supposed to be instinctive. And so there's a number of competition sites, like TopCoder, Kaggle, Project Euler. And if you go to these sites and you do a lot of their practice problems or compete in some of their student or professional competitions, then you will build that sort of muscle memory for your brain. And you will be able to sort of instinctively—you won't just someone won't just tell you some question and you'll say, 'Three.' It doesn't work like that. But you'll instinctively jump to a certain set of tools that will at least get you in the right direction.

0:37:23.140 --> 0:38:10.280
<v B>Yep. And it is worth noting too, even if you do programming day-to-day and it's arbitrary as it seems to do these silly questions, that is what these companies have chosen to do to screen people. And so you either got to kind of sign up to do it or just decide you're not going to work at one of those companies. So, like, in my day-to-day job, I don't ever implement a binary tree from scratch. But if I know I'm interviewing at a company that asks these kinds of questions, I should study that or decide that I'm just not going to bother. Because it's also I've heard stories and we're moving into maybe the section where we talk about some bad stories. But I've heard stories before of people saying, like, 'I know how to do that,' but 'I'm not going to do it for you.' So that basically, that's so elementary, like, it's a waste of time. Like, let's talk about other things.

0:38:12.212 --> 0:38:12.702
<v B>I bet that,

0:38:12.702 --> 0:38:12.938
<v A>Okay.

0:38:14.060 --> 0:38:25.476
<v B>Yeah, so that doesn't work out that well. So, like, you've got to be prepared to play the game that the interviewer wants you to play, even if you think you're above that. Yeah, it's

0:38:26.151 --> 0:38:39.260
<v A>A really good point. I mean, the reality is, you know, it doesn't matter whether you're 25 or 52. You know, if you go to a technical interview, you're going to have to know binary trees, hash maps, sorting, et cetera.

0:38:39.600 --> 0:38:47.397
<v B>Yeah, and the interviewer knows there's a tool that does that already. Yeah, I mean, they know that as well, but like, that's not the point. Yeah, yeah, like,

0:38:47.852 --> 0:38:53.539
<v A>The right answer isn't, oh, I'll use the binary tree code off the internet. It's not going to work. Yeah, so.

0:38:55.859 --> 0:38:58.540
<v A>So, you want to cover best and worst?

0:38:59.060 --> 0:39:09.000
<v B>Yeah, so, well, best moment? I don't know if I have a best moment other than like ever not completely flunking out at someone's question. But my worst moment is.

0:39:09.120 --> 0:39:16.580
<v A>What about a best interviewer moment? Like, did you have a moment where you interviewed somebody and it was really profound or anything? Okay. No.

0:39:17.660 --> 0:39:57.560
<v B>But I do have a worst one. I was in an interview where I was going to have several interviews that day. I think like four or five. And it was like the first or second one. And this person asked me like a really open-ended question. Like one of these kind of, like, estimation-style questions. And I was like really going very in-depth on it. Like, kind of you know exploring all the possibilities and waiting for them to guide me into like, okay, yeah, that's good enough. Or like, okay, let's get to a final answer. You know, like kind of seeing like how much detail they wanted me to get into. And then kind of by the end of it, they said, you know, I don't really think you have any technical ability whatsoever.

0:39:59.020 --> 0:39:59.299
<v A>Oh.

0:39:59.680 --> 0:40:04.759
<v B>And it was just like, oh, what? Like, I was, but you can't explain, right? Like, I was, like.

0:40:04.779 --> 0:40:06.339
<v A>What can you even say after that?

0:40:06.340 --> 0:40:21.160
<v B>So then I was kind of like, well, you know, I was just like waiting for you to tell me like when you wanted me to start, you know, coding. Or when you were thought I had given enough detail. And they're like, no, I think you're just trying to dodge having to do any coding. And I was just like, oh. Oh, my gosh. Okay.

0:40:21.900 --> 0:40:25.960
<v A>Oh, that's gut-wrenching. Was that in the beginning or the end of the day?

0:40:26.520 --> 0:40:29.001
<v B>That was like the second interview out of five. Oh,

0:40:29.001 --> 0:40:33.200
<v A>No. So you still have to face the majority of the day after that. Yeah.

0:40:33.200 --> 0:40:47.819
<v B>But you got to kind of, like Jason said, shake it off because just because that guy was that way doesn't mean other people will be. And if I go through with a bad attitude, like, it's just going to everybody else is just going to assume that I'm, that's me normally.

0:40:49.660 --> 0:40:57.149
<v A>Yeah, yeah, definitely. So I actually don't have a best moment either. I think it's actually pretty hard to have a best moment interview, right? I got

0:40:57.149 --> 0:40:58.448
<v B>offered a job. But

0:40:58.448 --> 0:41:08.920
<v A>I'll talk about my worst interview, interviewee moments. So as an interviewee, it's similar to Patrick. You know, I did like a lot of, you know, computer science theory.

0:41:11.864 --> 0:42:24.500
<v A>And so I had this one stage of an interview where somebody was asking just kind of very specific questions on like this certain type of architecture that I just never been exposed to. It's like I never took a class on like networking or anything like that. So these are kind of like very specific networking questions. And it was just really, it's just really hard because I kept like saying a variety of things. And there's sometimes when the person was trying to guide me in one direction. But like by guiding me, they were saying things that like opened up holes in the original problem. So I was like, oh, well, now there's this hole in this problem. So I could just do it this way. And they're like, okay, yeah, but what if you couldn't do it that way? And it's like I just knew that they wanted me to say something. But I didn't know what it was that they wanted me to say. And I just felt so helpless. But like Patrick said, you just have to shake that one off. It actually went pretty bad. The person about halfway through the interview started going on, like, opened up their computer and started like chatting. Like, I don't know. Like, it's hard to say if someone is taking notes or chatting. But I'm pretty sure this person is just like chatting to other people. Did I get a joke interviewer? Like, while they were trying to talk to me.

0:42:24.520 --> 0:42:26.880
<v B>A joke interviewee? Are you guys testing me?

0:42:27.640 --> 0:42:52.460
<v A>It was so bad. But my worst interviewer moment, I guess I have two, one really short. I was a phone interviewer and the person, like, pretty quickly into the interview. It's not like I had been kind of, like, badgering this person. But, like, you know, like, relatively quickly in the interview, you just started crying. And I think it was just, like, the pressure was just too much that they were putting on themselves. That's just sad.

0:42:52.607 --> 0:42:54.025
<v B>It was

0:42:54.025 --> 0:43:43.400
<v A>just really super awkward. And then I'm only laughing because I'm, like, remembering just how awkward it was. And the other one, it was an in-person interview. And it was the same scenario. The person was just extremely nervous. And we were on a whiteboard. And the person had these Expo markers. And they were furiously writing. But they were left-handed. And so as they were writing, they were kind of smudging the whiteboard with their hand. And then they were, like, profusely sweating because they were so nervous. So they kept rubbing their forehead. And then the Expo marker, like, you know, migrated to their forehead. And they had just, like, they looked like they had, like, kind of, like, these, like, Native American tribal tattoos, like, all over their face. But it was all these different color Expo markers.

0:43:44.300 --> 0:43:45.780
<v B>And you didn't say anything?

0:43:45.780 --> 0:44:16.400
<v A>I was, like, hey, you know, after the first problem, I was, like, let's go get something to drink. So we went and got a drink. We came back. It was, like, he got a soda. And he was kind of, like, his hand was shaking. So he was shaking the soda. So he, like, he turned around. He didn't even have a chance to open the soda. He turned around. And the soda flew out of his sweaty hand and hit the wall and then exploded. And both of us and the whiteboard got, like, showered in, like, very foamy Coca-Cola.

0:44:16.800 --> 0:44:21.977
<v B>And it was disgusting. That's not funny. That's just depressing. What is?

0:44:21.977 --> 0:44:40.720
<v A>The worst interview that I've ever given in my life? And I actually, I probably gave a little too much detail. And if you're listening or if you're friends, you know, I apologize. And, you know, I still thought it was hilarious. No hard feelings. But that was just so bad. Oh.

0:44:41.440 --> 0:44:41.920
<v B>Okay.

0:44:44.360 --> 0:44:45.920
<v B>Time for book of the show.

0:44:46.520 --> 0:45:49.220
<v A>Book of the show. So my book is actually a series of comic books called Locke and Key. And I thought it was very well done, basically. The thing that I thought was really cool about it is, you know, without giving too much away, there's this house full of keys. And each key, it's almost kind of like the Twilight Zone, where each key kind of, like, bends the world in a way that's not generally bent. You know, and it just, each key causes something crazy. Some kind of crazy power or whatnot. The book is a little too generic. You know, like, they gave themselves too much freedom. It's sort of like you have any key. And then, without spoiling too much, the antagonist ends up being just also kind of generic. But the creativity is absolutely astounding. And the kind of crazy combinations of keys and all the things they do with them. I thought it was a really awesome series, and I highly recommend it.

0:45:49.779 --> 0:45:57.440
<v B>Nice. So it's a comic book or a graphic novel? Yeah, it's only 20 or 30 issues.

0:45:57.779 --> 0:46:22.000
<v A>Okay. But, you know, I don't really like Spider-Man, Superman, any of that. But I do really like kind of reading comics. It's kind of light. And, you know, usually I really like the artwork and everything. But, you know, this is more kind of not serious comic, but it's not one of these superhero kind of crazy fantasy comics. Nice.

0:46:22.000 --> 0:46:23.967
<v B>It's meant to be. Yeah, yeah, yeah. It's, I guess,

0:46:24.034 --> 0:46:26.259
<v A>A horror comic. Oh, horror. Okay.

0:46:26.260 --> 0:47:45.810
<v B>So I chose this book before I knew what you were picking, but it also has Locke in it with L-O-C-K-E. But this is The Lies of Locke Lamora. And this is a fictional book by Scott Lynch that I just finished, well, actually listening to, but I'll call it reading. And it is pretty good. So it's a crime thriller, kind of like, think like Ocean's 13, like a heist. Okay. But it's set in a fantasy world. So it's this kind of really interesting world where they don't get into as much as most science fiction would, the details of how this world came to be and kind of the rules of the world. But they do, the author does a good job of setting up an interesting environment for this thing to take place in. And I believe it's going to turn into a trilogy. I think the second book is already out and maybe the third is in the works as well. I'll have to look into it. Oh, so it's pretty new then. Yeah. But it's probably three or four years old. I'd have to look. I don't really know. But I just read it. And I really enjoyed it. And it's not like some trilogies end where, like, it's just the trilogy is just really one long book. But this seems to have, you know, like, you could just read one book and be happy. Gotcha. Cool. Cool.

0:47:45.880 --> 0:47:49.620
<v A>Yeah, I'll check this out. So, wait, what's the theme again? Is it, like, futuristic or?

0:47:49.720 --> 0:47:53.880
<v B>No. So, it's like a fantasy world. So, it's not really futuristic.

0:47:55.560 --> 0:48:11.663
<v B>And there's like a little bit of magic. I don't really know. It's not like medieval. How would I call it? I don't even know like the age. Maybe like a little steampunk. Oh, okay. But not like with like balloon steam boats or anything. Oh,

0:48:12.929 --> 0:48:16.017
<v A>Okay. Cool. So, yeah. Maybe like,

0:48:16.017 --> 0:48:19.520
<v B>18th century. Maybe like 18th century, but like in a fantasy world.

0:48:21.079 --> 0:48:27.220
<v B>Now, I'm trying to remember if there was any technology in the book that would have placed it in a specific time. So, I don't know.

0:48:27.220 --> 0:48:53.600
<v A>I love seeing some of these like futuristic, but the art styles from the past. Like, there was this artist that did pin-up art. Like, these are kind of like 1920s, 1930s. Like, kind of very pastel, very flat colors. But then, like, the cars would be flying cars. Or, like, the technology would be like something outlandish, right? And I always thought those contrasts was pretty cool.

0:48:55.480 --> 0:48:58.840
<v B>Nice. Nice. All right. So, time for tool of the show.

0:48:59.500 --> 0:49:51.460
<v A>Tool of the show. My tool of the show is Duolingo. So, long story short, I used to be pretty much fluent in Italian. I lived there for a while. Lived in Italy for a while. But I've since lost almost all of my fluency. Literally all of my fluency. And so, I wanted to build it back. And, you know, I have Brady, and I want to sort of teach him Italian and all of that. So, I picked up this app. It's really cool. It sort of gamifies learning a language. And I feel like it does a really good job. I mean, my opinions, I feel like I can't really give it a fair, you know, assessment. Because I already know Italian. So, I'm kind of, you know, breezing through it. But I really feel like if you had no idea about the language, maybe I'll try Chinese or something next.

0:49:51.732 --> 0:49:53.700
<v B>Maybe I'll try learning Italian and I'll tell you.

0:49:53.700 --> 0:50:02.259
<v A>But it walks you through it at like such a fundamental level that you could pick up any language with it.

0:50:02.520 --> 0:50:10.720
<v B>So, you can get back your fluency. I'll try this out and try to become fluent and try to learn Italian and become fluent. And then you can tell me how good I did.

0:50:11.899 --> 0:50:22.090
<v A>All right. Sounds good. One thing that's particularly cool about it is, although I found out later like only through using the app, that it's not that accurate. Like, it gives

0:50:22.090 --> 0:50:23.120
<v B>you a lot of leverage. Oh.

0:50:23.440 --> 0:50:31.360
<v A>But it has this thing where you speak in the language to the microphone and it evaluates your accent. I thought that was pretty cool.

0:50:32.720 --> 0:50:35.180
<v B>But then you told me it wasn't accurate. So, no, I don't think it's cool.

0:50:36.180 --> 0:50:44.460
<v A>Yeah, that's the thing. Like, I don't know. Either I have a really good fake Italian accent or it's just giving me way too much credit.

0:50:45.090 --> 0:50:53.340
<v B>Play some, like, of the Mario soundtrack or something, like Mario speaking in Super Mario Bros. or whatever one of the games he actually talks in and see what it gives him.

0:50:53.840 --> 0:50:57.480
<v A>Yeah. It's a me, Mario, 100%.

0:50:57.480 --> 0:52:06.920
<v B>All right. So, my tool is by a company called Autodesk. And it's 123D Design. And so, if you've heard before, I think we even talked about SketchUp, which Jason was talking about CAD tools before and talking about using Blender. And SketchUp was something that a company had made and then Google bought. And then I think they sold it to someone else now. But it was, like, a free, you know, kind of more basic CAD tool. And so, this 123D Design is in the same vein. And I picked it up because I've been trying to learn some 3D modeling. And there's, like, you know, all these recommendations. And depending on what you want to do or what it's targeted to, it's like Blender is, you know, good for, like, you know, artistic stuff. And you can use it for kind of precision mechanical drawings. But, you know, maybe it's not the best. I don't really know. But this one seems good. It's free. It's not open source, though. And it's called 123D Design. So, if you're interested in learning CAD and looking for something that seems simple yet still, like, you know, quite powerful, then you should check it out.

0:52:07.380 --> 0:52:16.380
<v A>So, if I remember correctly, Autodesk made 3D Studio Max. And then I believe they also bought Maya. Is that correct?

0:52:16.560 --> 0:52:23.033
<v B>Yeah. So, they actually, this company is, like, yeah, they have, like, a whole host of, yeah, like, all the major

0:52:24.569 --> 0:52:28.560
<v B>types of CAD software they do. I'm trying to click through to see all their apps now.

0:52:29.100 --> 0:52:42.473
<v A>But, yeah, I'm amazed that, like, this company with so much experience and, like, so much invested in paid apps would make a free one. But I'm assuming, like, the other ones, maybe this is, like, the gateway to getting people to

0:52:42.473 --> 0:52:50.720
<v B>buy these more professional ones. Yeah, I guess. So, yeah, so they make 3D Studio Max, Maya, this more professional one called Inventor, I guess, AutoCAD.

0:52:52.360 --> 0:52:53.037
<v B>Oh, they

0:52:53.037 --> 0:52:54.100
<v A>Make AutoCAD, too. Wow.

0:52:54.100 --> 0:53:37.519
<v B>Yeah, so they make a lot of, like, these kinds of products. And this one seems like it doesn't have a lot of crazy features. Like, a lot of the macros and things for doing, like, bill of material and tolerances and stuff I haven't seen in it, which I know some of the other ones do. But it seems like it is in a similar vein to the more complicated products. So, like, if you got to the point where you outgrew this one, you could transfer your knowledge into one of their paid products. Yeah, that makes sense. Which I guess is the point. But also an advantage because then you don't have to relearn something because, you know, like, Blender, you couldn't do exactly what you needed in Blender. And, you know, you have to relearn another tool. Which I'm not picking on Blender. I don't really know. That may not be an issue with Blender. Yeah,

0:53:38.363 --> 0:53:49.839
<v A>I mean, I've used Blender quite a bit. But, you know, I mainly used it for artistic things. So, yeah, I don't know how precise it is, per se. Yeah.

0:53:50.180 --> 0:53:58.660
<v B>Cool. So, on to, well, you're calling it Unix shells and I called it Unix commands. But it's just general Unix knowledge.

0:53:59.660 --> 0:54:11.600
<v A>Yeah, Unix knowledge. So, one thing I have to warn everybody by listening to this podcast. You know, after you listen to this podcast, look in the mirror and you might have a huge neck beard and not even know it.

0:54:11.680 --> 0:54:14.240
<v B>What? I don't know if my wife's going to approve of that.

0:54:15.260 --> 0:54:29.764
<v A>No, my wife definitely wouldn't approve. But, yeah, it's, you know, if you need to know something about a very specific way a Unix command behaves, look for your closest neck beard. Oh, we also

0:54:29.865 --> 0:54:32.080
<v B>just lost all our female listeners.

0:54:33.260 --> 0:55:21.540
<v A>That man or woman will definitely help you with their Unix fantastic knowledge. We'll cover some of the common shells. I've used a bunch of these, but to be honest, only one of them I've really liked. So, maybe you had a different experience. Nope. Okay. Yeah, so there's Bourne shell, Seashell, Corn shell, Thompson shell. There's also Tseashell, which is a derivative of Seashell. And I've used all of them, and in my opinion, they all were terrible. The only good shell, and fortunately, a lot of people agree with Patrick and I here, so it's the default on, you know, almost any Unix computer nowadays, is Bash. Bash shell.

0:55:22.580 --> 0:55:25.500
<v B>Actually, I've been wanting to try out, do you know anything about Fish Shell?

0:55:26.400 --> 0:55:27.980
<v A>I've never heard of Fish Shell.

0:55:28.020 --> 0:55:36.900
<v B>People on, like, Hacker News are always talking about this fish shell. Is it F-I-S-H? Yeah, I keep telling myself I need to check it out, but all right, I'll keep looking. Keep going.

0:55:38.420 --> 0:57:36.570
<v A>So, I'm looking at Bash shell. Bash shell was a replacement for Bourne shell, but I can't find out if Bash is supposed to be an acronym or what. Regardless, so basically, there's a number of sort of core commands that will really make your life much more productive as someone who's like a programmer or has to mess with a lot of, you know, structured data. Now, by structured data, I don't mean, like, SQL or something like that. I'm talking about, you know, like, comma-separated files, space-separated files. If you want to write something to, like, a flat file structure and you want to do something kind of quick and dirty, the best thing is to just kind of write ASCII text to a file and then do some manipulation. And so, the Unix shell is actually extremely good at this. It has a lot of functionality people don't know about. So, we'll start with some of the easy ones. So, there's cat. Cat lets you, basically, it takes the contents of a file and it writes it to standard out. Actually, we should probably explain what these are. So, any Unix shell has streams. So, it has standard in, which is, you know, a stream of data flowing into a program. Now, by default, that stream comes from the keyboard. So, you know, you can run a program. It can say, 'What is your name?' You know, you type in, you know, you could write a program like this. You type in your name, hit enter. Now, when you hit enter, the information flows through standard in to the program, which is kind of waiting for it. And then it says, 'Hey, hello, Jason,' or 'hello, Patrick,' right? So, standard in, now, you can also, if you don't want to have to use the keyboard, you can cat a file, which will take a file and sort of dump it to the screen. But then you can use the pipe character and you

0:57:36.925 --> 0:58:56.609
<v A>can take things that would have been dumped to the screen and sort of pipe them or redirect them into another program. So, instead of typing Jason, you could have a file that has, you know, Jason in it. Cat that file, pipe it to your program, and now your program runs with Jason. So, you know, if you wanted a program that, you know, executed some process on some data, but you didn't want to have to, like, put the file name in the program, and then, you know, you make a change, now you have to rebuild the whole program, right? The program could just read information as if it was coming from the keyboard, and then you use Unix streams to sort of feed whatever file you want through the program. So, that's cat, and that's sort of redirecting. There's also sed and awk, and now we're starting to get a little more complicated. Sed does a number of things, but the most common is find and replace. So, again, you can have this stream of data that's coming through. Say you're catting a file, so you're just dumping a file, but you only want the words Patrick from the file. So, any line, or another way of saying it is, anytime you see the word Patrick, you want to replace it with Jason, because, of course, you know, let's be honest. Hey,

0:58:56.609 --> 0:58:57.840
<v B>Hey, hey, hey, hey.

0:58:59.060 --> 0:59:33.980
<v A>So, you would use sed, and then you do, I think it's like s/Patrick/Jason/g. So, there's a little bit, again, it's Unix, so it's going to have this crazy wizardry, and you'll have to look it up on the internet. Don't worry, all of us have to. Except for the guy with the neckbeard. He has it memorized. But you'd use sed to sort of do things, like simple things like that. Awk lets you do even more complex things, but together, they both sort of have a nice union. Like, between the two of them, you can do a lot of cool text manipulation.

0:59:36.580 --> 1:00:11.230
<v B>So, then you have diff and patch, and so this will take diff will say, like, if I have two files, so, like, I made a copy of a file, and then a piece of code, and then I made changes to it. Diff will tell me what lines have changed between the two files, and patch lets me, instead of having to send someone a whole new file, just send them the delta that they can then patch into their file and reflect my new version of the file. So, it captures the differences between two files, versus diff is more for examining by eye. And the same thing. Yeah, definitely. So, you can... And you can

1:00:11.230 --> 1:00:39.940
<v A>also, you can diff entire directories, and it'll diff, like, everything inside the directories. And you can also redirect diff to a file. So, now you have this diff file. You can send that to somebody, and then he can patch your diff file, and now he has the same changes you have for, like, a bunch of directories. Yeah, so then there's TAR. TAR, actually, do you know what TAR stands for? I have no idea.

1:00:40.460 --> 1:00:41.520
<v B>I'll look it up. Keep going.

1:00:41.819 --> 1:00:43.380
<v A>Maybe it's like Terminal Archive or something.

1:00:46.380 --> 1:00:48.779
<v B>Okay, so what's the difference between TAR and gzip?

1:00:48.780 --> 1:01:13.100
<v A>Yeah, so gzip takes a single file and then shrinks the file by using some compression, right? TAR will take a group of files, and it basically just concatenates them together, but it also stores a little bit of metadata so that it knows where one file ended and the other began.

1:01:13.480 --> 1:01:15.400
<v B>So, TAR stands for Tape Archive.

1:01:15.400 --> 1:01:55.920
<v A>Oh, Tape Archive. Ah, I guess now it makes more sense as Terminal Archive, but it originated as Tape Archive. It's interesting. So, you can actually use both of these together, right? So, you can use TAR on a directory to, you know, collapse the whole directory into one huge file, and then use gzip on that file to make the file a reasonable size. And that's why if you're downloading, especially things for Unix, you download these files that have the extension .tar.gz. And that's because that's exactly what they've done, right? They had a directory, they TAR'd it, and they gzipped it, and then they put it on the internet.

1:01:58.605 --> 1:01:59.972
<v A>So, what's crontab?

1:02:00.540 --> 1:02:11.780
<v B>So, this is for when you want to run a script or program on a regular schedule. So, something every hour or something every so often.

1:02:13.506 --> 1:02:16.480
<v B>Yep, that's pretty much crontab. Yep, okay.

1:02:17.894 --> 1:03:14.540
<v A>Yeah, so like the, you know, a bunch of programs on your computer, like, you know, that like check for updates and all that stuff, they all just, they're basically crontabs. And you can actually, I think you can type crontab—maybe it's crontab -h or something. But one thing, oh, one thing we should mention, for all of these commands, if you type man, which is short for manual, man space, and then the command, they give you like a whole dossier on how the command works and everything. So, half of the things we'll say are wrong because we just look it up every time. But, yeah, if you type crontab by itself, I would think, or maybe the dash L, it gives you a list of all the programs that you have scheduled. So, next is, is BG jobs and kill. These kind of all work together. So, BG says,

1:03:14.760 --> 1:03:22.677
<v B>An assassin's toolkit? What's that? An assassin's toolkit. I was guessing what they're for. BG is for

1:03:22.677 --> 1:04:02.240
<v A>Background. Background. Dab. Yeah. Yeah, so it's basically it takes your program, runs in the background, so you can keep doing other things on the terminal. And your program will just, you know, run in the background until it's finished. Jobs gives you a list of all the times that you've done this. So, all the BG commands that haven't finished yet. And kill lets you kill one of those. So, if you have one that's kind of going out of control, you just type kill and first type jobs, find out which number it is, and then type kill percent the number, and it will kill that job.

1:04:05.759 --> 1:04:21.537
<v B>So, I never get the PS right, but PS lists the processes. Is that right? Yep. PS, so you can get processes. I have no idea. I've never used the history command. Is that the same thing as pushing up in Bash shell or Control R, and searching through

1:04:21.537 --> 1:04:27.780
<v A>Your history? History just gives you a list of all the commands you've typed since you opened the shell.

1:04:28.960 --> 1:04:34.720
<v B>I've always just output my, it's like .bash_history in my home directory.

1:04:35.560 --> 1:04:39.070
<v A>Oh, yeah. So, this is a one-word command that

1:04:39.070 --> 1:04:43.440
<v B>does exactly that. Oh, that's useful. See, this is why I do this podcast, so you can tell me things I didn't know.

1:04:45.080 --> 1:04:59.740
<v A>Yeah, so, that's history. So, `readlink` is a rare but extremely useful command. You type `readlink`, and then `-f`, and then the name of a file, and it gives you the full path to the file.

1:05:01.340 --> 1:05:40.760
<v A>Now, if you do `readlink` and then the file, it gives you like the full path based on where you are now. But where you are now can be a symbolic link to some other directory, right? So, we won't get into symbolic folders. It's kind of complicated, but, you know, you do `readlink -f` and then some file. And remember, all these commands work in Mac as well as Unix. So, if you have a Mac desktop or laptop, if you have a Mac Pro, if you roll that way, all these commands will work. So, `readlink -f` the file, and it tells you like exactly on the disk where that file is.

1:05:42.820 --> 1:05:46.266
<v A>So, that always kind of comes in handy. So,

1:05:46.266 --> 1:06:32.600
<v B>Actually, we talked about programming questions before, and sometimes it's really easy to solve programming questions using `sort` and `unique`. `Sort` will just sort the lines in a file, and `unique` will give you the unique occurrences. It also can give you counts. So, if you have like `unique`, and then it occurred this many times, or just the number of distinct lines in a file. And so, this can be useful, for instance, if you have like a log of all the IPs that have visited your website, you could unique them, and then get just the number of unique IPs, and know how many unique visitors you had in the log file. Right? So, this like could be a common programming question. You could solve this way, although they might want you to actually do it programmatically. There is a file or a Unix command you could use to just do it.

1:06:32.600 --> 1:06:58.520
<v A>Yeah, I think if you walked into an interview, and like somebody said, you know, as Patrick said, like, you know, give me a histogram of, you know, the frequencies of IP addresses, and instead of like, you know, busting out C++, you just whipped out like a one-liner in Bash and did the whole thing. I think that'd be pretty cool. You get some props for that. Like Patrick said, you'd probably still have to do the problem again, but that'd be pretty interesting.

1:07:00.260 --> 1:07:11.519
<v A>So, the next ones are `tr` and `ts`. Actually, that's a typo in my notes. I meant `tr` and `tr-s`. So,

1:07:11.519 --> 1:07:12.615
<v B>Basically,

1:07:15.020 --> 1:07:16.986
<v A>`tr`, let me

1:07:18.623 --> 1:07:46.720
<v A>make sure I get this right. I'm like totally flubbing this. `tr-s` is a basically okay, so `tr-s` is a collapse command. So, for example, let's say you have a file, but this file is like maybe user-generated content and what you really want is to, you know, split the file based on spaces so that you can do a `cut`, which actually I'll cover `cut` as well.

1:07:47.700 --> 1:07:48.960
<v B>The list is getting longer.

1:07:50.460 --> 1:09:46.320
<v A>Yeah, that's right. So, you know, but some of the columns have like so you'll notice as if like you look at say the output of `ps`, right? The output of `ps` has usually three columns, but then they use spaces so that all the columns kind of line up, which is great for looking at it, but if you want to write a program to analyze the output of `ps`, it'd be much better if there was just one space between the three columns, right? Then you wouldn't have to like write some code in C or C++ to like, you know, move that many spaces and all of that. So, `tr-s` does exactly that. It looks for consecutive characters, and then it collapses them. So, like if you put in `tr-s` and then the letter E, you know, if somebody put the word scene, it would turn into send. It would just like collapse all the consecutive E's together. This is really useful because the next command is `cut`, and `cut` lets you pull individual columns out of a, you know, a Unix stream. So, again, going back to the `ps` example, if I did a `tr-s`, so now I only have, you know, one space separating all the columns, now I can do a `cut` and then the space, you can actually represent a space with like a single quote, space, single quote. Then what that will do is it will cut the stream, and then after that you do `-f` and then the number. So, if I did, if I did `cut space -f1`, it's going to pull the first column from that stream of information. So, if I wanted, say, to kill every process that I started, I could do a `ps`, and then I could do a, you know, send that to cut, and then now I have just this list of process IDs that I could then, you know, go through and kill.

1:09:47.900 --> 1:10:17.020
<v B>Nice. And `grep` is like the de facto search tool. So, if you have like a file and you want to look for something in that file, you can use `grep`, and there's all sorts of parameters for it as far as like expressing what you're looking for and tweaking the output, like, showing stuff before and after the line that contains what you're looking for and all that wonderful stuff. So `grep` is a really powerful command for searching for things in a single file or in multiple files.

1:10:18.560 --> 1:10:29.340
<v A>Yep. Yeah, if you want to do a whole directory, just do dash R and put the name of a directory instead of a file, and you'll look in all the files for whatever you want it to search for.

1:10:31.200 --> 1:10:33.780
<v B>So then there's, last but not least, there's Xargs.

1:10:33.780 --> 1:11:22.620
<v A>And this is pretty cool. What this does is it takes some Unix stream, it looks for all the new lines and then it splits that up. So each line of the stream is like kind of its own thing. And then it takes whatever program you put after the Xargs and it executes that program on that string. So for example, let's say you did a grep dash H dash R on a directory and you looked for Patrick. So dash H will tell grep, you know, return all of the file names that have the word Patrick in them. Then you could pipe that to Xargs and then say Xargs Emacs, and it'll open Emacs with all those files all ready to go, so that you could change Patrick to Jason.

1:11:26.240 --> 1:11:26.840
<v B>So.

1:11:30.040 --> 1:11:32.120
<v B>This is exhilarating, my friend.

1:11:33.840 --> 1:11:36.059
<v B>Best podcast content ever.

1:11:37.320 --> 1:11:38.139
<v A>Oh, man.

1:11:38.400 --> 1:11:41.220
<v B>Just type this into your terminal and follow along with us.

1:11:42.480 --> 1:11:56.639
<v A>Yeah. So now we have this is a little more interesting: some rare but useful commands. We have a couple on here. Have you ever used this one?

1:11:56.700 --> 1:12:00.320
<v B>Nope. None of the remainder that you're going to talk about I've even ever heard of before.

1:12:01.759 --> 1:12:39.760
<v A>Okay. We'll go there just pretty quick. Expand turns tabs to spaces. So one thing everyone should know if you leave the podcast with one bit of information: know that the tab key is evil and should be abolished. And anyone who thinks the tab character should exist is a bad, bad, bad person. And so, expand agrees with me. Expand takes any tabs and deletes the tab and replaces it with spaces. So you can open a file—I can open a file—and mine won't look totally screwed up because my tab width is different.

1:12:42.400 --> 1:13:13.820
<v A>FMT is short for format. And you know sometimes you might have, you know, you might have a lot of data. You might have some huge spreadsheet that you want to put into a terminal or something, and it's just like it's like the line is 4,000 characters long and it just looks ridiculous. And it just like half of the words get—or not half of the words, but you know, some of the words get cut off at the edge of the page because they wrap around. So FMT, you just pipe your whatever you're streaming to FMT, and it just comes out looking pretty.

1:13:17.120 --> 1:13:18.660
<v B>I like my output to be pretty.

1:13:19.700 --> 1:13:27.800
<v A>Yeah, pretty output is a guaranteed path to success. Even better than a successful interview is having pretty output.

1:13:30.740 --> 1:13:35.526
<v A>So, then there's quirky commands. Have you ever used these, cal or banner? No,

1:13:35.560 --> 1:13:41.080
<v B>I've never heard of any of the ones I told you already. Are you on a, you surpassed my knowledge. Yes.

1:13:42.340 --> 1:13:45.360
<v A>Type, type banner and then type some text.

1:13:46.060 --> 1:13:58.460
<v B>Okay, I feel like this is even more compelling, a more compelling podcast. What? I don't really know how to explain this. So, what is the point of this?

1:13:58.600 --> 1:14:03.660
<v A>You put in banner and then you put in some text and it just makes your text look ridiculous.

1:14:04.440 --> 1:14:08.736
<v B>It just made it really, really big and repeated over and over. From

1:14:08.736 --> 1:14:18.280
<v A>way back in the day when people had dot matrix printers or something, and the banner is somehow useful for that. I don't know, it's bizarre.

1:14:18.600 --> 1:14:30.240
<v B>Okay, interesting. So, it just takes the letter, so those of you who weren't watching my screen, if you type banner and then test, it makes like ASCII art of the word 'test,' basically.

1:14:31.059 --> 1:14:43.515
<v A>Yeah, and like, it's just crazy that every Mac computer on Earth has this completely useless program on it. Cal is also pretty useless; it just gives you a

1:14:43.515 --> 1:14:48.494
<v B>calendar. Whoa, wait, that sounds good. I'm sure this was useful.

1:14:48.494 --> 1:14:49.962
<v A>Years ago. No, I

1:14:49.962 --> 1:14:50.535
<v B>Didn't know this. It's

1:14:50.535 --> 1:14:51.219
<v A>Just a relic.

1:14:51.860 --> 1:15:04.238
<v B>I'm constantly going into my email program and like using the calendar there. Oh, are you serious? Yeah. Is it actually useful? No, this seems good. Oh, and I can say how many months. Yeah, no,

1:15:04.320 --> 1:15:04.900
<v A>This is good.

1:15:06.580 --> 1:15:10.580
<v A>I'm like only like 50% sure you're not playing alone.

1:15:11.059 --> 1:15:18.580
<v B>No, no, no, this seems good to me. How do I make it up more than one month? Okay, anyways, I'll figure it out later. This seems awesome.

1:15:19.400 --> 1:15:23.273
<v A>Well, you know, you'll be pretty pleased there was also a date command. We

1:15:23.273 --> 1:15:24.420
<v B>Didn't talk about that one. What

1:15:24.420 --> 1:15:24.980
<v A>Does this do?

1:15:26.980 --> 1:15:29.679
<v A>Oh, that's boring. Between date and calendar,

1:15:29.680 --> 1:15:32.740
<v B>I have my Command Prompt already set up to show the date like this though.

1:15:34.840 --> 1:15:35.240
<v B>Okay.

1:15:37.240 --> 1:15:59.100
<v A>All right. Well, this was a hodgepodge of things. It's been a pretty crazy year. Definitely a crazy start of the year. And, you know, I think now that we've sort of got our feet in the water, we'll definitely dive into a programming language next episode.

1:15:59.500 --> 1:16:08.127
<v B>All right. Sounds good. Now that you've won the lottery and you're a multimillionaire, you'll have more time to just sit on your couch and study programming languages. Yeah,

1:16:09.480 --> 1:16:12.885
<v A>that's right. Well, sipping Mai Tais in Hawaii, but, but yeah. Your

1:16:12.885 --> 1:16:14.660
<v B>couch is not in Hawaii. Nice.

1:16:15.880 --> 1:16:18.184
<v A>Yeah, actually, so, I did

1:16:20.243 --> 1:16:33.080
<v A>not even come close to winning the lottery. Oh, but I do, if I did win the lottery, I would be able to print the amount I won in ridiculous ASCII art using the banner command.

1:16:33.340 --> 1:16:45.099
<v B>Yes. Yes. All right. Well, before we keep people up past their bedtimes listening to this long rambling podcast, I think we'll call it to a close.

1:16:45.719 --> 1:17:12.280
<v A>Have a great start of the year. The start of the year has definitely been pretty exhilarating and exciting for Patrick and I. And I hope you guys are having an equally interesting and fun time. And, you know, keep checking out the books of the show. We really appreciate it that all those proceeds go to keeping the servers up and running. You guys use terabytes of bandwidth, and the books are what help to support all that bandwidth.

1:17:13.080 --> 1:17:25.480
<v B>We appreciate it. Maybe there isn't very many people actually out there listening to us. Maybe they're all just have like evil scripts running against us to download our podcast continuously in hopes that it will cause us to go bankrupt.

1:17:27.600 --> 1:17:36.560
<v A>Well, you know, if we got DDoSed, because, you know, we have the unique visitors, you know, if we got DDoSed by that many people, I would wear that as a badge of courage.

1:17:36.680 --> 1:17:40.580
<v B>Yes! No, wait, no, no, that sounds like you're encouraging people to DDoS us. Please do not.

1:17:41.460 --> 1:17:52.617
<v A>Yeah, no, our server can't take it really. I mean, they're mad enough as they're mad enough at us as it is, so they don't need to get DDoSed. All.

1:17:52.617 --> 1:17:56.020
<v B>Right, well, until next time. All right, catch you guys later.

1:17:56.560 --> 1:18:18.040
<v A>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.

