Coding 101 27 (Transcript)
Shannon Morse: Today on Coding 101, we’re posting things! On the internet, with post.
Net casts you love, from people you trust. This is TWiT! Bandwidth for Coding 101 is provided by Cache Fly at cachefly.com.
Shannon: This episode is brought to you by lynda.com. Learn what you want when you want with access to over 2400 high-quality online courses, all for one low monthly price. To try it free for seven days, visit lynda.com/c101. That’s lynda.com/c101.
Father Robert Ballecer: Welcome to Coding 101, the show where the cursor takes a really long time to click. I’m Father Robert Ballecer.
Shannon: And I am Shannon Morse and for the next 30 minutes we are going to get you all coded up on everything you need to know to be a code master in the world of Perl.
Fr. Robert: Pearly! We’ve had a couple of interesting episodes. The first five episodes of Perl, I knew they were a slog. There was a lot of regular expression.
Shannon: No, I had a lot of fun with it.
Fr. Robert: What made it really fun was when we put it on the interwebs.
Shannon: Yes, we started having a lot of fun times with surfers. We were able to put our code into work with HTML scripts, so that your clients would be able to see nice pretty forms and things of that nature on their websites.
Fr. Robert: Which we know is what Perl is made for. It’s a web-scripting language, designed for the internet, designed so you can do server-side or client-side scripting for pretty much any need. Patrick Delahante, who’s been our code warrior over the past few weeks has shown us how to use things like regular expressions, to dynamically generate websites.
Shannon: We’re going to be taking it a step further today but first I think it’s time for a little bit of review.
Fr. Robert: Let’s do it, please!
Shannon: Let’s bring it over to my computer. I have a form up here. It’s on a website. So it’s very simple and it says Doctor Who companions; and it asks a user for their favorite companion in the form of a form. Ha, lolz. So, do you have a favorite companion?
Fr. Robert: Uh, Rose.
Shannon: What is his or her name? You said Rose?
Fr. Robert: It would be Rose.
Shannon: Okay so let’s put in Rose Tyler and then hit submit. And it says your answer says, companion is yes, name is Rose plus Tyler so it recognized that. And then it says you said yes, her name is Rose Tyler. Nah, I would prefer Amy. So now I can put it in again, and say yes I do have a favorite companion and it is Amy. Hit submit. And then at the end it will say, Amy is rocking it! Very cool, very easy.
Fr. Robert: And again this is a really good use of Get, because all it’s doing is appending your answer to the URL and then the script is stripping that off and putting it back into the dynamically generated webpage.
Shannon: Exactly. Now I’ll show you my code real quick. Let’s go ahead and open this up. So first off we have some HTML, just tells you the title of the website. And then it asks you for Doctor Who companions; I gave it a nice little header up here. And the first paragraph, here are your results. And it will tell you your answer is the query. So down here we get into our Perl code. So it says, if your answer is a certain name…
Fr. Robert: Right, right.
Shannon: Then it splits it up. And then down here we have the companion. So the companion is the actual name of the person, the name of the companion. Down at the bottom, it looks for, under name, the name of the companion. It looks for Amy. If you put in Amy, it says Amy is rocking it. If you do not put in Amy or Amelia for that matter, since she goes by both, then it will say nah, I prefer Amy. And then you can submit it again and it will just bring you right back to the HTML form.
Fr. Robert: Right. What we like about this is that it’s showing you a lot of the concepts that we’ve been playing with the for the last two episodes. With posts, with Get, and again with dynamically generated pages using Perl script. What this is doing, is it’s taking the URL that’s created, and you can see it at the top of your screen; in fact, Brian if you could zoom in there, you can see it has appended her answer to this. That first part of his code was about taking that, which was pushed to the Perl script, and then turning it into something you can actually use. It takes that header, strips it off, puts it into a string that can actually be used within if/then statements. And that runs the rest of the program.
Shannon: Who else do we have? Rose.
Fr. Robert: And you’re cheating now. She’s showing you, this is actually very important. This is important about a Get from a form, which is if you change the URL, you’re actually changing what the input was.
Shannon: That’s right.
Fr. Robert: It’s a really easy way to play around. It’s also a good way to mess around with people by injecting code.
Shannon: That’s very true. We also had a user example in our Google Plus community. As usual, if you guys want to join our Google Plus community, just go to Google Plus and search for TWiT Coding 101. Definitely join because people do share their code over there and they’re very open to answering any questions that you guys might have. So we have a user example from Joe again. Thank you, Joe. You are really good with all these Perl examples. They are awesome. So his Perl example is basically a web calculator. So he sent us his script right here, and you can download it straight from his post in our Google Plus community. Basically, it just calculates a couple of numbers in a form on a website. And if I pull up his calculator… right here. So I’ll put in the number four and then we can choose times.
Fr. Robert: Nice.
Shannon: So he has a bunch of different options down here. Basic math. Then I’ll put in another four. Hit calculate, and it answers sixteen. Now what happens if I put it in the bar… calculate. Your first value does not look like a number.
Fr. Robert: So he’s done what he’s supposed to do, sanitization.
Shannon: Sanitization!
Fr. Robert: He sanitized his input. But again, look at the URL. So the URL shows you exactly what the input was. And you can change it there; now get rid of…
Shannon: So now it says 24.
Fr. Robert: There you go.
Shannon: It totally works. It’s a very good example of something that you can do by using Perl on a web server.
Fr. Robert: And once you know how to do this, this is what I like about it, once you understand how that URL is formed, I’m not saying to do this maliciously; but you can really start hammering at the back-end server and see are they sanitizing this? Unfortunately, what a lot of really poorly created software will do is it will check it on the front end. But once the URL is made, it doesn’t matter. It will let that go back to the back-end server. So if that’s where they’re doing their checking…
Shannon: You have to make sure your stuff is working correctly. You have to think like a hacker when it comes to putting things on a website.
Fr. Robert: You know a little bit about that.
Shannon: A few things. Going to Defcon, I hope I know a few things.
Fr. Robert: Turn off your phone.
Shannon: Moving on, I know a site where you can learn even more about programming than just what we can teach you here. A lot more.
Fr. Robert: Well thank goodness. That’s what we want, right? When we created this show, we’re like, look we’re not going to be able to show these people everything they need to know. We can give them the highlights, but then they need some place to fill the gaps in the knowledge hole.
Shannon: And we’re happy to say that our sponsor of this week’s episode is lynda.com. And that is the place you guys can go to get tutorials, thousands of video tutorials; that are made professionally by people across the interwebs to check out things as far as programming. You can do photography, video gaming, creating video games, all sorts of things. So, lynda.com, they help you learn and keep up to date with your software. You can pick up brand new skills. You can explore new hobbies with their easy to follow video tutorials. Whether you want to master the fundamentals of programming, you can learn a new programming language, like Python. Or you can design and develop engaging websites. Lynda.com offers thousands of courses on a variety of topics. Lynda.com released a new iPhone and an iPad app for iOS 7. And enhanced their Android app to provide Chrome Cast support. Yay, Chrome Cast. The iOS includes a more visual-intuitive interface. And both new apps offer offline course and video viewing which makes it really easy and convenient to learn even in environments without internet access. So say you’re on Bart and you want to learn more. Get on Bart, fire up the app, and there you go. You can watch as much as you want without the internets. Lynda.com users can move seamlessly between mobile and desktop applications. And new courses include Sea Essential Training, Simple Android Development Tools, Photoshop CC for Photographers-Intermediate, and even more. One of my personal favorites is doing things like what Brian’s showing. Learning a little bit more about programming. This really helps even right here with Coding 101; it’s super helpful to go over to Lynda and learn a little bit more about Python. And what we can share with you in our little 30-minute show. They have over 2400 courses, that’s a lot. So you’re going to be busy all the time watching these shows. More added every single week. And lynda.com, courses are produced at the highest quality. They’re not homemade videos on YouTube, not uploaded by anybody. These are professionals; Lynda.com works with software companies to provide you updated training the same day the new version hits the market. So you’ll always have the very latest skills. Instructors are accomplished professionals like I said at the top in their fields. They’re passionate about teaching; so you can get experience, levels from beginner, intermediate, to advanced for all sorts of different professions. You can watch on your computer, your tablet, your mobile device. Whether you have got 15 minutes of 15 hours, you can watch each course in a structure so that you can learn from start to finish. And you can also search the transcripts to find quick answers and read along with the video. They also offer certificates of completion for when you finish a course. So you can publish on your LinkedIn profile exactly what courses you’ve completed. Very nice for finding a job in that specific hobby that you absolutely love, which is great if you’re professional in the field as well. Now it’s only $25 a month for access to the entire lynda.com course library. Or for $37.50, you can subscribe to the premium plan which includes exercise files that let you follow along with the instructor’s project. Using the exact same project assets they do. You can try at lynda.com right now with a free seven-day free trial. Visit lynda.com/c101 to access the entire library. That’s over 2400 courses, so many free for seven days! That’s lynda.com/c101. And of course, we thank Lynda for their support of Coding 101.
Fr. Robert: Thank you, Lynda.
Shannon: Let’s move on! Let’s have some fun!
Fr. Robert: Let’s do a little bit of ivory tower stuff. So last week we were all about posts. Again, we were all doing Get. That’s what you showed off…
Shannon: We were getting some Get forms, getting all sorts of fun times.
Fr. Robert: Exactly. So the examples are really simple. This is the one I used from last week. Here’s my Get example. This is what it looks like, this is what the spin looks like. If you go to that, this is what the code looks like that goes behind it. It is just a simple HTML document that uses a table and then it uses the form. And the method is Get, so we’re using Get. And it gives us the action. So the action upon you clicking submit will be to call this particular script. So the script is called animal name. It gives it the prompt of, would you care to name this creature. And the input name called Name with creature. Which I what will push back out when you do submit. Remember one of the reasons we were showing this off is to show how Get works. If I would care to name this creature, it would have to be Dog Tor Who. And when you click submit if you watch the URL up here, you see that it does this. It’s going to append it to the file that I told it to call. So I told it to call CGI Bin, Animal Name. That script, and then it’s going to hand this additional information. That additional information was defined by the code that I gave it inside that HTML form tag. I told it to have the name of creature be my input, and then I made my input Dog Tor Who. And so all it does is says Dog Tor plus Who, and that gets pushed to the script. So now the script has that information, and it can do with it what it needs to.
Shannon: Now I know that you’re just explaining to us why this changes in the actual line of text at the very top. But we might as well answer it for anybody out there that does question it. Why didn’t a webpage appear when you click submit?
Fr. Robert: Because that doesn’t actually exist. So this is all for demo, right? We didn’t actually create a live server that we could call, because we didn’t want people hammering on it. It’s a really good way to have a server taken down on live TV, bring up server URL. People will poke it. We could have done something internal, but we didn’t want that. We’re not showing the running of the script, we’re showing how you would imbed this into an HTML file. Because we want to be able to pull data from the user and then use that data inside the Perl script. That’s what we’ve been doing in this entire module.
Shannon: Exactly. As far as the title goes, it changes
every time you put in a different entry. What if I don’t want it to show that?
Fr. Robert: You can’t do that with
Get. That’s one of the things about Get; in the last episode there were a lot
of people in the chat room saying, use Post. Post is secure. No, Post is not
secure, but it’s not as insecure as Get. There’s a lot
of things about Get that people don’t like. For example, it’s very
character-limited. I believe in Internet Explorer, you’re limited to 1,024
characters.
Shannon: That’s it?
Fr. Robert: That’s it. That would be the actual URL; that’s the file plus all the special control characters. Plus whatever input you take from the user.
Shannon: That doesn’t give you a lot.
Fr. Robert: It’s not a lot. For example, if someone were to type a comment, that could go way over 1,024 characters. And that’s all displayed in the URL. That’s a really insecure way to transmit data. The other thing is you can bookmark a Get. You can cache a Get. That’s not necessarily a good thing. Luckily, we have another option. We started this last episode. We talked about two different ways to get data back from a user inside an HTML document. The first one was Get, that’s the simple one. The other one is called Post.
Shannon: Ooh, Post!
Fr. Robert: Post. Quite simply, Post is another way to get everything from the status of check-boxes to the entries on data boxes, to comment boxes, whatever it’s going to be; you can get all that data back and you can push it to the Perl script, just like you did with the Get. But none of it shows up in the URL. And actually we can show that to you right here. What I’m going to do is I have pretty much the same example, but we brought it up in Post. It looks the same; I changed the text a little bit of course. And Doctor Who fans will know that, the dog will lie no more when that dog lies at Transelure. And bonus points if you know the name of the episode that this is paraphrased from. It looks like the other form, of course it’s a bit more advanced. Again we can do this because we have more leeway since it’s not limited to just a few characters. Let’s say, what is your preferred mode of transportation? Of course my preferred will be the tortoise… tardin. And who is my companion. And you prefer Amy so I’m going to say Amy. Now if this was a Get and I try to do this, when I click Geronimo, all that data would show up in the URL at the top. But you’re going to notice that when I click Geronimo, it doesn’t. All it’s doing is it’s calling this Perl script that I told it to call. All of that other data is not contained in the URL. That gets pushed directly to the Perl script.
Shannon: No way. But how?
Fr. Robert: That’s how it works. That’s the difference between a Get and a Post. The cool thing about doing it this way is I can A, send a lot of data. And B, it’s not impossible to intercept it. If I was scanning someone’s packets, I would still be able to see the data if it’s not encrypted. But at least it’s not as obvious as a Get.
Shannon: So why in the world would I want to use Get when I have the option to use Post instead?
Fr. Robert: Get is a lot more simple. Sometimes you do want something that’s brain dead simple that’s just inside the URL. That’s not as complicated as sending a Post. So you have options. Options are good.
Shannon: That’s true.
Fr. Robert: Now I don’t believe I’ve ever used a Get. I should some times, but I almost always use Post.
Shannon: It makes sense. I think I would choose Post over Get. But of course I haven’t seen the code yet, so I’m assuming it may look a little harder?
Fr. Robert: Not really. Let’s take a look at it. Let’s go back, sorry. This was our code; let’s go and view the source here. It actually looks a whole lot the same. So everything in the table looks exactly the same as in our Get code. The only thing that’s different is if you look at the form tag itself, I’ve changed my method to Post. And I’ve changed my method to Post.
Shannon: That’s it?
Fr. Robert: That’s it. Everything else is the same.
Shannon: That’s easy.
Fr. Robert: So yea, do this. Post is more secure, yes. But I always like to sort of…
Shannon: Trust no one.
Fr. Robert: Trust no one. It is more secure than Get, but it is not secure.
Shannon: Right. Nothing is secure.
Fr. Robert: Nothing is secure, just so you know. We want to build a healthy sense of paranoia into our audience.
Shannon: That’s good.
Fr. Robert: Now this is the time when we actually have to bring in our code warrior. What he’s going to do is he’s going to take Post and he’s going to show you how it interfaces with the Perl file.
Shannon: Yes.
Fr. Robert: That’s that mystery meat that we were talking about. Wait a minute, if it’s not in the URL, where’s it going? How does it get to the Perl… so this is the time where we want to introduce to the show; welcome back, he has been with us for six episodes. This is number seven. Mr. Patrick Delahante, also known as Bunny. Bunny, how are you today?
Patrick Delahante: I’m not going to acknowledge that with an answer.
Fr. Robert: Now Patrick, how does this work? We understand there are two different ways to get data from the user in an HTML document. There’s Get, and there’s Post. Get is straight-forward. It appends it to the URL so that when you call that script, the script will also have that additional piece of data which can bring into the program, turn it into a string and then run regular expression on it to its parts content. But what happens with Post? Where’s the data coming from that’s not in the URL?
Patrick: It’s magic.
Fr. Robert: Okay, that’s not the answer we were looking for.
Patrick: Also known as standard input.
Fr. Robert: Oh, there we go. That’s what we wanted. Remember at the beginning of the module, we were playing with standard input and people were saying, why are you doing standard input? That’s why we’re doing it because that’s what we’re dealing with it. That’s how Perl will bring it in. It uses standard input just to take that stream from the browser.
Patrick: It all comes full-circle.
Fr. Robert: Boom, there we go. Alright, do you want to show us some examples of how Post works?
Patrick: Yea, I’ve got the same form that I had last week, with what is your favorite animal. And of course, we type rabbit this time, just to be different. And submit. And the URL does not, it uses a Post; there’s no scent in the URL. So it doesn’t say animal equals rabbit. And then I’ve hit the script, it’s read it in. It says, the same response. The only difference between this is it’s using a Post instead of a Get. So if you look at this script, you’ll see everything here is the same except I’m reading standard input. And for the length of the input, I put that into the variable input.
Shannon: Oh, interesting.
Patrick: So I said standard input says input, and then everything else but this is the same. It’s doing the exact same script as I had last time. It’s all the same as Get. All I had to do was read it from a different place.
Fr. Robert: So when we were using Get, you had to read the URL. You had to break off that last piece, turn it into a string, that could then be used inside the script, inside the program. But if we are using Post, it’s using a standard input just to receive the stream, rather than stripping off the URL. And it can use that within the program.
Patrick: So my second example here, the same second example as I had last time except this is also using Post. Favorite animal, bunny. Animal’s name, Baxter.
Fr. Robert: Oh, Baxter.
Patrick: And it’s the same script, if you look at the code here; I’m doing the same thing. Read standard input; I’m printing out that phrase just so I can see what it says. And up here you can see that it has the input and it’s handled the same way as Get. It has the first variable ampersand, second variable.
Fr. Robert: Right.
Shannon: Can you break down the read standard input line a little bit for me. I don’t understand why you have the content link there at the end.
Patrick: Sure. That tells it’s reading this much content off the standard input. So it’s reading that many characters. If I print out the content link, maybe that will help understand here. Let me just put that right here. So if I run this again, resubmit; you can see here, 24. That’s how many characters are in this submission.
Shannon: Cool.
Fr. Robert: That’s actually a built-in function in Perl. It will take a string and tell you how long that string is.
Patrick: Then there are all the environment variables. I listed some of them in one of the earlier modules.
Fr. Robert: The question of course is why would you use Get instead of Post?
Patrick: Get is very helpful if you want to give people a page to bookmark. Like, I use it at amicons.com where I got it so that if somebody views a list of the conventions in this country, it will say country equals UK. And that way, Google will index that or people can bookmark that. And I could provide links directly to that without having to use the form. And this way the Perl script can interpret, oh country is UK; so therefore just display these. Instead of having to make somebody go through the form every time asking what country do you want. I can provide a link directly to the country equals UK.
Shannon: That’s awesome.
Fr. Robert: These first two examples are just you taking the old Get examples and putting Post on them. As we saw it in the Ivory tower, they really look the same. It’s slightly different on how you tag it, and it’s slightly different on how you get the information to the actual code. But is that it? What else can I do with this?
Patrick: The way I’ve been doing it. I’ve kind of been showing you how the fundamentals of Get and Post works. But really that’s not how anybody who uses Perl programming is going to be doing this. Because there are things that are known as Perl modules, and they’re made to make your life easier. Fortunately a Perl module called CGI, which takes all the trouble out of having to interpret the line, parse it out and split it. And handle all of that. So I can actually show you I’ve taken the third form from last week and I’ve done this using this CGI module. So this is the one where I’ve got the check boxes with multiple answers, I’ve got the radio buttons. Remember last time, I was looking at the URL, pulling up value food. And I only got the most recent, the latest one. So if I hit A, because it was left in the list. That’s all I got.
Shannon: Yea, I remember that.
Patrick: So this one I can actually see all the values. So let me first fill out the form, and I’ll show you here. Let’s do bunny again; minus, give the other one some recognition. It’s vegetables and hay, and he is cute. We will submit and you said bunny, named it Lionus. Yes, bunnies are the best. It eats veggies and hay, and Lionus is cute. So it knows, I hit both veggies and hay. Not just hay. So we’ll look at the script for this. And up here at the top of the Perl file, I think this new line says use CGI. Most Perl installations have this installed by default. It says CGI module, which makes it so much…
Shannon: So I don’t have to download anything. I can just do this on my computer?
Fr. Robert: Unless it’s on Windows, then you probably…
Patrick: You might have to, who knows. Depends on what installation. But anyway, we can cover more of this next week, but here’s how I’m using this CGI module. I set the variable input, which I’m using to reference that. And then this is all the same. This is all just HTML header; then down here, I’m actually doing a check. Just because I should. If the request method is not Post, I’m saying okay go back to the form and fill this out. This is helpful if someone comes directly to my script. I’m saying no, you haven’t sent me anything. You haven’t sent me the Post.
Shannon: So it just automatically pushes back to the form.
Patrick: Yea, if I try going directly to this script…
Fr. Robert: So if someone tries to inject code into your software…
Patrick: Oops, I messed up that code. I should have done this check earlier. Let me fix this right now. This has to go before the content type.
Shannon: Aha.
Patrick: I messed that up. I’m sorry. I’m embarrassed. So there it goes. It goes back to the form.
Shannon: It works.
Patrick: It still has this in the URL but it’s back in the HTML form.
Shannon: That’s cool.
Patrick: So now, go back to the code here. I’ve used this variable input and so now I have to go down here; animal equals input, arrow, and pram animal. So that’s taking in the CGI if I view the source. It’s taking this animal value and putting that into this string. And it’s doing the same for the name value, the name of the animal here. It’s putting that in this variable name.
Fr. Robert: We did that before. Because we can call our parameters anything we want. In this particular case, it’s looking for the value that’s contained in the parameter named animal.
Shannon: Ah, okay.
Patrick: So then it’s the same script down here. If animal is bunny or rabbit, then do this part here. If it’s not, then do this part. It’s what I’ve done here, you’ve said animal, give it name, bunnies are the best, then I’ve done something a little different here. It’s another new thing. This is calling a sub-routine. I’ve got the same thing in both. I didn’t want to have to put the code twice, so I’m instead calling this down here, boom. Sub-eating; so this up here with ampersand eating says go down to here. Run this code, and then it goes back to where it left off.
Shannon: Oh.
Fr. Robert: Which we’ve seen this before. We saw this in C-Sharp, in Python, making a function, making a method that you can call. So this is how you would do it if you’re scripting. Which is, I know I’m going to need to do this operation over and over again. Instead of cutting and pasting the code every time, why not make it a sub-routine and now I can call the sub-routine.
Patrick: So this isn’t really a new concept for Coding 101. But this is something new in Perl.
Shannon: This is the concept in Perl.
Patrick: Yes, this is how it’s done in Perl. And it’s really that easy. There’s ways to pass variable names and everything. Right now I’m just getting my variables global. Just to make it easy.
Fr. Robert: We would not do that in the real work, by the way folks.
Patrick: I’m just trying to present easy to understand code here.
Fr. Robert: It would be an easy way to get hacked.
Patrick: So now next after I’ve processed what happens if what it eats; then I say, actually no I should probably tell you how that works. Somehow this got poorly indented. I think it’s when I increased the font size. If the parameter food exists, so if parameter food, what that means if I check something off and there is a value, then print it eats; because there’s at least one thing it eats. Then I just do an array with all the parameters from food. So this is input because I checked off vegetables and hay, it’s putting vegetables and hay into the array.
Shannon: So if we look at your HTML code, where is food? Oh I see it.
Patrick: Food is here. I’ve check-boxed food.
Shannon: So it looks under all four of those, since each of those have the same name?
Patrick: Yes. For each food I’ve checked off, print it. And so it’s printing the value that I’ve sent in the HTML here. Veggies, meats, seeds, or hay.
Fr. Robert: But only the ones that receive a check box. The other ones will be empty.
Patrick: Yea, they’re not sent. So after it processes this, it prints out the list of food. It comes back up here. If cute, instead of saying it to a variable, I call it once. So I just did it here. If cute equals yes, print of course name is cute. Else, what do you mean name isn’t cute? And if I didn’t do bunny, it does the same sort of thing. I just prints out different output. And then closes the HTML and then exit. And it makes it stop.
Shannon: Wow, you know that wasn’t as complicated as I thought it was going to be.
Fr. Robert: Once you start breaking it down, you realized you’ve covered all these things before. The code looks crazy but start looking at it. If/then/else statements, great. I know how to do that.
Shannon: There’s some arrays; we know how to do those.
Fr. Robert: There’s putting data in and printing data out; we know how to do that. And now there’s sub-routines, functions or methods. We know how to do that. So everything that you’re seeing, even though it’s slightly different syntax, because of course these people have been watching all of Coding 101; if you’ve watched previous modules, you’ll see how those ideas are universal. All coding languages are going to have it. Be it a scripting language, and interpreted language, or a compiled language. They’re always there.
Shannon: That’s so awesome. I don’t know about you guys but I get so excited when I learn cool new things like this.
Fr. Robert: That’s the knowledge hole.
Shannon: Yay, knowledge hole.
Fr. Robert: So Patrick, tell me now that we’ve seen what you’ve done, and this is a very simplified version; the people at home are probably saying I could make a form that has a couple check boxes and a couple radio buttons, what can I do with this?
Shannon: You can do a trivia, like those trivia websites from 1995?
Fr. Robert: Exactly.
Shannon: Who’s your favorite silver moon character?
Patrick: You could do all sorts of things. You could have a comment form that does something, maybe does something with the input data people have put in; and Post is so much better if you’re going to do a big text box because you don’t want that in your URL. You can do anything with a form input now. You can get feedback from the users on your website and let them change it so that what you’re presenting is different depending on the options they’ve selected.
Fr. Robert: And something I think is very important to remember is the examples we’ve been using look horrible. We would never design this for the real world. But we’ve done that on purpose, because we want to make things really simple. We don’t want to confuse you with the formatting that you would need to make a good looking website. Under that good looking website this is how it’s fun, this is how it works. If they’re using a Perl scripting language, a Perl server, to be able to dynamically generate their web pages, we just taught you about 50% of everything you’re going to do with Perl. Most of Perl is getting data, modifying it in some way, and pushing it back out. Now you know how to do it.
Shannon: Now you know.
Fr. Robert: Now you know. We want to thank you very much, Patrick for being our code warrior again.
Patrick: My pleasure.
Fr. Robert: Next week is the last episode of this module. I know folks.
Shannon: No! But I’m liking Perl.
Fr. Robert: Isn’t that true? Every time we finally get to the point where we’re left in the limelight, it’s time to move on. But what do you got for the folks at home for next week? It has to be a special episode, right?
Patrick: I’m just going to go crazy. And do all sorts of Perl things and show the potential that is there. So we’ll see.
Fr. Robert: I don’t to spoil it, but I want to give them a sneak peak. The wildcard episodes between module 3 and module 4 are actually going to be security experts. So if you’ve ever wanted to know a little something about how security experts use code, you’re not going to want to miss that. But Patrick, thank you once again for being our code warrior. Can you tell everyone where they can find you and your work?
Patrick: They can find me at cheepyproject.com. I’ve got podcasts that I’ve been doing for like 10 years or something; where we destroy toys for no good reason. You can follow me on Twitter @delahante.
Fr. Robert: Thank you. Patrick Delahante, programmer premier here at TWiT TV.
Patrick: Wait that’s a bunny-corgi. How does that even work?
Fr. Robert: Why is he eating a …
Shannon: Well you said you liked bunnies, right?
Fr. Robert: I don’t know what’s going on right now.
Shannon: I think that about wraps it up for tonight’s episode.
Fr. Robert: I think it does because that was weird. We know there was a lot of information we’ve thrown at you. Go to our show notes page; we’re going to improve it. We now have a plan…
Shannon: Post the show notes, Padre.
Fr. Robert: My fault, my fault. I build a really cool automated script to post show notes. It broke, it broke hard. It may have been broke by one page. But you can always find our show notes by going to our show page by going to twit.tv/coding101. There you’ll find all of our episodes and you’ll also find a way to download our episodes to your device of choice.
Shannon: Don’t forget we’re also on iTunes. Go there and subscribe to this show. Just search for Coding 101, in your iTunes video category for podcasts. And you’ll find us! I think we’re under audio as well, so definitely check it out. Especially if you want something fun to listen to and geek out to. And tell all your friends to subscribe, too.
Fr. Robert: That’s true. The show is doing very well, but we want to spread the word wide and far. Tell your friends, tell them this is a 101 show. Yea, we’re going to talk about a couple things that might make your brain hurt, once in a while. But it’s designed for people that may not want to be programmers, but want to understand how code works. It’s something that you need in this day and age, and if you hate iTunes and you don’t want to download it off our page, I guess you can always watch us on TWiT. We also have a page. You can find us at YouTube.com/twitcoding101. Again you’ll find all of our episodes and it’s just another way to share the love.
Shannon: Google Plus community; I know I mentioned it at the beginning. But that’s over at TWiT Coding 101 on Google Plus. Definitely go over there, subscribe. Especially if you have questions that we didn’t get to you in the chat room. Make sure to go into there and ask our community because they’re very useful and handy in answering questions from anybody. And they won’t make you feel dumb, that one of my favorite parts.
Fr. Robert: Exactly. If you’re an expert, great you can help some of the newbies. If you’re a newbie, jump in there and ask the stupid question. You know that question that you don’t want to ask because everyone’s going to laugh at you and say, what is standard input. Go ahead and ask it; I can guarantee that they’re going to be kind. If they’re not kind…
Shannon: I will punch them in the face.
Fr. Robert: She will punch them in the face. Also you can find us on Twitter, twitter.com/padresj. Please follow me @padresj.
Shannon: I’m at Snuggs.
Fr. Robert: Did I break your flow? Don’t forget we have this show live every Thursday 1:30pm Pacific time. You can watch us at live.twit.tv. You get to watch the preshow, the bloopers, all the stuff that gets cut out of the final. Once in a while, we do a technical difficulty because we’re always trying to make it entertaining. Exactly, like that; that was one big technical difficulty. And as long as you’re watching us live, why not jump into our chat room. At IRC.twit.tv. We do pull questions straight out of the chat room. We listen to you, read your comments as the show goes on. It’s a great way to be part of the experiment, that is TWiT TV.
Shannon: We’re so experimental.
Fr. Robert: I think that’s it for this episode. Until next time, I’m Father Robert Ballecer.
Shannon: I’m Shannon Morse.
Fr. Robert and Shannon: End of line!