- Podcasts
- Programming Throwdown
- Objective-C
About this episodeThis show covers Objective-C, the premier language for iphone, ipad, and os/x app development. The episode talks about the upcoming Wii U…
This show covers Objective-C, the premier language for iphone, ipad, and os/x app development. The episode talks about the upcoming Wii U console and Duke Nukem Forever, (possibly) the most offensive game ever made. After the news, the show discusses why and how Patrick and Jason got into programming. The tools of the biweek are JavE, an ascii art drawing and conversion tool, and Ascii Flow Diagram, an ascii art flowchart creator.
★ Support this podcast on Patreon ★Transcript
From the publisherThis transcript comes from the podcast’s own feed, shown as the publisher wrote it.
Objective-C
Jason. Hey, so I'm biking to work now, which is pretty awesome. I actually, I didn't know if I was going to, you know, like it. Because, you know, I like the exercise, but then there's this whole, you know, you get to work a little bit later. I mean, it might take you like an hour to bike five miles or something, right? So, you spend a lot of time on the bike and you kind of have to, you know, shower afterwards and stuff like that. You are such an overachiever. I'm just saying it. Showering is an overachiever. What does it say about you? No, riding your bike. No, it's, but it's super fun. You know, you get to feel, there's something weird, like there's something invigorating about like almost dying. Literally just taking yourself to work. Oh. Yeah, well, that too. But people over here in California are actually pretty nice to bikers. Like in Florida, I feel like if I had pulled some of the stunts I pulled here, I would definitely have been killed. Like actually, if you're biking and they actually, they have a bike lane here, which is pretty cool. But if you're biking in the bike lane, which is on the right side, and you need to make a left turn, you can just swing over to the left lane and take up a whole car lane, you know, until the turn signal goes. And then, you know, take, make the left turn and then swing back out to the bike lane. Yeah. And this only works because everyone's in on it. Like the cars know you're going to do it. You know you're going to do it. You stick your arm out. Make sure to do your hand signal. Yeah, we
used to have to do that when I was at school and, you know, going to university. That was how it was. Yeah. And that's actually the right way to do it. You have to ride in the turn lane and block traffic. And people would honk at me and get mad. And that was really scary. But that's the rule. Like that's what you have to do to make the turn.
Yeah. Your only other thing you can do, and I've done this, like I'm still doing this today on a couple of the intersections where I have to make lefts because I'm just not comfortable yet. You know, you can walk your bike like along any of the pedestrian paths. Right? But technically it's against the law to, you know, ride your bike like on a sidewalk or a crosswalk or something like that where there's a bike lane or something. Yeah. Yeah, right. Or even where there isn't. I believe the rule is if there's no bike lane, you're supposed to take up a regular lane of traffic, or just kind of get over to the right.
Okay. The one thing about it though, at least, you know, up until now, maybe I'll actually build muscle. But as long as I'm still kind of like indistinguishable from a skeleton, I'm like perpetually sore. Like every day I'm sore because, you know, you have this like, you know, eight-mile bike ride or whatever. So even if you don't work out, you're going to be sore.
my couch and watch you bike to work. Oh man, I'm totally going to call—let's just say somebody I know who may or may not be in my family. And I have no brothers and sisters would watch sweating to the oldies and just like sit on the couch eating like Cheetos. And the guy, what's his name? Richard Simmons, right? Richard Simmons is like,
Yeah, a listener suggested that we cover Objective-C, which we're going to do, as you know. And also suggested we kind of talk about how we got into programming. I think that's really good, two excellent suggestions. And in general, if you guys have any feedback that you want to give that involves future episodes, definitely bring that to our attention.
right. Pretty good. All right, so first item of news we had was the new Wii. We talked about that. It was that last episode or the episode before. Yep. That, you know, was it going to come out? And sure enough, at E3, they announced it. I guess that was last week. And it's actually kind of interesting. The first pictures I saw were of this weird, like, tablet device. I don't know if you've seen these pictures. The thing looks crazy.
believe it. And then I saw the pictures and I was like, that looks stupid. But reading people who actually tried it said it's, like, it's really fun and really amazing. And like you said, with the Game Boy Advances, you know, that's what they tried to do before. But supposedly, I guess, they executed it this time really well. And people said that, you know, you can basically have the normal Wii remotes for everybody else. And one person has this tablet screen. And they can kind of be, like, a different player than everybody else with more information or a different worldview than everybody using the TV screen. And so you can kind of get this, like, different players have different roles dynamic at an even fundamental level.
Yeah, I mean, you know, this mechanic has been around forever. I mean, you had the idea of even Dungeons & Dragons. Have you ever played that in, like, middle school or high school? Or even, I know people who play it today. You have this idea of the dungeon master who sort of, he has information that no one else has. And he has sort of a certain amount of control and is sort of more like the moderator. You know, as the Wii has sort of taken over the family demographic, you could see playing this with your kids and sort of being sort of the dungeon master and help guiding them to having, like, even more fun than they could have just playing by themselves on the computer.
And it's supposedly going to be a big upgrade. They're going to be said, I think, 50% faster or more hardware or power than the PS3. Oh, wow. So, well, yeah, I said the same thing, like, well, that's pretty good. And then I saw some commentary, which was a good point, which is, yeah, but the Xbox 360 and PlayStation 3 are many years old now. Like,
Yep. I mean, you know, I think what will happen is, putting my visionary glasses on, is, you know, the next Xbox and PS that come out will probably support 3D if they don't already. And we'll all be saying, oh, how come the Wii, you know, is the only one without 3D? Kind of like we're saying now, how come the Wii is the only one without 1080p?
But I guess they're not going after the visuals. It's more about the gameplay experience, and these controllers, and they really led the way. I mean, now with PlayStation, you've got the PlayStation Move and the Xbox 360 Kinect, which have been successful in their own rights. But, I mean, they all came years after the Wii introduced this motion controller. Yeah,
That's right. That's exactly right. Cool, man. All right. You have any news? Yeah, so I'm going to talk about something not as sophisticated or eclectic as the Wii. I'm going to talk about Duke Nukem Forever. This article is titled, 'Duke Nukem Forever Barely Playable, Not Funny, Rampantly Offensive.' Okay. That sounds like
I think that... You know, I saw the preview for it, and they're sort of really going after this niche market of people who like want to have sort of, like, nudity in their games. Like, even... I don't know if... Have you seen the preview for this? No. For this game? So even the boss is basically the top half. It's
Yeah, yeah. So keeping on the clean rating, it's basically... It looks like top half of a naked woman. But, like, if you had textured that in such a way and changed the face to make it look like a monster. Like a half-naked woman torso with a monster head. So it's like... There's just... And even the preview is just littered with, you know, nudity. And so it's sort of... I feel like that's sort of what they're going for. And this article really sort of pokes at the, you know, huge weaknesses of this game. And I thought it was a funny read, so I'd definitely give it a glance.
Yeah, yeah. I mean, the hip thing. Video games are hip. We want to be with the young kids. I was playing... Just an aside. I was playing Demon's Souls, which is this really hardcore game for the PlayStation 3. And I don't know if I'm going to make it through. Like, the graphics are beautiful and the experiences... It's like I'm getting a lot of enjoyment out of the game. But basically, every time you die, you have to start all over again. Kind of like those old Nintendo games. And I'm just so sick of playing, like, the beginning over and over again that I just don't think I can tough it out. That sounds pretty brutal. Yeah, yeah, definitely. Okay.
All right, so... Go ahead. No! All right, so we were going to talk a little bit about kind of the reasons we got into programming in some of our early days. And try to remember, clean out those cobwebs and try to think about what it was like and any sort of advice, I guess. So I guess you go ahead and start it off. So how did you get into programming?
Yeah, so I started programming really young, actually. I come from, like, a lot of computer science majors in my family, my extended family especially. And so my cousins were kind of teaching me how to program and they were teaching me basic and, you know, how you do, like, print your name, go to 10 and it would just spam your name on the screen. I remember that one. Like, oh, I crashed it
I know. It's like... And so it's sort of like, it's like, there was nothing and then I created my name like an infinite number of times or just a really large number of times. And so that idea of being able to create something from nothing has sort of, like, pervaded all of my interests in programming thus far. Like, I've worked on this Underworld Hockey Club, this video game that I made from scratch. And I really wanted to see a hockey game with physics where when you body check the person, there's some physics engine running. And it was kind of funny and just another aside. I was looking at video games at Target the other day and NHL 2011 has come out. And on the back of the box, it says, new physics simulation. Like, every hit is unique. And I was just thinking to myself, it's so funny because I did that in, like, 2008. And so that idea where... You should sue him.
But yeah, the idea that one person just, you know, in their basement can create something that usually takes, you know, a whole team of people or can change the entire world. Can create a project that's downloaded or used by hundreds or even thousands of people. That is something that's sort of unique to programming. I mean, there's many different arts. There's painting. There's sculpture. There's writing. But few of those arts allow you to, you know, influence and allow you to get inside the homes and the minds and the lives of so many people as computer programming. I mean, you could write an iPhone app for... I was talking to somebody today who wrote an iPhone app for deer hunting. It's like the number two or number three app. Like, every deer hunter needs this app. And even people who don't like deer hunting, for some reason, they're fascinated by this. It's like,
No, what it is, I guess it keeps track of, like, deer, like, migration or something. And also, it's sort of like user-driven content. Like, you can specify, like, if you know good places to hunt and places to hide where the deer are and stuff like that. But the idea that there's someone in their spare time... Oh, it's like four
Someone in their spare time just made this app, and it completely took off. And I think that, you know, you can be like an amazing painter. But often, you need different sponsors. You need to go to galleries. You need to, you know, get your foot in the door. And, you know, now with the Internet, of course, all of that is changing. But definitely, when we were young, that was the case. But with computer programming, even back then, before, you know, the Internet had really taken over and things like that, when we were very young, there was this notion that, like, one guy... Like, you'd play Pitfall for the Atari, and it was like made by this guy. Like, that guy made that whole experience. And you'd go to the movie theater, and there'd be a cast of hundreds of people to create a movie. So, this idea that you have just this incredible power is sort of what got me into programming.
Yeah. I mean, he worked on Wyrm Online, which is sort of an MMO that was kind of trying to be like Minecraft. So, it was an evolutionary process. But still, I mean, he created Minecraft himself from scratch. I think his online pseudonym is Notch. Okay, yeah, that's right. I forgot his real name. But I think his real... Marcus Person. That's what it is, yep. But yeah, so even today, one person can make a gigantic impact on the world with programming.
Yeah, so I guess a little similar. My family, even my immediate family, my father does programming. So, that always is kind of there. People always, you know, ask me, and I share this story a lot, and I'll share it in a minute, about kind of how my dad was at programming, because a lot of people know my dad and know that he programs and writes code and stuff, and I'm kind of familiar with that. So, they ask me how that was growing up with that. And I mean, it's hard to say. It's like one of those things you don't know growing up another way how you would have been or if you would have been different. But, you know, I feel like through his doing or through my mom or through some combination of just family that you always had this thing about solving problems. It wasn't just, you know, the answer to something was never just told to you. It was always, you know, kind of asked as a form of a question. You kind of had to try to figure out yourself. And so, that kind of solving puzzle aspect always led me to how do I get things done? How do I find answers? And, you know, that eventually played well with the first few forays into computer programming. Similar, you know, writing some little basic thing that, you know, just followed the tutorial and, you know, oh, look, it's printing out my name or it's converting a temperature or whatever. And it was just kind of cool to see it solving a problem to figure out how do I express this thing in my head for the computer to do. And even today when I explain to other people about programming, a lot of people just look at me with the glossy-eyed stare like I have no idea what you're talking about. But, you know, this how do you tell a computer to do something? You know, even something basic that humans can do really simply like, you know, one of the first things you learn in, you know, classic academia about programming is sorting. And a human has like all these different ways they might sort something. But then if you say, well, how would you codify that? How would you write down a set of rules or steps, algorithm, to use a word, you know, that says how you do that sorting of, you know, those playing cards? And they kind of have to think about it. And, you know, a lot of them, you know, have trouble even figuring that out. It's like, yeah, try doing that for like all sorts of problems all day long, you know? And to me, that's exciting. It's like, oh, this is fun. And you work really hard trying to solve some little bit of code and then, you know, just get that excellent feeling of accomplishment, even if nobody else appreciates what you just did. And so once I got to that point, I was hooked. And getting there was an interesting task. And I guess it was just influenced by the fact that even my grandfather did write code at one point and worked on some software stuff that was, you know, pretty early on. And so I guess kind of unique being as fairly young as I am or and being a third-generation programmer, I guess that's a pretty good story. Not a lot of people have grandfathers who program computers.
Yeah, I feel like a lot of people, you know, a big part of problem solving is being able to, I guess to use your word, to codify intuition. You know, I was playing Professor Layton with my wife the other day. Oh, yeah. Yeah. And it was one of those problems where it's like, you know, your brother is twice your age and your cousin is six years older than you and half your brother's age or something like that, you know, and somehow like those, there's like a set of constraints that like, and then it's like, what's your age? And the constraints are such that like your age has to be some exact number. Right. And so I'm sitting here like writing formula and trying to, you know, figure it out and solving a system of equations. And my wife is just trying different numbers, like five. Oh, five didn't really work out. Five, you know, if I have five, then my brother's age is negative three. So let's try seven, you know. Yeah. And, and by the time I was done, she had already like solved it and moved on to the next question. But, but when I was done, I know, but when I was done, I had solutions for, I mean, I had the solution, but in a, in a way that, you know, like a computer could have solved. So in other words, I could have written another program. You could have solved it in
Yeah, it definitely is fun. And, you know, like you said, the sense of creating something, even if it's not something physical ish, like a game or art or music or whatever, but, you know, even just creating programs that run on the computer is, is kind of fun and exciting and building them up. It's kind of like Legos in a way, you know, you have all these small pieces and you build them into bigger
And then also being able to think when you see stuff in movies that are, you know, 3D graphics or video games or, you know, jumbotrons, and you kind of know what goes into making those work. Because so much of today's society is culture. I don't know what you say, but so much of what we interact with every day has computers in it or has some sort of code running to help either generate it or run it or control it. And so kind of knowing how that works is very powerful.
Yeah. And I mean, my opinion might be biased, but I've always been under the presumption that everyone should know how to program. Like even, I mean, not a specific language—it doesn't really matter—but just, you know, a program is basically a set of instructions with certain basic structures like control loops and if decision statements, and just the idea of being able to describe what you want to do, regardless of whether you could be whatever, like a janitor or it doesn't matter, but being able to describe what you do and how to do it in a way that's programmatic, I think is important to any discipline.
Yeah. Yeah. Yeah. So, um, let's talk a little bit about our first kind of, you know, early experience. We talked all about basic, but, uh, I know like when I, I first started, you know, I, I did a little bit of basic stuff, but I never really got past, you know, just kind of messing around. Um, but then I, I picked up a book on, on C programming, uh, and started there and started to write some code, you know, just kind of entering the examples there. And I remember kind of trying to work through the book and, you know, not at that point, I realized that the, it was kind of looking back. The first time I really started to click is taking the examples, putting them in, but then not just moving on or just reading the examples, but actually typing in the examples. And then like changing it. So I had, you know, for instance, like a program that converted Celsius to Fahrenheit. So I said, okay, well, let me make one that goes the other way, you know, Fahrenheit to Celsius. Cause it should be almost the same. Right. You know? So, so making little tweaks like that and making it my own. And that really led to understanding. And so that's actually kind of where that funny story I was talking about earlier came from. So I was writing, you know, this program to do temperature conversion. So I was pretty excited that I had, you know, modified this example, you know, it's pretty dinky. I was pretty young. So I, you know, got my dad to come in and I'm like, oh, Hey, look, look what I wrote. I wrote this thing. It converts, you know, Fahrenheit to Celsius. So I think he, you know, it was like, oh, that's, that's interesting. Let me see. And so he types in, you know, some, some temperature and it converts and he's like, oh, okay. Then the very next thing he does is he, you know, goes negative nine. He just keeps typing nines for a while. And then he just entered and it crashed. And he
Yeah, I know. I wrote a lot of kind of like short stories. Okay? And, uh, I read a lot and I wanted to make a choose-your-own adventure. I've actually made a few choose-your-own adventures on a typewriter. And, um, that's pretty hardcore, dude. It was, it was really hard. You know, I mean, the worst is the typewriter—you make a mistake. You have to just kind of keep going. And I decided, you know, I want to make a choose-your-own adventure on the computer. So I started off in this program, is The Print Shop. I don't know if you ever use that. I mean, like reading cards and stuff. Yeah. So I somehow—oh, I made like a set of—I used The Print Shop and made like a set of greeting cards, and it was like, go to page three or whatever. It was pretty epic. I still have it. Actually. I was going through my stuff and I found it. It's called—it was called—The Race That Never Ends. And it was like eight pages. Um, I think I've seen this
It was so funny because it was like, do you want to go left or right? You know? And it was like, do you want to go left down the dirt road or right on the ocean? And if you go left, you die. But like, there's no context. It's like, you just died. So you shouldn't have picked the dirt road, dummy. So did you get inspired
So kind of a weird story. My parents did a lot of like shopping and like garage sale, flea market, that kind of thing. Like that was a common family outing. And this one flea market, this guy had The Fighting Fantasy. Have you ever heard of these books? No. They're from you. Oh, okay. There you go. They're basically, and there's an iPhone app for them, by the way. Now someone's converted them to like an iPhone app, which is pretty cool. It's pretty epic. But it's basically like 400 sections, and each section can be from a page to, you know, even a few lines. So a 400-section choose-your-own adventure book, like this massive choose-your-own adventure book. And so that's really what got me started into trying to write my own stories and my own choose-your-own adventure books after reading tons of those. I bought the whole set of like 36 or something books for like $10. And so that really was started the whole thing. And then I moved on to basic, writing different stories and that. And then from there, it just kind of went on to writing games and from games to programming, you know, websites. And then it just kind of one thing led to another.
Yeah. I mean, I guess that's a point too. I did a little bit, you know, I guess it was around the same time or a little bit after, when web browsers were first picking up and, you know, not that they were just being invented, but, you know, I guess just becoming mainstream as it were. But that started doing, writing HTML, which I guess we should point out is a little different than programming. It's more designing and laying out a page. If you do JavaScript, you get into programming, but doing actual HTML is slightly different.
Yeah. I mean, I just—there's just so many; some of my best memories are just geeking out to produce something like really crazy. One time I wrote like a little 3D engine in Flash, just using sprites. And then I made this website where when you went to it, based on the time of day, it would show you like this scene. So it was like this—there's like trees and like a lake and some rocks, and the sun would kind of go over the scene. Wow. And so if you came in the evening, the sun, like the wavelength, like I just made the wavelength, the function of time or whatever on the light that was being emitted from the sun. So it'd look like it was the evening, and at night it'd be just pitch black. And it's just—just some of the times like you create, you can create something just like totally crazy. And this was like Flash was fairly new; ActionScript, like I think one or two or something like that. So it's like, that's something that like nobody else had ever seen before. You know, that's pretty nerdy.
Yeah. So a big part of it is just, yeah, being able to make something completely crazy, and the technology is evolving so rapidly that any of you guys out there can be on the cutting edge and could be, you know, maybe as we talk about Objective-C, could be using Objective-C to make something on the iPhone that nobody's ever seen before.
So let me ask you a question. Sure. Do you think that it's more important to pick a language that people say are good to know or good foundation languages? You know, like people would say maybe Java or C++, or if you have some task you want to do, learn the language that does that task. Which one would you recommend for a beginner?
I think honestly, it depends on what the task is. So, I mean, clearly, if the task is an iPhone app, it's going to be Objective-C. But, you know, if the task is a website, well, then maybe you should do that in Python or PHP. Or if the task is, you know, a desktop application, then maybe you should try doing that in Java.
I think that the biggest thing for someone who's just starting out, I would say, is to pick, you know, pick a project. Like, once you know what you want to do, then just you can use these podcasts or you can use any of the resources out on the internet to try and find the language that suits your needs. Because in the end, you know, not to be blunt, too blunt, but in the end, your first programs are going to suck. And they're not, they're almost certainly going to misuse the language. So, you know, you might be writing in Python, but in a way that doesn't, you know, accurately reflect the strengths of Python. Or this, and this is, this happened to all of us. You know, I wrote a, I wrote this beat-em-up, kind of like this Double Dragon beat-em-up game MMO that you could play in a Java applet. And it was terrible. I just, I used all these different multi-processing libraries that I didn't have to do any of that for. And just the whole thing was, it's that the architecture is a nightmare. But I learned a lot. And I think that those lessons can be gained in really any language. So, if your project is web-based, you know, if it's an applet, use Java or Flash. You know, if it's a website, you can use Python or PHP. If it's the iPhone, you use Objective-C. Just pick the language that best reflects what you want to do.
Yeah, I'd agree. And, you know, I definitely, I think you hit upon a good point I wanted to call it specifically there, which is that you'll mess stuff up, and that'll drive you learning new parts of the language. So, you'll go through some tutorial, and it'll be really boring. Like, I don't, you know, I just want to get started doing my thing. And you'll start doing it, and you'll, you know, for instance, you only know how to do while loops, and you don't know how to do for loops yet or something. And so, you'll, it'll be terrible, and you'll eventually get frustrated, go, there's got to be an easier way, and you'll go look, I'll be like, oh, that's it, I just do that. And that'll lead you how to learn, you know, and that's a valid way to do it is, you know, pick something you're trying to do, and then learn kind of ad hoc as you need the skill to do something that you're not able to do with the ones you currently have.
Yeah, and definitely, you know, unless, unless you're doing this with, you know, a core group of people, and you're looking to make a profit, or it's your job, or something like that. But if you're doing it as a hobby, definitely reach out to the open source community. Post your project on Google Code or SourceForge. You know, get, get some people interested, or at least if you don't want to get people interested, make your project public. So people, you know, who are interested can contribute. And that's one way to learn a tremendous amount. My first project, actually, that went, that I, that I open sourced, was JISOman, this JavaScript isometric engine. And it's completely obsolete now. But at the time, it was pretty cool because there wasn't any OpenGL rendering in Java or anything like that. So I got a lot of help from different people who really taught me how what I was doing was terrible. And taking their advice made me a much, much better programmer. So definitely reach out to the community. There's tons of people just like you love to program. And, you know, anytime you make something public, you're almost guaranteed that somebody's going to look at it. And definitely stick with it.
Nukem Forever. Okay. So you play that game and you're like, oh, I want to make that. Okay, well, you got to understand, you know, that takes a team of people in the case of Duke Nukem Forever, like decades. But in the case of another video game, like years, you know, and millions of dollars to make that. And that's not to say you can't make something fun. But it's to say that you got to break that down and start learning what you don't know. I mean, that's half the battle is, you know, figuring out what it is that you don't know so that you can go learn it. And people say, I want to jump into making, you know, an iPhone game. Well, that's great, you know, and that's a good inspiration. And that'll keep you motivated to learn what you need. But you got to start. Don't think the first thing you're going to make is, you know, some crazy 3D, you know, phone game. You know, first start with make tic-tac-toe. And it sounds stupid, but figure out how to do it because it'll teach you a lot. It'll teach you how to interact with the screen. It'll teach you how to detect an end game like the game has ended, how to start it over, how to have a game loop. I mean, you'll learn tons of stuff just writing tic-tac-toe. Say, okay, I'm done with that. All right, write hangman. Write snake, the, you know, little snake that moves around the screen and eats apples or whatever.
Yeah, that's definitely true. And I think that, you know, if you go for something huge like that and fail, you won't really have anything to show for it. If you want to go for something big, like some big 3D platformer like Duke Nukem Forever on the iPhone, you can break it down into modules. And make sure that, this is true whether you're a novice or an experienced programmer, make sure that each piece is measurable. You know, like start off with a little ASCII art top-down thing where you're just running around picking up ammo or something. Like you're like a little at sign running around some world of periods like clicking, you know, collecting equal signs, you know. Like start off there and work your way up to the game and make sure that you're constantly rewarding yourself. I feel like the biggest, you know, the projects that I completely failed on were ones where I didn't have these intermediate goals. I had this end picture in mind, but I didn't have the steps to get there and I didn't have products to show at each level. You know, if you can show the at sign running around collecting equals glyphs or whatever, you know, that's something that somebody else on the internet can say, you know, this guy, at least he's doing something and he's on a path forward. And I want to join this project, you know. Or even just to yourself, you know, you could show your friends and be like, look, I'm going to step towards making something awesome.
And I think you can get involved in big projects. But I think you got to get in with other people because they'll help teach you, motivate you, show you what needs to be done. And so I know there are some people who definitely learn programming by getting involved in open source projects and starting off by, you know, going through and reading the bugs and, you know, trying to fathom how to commit some of the bug fixes or even just writing documentation, which forced them to go read the code and think about things and get involved. And then slowly but surely they began to understand more and more about what was going on to the point where they could write their own stuff. And that's another way to approach it. I think that's probably a little more unusual. I know a few people who have done that, but I think more typical is people kind of starting with small things and building up.
Yeah, because usually, you know, it has to come from you. So, I mean, if, you know, typically people want to produce something, that's why they get into, you know, programming and open source stuff. It's sort of like what, 'How can open source make me do something awesome?' Like, I don't know how 3D programming works, but here's this open source 3D engine that does a lot of that heavy lifting. But, yeah, I mean, I have seen cases where people have started off just, you know, 'I want to contribute to something and start reading documentation and getting familiar on how the technology works.' So, yeah, there have been both cases.
So, hopefully we haven't lost some of our more interested viewers or they've skipped ahead to this point. But that's okay. You know, I think we've got to understand there are people of all levels out there. And maybe some people could relate to ours or at least laugh at us for how silly we sound. But my tool of the bye week is something I actually just found called Flow Diagram or ASCII Flow Diagram. Sorry. And on the tune of making your own first-person overhead shooter, or I guess that's third-person overhead shooter ASCII art game that Jason's brainstorming here on the show, which I fully expect to see by next show because it sounds pretty awesome. Sorry. This tool is a web tool that allows you to make flow diagrams in ASCII art. So, you can kind of draw boxes and arrows and lines and, you know, show the flow of a program or of, I guess, anything that wants to show data flow or any other kind of flow. And then, you know, you can copy. It does it all text-based, ASCII-based, you know, rows and columns. Then you can copy and paste that into pretty much anything—at that point, into your code, into comments, into, like, a mailing list post or, you know, just anywhere. As opposed to trying to make a picture and draw something fancy and complicated. And the nice thing about doing ASCII art is it's really easy to edit, right? You just go add a few more dashes or pipes here or there and change it how you need.
So, I thought that was pretty cool. There are so many times when the best documentation for something is the source code. And so, you know, let's say you used a bunch of training data and came up with, like, let's say you're making a breathalyzer, right? And you came up with a bunch of training data. You got a bunch of your friends intoxicated and then... Oh, I thought you meant
Oh, yeah. So, you get people to not brush their teeth and then breathe into this breath-sensing device. And it spits out a bunch of numbers. And, you know, using the different numbers that spit out in your friends' testing, you know, mouths, you develop testing data and come up with some equations. And you did all this stuff behind the scenes on your TI calculator or whatever. And then you came up with the answer. It's 42. If you take the output of the breathalyzer and you multiply it by 42, you get the one or a zero. Yeah, that's right. A stinkiness between 1 and 10. So, but you did all this work behind the scenes that nobody knows about. They just see times 42 and they don't really know what's that code doing there. It doesn't make any sense. So, you would love to sort of give them a graph or draw them a picture or give them a little flow chart of, you know, what you did behind the scenes and just embed it into the code. And that app lets you do that.
What about you? What's your tool of the bi-week? My tool of the bi-week is actually Java, which is very similar. Is that French Java? That'd be pretty awesome. Oh, .de. Is that German then? Yeah. So, this would be German. It's a German website. And Java V stands for Java ASCII Versatile Editor. And as you can see from the website, it's basically an MS Paint, but for ASCII art. So, you can sort of like use your mouse and draw like cool lines and shapes and draw bubbles. And it lets you sort of draw different types of, you know, borders and embed your text into those. It can also do image to ASCII art. Nice. And, you know, yeah, you can give it like a JPEG or something and it'll turn it into ASCII art. And so, this is the same kind of thing where like you can wrap a comment block. You can, let's say, for example, you have a bunch of graphs. You can export the graphs to like a PNG from Excel or from OpenOffice. You can import that PNG into ASCII art using Java V. And then you can copy paste that ASCII art chart into your code. I am totally going to do this to all of my programs at work now. Yeah. I'm just
Now, let's just go ahead and address the 3,000-pound elephant-gorilla hybrid in the room. Okay. Which is the fact that Objective-C is all the new rage because of basically one slash two devices, which are the iPhone and now the iPad. So, Apple has kind of a history, which I guess we'll talk about in a few minutes, of using Objective-C. And because of the increasing popularity of iOS devices, I guess as they're known, and Objective-C being pretty much the de facto standard of what you have to program in. And because of that, they've had this kind of resurgence of popularity that they probably didn't even ever have before. And so, everybody's wanting to learn Objective-C because it is the enabling technology to be able to you to write the next great Angry Birds. That's right. Yeah. So, do you know anything about the history of Objective-C? So, the way I understand it is that I guess it was originally written as a preprocessor for C, similar to which we haven't talked yet about C++. But C++ has a similar background where originally people were using C and some other languages like Smalltalk started to come out and introduce these object-oriented concepts. And Objective-C was one effort to try to give C object-oriented support. And they did that by instead of writing a whole new language compiler, as it were, they wrote kind of an extension of the language, which did become a whole new language, that compiled not to machine code or assembly like we talked about last time, but C code. And then you could use your normal existing, in theory, really good C compilers to generate machine code. And that was adopted by Steve Jobs' small company that he founded when he first left Apple, which was Next. Right? Yeah. And so, there's a lot of stuff you'll see in even the notation for Objective-C, which is like NSObject, NSString, which is for next step string, next step object, I believe.
So, this is sort of a point of contention, right? Because a lot of people would say the reason why it exists is because it's what you have to write in to program for the iPhone. But it does have some strengths that, you know, sort of separate Objective-C from a lot of other languages. Many of them are sort of more geared on sort of enterprise writing, you know, safer code and increasing productivity. So, one is that Objective-C is both dynamically and statically typed. So, basically, you know, just to cover that again: if you do in C, if you do int i equals 3, you can't just say j equals 4. You have to say int j. That means it's statically typed. So, at compile time, you're going in and typing in what the type is of every variable in the system. This is slow, but it prevents you from having these unforeseen side effects. I mean, imagine if you had a round function that rounded a number and someone passed in the word 'tree.' Yeah, your round function, it either has to be smart enough to handle what, you know, to do something when you give it 'tree,' or your whole program is going to crash. So, a statically typed language like C is safer in the sense that you know what's coming in and going out of all of your functions, and so you don't have to handle all these weird corner cases, and that prevents errors at runtime. On the contrast, dynamically typed languages like Python, they don't have a type. So, you just say j equals 4, and then your very next line could be j equals 'apple,' and it handles it just fine. It's just behind the scenes, it's going and figuring out what j is at runtime and changing that. So, Objective-C kind of has the best of both worlds because you can do int i equals 3, and the compiler will know that that's an integer, and it should stay an integer. But you can also use this special term id. So, you could say id i equals 3, and what that tells the compiler is 'i can be anything.' Like, right now it's 3, but later on it could be Apple, it could be a database, a pointer to a database, it could be anything. And so, it gives you the strength—you know, when you need to be flexible, like you're writing a user interface and someone might be typing in strings or numbers or whatever, you could be flexible. And when you are doing some kind of numerical simulation where everything has to be afloat, and you know, you have certain expectations, or you're doing something that's mission-critical, you know, you can have that security as well.
supports object-oriented, and it kind of does it in a way that's different than C++, which is why, you know, both C++ and Objective-C kind of existed and coexist—is the fact that it has a different model for doing, like, the calling of functions with classes and stuff. And maybe you can explain this a little bit better, but I guess it's based on messaging as opposed to function calling. So if you have a class in C++, and you want to say, you know, 'thisClass.foo,' and pass it in the number three, then you're calling a function of that class. You're actually going and invoking some code that's, you know, done by a function pointer, what it boils down to. Versus Objective-C, it's a message-passing thing. So if you did—what's the equivalent syntax in Objective-C for that? You're not calling a function; you're sending a message to that instance of the object that has, 'Hey, I want to have a message of type foo with the contents of three.' And it's up to that class to figure out how to handle that message.
Right. So, you know, that all happens sort of under the scenes. You know, on the surface level, it is very similar to C++ where you're calling functions. But yeah, under the scenes, there is a message-passing interface. And so basically what that means is the parameters and actually the function itself that you want to call get packaged up into this blob and then sent over to that class. And so under the hood, what that means is it's sort of what enables the dynamic typing is this idea of being able to do message-passing. But, you know, anything that we've talked about with respect to object-oriented in the past still holds here. So, for example, you can have inheritance. You can have polymorphism. You know, you could have, going back to my canonical example, you know, your Area interface. Or I guess a Shape interface with a getArea function that's virtual or returns nothing. And then as you implement that Shape, you can have a Square where the area function returns side times side. And you can have a Triangle where the area function returns, you know, one-half base times height. And at runtime, when you call getArea, you might not even know if it's a Triangle or a Square because it was created minutes ago and it's been typecasted down to a Shape. You might have no idea as the programmer what that is. But the compiler and the virtual machine know that that's a Square or Triangle and it does the appropriate thing.
Yeah, so, but I guess like you pointed out, I mean, that's not really all that applicable to, you know, somebody who's trying to just write in the code. It's kind of handled under the hood, but it does serve to kind of explain to some of the more advanced listeners, you know, what is the difference? Like, why is Objective-C still around? And it isn't just used for iOS. I mean, it's also used on OSX and the Coco framework. Am I saying that right? Yeah, that's right. So they use it there for doing a lot of the programming of apps on OSX. So I guess applications or just programs as opposed to apps. I think it's still apps.
Yeah, now it seems to be specific to mobile, mobile apps. Yeah. And, you know, another benefit of Objective-C is it has a really smooth interface. So basically, let's say you want to use some C++, like the Bullet physics engine in some Objective-C app you're writing. Now this, for one thing, I should preface this by saying that this applies loosely in the iPhone and iOS world, but this is mainly for people coding on Mac OSX. You can still do some of this on the iPhone, but some of it is very limited. And that's mainly an artifact of just the iPhone trying to restrict you from, you know, coming up with exploits and things like that. It's nothing, you know, inherent to the design or something. It's a political decision. But with that said, you can integrate Objective-C and C or C++ very easily. Now basically, you create a C or C++ interface in your Objective-C code. And it just sort of mentions what classes there are, what functions there are that you can call and things like that. And the API is really straightforward. So if you have, let's say you have this monolithic C or C++ application and you want to write an OSX GUI for it, that would be very easy in Objective-C because it ties in so well to both of those languages.
Yeah, I did some stuff where I wrote some iPhone apps. And it's, you know, it's kind of hard because, like we were talking about before, sometimes the best way to learn programming is with really simple things. And you kind of have to do a lot before you even get the, you know, first program up and running on like an iPhone or, you know, I'm sure it's pretty similar on OSX. Or even, you know, just the most basic C program is still, you know, probably like 10 or 11 lines of stuff you have to type versus just a simple one line, you know, print in Python. So that's kind of a little bit of a, oh man, this is scary. And you have to write a bunch of lines. You kind of don't even know what they mean initially. And the same thing is true in the iPhone, that there's kind of stuff you have to do and set up and work with to even, you know, get something that you can just draw to or write text to on the iPhone. But I kind of having roots in C and, you know, you know, maybe I think this would be my advice to people trying to learn Objective-C programming to do stuff on the iPhone would be kind of learn C first because it's simpler in a
mean, there's advanced parts to it that are really complicated, but you don't have to worry about the iPhone-specific parts. Not only will you have a lot more resources to draw on as far as learning C, you'll have something that's very applicable to a lot more than just the iPhone. And then my experience of programming the iPhone was that I was in there, I would do these kind of things I had to do, this little song and dance to get everything set up the way it needed to be to get the iPhone happy. And then I would pretty much just write C code. So, you know, they have all these NS objects you pass around and I would just figure out how do I get a pointer to the data, the array, and then I would just, you know, do regular pointer stuff and see and, you know, just do all my old stuff that I knew, have done for years and am very comfortable with. And I had no problem doing that. In a lot of ways, that code actually ended up being a little bit faster than doing it the way that kind of they recommend to do it because it involved less overhead. And so it worked out well for my application at least. Now I can't say that, you know, universally that'll be the case, but I definitely didn't feel hampered only having a strong C background and not really knowing what I was doing in Objective-C. I was still very much able to write a fully functioning iPhone app that did everything I needed to do and, you know, was well-received.
Yeah, I actually went through something similar where I made a little board game. I guess a board computer game? I don't know. I made a board game, but, you know, not having the facilities to print large amounts of stock paper, I created an emulated version on the computer. I wanted it to run on the iPhone. And so I was taking this program that was actually written in Python and converting it over to Objective-C. And it converted over pretty well. So I think that, yeah, definitely, I think that I wouldn't pick Objective-C as my first language to learn either. I would pick a simpler language like C or like Python. Something very much like
Yeah, I mean, I think that when I read Objective-C, and I don't know if it's because I started in C, but everything seems a little backwards. You know, like, it seems like, I think things are out of order in certain areas of it. Maybe the way that there's, the things are nested. But I always feel like I'm reading things backwards. I think what it is, is, yeah, you put the brackets, and then you put like the object and the function name inside the brackets, as opposed to like object parentheses and then, or function name parentheses. Yeah, so that is a little bit, it's a little bit getting used to. But one thing that should be mentioned is that the Xcode, which is the editor IDE you'll almost certainly be using if you're doing iPhone development, has a really nice slick UI for, you know, creating the UI for your app. So, kind of like how Microsoft MFC used to be, although MFC is the devil, but that's another story. they have this like nice, Mac, actually, Apple did a great job, they have this resource builder where you can go in, drag buttons, you know, kind of get an idea, mock up how your app is going to look, and then you can double click on the buttons to create little stub functions and things like that. So, you know, like Patrick said, if you get a foundation in C or Python or any other procedural language, Java, you could take that to Objective-C and be able to do whatever you need to do on the iPhone there.
Yeah, I'd agree with that. And I mean, if you really want to make an iPhone app and that's really what motivates you, by all means, please go ahead and learn Objective-C. There are becoming more and more resources out there to do it. And the stuff you learn there will, just like we're saying, other stuff will apply to that. What you learn in Objective-C will apply to other things for sure. So if that's what motivates you, I think it's just a word of caution: be careful not to get overwhelmed by the kind of graphical nature of this iOS device versus kind of just starting with simple text-based stuff. Yeah, that's true. Definitely. Because graphics does add—it's fun because it's really enjoyable to be able to see kind of animations and visually what's going on. That's a really fun thing to do. But it does add a whole layer of complexity that is hard, especially for a beginner, to figure out exactly what's going on and all you have to do. Yeah.
Maybe we'll take a little bit of time here and talk about asynchronous because a lot of anything you're going to do with the user interface, and if you're doing stuff on the iPhone or the, you know, OSX or the iPad, you're almost certainly going to have to deal with the user interface. As Patrick said, you're not really going to be writing console apps for the iPhone before.
We do that. Let me interject quickly: we've been talking about OSX and about the iPhone, but GCC actually does support Objective-C as well, so you can write text-based command line programs that way. I don't really know of a lot of people doing that. The only people I know writing Objective-C are doing it for OSX or Cocoa, or, you know, iOS, but there are a couple also the LLVM Clang compiler will do Objective-C, so you do have options on other platforms for doing that, but it's mostly supported by Apple and their products, so that's where you're going to find—I would dare to even say probably 99% of Objective-C development.
Yeah, for sure. Okay, sorry. So, asynchronous. So, asynchronicity is something you have to worry about whenever you have a user interface. And basically, you might have wondered this: I write this program, and somewhere along the line it has a set of instructions, and then when that instruction finishes, my program ends. So, how can I write something like a user interface where it's kind of waiting on the user? So, you might think of—well, I'll just do kind of like a while true around my entire program, and this while true will just continue to loop and sort of wait for the user to do something. And when the user does something, then there'll be some kind of action. And this is basically the heart of asynchronous programming. So, what's going on here is basically you have sort of a while true—so you have some loop that's constantly running, but then within that loop it sort of asks a series of questions. And so, these questions are getting asked, you know, hundreds, maybe thousands of times a second, maybe even more than that. So, the questions might be: Has the user clicked on a button? Has the user moved the mouse? Has the user done anything? Maybe there's an idle function, you know, has a second of time gone by. There's just a series of questions. Now, all this is going on behind the scenes. You don't see any of this code. But if the user has, let's say, moved the mouse, then look for any, you know, 'mouse moved' functions in the code. And by 'look for it,' what I mean is actually you tell the operating system—or in this case, you tell the application layer, called registering. Yep. So, you might have some function where every time the user moves the mouse, it draws like a cute mouse trail or something like that. In that case, you're going to register this 'mouse moved' function and you're going to bind a 'mouse moved' callback to one of your functions. So, when the mouse is moved, then I'm going to, you know, add these little mouse trail pointers, these little graphics. So, writing asynchronous code, if you look at the code, what you'll see is some main function that just creates all these callbacks. It just instantiates all these callbacks. Like, you might have like 'main,' and then, you know, bind 'mouse moved' to my trail function; bind user clicked on this button to my submit function—all these binds. And then just a go. And what's going on behind the scenes when you call that go is there's just a loop, and it's just going through and waiting for the user to do something and then reacting to it. So, this is something that as programmers, you know, if you're used to writing sort of recipe kind of programs like C or C++, asynchronous programming can seem very scary. But it's something that you just kind of got to get familiar with. And once you start doing it, you'll quickly get the hang of it.
The other thing that's confusing there that is worth pointing out is that if you kind of think about—so, asynchronous, you know, just means not everything being synchronized and in lockstep. So, if you read a normal C program, it's everything operates one after the other, and you can follow a line of execution straight through your program. Or if you've got a loop, you know, you can follow it through each cycle of the loop and then to the end of the program or whatever it means. But it's kind of everything one right after the other. When asynchronous comes in, you don't know which parts of your code are going to operate in which order, which is because you bind these functions to certain events, and you don't know which one might get called before another, and they can be called while you're off doing something else. And so, that introduces a kind of confusing thing to your code where you can't just read it like a book. And the other thing is that you have to be careful because what happens is there's a thread of execution that is, you know, responsible for drawing all the stuff on your screen. And so, if somebody clicks a button and in that button event handler, you try to do some complex math—like you try to solve the meaning of the universe—what's going to happen is during that time, the user is not going to be able to get a response out of your GUI. The buttons won't highlight when you move over them. They won't be able to resize a window. And if you've ever seen this happen in a program, that's typically what the problem is: something's gotten stuck somewhere doing a bunch of processing it wasn't supposed to do in that thread, and now you're not getting a response out of the GUI. So the right way to handle that is in the message handler—well, handle it in the handler is to push that work to another thread or to some other something that's going to do that processing that's going to take longer so that that function can return and the GUI can continue to be updated so that the user maintains responsiveness.
Right. So one thing I probably should mention, in addition to the while loop that I talked about before where it's checking to see did the user click a button, did the user move the mouse, etc., there's also what Patrick alluded to: drawing the screen. And as he's saying, if you interrupt that while loop—if you halt that while loop by, you know, solving the meaning of the universe—it can't get to 'draw the screen.' Draw the screen, you know, did the user move the mouse? Draw the screen, draw the new mouse. It can't do any of that. And so a lot of asynchronous programs will—if you have a threading library, they'll say, 'Okay, you clicked on this button to submit your information to the website. While I'm contacting the website and submitting the information,' etc., let's push that off onto a separate thread so that this main thread can continue running, or let's break this up into pieces. So, if you click on, you know, create graph, and it's going to take all this data that you've put into your phone and it's kind of like Excel; it's going to, you know, fit a curve to your data and display it on screen for you to do whatever with. It might break that up into pieces, and it might say, 'You know, draw the curve,' and then the next time it goes through the loop, you know, find some data. The next time it goes through the loop, fit the data to the curve.' And so every time you're going through the loop, you're checking: did the user move the mouse? You're drawing the screen, and then you're doing just a little bit of work. And so the GUI is actually being halted by such a tiny amount that nobody can notice. So these are often the core features you see in asynchronous programming.
Yeah, those are very applicable, and I think a lot of people are out there doing that. And you know, we should be careful that when talking about learning to program—which I guess we kind of got off of when we were on Objective-C—but that, you know, a lot of people will kind of fuss at you about your choice. Oh, I can't believe you learned BASIC, or I can't believe you learned PHP. That's not a real programming language. Sometimes I find that those people tend to be the people that don't know what they're doing. And so they're just saying that because they're ignorant and they're threatened, or, you know, whatever it is. It's kind of like the people that make fun of you in school, you know.
I mean, it's so... So never be embarrassed by your choice. It's so interesting how, you know, often, like you're saying, the people who are the most despondent are the people who, it's typically that they just don't, they cannot see the benefit of whatever they're, you know, making fun of. But the fact is that all of these languages that we've talked about until now and likely all the ones we're going to talk about unless we really start running out of languages are very popular and they have an incredible amount of utility. So it's definitely worth learning any of them—picking the right tool for the right job. That's right. And if you're writing iOS programs, that's Objective-C. That's definitely the right tool, for sure. So we talked about a lot of the strengths, but maybe we should cover some of the weaknesses of Objective-C.
We've kind of been hinting around the first one that I have, which is that outside of these uses, nobody really uses Objective-C for anything. In fact, if I understand correctly, Apple kind of released the second version of Objective-C language or the Objective-C compiler, or however you want to phrase it, kind of the upgrade. And that's not even supported by anybody else. Like GCC and Objective-C don't support those language features because there's just not enough people interested in using this outside of the OSX, iOS environment.
Yeah, that's right. Yeah, the low user base is by far the biggest weakness. And, you know, now I think that some people have figured out ways to write, you know, apps for the iPhone without using Objective-C. I've seen this Corona SDK. It's a development kit for the iPhone where you can write in, I think, C++. And I don't know what they're doing behind the scenes. Yeah, I
thought there was something. I'm not that fresh on it. I wasn't prepared for that topic. But I know there was a while where they had something in the license agreement that basically said you had to write in Objective-C with Apple's, you know, deemed appropriate development environments. Right? And you weren't allowed to write in anything else. And I think people kind of fussed and I think they backed off of it a little. But I think in general that's still their stance is that you're supposed to always run Objective-C or write in Objective-C.
Yeah. Yeah, I think that, you know, it's still 99% of the code on the iPhone, I would say, is Objective-C. But yeah, there are ways. I think Boo is a dialect of Python which can be used on the iPhone in some capacity. But yeah, I mean, in the end, if you're writing for the iPhone, really the best advice is to just suck it up and learn Objective-C. We did for writing our iPhone apps. One of the other weaknesses I would say about Objective-C is that its syntax is, I feel like it's very verbose and complicated. But maybe that's because we're colored by being
Well, I feel like that, but I feel like objectively what I can say is that, you know, going back to the strengths of Objective-C—being dynamically and statically typed, having the, oh, one thing we didn't really talk about was the different property directives. It's very easy to create properties in Objective-C. But just being able to get that power and, you know, the reference counting, things like that, comes at the cost of the syntax, I feel. You know, I just, I feel like I could be objective and say that a language like C, which doesn't have all the bells and whistles, has a much simpler to read syntax. But, you know, again, a lot of that is because everything... hang
Well, have you seen some of the C code? I've seen? Oh, yeah, C code can be terrible. I guess any code can be. But maybe, maybe this is a more fair statement: If you're writing for the iPhone, you will almost certainly be doing asynchronous programming. And so, you know, we really—there aren't really any canonical hello world. You know, there isn't a large code base of command line, you know, straightforward code written in Objective-C for you to get your feet wet. So chances are if you're going to learn the language, you're going to take on, you know, an asynchronous iPhone app with many different function calls going all over the place. And I think that's enough to make any language complicated.
Yeah, and you know, this is really endemic to a lot of these sort of these sort of UIs. I mean, remember MFC and what a disaster that was? Like, it was like application, layer, integer, pointer, like all of those words strung together just to name a variable for a freaking button on a UI. And so MFC had this problem. You know, Java, even Java has this problem, like new File Reader and then inside of that new Buffered Reader, new I/O Reader. So anytime you start dealing with GUI user experience kind of things, it's going to become very verbose. And so I think it's just the fact that Objective-C is only used for those kind of applications means that you're going to be reading a lot of complicated code.
Well, to close this up since we're drifting a little, I want to thank all of our listeners. Thank you for those who have written us some emails and written us some good reviews in iTunes. Continue to do that, please. That helps us, you know, feel appreciated for doing this work, and we enjoy doing it, but it helps to know that it's worth it because people are out there listening to it, and it helps us get even more listeners because it rises us in the ranks. So other people can see us. So I encourage you please not. It's nice to click the five star review and four stars reviews. Please five stars. But it's even nicer if you can write a little message and tell us what you like about it. And then if you have something you don't like so much, just write the good things in the review and then send us an email or post it on the blog. You know, your comments and critiques so we can try to make things better. And feel free to post on those. We do on our website programmingthrowdown.blogspot.com. You'll find show notes, links to some of the stuff we talked about, kind of a little bit of a recap of our discussion in case you can't remember something later. If you have terrible memory, like at least I do. Yeah.
Yeah, so I think that about wraps it up. All right, well, until next time. Have a good one, guys. Take care. The intro music is Axo by Bynar Pilot. Programming Throwdown is distributed under a Creative Commons Attribution Sharealike 2.0 license. You're free to share, copy, distribute, transmit the work, to remix, adapt the work, but you must provide attribution to Patrick and I and share alike in kind.
