Programming Throwdown - Interface Description Languages (IDLs)

Episode Date: April 26, 2012

This show covers Interface Descrption Languages (IDLs), such as thrift and protocol buffers. News: Sony fighting with PSP hackers, Pebble smartphone watch, Pacman runs on 0x10C, UF Computer S...cience cuts. The tools of the biweek are Sublime Text Editor and Luminance HDR. ★ Support this podcast on Patreon ★

Transcript
Discussion (0)
Starting point is 00:00:00 Hosting provided by Host Tornado. They offer website hosting packages, dedicated servers, and VPS solutions. HostT.net. Programming Throwdown, Episode 14, Interface Description Languages. Take it away, Jason. Hey, so my Twitter and facebook account got hijacked no not good times yes i spent a significant amount of time today cleaning up uh you know tweets and posts that i didn't make and uh the archive forever somewhere yeah exactly so now uh coincidentally uh facebook
Starting point is 00:00:46 is uh sending me ads for russian models not just oh no but so was it better or worse than losing a wallet or have you ever lost a wallet before now i've never lost a wallet i did lose my keys but i lost them actually in a bottom of a lake so i've kind of figured that they weren't coming back and no one was finding them so one day somebody will drive away with your car after finding keys in the bottom of a lake yeah especially now well uh but uh but yeah basically um you know we talked about key pass which is an awesome program highly recommend especially now i highly recommend everyone use it um but i i wasn't using key pass you you know, for a while, especially before the show. And, uh, so I had like a default password that I used for things I didn't really care
Starting point is 00:01:31 about, like Twitter and Facebook. Yeah. And it was just, it wasn't, it was just completely alpha characters. It wasn't a numeric or anything. And plus I use the same password for like basically everything I didn't care about. Like anytime I had to sign up for anything and so invariably you know somebody you know didn't store my password securely and uh you know got leaked out and associated my email and everything and so somebody just went through and systematically logged into everything that they could get into with that password
Starting point is 00:02:02 and then it turned out you were in Europe asking for money after being kidnapped. Yeah, exactly. Yeah, so the way I found out was kind of interesting. I got an email from Facebook saying someone with an IP address they traced to Japan logged in successfully as me to Facebook. And so that kind of tipped me off. And so then I went went and sure enough, there were all these tweets on Twitter and Facebook posts that I didn't make and not to
Starting point is 00:02:31 clean all that up. Oh man. Did anybody else let you know? Like, did any of your friends see what was going on? Oh no. So interestingly, this all happened really quickly. So basically, um, you know, all the tweets started, I would say like eight hours before I found out. Um, so, uh, you know, the tweets started, I would say, like eight hours before I found out. So, you know, the person like hadn't had enough time for it really to propagate to any of my friends or anything like that. And the Facebook posts were even more recent than that. So they didn't change your password, though, because that would have been bad because the recovery for your password would have been your email, which you then also didn't have access to. Yeah, that's true. Yeah yeah this could have been a disaster actually it's uh interesting you mentioned that because uh my co-workers uncle's uh yahoo account got hacked hijacked and they actually changed the uh you know forgot password like the backup email they changed that
Starting point is 00:03:22 to an email that they owned like the hijackers and they changed the security questions and yeah depending on how and depending on the specifics of the system but yeah yeah it can be really bad yeah so actually they do have um so fortunately my gmail account was not hacked because it uses a completely different password um but they do have like a lot of these websites like facebook and google have what's called two-factor authentication and the way this works is you um you have a program running on your phone and basically whenever you have to put in your password to log into let's say gmail you also have to go on your phone and you hit a button and the button gives you a six digit number that you type in along with your password.
Starting point is 00:04:09 And so the idea is for someone to hijack your account, they not only have to have, you know, your password, but they also have to have your phone. So that adds another layer of security. Yeah. And Google's, I think, actually, well, they have an option to either text you or call you if you don't have a smartphone oh that's cool i didn't know that yeah because i have it set up to call me i don't i don't remember why i did that this is kind of weird if i try to log in i get my phone will start ringing i'm like why is it ringing oh wait oh that's why and then it's coming up on screen like you know enter your your i think what they call otp yeah one time password yeah so so the so you actually get a call from google and they it just says like just as a random number or whatever you pick up it's like
Starting point is 00:04:51 this is your google verification code and then they say it once and then they repeat it that's pretty cool yeah it's kind of cool and i assume texting is probably similar just text you a six digit number yeah yeah totally yeah so so yeah i might set up a two-factor authentication um on things i really care about so that you know worst case if something like this happens and someone gets my password at least i'm still safe somewhat yeah the only hassle is and i guess this may be a different controversial subject well maybe not controversial i don't know but if you like uh your wife needs access to your email ever so it was the case where uh i think we've been communicating with our bank or with
Starting point is 00:05:30 somebody and they had only been using my email for some reason and my wife needed like i needed her to print off some documents she was at home and i was at work and so she needed to get on my email and she knows my password but she didn't know my you know she couldn't have this this code and so she had to like like i had to get the phone call write the number down and then call her and give her the number so i guess that's really safe but you know it was kind of awkward that like i wanted her to be able to have access but in this way it was actually difficult to do that yeah yeah maybe oh man in hindsight what i should have done is actually just forward it to her but uh i guess this is controversial
Starting point is 00:06:12 as well but you know it's like you worry about it's okay for me to do two-step authentication and i want to be really safe and have secure passwords and i you know try to educate other people the same way but you know you don't know. And so there's this hesitancy to like, I don't know. You don't know what other people's passwords are. You don't know if they're good. So you don't want to forward something to somebody who might have a, that may be very personal to you or have private information.
Starting point is 00:06:37 And then they don't have security like you would want. Yeah, yeah, totally. So actually, so the big thing to take away from here, folks at home, is because I'm pretty sure that what happened was I put my password in on some forum and somebody wasn't hashing the passwords and it just totally got leaked out. And I think even major websites like joystick.com had this whole thing where all of the passwords got leaked out like in plain text
Starting point is 00:07:05 so if you're gonna you know have a password which you don't really care about like if you need throwaway passwords use keypass just to recap what it does you have this master password you put it in and it opens up a program with just a list of passwords and it can auto generate passwords you can type in passwords. You can just make up passwords on the fly. It's sort of like writing your passwords down on a sheet of paper for the ones you don't care about. But that sheet of paper is now protected.
Starting point is 00:07:37 It's better than just having it taped to attach to your monitor or something like that. Although I've actually heard somebody make an argument that it's better to write passwords like that down um so at least you guarantee they're different and you don't aren't encouraged to use the same one over and over again better to do that then then use the same password that's easy or the same oh yeah and you know just because that way you can remember it yeah but then of course if somebody breaks into your house they have all your accounts yeah that's true but if you um if someone breaks into your account if into your house you probably
Starting point is 00:08:08 should just change everything like yeah that's true join the witness protection program but uh if if um yeah whether you write them down yourself or whether you use a program like keypass use a different password for every website that you don't care about because chances are if you don't care about it you know if you don't care about it you know it's probably they're not probably not doing a good job securing your password so don't be like me don't get all your things you don't care about hijacked and the bad thing is you know since i use the same password for everything i don't care about then basically like all of those things now can be compromised i mean like you know by their nature i don't care
Starting point is 00:08:45 about any of them but still i don't like the idea that someone's going on like the maim arcade forums masquerading as me or whatever you know although i guess that's maybe the least bad thing but yeah it's still kind of bad yeah yeah yeah so it's kind of a catch-22 it's like if i cared enough i i would have put a real password but then at the same time like i don't want somebody like well it's hard to because like each individual one you might not have cared enough about but now that like you said somebody can masquerade as you on many things that's actually more annoying yeah exactly exactly so all right the first news story i had one in here about and we talked about this a little bit before, about next generation consoles having this, you know, much more kind of a Valve type system where things are more downloaded and you put in unique keys and that key is tied to your console or your group, like your login. And so you can't, you know, just have normal CDs and stuff.
Starting point is 00:09:43 And I just read an article about this is interesting so um sony has a storied past with hacker community and um the new their new handheld game system i think it was a new handheld on the psp vita um has this ability to go online and download games right like yay they're a little bit cheaper and you can go online you don't have to go to the store and they saw it as this wonderful thing well so of course uh just like uh people without a lot of scruples do on many different devices they essentially wrote a hack to get around this using an exploit and i think a combination of the game and the os um so one of the games that allowed you to kind of undo the drm the digital rights management
Starting point is 00:10:25 that prevents you from running games which you don't have the key for and so um that might be a great oversimplification but anyway so what sony did was because they have this power that it's all online they you know pull those games down and then you know try to patch it and put them back up again and then upgrade the flaw that was exploited in the operating system as well and then force everybody to upgrade immediately so the thing that's kind of interesting is that had this been normal you know whatever generation or two ago a little less so with the current generation but still still could be done i guess is you have cds made or dv made, and you can't remake those DVDs. Somebody will always have that DVD with that exploit on it,
Starting point is 00:11:08 and the only thing you can do is force people to upgrade the firmware running on their devices. But this is even faster because they could pull it from the store and change it, force everybody to update both their game and their OS to be able to access anything online and essentially kind of stop it in its tracks. Yeah, right, right so that's pretty cool so so so it sounds like well can't you you can always just not upgrade right or no
Starting point is 00:11:33 so the way they do it though and this is interesting is that so i you know this is outside the story now so this is patrick pontificating. Okay. But yeah, so I mean, the issue is... Double T. Ooh, I like it. The issue is that if you have this kind of online connectivity as like a base feature, so you're downloading games from the store, you're up, you know, there's all this digital rights management
Starting point is 00:11:56 on your stuff as opposed to a disc, you would say like, oh yeah, just don't update. Well, the problem is they can force you to, right? Because the game, like Valve has this, you can not be connected to internet and play your Steam games, but only for a set amount you to, right? Because the game, like Valve has this, you cannot be connected to the internet
Starting point is 00:12:05 and play your Steam games, but only for a set amount of time or a set amount of plays, I don't remember. And then if you haven't connected to the internet, it won't let you play until you do connect to the internet. And then as soon as you connect to the internet, first thing they're going to do is, in order to play your game, you have to update
Starting point is 00:12:18 because Steam's out of date. And then once you update, boom, gone. Like you lost what it was. So I assume that playstation vita can do the same thing like they can if you go to play your game they'll say oh you haven't connected online in a month like you need to connect online or if you try to go online to play with your friends you know then they'll do the same thing because it's all through their system oh i see it kind of reminds me of and this is now jason pontificating because i have no idea how this
Starting point is 00:12:44 technology actually works. But remember how they used to have those zips with the password on the zip? Yes. Yeah, you'd go to unzip it and be like, oh, nope, sorry, you need some password that's hashed into the zip. Otherwise, you can't get the contents. It's probably something like that, a with a temporal component to it you know like it's some kind of like zip hash thing but it but it's based on the current week let's say and so once the week expires like you don't have the password anymore kind of thing and you have to go and you know get
Starting point is 00:13:17 it from sony and sony will only give it to you if you know you haven't been compromised or whatever so yeah it's just tied to your account like yeah i think you're right so like it requires some some piece that exists in the operating system to basically unlock it and that piece of the operating system would be very hard for a hacker to write and so without it the game just says like hey i i'm calling this and it's not coming back like what's going on right right yeah i mean if you can make it to where the server has to be involved it's basically like hacking that would be the same as like hacking your bank password or something like that you know because you have to send some authentication out and then it has to get you know accepted on on the other end and then send back to you yeah i mean it's really the same as logging into a website so i mean and i think that was
Starting point is 00:14:03 around forever. Right. Yeah. I mean, we could guess all day about, I guess, exactly how it's done. But it's just, to me, it was an interesting fact that this, as everything moves to online, the ability for them to take control out of your hands comes in. It's reminded of the, was it Amazon who pulled a version of 1982? Or 84, wait. Which is the one?
Starting point is 00:14:23 Oh, yeah. 1984, the George Orwell. George Ororge orwell yeah george orwell wow 1982 is like our birthdays or something right no years no not mine but that's okay um okay confusion but they had somebody had published a version of that book that wasn't authorized and then people had i think it was free or people had paid a little and then amazon found out and they actually not just stopped selling it they went and took it away from everybody's device right right i remember that story which is yeah kind of like whoa whoa whoa hang on yeah basically it's like the book was not in public domain but
Starting point is 00:14:56 like it was under some you could publish it for free but it wasn't public domain there was some license and like amazon like didn't agree with the license or whatever something like that yes so yes george orwell okay yeah yeah but yeah basically like yeah i mean steam and and you know it's it makes me wonder if if the whole like piracy hacking thing is going to just go away like for example you know now so many things are online the really the only thing that's going to be left to hack is like your os or something like that i mean i mean well okay we're using the term hacker here kind of doubly like there's a hacker of like hacker website what happened to jason yeah and then there are likely happened to jason
Starting point is 00:15:40 and then there's hacking like we're kind of talking about here which is more like subversion well that's a another thing but you know like you're doing something that the manufacturer doesn't want you to do but it's not necessarily illegal or you know attacking somebody else right right I guess I meant to say piracy when I said hacking yeah so the problem is there are legitimate reasons why you would want to do some of these things you bought the hardware like at some level you should have the rights to run what you want so like what if you just want to write run custom games so i saw this band the other day that was uh playing chip tunes which is like you know retro style game music um and they used a game boy so somebody had like designed a cartridge that you
Starting point is 00:16:17 put in that is basically like a what are those things called a sequencer that you know you could play you know these tunes with on this game boy well i'm pretty sure that's not an official game boy cartridge so like but you know game boys how old and those people owned it they weren't taking any money from nintendo that i'm aware of you know like why should they not be allowed to make music on their game boys with this special game boy cartridge you know and at that level like i want to support them but the problem is that's a in my mind that's a small percentage of the people. Most people do these kinds of hacking to do piracy.
Starting point is 00:16:49 Right, right. So it's a hard line to walk. I mean, Google made that Google Maps for Nintendo, the NES maps. Oh, the April Fool's joke? Yeah, that's right. I'm pretty sure Nintendo didn't expect that when they released the nes no maybe not yeah well talking about cool hardware i'll uh i'll segue in here to a second story not to kind of take over from you and not give you any stories but this story is really cool so
Starting point is 00:17:16 there's this website i don't know if we talked about it before kickstarter so it's kickstarter.com and the way this basically works is you pledge money to projects and then those if they reach a certain goal level of funding then your money gets collected if not then um you know you just keep your money nothing nothing transpires and so people post up ideas they have for projects they collect funding and then as part of that like if they can set levels of funding and if you pledge that level they agree to give you you know products you know, merchandise or if they're making a movie, send you a copy of the movie on DVD or maybe just online or whatever. But it's gotten a lot of attention recently with a bunch of video games, you know, going over a million dollars. I think there's like three or four video games now that have gone over a million dollars in funding for for the most part games that don't have a lot of nobody knows what they're going to
Starting point is 00:18:08 be it's just going to be so is it tim schafer from double games you know he made a bunch of cool games uh what full throttle grim fandango some other ones and he doesn't even know what game he's going to make he's just he's going to be awesome it's going to be like those and people like oh yeah here's millions of dollars yeah it's insane it's really exciting blows my mind i mean we need to like jump on this or something yeah maybe we should uh crowdfund uh programming throw down the movie starring jason gauchy as the fake mark zuckerberg you know what's cooler than oh no we won't start quoting movies from the social network ice cold oh no never mind all right so uh i wanted to talk about this thing
Starting point is 00:18:55 that i thought was really cool on here that has now raised 5. almost 7 million dollars as the time of this recording and i say time of this recording because it's going up like a rocket i think it broke a million dollars in a little over one day of being on here um and it's a e-paper watch for smartphones so it looks pretty cool a number of companies i guess have tried to do this before so what is it so apple kind of did this with like the ipod nano watch band thing or i don't know so what it is is a watch that you wear on your wrist and it's made the display is e-paper so it's just black and white but it's you know sunlight readable it's nice and it gives it i guess a longer battery life um and so it normally just displays the time but you pair it to your iphone or your android phone and if you get a text message um it'll display like
Starting point is 00:19:40 the a summary of the text on your watch and has a little vibrating motor to signify you you got an alert you can sync it they have another one that shows like uh using it like a pedometer or showing a distance that you've run like while you're running um because i don't know if you've ever tried to run with a gps tracker on your phone it's actually kind of nice because it tells you distance and it's that sounds awesome speed but it's annoying to look at your phone while you're running especially if you have like strapped to your arm or something oh yeah right cool um you know and it can display different watch faces so you can customize it and they're they wrote like an sdk that they're gonna release for everybody to be able to write again so people can write apps and they showed a demo where you
Starting point is 00:20:17 kind of just run the uh program on your phone and then you go to like their app store and i they don't really talk about it but i assume you'd be able to buy or hopefully a lot of them will be free you you know buy new apps for your watch through your phone that's totally awesome man so that's really cool um it's hard because you're laying out the cheapest one you can get right now is for a black one it's 115 i'm not a big watch person so to me that's kind of a lot for a watch. And you don't get it until September. So that's the only ones I have right now, I think are all prototypes. So you're kind of banking on like, that it'll be really awesome in that time. Like it's not normal, because normally you go on Amazon or wherever, look for reviews. But there are no reviews,
Starting point is 00:20:59 because it doesn't really exist yet. It's just it's wild that they've raised so much money i mean i'm looking at it and like i'm literally i'm hitting refresh and every time i hit refresh they're raising thousands of dollars oh you're right it went up by ten thousand dollars and just since i'd had it loaded before yeah i mean it's just insane i mean like the amount of power behind kickstarter is just phenomenal i mean i've just never really seen anything like it like the news stories everyone that i see just blows my mind when you think about just the sheer volume of money that they bring in for these projects so imagine if you're a backer of this forget kick-starting the projects i wish i had kick-started kickstarter because like i mean they get a cut of all this money so like
Starting point is 00:21:43 they really yeah in the last couple months i i mean i think there's been over probably 15 million dollars i would guess very conservatively has gone through there so whatever their percentage of that is it's got to be huge oh my gosh it's just so insane it is real i mean it really is one of those things where in my opinion i might offend people or maybe i don't know the whole story there's nothing revolutionary about the technical background for doing this like this idea had been there yeah totally that it didn't need like a new technology or awesome programming or whatever but it's just a really really good idea and it hit at the right time
Starting point is 00:22:20 so it got traction it wasn't ahead of its time. So everybody jumped behind it. And now it's like taking off. I'm really curious that like what the average project percent is, you know, like the average product, how fully funded is it? much the project's been funded and things like this and there are a lot of projects i've seen which get like almost no money like they are just kind of like what somebody because i think their standards like you have to get them vetted i think like you have they have to approve your project but then a lot of them are kind of like that's kind of silly or stupid and then nobody ever gives any money to it or like they raise 15 or something yeah yeah but it's awesome because it's a way for the project makers to gauge demand before they make something but as a consumer i'm kind of worried because you're buying something you have no idea what it's going to be like so even if they like let's assume something bad doesn't happen and they don't go under and not deliver you anything in which case i'm not sure
Starting point is 00:23:23 where you're at because your money's gone they can't like they spent it and then they got hit by a disaster like i don't i don't know what happens in that case oh i thought that i thought that the whole point was that they don't take the money from you until like no they take the money when the funding ends oh but not when they deliver something oh wow see i was under the impression that basically both parties would have to agree like so for in other words for this watch thing you know if they say that for 120 you'll get a prototype of a watch then like you lose the money when you get the watch you know what i mean no no no you lose the money when like on this one may 18th i guess um they'll take the money from your account and then
Starting point is 00:24:05 in september this company promises that they'll ship you something that's going to be awesome right but they don't have to i don't so i don't know legally they maybe have some obligation like but i don't know what kickstarter's involvement would be if that happened like on this one they'd probably want to get involved because it would be very drastic right but like you know if you fund something smaller or whatever i don't like they could deliver it to you but what if it just sucks or like what if it only lasts an hour instead of a you know a week like they say it's going to um on a battery charge what i mean what what are you to do about like i said you can't go online and read reviews first it's not actually made they're getting money so they can design it and make it and build it
Starting point is 00:24:42 it's it sounds like kind of like crowdsourced angel investing you know i mean it's basically what it is except the only thing is you know an angel investor expects to get like a huge return in this case you're expecting to get the watch before everyone else i don't know which i guess is a huge return because like if there's some people who really like it's like oh yeah i got the watch before everyone it's so cool you know what i mean so i have kickstarted one or two things um a board game that was kind of cool and i think maybe one other thing for like but it was much less money i think it was like 20 or something yeah um and it was a company that had done a kickstarter before and delivered well on it so i had a little bit more confidence oh is there like a feedback loop
Starting point is 00:25:23 uh well you can look it up, right? Like you can just Google the people or I think it tells you like how many projects they've like done. Oh, gotcha. But you can just like Google the company, Google the name and, you know, look for news stories. That's how I did it anyways.
Starting point is 00:25:37 But I'm hesitant. My philosophy on this one has become like they're saying in here, I think they said it'll retail for 150. So my thing is for my extra 35 i kind of rather wait and just buy it when it actually comes out yeah that's right yeah i mean for i mean if you put your money in like a cd or something actually i take that no no you'd have to get really if you have something that's that secure let me know you used to be able to make like eight percent on a cd but that was probably
Starting point is 00:26:06 like 10 years ago yeah so oh man so you have though you have the next news article yeah so so this is a pretty fun it's pac-man running on the on a javascript implementation of the or i guess emulator of the zero x10 c cpu so okay you said a bunch of words i have no clue that anybody's gonna know what you're talking about let's take a step back so um minecraft the creator of minecraft notch they're making uh he's making a space game and i think you've done some research on this but i'll go into a little bit there's um there's a zero x10c CPU, which is this virtual hardware that you can control on your spaceship in this new space game that's coming out. So I don't have much more other than the game, I guess, is just, I assume you pronounce it OX10 to the C. I don't know.
Starting point is 00:26:59 Yeah. And it's a space game. And in the space game, you have a spaceship, which has a fixed power supply generator of so many watts. And you mine something, I guess, from an asteroid or a moon. The details are kind of scarce right now. But on your ship, while you can use the CPU, which has a fixed number of speed and cycles and all this, you can use it to guide the ship.
Starting point is 00:27:20 But if you're just sitting there waiting for some processing background task to run, you can play games on it. And of like making games himself like little mini games he released a specification for the processor this the d cpu 16 and people are now already starting to write application in games to run on this imaginary well well, real in-game spaceship CPU. Yeah, which is totally awesome. You know, this is actually, this is, I think, reaching the apex of something that has sort of really been brewing. I mean, you know, Notch himself has even admitted
Starting point is 00:27:58 he's very influenced by Dwarf Fortress, which is a game released by Tarn Adams. You can actually download and play for free and door fortress is like a text-based version of minecraft believe it or not um yeah i mean it's actually there's actually even more going on in door fortress because you control like many different people instead of like a first person mode um but it's it's one of these games it's very abstract like very hard to visualize because it's literally ascii art and you're only looking at one sort of slice of the world so in other words like if you if you have a mountain you're looking at one slice
Starting point is 00:28:40 of the mountain so you see this like ring of m letters or something right and as you use like the brackets to go up and down in the z levels basically the circle of m's gets smaller and like you just have to sort of in your head visualize yourself as like moving up through these like little slices of this mountain right so it's always really abstract games but but it had a lot of the fluid dynamics and things that you see in Minecraft. And one of the things that people did early on in Dwarf Fortress is actually make computers. And one person went so far as to make a Turing machine in Dwarf Fortress. And so for people who don't know, a Turing machine is, I'm probably going to butcher this, but it's basically the universal computational machine so the idea is if you can uh make a turing machine then a turing machine can can compute any problem or any algorithm that's computable that's computable right so anyway there's a lot of theory stuff that we probably shouldn't get into now but basically you know people were really into doing like computation in dwarf fortress and and uh that really you know someone
Starting point is 00:29:51 wrote a 10-bit adder and all this stuff so um and people have done that in minecraft too somebody wrote like an adder with sheep or something like that's bizarre somebody wrote a graphical calculator i saw a video of so like you can actually stand on buttons, enter an equation or whatever, and it'll plot it out on a screen in-game, like all these blocks that make up a computer screen. It's crazy. Yeah, it's totally amazing, right? So Notch is just taking it to the next level by saying,
Starting point is 00:30:18 all right, you guys, I'm going to just give you straight up a computer with assembly instructions and everything. And just the point of the game is to do fun things with this computer or or also really effective things like coming up with a clever ai to mine asteroids and things like that and it's really the interesting thing for me is you know i have a co-worker a guy who sits a couple rows from me and he's constantly working on like scripting mmos so he wrote a bunch of like bots for world of warcraft and uh he wrote uh a bot for uh what is it the star wars star wars knights of the
Starting point is 00:30:56 republic or something like that okay yeah yeah he actually wrote a bot that like looks at the memory and then you know moves around and it can farm gold on its own and stuff like that. Knights of the Old Republic? No, that's a single player. Yeah, this is an MMO. I might be getting the name wrong, but it's a Star Wars MMO. Oh, yeah, just the Old Republic. Yeah, so he wrote, you know, basically an AI, a bot to play that game or to grind that game.
Starting point is 00:31:24 And so it's just interesting for notch to come out with this game and say look you know the point of the game is to write the bot to play the game you know it's sort of it's so meta i love it so that was robocode oh yeah remember that oh yes robocode is totally awesome so okay robocode you were talking about writing the bot to play the game that is literally what robocode was it was. So, okay, Robocode, you were talking about writing the bot to play the game. That is literally what Robocode was. It was a tank that were in an arena, and you had like a special set of Java that you could write that would say what the tank should do.
Starting point is 00:31:55 Like the tank should scan its radar, and if it sees somebody, it should do this. And if it's this far away, it should behave like this, and it should rotate left and move forward. And you could just kind of program AI or something that just ran around and shoot randomly like you know you just program all sorts of things and then they would put them in giant tournaments the sorry they the online system you could play on your computer tournaments but you could also submit it online to run your code and they would run online tournaments where they would put everybody's
Starting point is 00:32:22 different ones against each other and see whose was best yeah you know this this has come up a lot this kind of thing and the funny thing is it's always like the really stupid stupid simple algorithm that wins like like they had this uh what was it called again robo robo code robo code yeah they had this robo code and they were you know you have all these aspirations like oh someone's gonna write some crazy genetic algorithm neural network thing and it's just gonna like have this crazy ai it's gonna do awesome stuff and no it's like the guy who writes the code it says like turn left and shoot like wins and then they had this with mario too somebody made an open source clone of mario and they said write an ai to play mario um and sure enough the guy had this ai where basically he did uh a
Starting point is 00:33:07 mini max which is an algorithm that they use for like playing checkers that's been around for like 50 years um and he beat everybody with like neural networks and everything like this guy who wrote this algorithm that was discovered you know 50 years ago just like just wins and they had uh something else where it was like this like open source uh it was like this uh open-ended world where you know you had this like population it was like this cellular automata kind of thing so there's a bunch of cells with people in them and uh you could like move forward you could turn you could mate and you could like move forward. You could turn. You could mate. And you could like kill. Like these are the four things you could do. And so like people realize genetic algorithms.
Starting point is 00:33:49 They're trying to see if they could get like a group, like a wolf pack kind of thing to evolve. And, you know, the person who won, basically it's like turn left, try to have sex, and kill. Like that. Like and he beat all the neural networks and everything. And it's just like one thing after another it's like it's like always seems to be like these really simple algorithms take over which is really sad for ai people like us yeah well that's the like uh um game theory thing right that basically they did this thing where you could uh what is it i'm gonna mess it up iterative
Starting point is 00:34:23 prisoner's dilemma yeah that's right it's a basic one and everybody wrote all these algorithms to say like oh if we play over and over again this game with a choice like what should you do based on what the other person does and people came up with all these complex things like if he's doing this two times in a row then do the opposite constantly and it turned out the one that won was just tit for tat like just do whatever the other person did last time do next time yep yep so it's kind of sad but but you know i think it's a little humbling too so sometimes ai people we need to eat a slice of humble pie i guess that's why you just stay out of ai yeah yeah kids at home don't go to ai it just makes you sad no i'm kidding ai is great talking about uh computer research uh yeah so if you're gonna go into ai apparently you shouldn't go into it at uf right
Starting point is 00:35:13 now the university of florida uh for those of us we probably shouldn't shorten too much so jason and i are both from the state of florida right but jason you didn't go to the university of florida you went to central florida university of central florida but i went to the university of Florida. Right. But Jason, you didn't go to the University of Florida. You went to? Central Florida. University of Central Florida. But I went to the University of Florida. So I guess this story has some sort of importance to me as UF is my alma mater. And the computer science department
Starting point is 00:35:35 is facing budget cuts. And I guess they're going to try to put it under the electrical and computer engineering department. But this is controversial for a number of reasons, including like a bunch of researchers and teachers potentially will lose their job um but we want to take this opportunity to kind of talk a little bit about so the story to some people we were talking i was talking to and this is a little nuanced right like well why does it matter the program is not actually going away it's just going to be in another department like what does that really
Starting point is 00:36:01 matter and it led to this discussion about just all the different computer science degrees there are and how it varies school to school right so yeah what was your degree what was your undergraduate degree in jason yeah so my undergrad was in computer science and uh it was kind of tough for me because because because ucf as well as uf they have computer actually i don't even know uf probably has even more than this but at ucf there was computer science there was computer engineering and there was electrical engineering which had some programming in it and then there was also management information systems which had programming like and a lot of computer science prerequisites but was like a different program it has more for like people who are doing business right like in the was it in the business school or um no actually so it was more geared towards it okay yeah so it was a lot more about like networking servers that kind of thing
Starting point is 00:36:55 yeah so all of those people take a very similar course load but they are different uf has the same but i yeah well at least we used to have more so you had you could do a digital arts and sciences which is like for people in art, but want to do programming as well, like programming for 3D renderers or people doing it. So we had that. We had one that was in the business school that was for people who wanted to be able to do
Starting point is 00:37:15 like SQL queries and scripting and also be able to be business people and do more analysis and stuff. Then we had computer science, which was a liberal arts degree. We had then we had computer science which was a liberal arts degree we had computer science in engineering which was a degree i got which is the same as the uh liberal arts degree but you have a little bit extra engineering background as opposed to uh like a foreign language uh you know more liberal arts type oh wow that's wild then so
Starting point is 00:37:42 then there was computer engineering software emphasis which was also in the computer science school um and that was you have a few more electrical engineering classes than computer science electives and then computer engineering hardware emphasis which had even more like you got into kind of semiconductor design and stuff so even more electrical and hardware and that was in the electrical engineering department, but they also had to take programming classes. So, and then there was, I guess you could get, even the college isn't the electrical engineering college,
Starting point is 00:38:13 it was the electrical and computer engineering college. Oh, wow. Yeah. So maybe we'll take turns giving our take on the whole thing because I went through this process and it was really difficult for me to decide which to pick. You you know there's a lot of allure in being an engineer like you know uh it's sort of like cool like if you think you picture engineers as people who like build things make things happen like the space shuttle is up there because engineers things
Starting point is 00:38:38 like that i thought they were train drivers okay most people don't get that joke and they just look at me funny oh man those are siege engineers but anyway so um then there's you know so so that was kind of cool so that kind of made me think i should do computer engineering but then i looked at the course load and i saw at least at ucf computer science was sort of more math heavy and computer and physics and yeah, math and theory heavy and computer engineering had more like physics and like like dynamics and statics and those kind of things. So it's sort of more applied. And I was always sort of more interested in the theoretical part. So that's that's that's what sort of drove me to choose computer science. And then for the master's, I did, then, you know, for a master's degree, you have to kind of specialize. So I did graphics. And then for the doctorate, I did machine learning.
Starting point is 00:39:38 Show off. But basically, the takeaway is what I've learned is that computer science, if you really like more of the math, the number crunching, if you like what programming languages are made of, what constitutes a good language, all the different automata and things like that, those are the kind of things that you can only get in computer science like those are very computer sciencey things you know as opposed to like learning how to program which you'll learn in either one you can be proficient in programming totally computer engineering has more of the guts like like i noticed that patrick is much better than i am at like things like you know microprocessors and you know like embedded understanding like actually what's going microprocessors and, you know, like embedded understanding, like actually what's going on under the hood and like how to set up like circuits and things like that. I mean, I, I'd never learned any of that stuff. So, um, you know, so it really kind of depends on what you're interested in, but neither one is really better than the other. And I've been asked this question
Starting point is 00:40:40 as well, um, that I'll try to answer here too, and we'll kind of move on so we don't bore the people who are uh long out of college um but the yeah so i think is in my experience at you know working in companies and talking to other people in the end it doesn't matter so much what your specific degree was in fact some schools don't even offer so many choices they only offer one computer science degree and it's an engineering or it's not an engineering. And the emphasis isn't so much about that, but as to what electives you take, as to what your outside of school interests are, as to what you do on your own time, as to what kind of job you take as your first job, like these kinds of things typically matter more. And when you get to a big, at least a big company, and I'm sure it probably even applies
Starting point is 00:41:24 to small companies as well. there's not really a distinction. Like Jason and I, if we worked at the same company, then, you know, we would have the same title for the most part if we were at the same level. It wouldn't be different because he's more of a, you know, high-level applications guy and I'm more of a low-level embedded guy. Like we would still typically be the same job function at most places. Yeah, totally, totally totally so it doesn't matter as much as do what you're interested in like do what intrigues you more and what you find more uh fun to do because that's how you'll be engaged that's how you'll get good grades and that's how you impress a uh employer yeah i mean notice neither of us really mentioned like oh
Starting point is 00:42:00 you know i went to computer science because it made more money or because I read something on CNN or because, you know. So, yeah, I think to Patrick's point, you should really do what you want. And then, you know, you can always, if you do what you want, then the rest sort of comes easy, you know. It's like if you are having fun and you're doing something that you really enjoy, then everything else will sort of fall into place. And then we're moving on, but I'll caveat it with one last thing,
Starting point is 00:42:28 which is I will say that it does make sense to take practical classes. So a certain amount of things you want to be able to go to your first job and know how to do stuff. So if it's not a requirement, software engineering as the process of doing that um it is important to take some sort of low level class so you at least halfway know what's going
Starting point is 00:42:50 on when you're debugging stuff um it is important to do you don't want to do just things that are interesting and fun you want to do stuff that you think um will make you easier to hire for a bigger number of potential employers yeah that's fair something, you got to weigh those two. You can't do too much of one or the other. Yeah, yeah. Oh, that's definitely true. Yeah, I mean, there's, you definitely have to know
Starting point is 00:43:12 how to apply what you're doing. I guess, you know, there's always the avenue of being a professor. But even professors nowadays are writing code, you know, or at least like helping out the process. A lot of professors maintain like a source code repository of like their researches work researchers work and things like that so yeah definitely you should have some applied background nowadays for sure so anyways
Starting point is 00:43:37 let's get to tool of the bi-week all right you up first all, so my tool of the bye week is Sublime Text Editor. And basically, I've had to write a lot of JavaScript lately, which is something I'm completely unfamiliar with. Actually, we did a show on JavaScript, but I'm completely unfamiliar with writing in like a team environment. Usually if I do JavaScript, it's by myself, I'm hacking together some crazy client front end. I wrote a JavaScript front end for NetHack. But it's always been just kind of hobby products.
Starting point is 00:44:13 I've never had to write JavaScript for a living. And so for the past couple of weeks, I've had to do JavaScript for a living in a production environment. And I had no real idea sort of what was a good IDE for doing JavaScript. And a couple of my coworkers recommended Sublime and yeah, I think it's pretty great. Might not be the best one out there, but it has like the kind of things you'd really like, the syntax highlighting, the color coding,
Starting point is 00:44:41 and all that stuff. One of the cool things, it has a pretty good sense at least for javascript so you can like click on a function and it'll take you to where you implemented it that kind of stuff also it has this cool mode where if you haven't edited a file it has this like the tab on the far left so it uses tabs like most ide's where you have like one tab for each file but they have one tab which is like all the files that like you haven't really edited yet and so like if you want to look through all your files it won't create a bunch of tabs like eclipse will you know like you can just like left click on all the files in the little explorer and go through them all without creating a bunch of tabs and then if you actually want a file to sort of be sticky,
Starting point is 00:45:25 to be a tab, you double-click on it. Or if you start editing it, then it'll split it out. But overall, the interface is really slick. Yeah, I've tried it out too, and I like that there's a little map down the right that shows you kind of like a high-level view of your code. So a lot of times you're trying to move really fast from like the top to the bottom of a file,
Starting point is 00:45:42 and you kind of know what it looks like. It's just really easy to get there. And that's fun. And it's free to try, but they suggest if you keep using it, you should buy a license. Yeah. So basically, yeah. So if you every time you save, there's like a 1% chance you'll get a little nag window that you have to cancel, which like, you know, I used it for a couple of days before buying it. And I got the nag window
Starting point is 00:46:05 maybe like three or four times so it's not too bad um but you know i highly recommend buying it i think it's only like i think it was like 10 bucks or something i bought it it's like 40 or 50 dollars really yeah oh man well yeah it's totally worth it 59 so that's a little expensive but if you work somewhere you know work should probably pay for that for you hopefully yeah yeah if you have an employer um and you're you're doing it as part of work you should definitely you know get it approved or whatever but um even if you do it on your own the nag screen isn't too bad um you know it's livable and uh the id is great but if you like it you should support the developers yeah definitely can't all be mooches yeah if you have the money uh you should
Starting point is 00:46:45 definitely buy it um or if you're self-employed and you're using it as part of your job you should definitely buy it yeah so what about your tool of the buy week getting off of my extended uh stay on non-open source uh things i'm finally back onto an open source project. Nice. Yay. And this one is a camera application called Luminance HDR, which stands for high dynamic range, or at least that's what it means in camera. I'm not sure. I hope specifically that's what it means in this app. And we have a link in the show notes.
Starting point is 00:47:17 And so this is basically, so the idea of a high dynamic range photo in the photography world is that if you take a picture um your camera does basically it tries to guess like how bright the picture should be so um it wants the average brightness of the whole image and this gets a little bit into image processing but through either mechanical or electrical me or electronic programming means uh it tries to determine like the average if you look think about like a piece of white paper if that was the only thing on your screen it kind of tries to make
Starting point is 00:47:49 that like the middle of white like kind of gray you know kind of in the middle so that uh things to the top and bottom don't get washed out like that's what it wants to do so if you think about taking a picture with the bright sky in the background but like i take a picture of jason in the foreground in the shade. Sometimes like, how do you do that? Because the problem is you can only show so many bits, so much range, um, and your image. And the fact that I can't, I can show the dark of Jason in the shade and the bright of the sunlight, that's easy, but I want to both be able to see the details of Jason in the shade and also see that there's clouds in the sky yeah really the camera can only do one or the other it can only show the details on jason or show the clouds in the sky
Starting point is 00:48:29 i'm sure everyone's had this before where you know there's a sun in the background they try and take a picture of somebody and the person comes out like completely black like you just oh that's a great example yeah yeah or you try to take a picture of something and the sky is all washed out and glowy yeah yeah yeah so okay so those are the kind of the two options it takes right well the the limitation isn't really that the camera can't do either it's just it can't do them at the same or can't do both it just can't do them at the same time and so what hdr is about is taking the one where the foreground that's well it doesn't matter but the area that's dark dark and looks good when you take
Starting point is 00:49:05 an image just for the dark area and combining that with an image that is just of the bright area, but the dark area looks terrible. And you take both of those and kind of smash them together, right? And so what the computer can do is use a more bits of resolution for that range. So it can, instead of using an eight bit number to represent the amount of blue in the image it can use a 16-bit number to represent the amount of blue but your screen can't display that and your eye can actually do a better job but if the screen can't display it it doesn't matter and so what it does is use various algorithms to try to show both at the same time so kind of like i don't care about the middle so squeeze in the bottom and squeeze in the top and kind of ditch the middle um or just other things by combining those two images but the problem is
Starting point is 00:49:49 when you take two images you don't take them in exactly the same way if you're hand holding it they move slightly so you also have to shift the images so they are exactly the same on top of each other you get all sorts of bad things happen yep that's called registering the images that's right and when you have things that are misaligned you get ghosting so if like if a person is walking across the scene you get ghosting right okay but long story short this software does that no and it does it in a way with like many many different options all sorts of different algorithms all sorts of thresholds the user interface leaves something to be desired it's not always obvious what you should do and there are pay packages that do a really professional job of this.
Starting point is 00:50:28 And once you know what an HDR image looks like, a really famous person is Trey Ratcliffe. He's an online personality, and he takes a lot of HDR images using very expensive, very nice software. But if you want to try it out yourself by, you know, kind of doing this example thing, there's a great way to do it with the software. And it really teaches you a lot about how it is actually being done as opposed to just doing it all for you, which is bad and good. Yeah, it's totally awesome. I mean, the great thing about this is that, as you said, it's free and open source. So, you know, there's nothing stopping someone from giving this a shot and learning something. Yeah. So I would encourage you to, if you're into photography or even if you're not just interested in image processing,
Starting point is 00:51:05 check it out. Yeah, totally. OK, so let's go into the programming language. We've sort of ranted for a while, so we'll try to be a little terse. But we're going to talk about IDLs, which is something, Interface Description Languages, which is something I'm really excited about.
Starting point is 00:51:23 I've only been using IDLs for like a little over a year now, but it's really helped my productivity tremendously to the point now where I use it no matter even for personal projects, hobbies, I almost start with the IDL programming first and then get into the rest of what I'm doing. So from a software engineering standpoint i mean interfaces you kind of alluded to starting with it it's not so much the interface description language we'll just say idl from now on the idl is the fact that it's the interface interface is the thing that glues all the parts of your project together if you're using a library
Starting point is 00:52:01 how you interface with that library is very key. If you're going to interface to somebody else, that's like if you define those interfaces first, everything else somewhat falls into place. Right. And if you think about, you know, if you, you know, although it says interface description language, this is sort of it's sort of more general than that. It's also a lot of these are also sort of data description languages. And many programs that we write nowadays are sort of data driven you know the algorithms and the processes aren't necessarily new or interesting or difficult but it's just the data so you know for example like instagram or something like that you know picture taking had been around forever but the way that they manipulate the data with the social network and sharing with your friends and things like that is, well, one of the things that makes that product great. But there's also many other
Starting point is 00:52:53 things. So that's kind of a tangent. But, you know, starting with the IDL lets you sort of lay out a framework for sort of how your program is going to flow not only in terms of processes and interfaces but in terms of the data and what's going to be stored and how that's a good point and and we should point out here people might be saying well why do I need a language for that and if you're only working on one process on one computer you might be right but these days like Jason alluded to even simple applications need to talk to another application or need to talk to another process or go over the network
Starting point is 00:53:29 and when you do that you need a way to tell the person on the other end who may be running on a different kind of computer a different operating system a different a different language and you need a way to tell them what your data looks like. Yeah, exactly. Yep. Or even if you're talking to disk, you know, if you want to save data to the hard drive, you don't really want to have... Yeah, serialize it or marshal it. You don't want to have to do that by hand. You want something that is going to generate that for you. So yeah, IDLs, how did they start?
Starting point is 00:54:04 Yeah, so I mean, there's some classic ones. You hear a lot about Corba, Common Object Relation. Oh, I'm messing it up. Common Object Request Broker Architecture. This is a classic one that's been around for a while. You hear a lot about. Another one that people might be familiar with if you program on Windows is the Common Object Model that Microsoft uses COM for a lot of communicating with its APIs and stuff.
Starting point is 00:54:30 And it's a way to describe how that data should be and what it looks like. Yeah, totally. So another one is ICE. That's made by the Zero-G. ICE is very similar to Corba. It came out around the same time under the mantra of, like, we're not as complicated as Corba. But it does functionally the same thing. So what are some of the ones that we may have heard of more recently?
Starting point is 00:54:55 Yeah, so that was the beginning was Corba and ICE, things like that. Then they moved on to sort of the early web era. There was SOAP and json rpc so basically the way these two work is you know at the time you know there was a xml and a json reader and writer in most modern languages so they said that this sort of could be an intermediary so since you know python can write XML and C++ can read XML and we just we should create some data format so you could think of like a
Starting point is 00:55:32 simple way to do something like soap is let's just have an XML file and if you have like a class like a C++ class or a Python class you just have a tag called class and attribute called name with the class name and then C++ class or a Python class, you just have a tag called class and attribute called name with the class name. And then inside of class, you could have many XML tags for all of the members of the class. And the tag could say, you know, member would be the tag name, and then the type, there'd be a type attribute saying whether it's like a double or a float or an integer or a character and then inside of the member tag you could
Starting point is 00:56:09 actually put the data so you could actually hold class instances as well as the definitions so that's one way to do to do soap X soap is one implementation of that so for example a C++ program can write out some classes uh using this xml format and then a python program could read this xml and then reinterpret it as python classes yeah so so maybe an example i think we're getting a little bogged down in uh acronym phobia or acronym uh too many acronyms flying around so so like let's say jason runs a service that shares pictures with the world or my friends and i am an application that runs on somebody's computer that wants to upload pictures to jason so an rpc is a remote procedure call basically
Starting point is 00:56:58 saying like i want to be able to um initially take a picture that's on my hard drive and send information about like what the you who the user is when the picture was taken the picture itself like that data i want to send to Jason's web service so that he can then you know show it to the rest of the world so like how I call a function on his computer to say oh here I want you to upload picture and here's the data that's kind of the process that this stuff describes and then also the reverse like later i might want to pull down that image so i might want to make a call and say hey give me image number one and then have it give
Starting point is 00:57:33 it to me or give me a list of all the images yeah totally and so then now more modern idls are sophisticated enough to where they'll actually generate the code for you for many different languages. So one of them is protocol buffers. And so what you can actually do, protocol buffers comes with a compiler. So you write your proto file, and the proto file will say, oh, I have a message, you know, picture, right? And picture has a string called name. And then it also has a you know a list of bytes called data right now you can run the c++ proto generator and it'll generate a bunch of
Starting point is 00:58:17 c++ code that can read and write these picture messages yeah class it'll generate a whole class with gets and sets for you. Right, so it'll have a get data, set data. It'll have a constructor where you could construct new pictures. And then you can also generate Java code. You can generate JavaScript code. You can generate et cetera, et cetera. In addition to the generator that generates this code,
Starting point is 00:58:41 the protocol buffers also comes with a way to serialize so for example a way to convert it to like a binary representation so there might be some code for each language like some c++ code some java code which will say hey take this message which you know is a class as patrick mentioned and turn it into a set of bytes that can go into like a text file or go across the wire um and then also it says here's a set of bytes that i created or that someone else created using protocol buffers turn it into the class yeah and kind of in that step too which is a big gotcha of doing this on your own, is validating that what you got is actually a real class or is the thing that you meant it to be. Right, right.
Starting point is 00:59:29 And also handling, you know, if the protocol definition, if the proto changes, you know, dealing with that is also like brings a whole host of problems that you don't want to have to solve on your own. Right. to have to solve on your own. Yeah, I mean, if you've ever, you know, written a class and then written all these getters and setters and thought to yourself, like, there should be a way to do this automatically. Well, you know, that's exactly what, you know, these type of modern IDLs do is if you separate, as long as you can separate the logic from the data, then you can do this and not really have to ever write getters or setters or serialization or any of that it's all just done for you and so most modern programming nowadays you have these sort of container classes that just have a lot of data but can't actually do anything that are just auto
Starting point is 01:00:17 generated from some small proto file or thrift file which we'll get into later and then you know you have a set of handler classes that don't have any data or just have like a small amount of data but just manipulate these bigger container classes and send them across the wire write them to a database etc etc another modern idl and my personal favorite is apache thrift so actually this was started from the people who made protocol buffers and you can think of this as sort of like a version 2 of proto buffers but basically Thrift adds support for things like lists and sets and maps. The kind of things that you know people who have done Java or Python
Starting point is 01:01:00 who are familiar with lists or dictionaries in Python. Apache Thrift has native support for that. So in Thrift, for example, you can say, like, I have this Thrift message, and the message is gallery. And my gallery has, let's say, a name, which is the name of the gallery, maybe an integer, which is the ID for, you know, looking it up later. And then the third could be a map, which maps strings to picture objects. And so you can map like the name of a picture to the actual data. And all this is done in Thrift using just a few lines of this Thrift code. And then you can auto Generate that You know class in any language You want I think there's like 15
Starting point is 01:01:48 Languages that are supported So oh go ahead yeah no no yeah So I mean yeah there's a there's a lot of Choices here um it's one of those Things when you I don't remember ever really talking About most of these in school it's Kind of something you learn when you get on the real world and you Start running across these recurring problems Of man i really need to talk to something
Starting point is 01:02:08 else and i need to come up with a common way to represent it and uh i i'm gonna roll my own and then you run into a whole bunch of problems so it's much better to use one of these yeah i mean just to put it in perspective so one thing that i did sort of early on in my careers we we wanted to write a bunch of logging data of sort of like what the state of the system was at different points in time and we actually we had a bunch of classes in C++ that we we wrote just by using what's called a mem copy or f. So we actually just took the class in binary form and just wrote it to the hard drive as ones and zeros. And then on the other end, to read the class, we actually, you know, we had this file that had a bunch of classes in it. So you think, oh, well, I'll just write some program that just, you goes the other way and doesn't f read ah but the problem is one machine was big Indian and the other
Starting point is 01:03:09 machine was little Indian and for people who don't know Indian means it's it's kind of like a pun it's Indian it's actually spelled e nd i a n and basically what it means is let's say you have a short so a short is a 16-bit number right it's a two byte number so the question is where should the number start like if you're writing a number in English like let's say you're writing the number 1000 well the number the the most significant part of the numbers on the left like the one in 1000 the biggest the number is on the left. Like the 1 in 1,000. The biggest part.
Starting point is 01:03:47 Yeah, is in the thousands digit. Or if you have the number like 222, the first two is the most significant. Like that has the 200, the big part of the number. If you lost the first two, that would be a big deal. If you lost the last two, it wouldn't really matter. You'd have 220 220 let's say so that in in the case of computers there are some computers which are big Indian and that is where the first byte of a number say you have a short that's two bytes the first byte has the most significant bits in it and the second byte has the smaller the least significant bits. Some
Starting point is 01:04:25 computers are little Indian which means it's the other way around. So the first byte has the least significant bits or the numbers that wouldn't really matter if they weren't there or if they were set to zero. So the computer that was reading the data was little Indian and the computer that was writing it was big Indian. So all of the numbers were just completely bogus. Like all of them were like the bits were reversed. So the numbers were the bytes were reversed. The numbers are just garbage. So we had to write all of this code. It was just thousands of lines of code to like byte swap all of these you know
Starting point is 01:05:03 classes and byte swap all of the members in the classes, and it just, it took weeks. And if we had known about, you know, Apache Thrift or protocol buffers, we would have saved literally weeks, probably months of work. Yeah, definitely very useful. Yeah, I mean, there are just tons and tons of gotchas when it comes to moving, you know, turning code into data or turning, you know, the data that lives inside a code into ones and zeros, serialization and marshalling. And there's just tons and tons that goes into that. And so, you know, it's interesting to learn about, but if you just want to write something to disk, save yourself the trouble and use Apache Thrift.
Starting point is 01:05:48 So IDLs kind of are, this is different, as opposed to talking to one specific language, you're talking kind of about a group of languages, but they do share some common features. And some of it is the idea of this, this common idea of like the message, the thing that you might want to send or write to disk and generating these, you know, all this ancillary helper code that needs to be
Starting point is 01:06:06 done. And it's really nice that most of these provide utilities or are part of it where they process these message description files and generate code for you. Yeah, totally. The messages are huge. Another big part of it is most IDL support many different protocols. So for example Apache Thrift supports JSON so you can send it across over the wire as a JSON object and that's really useful for web debugging because you know a lot of web technology is sort of designed to expect JSON. It can also send data as binary so if you want to write the data to a file on your hard drive that you don't really care it to be human readable, you
Starting point is 01:06:51 could do binary. Or if you want to store it in a database, you can use binary. Also many of these have what's called a compact binary, and this is where they do a lot of sort of processor intensive work to shrink the size down so this can actually have a dramatic effect so for example you know you might reduce your database size by two-thirds by using a compact encoding which you know if you're dealing with gigs and gigs of data and if you're using something like amazon elastic cloud or something this could save you a ton of money yeah um the nice thing is also that they each library kind of typically has code to handle the details of what is going out as so if you if you're serializing
Starting point is 01:07:39 it like jason said in one endian and then reading it back in another uh the protocol will actually have defined what that is. And so the readers and writers on both sides all have agreed on what that should be and what to expect. So you don't have to worry about it. That's right. So just for example, and I don't know if this is actually how it works, but, you know, the Apache Thrift might say, hey, if you're big Indian, then I'll byte swap everything before I send it out. Like everything will be in little Indian when it's in between computers or on disk. And that way it's sort of everyone has the same expectation, you know, and you don't have any crazy data. So the, I mean, some of the good,
Starting point is 01:08:18 moving on to strength, some of the good things about these are these, we talked about the automatic code generation, the ability to use whatever language you want whatever kind of computer you want whatever kind of operating system you want go across the internet those are really the and the time saving i mean these are all really good strengths of the ideas but what are some of the weaknesses yeah so there is a certain amount of engineering work that you have to spend i mean for one thing you have to learn this technology and everyone using it has to be aware of it um The other thing is that, you know, it's just like using compilers, just like using everything. It's not going to be as efficient as if you did it by hand, you know? I mean, this has been the argument since the beginning of time, right?
Starting point is 01:08:55 Like, oh, if I wrote assembly by hand, it would be so much better. But, you know, there are cases, like especially, you know, let's say you want some real-time sensitive, like you're writing some plugin to do video conferencing or something like that. You probably want to write your own serialization that that takes advantage of certain nuances of your environment. So let's say you're doing sending video like compressing video you probably don't want to use apache thrift to compress video because video has certain characteristics like the human eye cannot really distinguish shades of blue and you want to take advantage of that you want to compress blue more than everything else these are the kind of things like you don't want to use uh an idl for
Starting point is 01:09:43 yep and also i mean if you're not careful, or like Jason said, if there's potential things that you know more about than the general solution, it can take longer. If you were going to write a very custom binary format, you might be able to make it smaller than what any of these things are able to do. So there might be overhead there that's associated with that yeah totally so um some good tools for uh doing idls um i use thrift for eclipse so basically it's it does like syntax highlighting and things like that i think it can actually run the thrift code generator for you so when you make changes to the thrift file it will auto generate the code um for me it's easier just to you know to run the command that generates the
Starting point is 01:10:32 code it's not that much work but i think you can you can with some elbow grease you can set it up to be sort of more streamlined another one is for protocol buffers is protoclips. And that's very similar, but for that format. Yeah. Yeah, definitely. So, I mean, very useful, very flexible. If you want to talk across the web, do remote procedure calling. If you want to serialize data to disk, if you want to just store something. Also, some databases, you know, have this language and are able to do kind of more intelligent things if they know in advance, like what, like the description of what your data is stored as.
Starting point is 01:11:11 Yeah, these are really powerful things, something that not everybody knows about. They're not completely obvious, but when you learn about them, they're a great, great help. Yeah, I mean, if you've ever seen something that was sort of transformed to the web, like I saw recently like SSH on the web or something like that. Or you see these like video games like FreeSib, they ported it to the web. And you figure like, how is that possible? Like, did they rewrite all of this in JavaScript? You know, like, how is this running in my browser? Well, chances are the JavaScript is just some thin client, and it's using something like Thrift or protocol buffers to talk to some bigger program on the server
Starting point is 01:11:53 that's running in C++ or Java or whatever. Well, I wanted to point out, well, finishing up with IDLs, we have a lot of great user feedback. We use our feedback, listener feedback. So we've had a great amount of reviews on iTunes. Thank you guys for those. We've had some good feedback on our Google Plus page. People have given us a lot of show topic ideas
Starting point is 01:12:17 that they want to hear about, things they want to talk about, encouragements, some helpful things to watch out for in the future, what people like hearing, what they don't like hearing. So we're really appreciative of all that. Glad to know you guys are out there and there's other people on the other end of these microphones. Yeah, definitely. I mean, we have added like all of the requests to the to our list of programming languages to cover. We want to sort of like cover sort of a variety of languages and sort of mix it up between the common ones and some of the more uncommon um but we definitely have taken all the feedback and we're
Starting point is 01:12:50 definitely going to keep uh covering languages until we've gotten every request out the door so definitely keep definitely and beyond so definitely keep uh keep sending us your feedback we really appreciate it if you have any particular show topics that you want to cover like if you're really interested in uh like you know embedded stuff and you want patrick to give like a little tutorial on how to make like an rc car or something or if you're interested in like games or ai or whatever i mean if you have any requests or any special topics you want to hear definitely shoot us a shoot us a post on the g plus um and we'd be happy to respond to that all right well that's a wrap thank you very much cool see you guys later the intro music is
Starting point is 01:13:33 axo by biner pilot programming throwdown is distributed under a creative commons attribution share alike 2.0 license you're free to to share, copy, distribute, transmit the work, to remix, adapt the work, but you must provide attribution to Patrick and I and sharealike in kind.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.