HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
Larry Wall: Computer Programming in 5 Minutes

Big Think · Youtube · 13 HN points · 0 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention Big Think's video "Larry Wall: Computer Programming in 5 Minutes".
Youtube Summary
Give yourself the gift of knowledge — subscribe to Big Think Edge: http://bit.ly/bigthinkedge

If you're interested in licensing this or any other Big Think clip for commercial or private use, contact our licensing partner Executive Interviews: https://www.executiveinterviews.biz/rightsholders/bigthink/

http://bigthink.com

Computer programming is a lot like writing a recipe. If you've read a recipe, you know what the structure of a recipe is and you can copy the format to create your own. But then you can take it a lot further.

Question: Can you explain the basics of the computer programming in five minutes?
Larry Wall:  Well, I can certainly try.  Computer programming is really a lot like writing a recipe.  If you've read a recipe, you know what the structure of a recipe is, it's got some things up at the top that are your ingredients, and below that, the directions for how to deal with those ingredients.
Well, a very similar thing happens in a computer program.  You have, you list out the various things that you're going to be dealing with, typically, and then you have some instructions that say what to do with those ingredients.  So, if you can understand a recipe and follow it in, you know, in your kitchen, then you can program on that level.  But you can take it a lot farther than that.  Many of you, I'm sure, have seen the Iron Chef show, I love to watch that, especially if they are given strange ingredients. I'm not sure I would like trout ice cream either, but one of the things that happens there, if you follow along, is that the Iron Chef, or whoever the chef is, doesn't actually do all the work.  They have what are called sous chefs, that they farm out, subdivide the jobs to, and they'll do the kind of busy work.  And programming is kind of like that, too.
You are the head chef, but there are bits and pieces of the computer out there that will do things for you.  Now, it's not quite like Iron Chef, because Iron Chef, you have some fairly intelligent sous chefs who know how to coddle an egg or chop up a fish.  But your computer tends to be more like a bunch of really efficient robots, but they're very stupid robots and very literal minded.  So you have to, at some level, you know, tell them exactly what to do.  But once you've told them, that you can just point to the robot and it'll do the same thing over and over and over again, and do it exactly the same.  And computers are like that, that's how they are valuable, they sort of take over all the boring bits of our thinking.
And then you can kind of take it beyond that, instead of just thinking of yourself as the chef that's in control, sometimes you want to program more like you're thinking about how the food actually goes through the process. And maybe even take it up a notch and say, here's a factory that produces some food item—Twinkies, or whatever—and you have raw ingredients coming in—that's assuming you think Twinkies are food—you have raw ingredients coming in, and they go on various conveyor belts and get chopped up in various ways and get recombined and there's this flow of the materials through the factory. And eventually it comes back out with some sort of a product that we considered to be food.
So there's programming languages that work like that, too, that just talk about how the data runs around in the program.  For instance, your Excel spreadsheet: you're putting data into little cells, and you have other cells that say, "Well, just make a little conveyor belt of these cells and add them up in this cell."  You're really doing programming, even if you think you're just writing cell macros.  So that's like a little factory on your desktop there.
Now going beyond that, there's various ways that you can get into, you know, sort of more highfalutin concepts that you would learn if you were taking a computer science degree.  The whole idea of programming on this level is you're saying one thing, some abstract thing, and that controls a bunch of other things.  So the next step that happens is that instead of just thinking about data as the pieces of things you're working with—strings, text, your phone numbers, whatever. You start thinking about those bits of recipe, and those recipes can also be considered data and can be sent around on the conveyor belt in your factory.  So it's like a little conveyor that you might have in your café, you put little things up there that order things up.
So when you start talking about actions and abstracting them, then you can start talking about doing the multiple times and looping and this action may do this action, which may do that action, which might come back and do the thing, and you get a recursive, sort of fractal pattern.  And so these are the basis of the more mathematical views of programming, but you don't have to do all that at the beginning.  You can just start off with the simple recipe idea and add things on as you go and learn as you go.  And then you'll do fine.
HN Theater Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
Feb 15, 2012 · 13 points, 3 comments · submitted by SlimHop
Detrus
I program and don't get this explanation. I'd be completely confused if I watched this before I learned to program. Can't say I'd do better.

Perhaps programming is like riding a bike by typing move left pedal to -10 Y and + 5 X, move right pedal +10 Y and -5 X. Then type repeat action. Same idea for steering. If you want it to get some place, you have to specify the path by GPS coordinates and pray nothing gets in your way.

And abstraction would be categorizing these various actions so you could possibly use the bike steering code on a car with some modification.

Makes it sound like torture at the wrong level of abstraction though.

JOnAgain
I think it was a pretty good attempt, and I'm not sure I could do better, but I'm going to say: "Swing and a miss"
techMAC
Think big!
tilltheis
Ressources about programming which are not primarily meant for programmers are always interesting to read/watch. The recipe metaphor reminds me of this (http://www.irishtimes.com/newspaper/finance/2011/0429/122429...) article which distinguishes between cooking recipes and mathematical formulae.
HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.