 I'm going to speak about my views on how to teach introductory programming, my experience and what I have learned from it. Okay, let me begin with a very basic question. So what should you teach in an introductory programming course? So some simple answers are there, some obvious answers are there. You should teach the programming syntax, you should teach how to design programs. Is this all or is there more? Well, from time to time, we do need to ask more questions. For example, we should ask, programming has evolved for 50 years. Has it changed during that period? And importantly, should that change be reflected in the way we teach? So you may have, it's clear to everyone that programming is becoming much more pervasive. Every device around you these days contains a computer, contains a processor, which has been programmed by somebody. Not only that, in many, many sciences, programming ideas are appearing, are becoming mainstream. They are becoming a part of that science itself. So for example, these days, biologists think a lot about computing, when it comes to evolution, when it comes to DNA, the whole field of computational biology. Social phenomena are expressed. So computational ideas are becoming mainstream, not only in computer science, but even in subjects such as biology where people think of evolution as computation. Social phenomena, social networking is being analyzed at great length. Text understanding is a huge field. I mean, nobody can live without doing a Google search every day almost. The second important question is, are our students changing? After all, I mean, we don't teach in a vacuum, we have to have our students. And if they are, we have to figure out how they think and what they are doing. Over time, students have acquired a huge number of distractions. So half the time, students might be texting a message or something like that. So you have to guard against that. A few years ago, maybe 10, 15 years ago, engineering used to be a great career. It still is, but there are lots of distractions, lots of people aspire to be, aspire to finance jobs or do IS and things like that. So what we should try to do is, we have to attract them. We have to attract them back, we have to make them feel that the subject matter of engineering and computer science and computer programming is really worthy of their study. Another point that seems to be emerging is that our students seem to be getting a shorter and shorter attention span. So we have to work hard to get the attention of the students in the first place. And having got that attention, we have to hold that attention for a certain duration if you want to tell them anything of substance. So what I'm going to propose are some strategic measures and then some tactical measures. So my first suggestion is that whenever we teach programming, we should take examples in programming from as many different domains as possible, science, technology, even art. And hope is that if we take all these different domains and take examples from all these different domains, quite possibly students might get more excited or rather I should say a greater fraction of students might feel that yes, there is something being taught over here which is of interest to me. We pass this with the standard approach where most of our programming examples are drawn from text processing or simple numerical processing. This may not interest all students. For example, those who are not measuring in computer science may not like just this narrow set of applications. And of course, this course Introduction to Programming is taught to all students of all engineering branches. So we have to cater to them also. The second point I want to make is that we have been mostly dealing with text input and output. I think it is high time that we went to graphical input and output. I mean look, your students are carrying cell phones with touch screens. So they are doing graphical input. They are getting graphical output every day. And it is a complete throwback to a bygone era if you ask them to work with just text. Also, if you allow graphical input and output, then a lot more interesting things can be done with a computer. In fact, I would contend that graphical input is almost essential and we really need to do something about it. We need to almost make it a standard part like we have IO stream. Maybe we should have a graphic stream or something like that. So if you do all these things, I believe and I hope that we may be able to empower our students to do something more interesting and we may also be able to excite them. The second part that I want to talk about before I get into more specifics is that we also need to work hard to grab our students' attention. So how do we do that? So for grabbing attention, I think that we need to do a much, much more sincere job of trying to sell, just like a salesman sells his ideas or his goods. I think we need to make a more serious attempt at selling computer programming as an exciting and important activity. I state this because to most of us, it is absolutely clear that computer programming is important and therefore we take it for granted that it should be clear to our students also. After all, they are holding a camera or a phone in their hands which they know contains a computer. After all, when they came to your institutions, they probably booked tickets through IRCTC or something like that. So they have been using computers. Unfortunately, that does not register. We still have to tell them very, very clearly that, look, this is how things get done. This is what you can do. So I think that selling job has to be done a lot more sincerely. I don't mean that we should spend an enormous amount of time on it, but I think a few very well-chosen, maybe four or five well-chosen slides or something like that will do the job. But believe me, students do not necessarily realize how important this course is and we have to tell them. One way of doing that and I think a very, very compelling way is to give them a demonstration of good programs, programs which they might themselves be able to write at the end of the course. Or you can tell them that, look, maybe it is not possible that you will write this program at the end of this course, but maybe if you study this subject for two additional courses, then this is a program that you will be able to write. So that way they can see that they can see for themselves where they can rise if, in fact, they work hard, if they take your course and things like that. So I will give some demonstrations at the end which will indicate what I think are exciting programs, which I think students will like, but I am sure every one of you has your own tastes and your own experience with students for you to decide how you can reach out to your own students. As far as holding attention is concerned, that is also equally difficult and I will come to this point shortly again. The key point over here is that we have to arrange our material so that once we have got them excited, in my opinion, the way to keep them excited is to throw challenging problems at them. If we get them excited and then don't give them anything to work on, anything substantial to work on, that energy that we have created dissipates. Energy dissipates very, very fast. So we create, you have to strike while the iron is hot. And the way to strike while the iron is hot in this case is to give them challenging programs which they would like to write for themselves. So the program should be such that having written those programs, they will themselves get a kick out of it. It should not be the case that, look, I am writing this program because Professor Ranade has asked me to do it. It is not that if I write this program, I will get good marks and therefore I will get a good grade, whatever. That is not the right reason. In my opinion, the right reason is you give them a program, they write it, when the program runs properly, they themselves see something thrilling, something exciting, something which gives them a feeling that, oh, I have accomplished something. So we have to throw assignments at them of this kind. And we can't let up on that. All right. So this is roughly the approach followed in the book. So I do discuss programming examples from different areas, math, engineering, art, operations research. I don't teach anything new. I have tried not to teach anything new. But look, these are students who have done 10 plus 2 in science. So they know a lot of math already, they know a lot of physics already. And interestingly, throughout their 10 plus 2, they do not really get a chance to exercise their math knowledge. They learn a lot of math. What did they do with it? Essentially nothing. This is the place where they can put, where they can put to use whatever they have learned. And believe me, students want to make use of things that they learn. So you have to give them a chance to make use of things that they learn. And they love it. That is my experience. To facilitate this, I have developed a teaching tool called Simple CPP. Simple CPP in the main contains a two-dimensional graphics library. It contains something called, it supports something called turtle graphics, possibly several of you may know about turtle graphics, but anyway I'll tell you shortly. It also contains support for fairly simple two-dimensional coordinate-based graphics. Again, two-dimensional coordinate geometry students have learned in 10 plus 2. So if you give them some problems of this kind, they are, in my experience, they are eager to do it because everybody likes to do things which somehow relate to things that they have done. So most people don't like to have compartmentalized knowledge. Most people want everything to be integrated. So if you give them a few problems, simple problems, not too hard, but problems where coordinate geometry gets used a little. And you'll see that I really mean very little. I don't, I'm not going to ask, I'm not going to expect them to know the equation of an ellipse or, I mean, anything, anything even that complicated. But simple coordinate geometry that they know, simple Euclidean geometry that they know, if they can put into action, I think that that sort of satisfies a very, very primitive need that people have. So I have been sharpening my tools for 12 years. I have been only sharpening my tools. 12 years of school only develop tools. There is very little opportunity in the 12 years of school to use any of those tools. But it's just learn, learn, learn, but no usage. Here is a course where people get to do things. People get to use the knowledge that they have acquired. And they can get a thrill out of it. And I think we should facilitate that. This two-dimensional graphics library that I'm going to talk about is extremely simple. I mean it's called, I'm going to call it graphics library, but you should not really think of it as, look, he's proposing that we teach graphics in the first introductory course itself. That's not what it is. It's very simple, as you will see very shortly. In fact, one element of it is based on a language which was developed for children. We'll come to that. So in fact, I think that this kind of a library should become absolutely common place. It should become a part of programming languages to the extent that IoStream is a part of programming languages. It also contains a couple of additional features. So there is a so-called new statement. Sorry, a statement I have included in simple CPD. A statement which is not there in C++. Don't get so worried about it. It's a very tiny inclusion. And the students have to do nothing in order to use this. So that statement is called main program. You will see it's a fairly trivial inclusion, but it accomplishes, it smooths some introductory hurdles. I have also included a statement called repeat. Again, this is a fairly simple statement. But again, it facilitates many, many, overcoming many, many problems that I will point out very shortly. And in the book, I have followed this general principle that if you want to teach something, you must have convincing examples. If you do not have convincing examples, no amount of lecturing, no amount of giving sermons is going to work. Examples are needed for the final understanding. And that too, not artificial examples. If you can get reasonably real examples for any concept, object-oriented programming, recursion, if you can get vivid examples, that is what helps people understand. So the book has been written, or I have tried, at least. You have to tell me whether I have succeeded. I have tried to write the book so that I pose a problem if that problem, that problem typically cannot be solved by what students have learned until then. And then I introduce a new statement or a new feature. Okay, so here is a rough outline of my talk, the rest of my talk. So I'm going to spend some time talking about turtle graphics. Then I'll talk about coordinate graphics. Then I will spend some amount of time on recursion, because I think recursion is an extremely important part of introductory programming. It's a very simple concept, but it's perhaps the most important algorithm design tool. It's also perhaps the most non-trivial program design tool. And therefore, it is imperative, in my opinion, that our students understand recursion completely. And I would like to point out that by using graphics, it becomes very easy to understand recursion. And I'll give you some demonstrations about that. Then I'll talk about some other issues, some more standard issues. So I'll talk about maybe, try to clarify what I think, what in my opinion is the difference between program design and algorithm design. I mean, after all, when you teach a programming course, there is always this thin line between when you assign a program. Is this an algorithm design program? Is this the key part of this algorithm design or is the key part of this program design? So that clarity is necessary, and I'll say something about how I have tried to make a distinction between the two. I will also talk about object oriented programming, the role of object oriented programming in introductory programming. I'll talk a little bit about software engineering. I'll talk about standard libraries. I wanted to talk a little bit about history of programming. It's an important topic in some ways, but I don't know whether I'll get time. In any case, if you feel that is important, please ask me at the end. So I'll be happy to speak about it. Also, same thing about hardware. How much hardware do students need to understand when they are learning programming? So maybe if there are questions about that, I'll talk about it. So after that, I'll conclude and I'll give some demos at the end. So turtle graphics is something invented in the 1960s by Seymour Pappert, who developed, who with other people developed a programming language called logo. Logo is a programming language. It is very active today even, but it was designed for teaching programming to children. So fourth standard, fifth standard, children. How many people have heard of logo? Great. So there are several and I'll, anyway, I'll be explaining. So as you might know, or if you do not know, turtle geometry contains something in it called a turtle. A turtle is a symbolic animal that lives on the screen. So when you start turtle geometry, you get a screen and at the center of it, you get a small, typically red triangle, which represents a turtle. Now that turtle can be moved by giving commands through your program. So you can say make the turtle go forward, let it turn, let it go forward again and things like that. The interesting thing is that the turtle has a pen, okay? So the pen is, it drags along when the turtle moves. As a result, when the turtle moves, a line gets drawn. All right, so the turtle has a pen and as the turtle moves, the pen drags on the screen and therefore, a line gets drawn. The goal of turtle graphics, or the goal when you write programs in turtle graphics, is to draw interesting pictures. We'll see examples of this very soon, but you may guess already what is coming. If you want to draw interesting pictures, you need to understand a little bit of geometry, depending upon how complex pictures you want to draw. Not only do you want to understand, you need to understand geometry, but you need to be able to take that understanding from one domain, which is geometry, and convert it into another domain, which is programming. So for whatever you want to do geometrically, you want to find what are the associated programming concepts that I want to use. This is a very fundamental activity, and turtle graphics makes this activity very, very explicit. It's very obvious and very visible, and therefore, it helps in learning this activity. This activity is important no matter what domain you are using. If you're writing a program to process salaries, there are constraints, or there are relationships when you deal with salaries, about interest, about taxes, and all those things. Those relationships have to be understood, and they have to be translated into the language of programming. This translation aspect has to happen over here as well, and that is what makes this domain very interesting. The domain of geometry, or the domain of this turtle, is well understood. So that part is taken care of. So the children can focus entirely on this translation aspect. Okay, so let me give you a turtle program first. Then we will run this program also, and then we'll run more complicated programs. Okay, so I'll invite you to stare at this just for half a minute, and tell me at the end of it, whether you understand what it is doing. Those who have seen turtle programming, please do not respond. Those who have not seen turtle programming so far, I would like to hear from them. So anybody who has not seen turtle programming earlier would like to make a guess as to what this might be doing. Come again? Okay, so it is drawing a square? Okay, so it is indeed drawing a square. And let me just go over, let me just make sure. So my principle is that when I'm teaching, even if things are completely obvious, I at least give one line of explanation. So I will try to follow that over here as well. So the first statement, turtle sim, starts the turtle graphic simulator. So that will pop up a window on the screen. We'll do this in a minute. Then that turtle will be at the center of that window. And then forward 100, as you have guessed, will command the turtle to move forward by 100 pixels. Then it says write 90. Write 90 says to the turtle, turn right by 90 degrees. Then next again there is a forward 100. So the turtle is over here. It says forward 100, then right 90. So the turtle turns. Then again forward 100, right 90, forward 100, right 90, forward 100, okay? So that's what the turtle has done. So the turtle has walked a square. And as it has walked a square, it has drawn a line. So the square has got drawn, okay? So this is essentially the first program. So it can be discussed in the first lecture. It is, I do discuss it in the first lecture. Well, actually I don't discuss this program, but I discuss a slightly modified version of it, which I will show you in execution in a minute. The line at the top includes simple CPP says that, look, we want the features from simple CPP included, okay? Now this also includes things like using namespace, a study, include IO stream and things like that. The reason for this is that I don't really even want to talk about namespaces on the first day of classes. People don't even know what names are. So how can you even be talking about namespaces? You are just confusing and boring them, okay? So we don't want to do any of this. IO stream, IO stream is a nice name, but again not really for the first day. Main program, main program is just a short form for the phrase int main program parenthesis, okay? Again, I don't want to explain int. Why int main, okay? This is the first day. On the first day, details like this should not be explained. What we should get to are the really interesting points. Okay, so I want to specify a main program, so I should be able to write main program and that should be the end of it, okay? So then you see turtle sim is there as it was there in the last slide. Forward is there. Now I have put in weights over here. I have put in weight statements. Wait for half a second, okay? The reason for this, you may guess, is very simple, okay? If I don't put it there, the whole thing happens so fast that you don't see. You don't get to see what is going on, okay? So you have to slow down the computer a little bit so that it works along with you rather than just zooms ahead of you. That's all. Yeah, so as I said, I don't want students to even know that there exists something called namespaces, IOS streams on day one. They have to understand it eventually, but not on day one, okay? On day one, they have to get something which is more interesting, more relevant and more at the core of the subject. Namespaces are not at the core of the subject. Programming is at the core of the subject and that is loops and that is how to translate things into programming language from your other domains. That's what is the core of the subject, okay? Just in case people over here know what the C preprocessor is, this main program doesn't require you to do any additional compiling step or anything like that. There is something called a C preprocessor or the C++ preprocessor which I have defined just a small tiny macro in using the preprocessor and that macro gets expanded without any effort from you into int main, okay? I'm just trying to hide this int business. I don't want to expose this namespaces and things like that, okay? But this is important because if I get to the real stuff very quickly, then I can hold, I can get the students interested and then I can get to something interesting. I want to get to something interesting on day one itself. Okay, here is the second program for day one. Again, I would like you to take a look at it and tell me what you think it does. Forget that you are C++ teachers. Imagine that you are first year students, okay? And if you're looking at this and you have just been told about the previous program. So what do you think this will do? It will again do the square but now instead of writing out the commands forward, hundred, right, ninety, four times we are giving a directive which says repeat those commands four times. That's all, okay? So what I have introduced is a so-called additional statement in C++, okay? So this is the repeat statement that I have introduced. Again, this is just a very simple macro. But as you saw, even a school child can understand what this repeat means. It says repeat these statements several times. Four times as it has been said over here. The right is used three times but here it's using four times. I'm really happy that you are observing that. So what the last program was doing was it was doing forward, right, forward, right, forward, right and then it was doing a forward and it was ending at this point. So I'm facing in this direction now. According to this, I will turn right and I will stand over here, okay? Yeah, so I'm really happy that you're observing these details but as far as the drawing is concerned the drawing is exactly the same, okay? And from time to time, having drawn a square you come back to your old position and I started facing in this direction after drawing everything I'm ending facing in this direction again, okay? So that may be a desirable thing, okay? So in that sense, this program is slightly better but the main point of this program is that I'm actually grouping and I'm not writing out everything four times but I just grouped the whole thing together, okay? Yeah. We can put weight also, right? Yeah, so in these braces, these braces are just like a regular old block. You can put as many statements inside as you want and you can put weight also. It is exactly like a loop statement except that the C++ or C loop statements are complicated, okay? You have to understand conditions. If you want to go with the for statement you have to understand for int i equals 0 semicolon on the first day students are going to be completely, I mean they are going to get scared of that, right? So you don't want to do that on the first day, okay? So on the first day you want to say something simple if the language doesn't have something simple well, you can invent something simple and this invention is not too expensive. This invention is fairly simple. Again, this is just a C++ pre-processor macro, okay? So the simple CPP will load that macro in for you and it will happen effortlessly. The translation will happen effortlessly. I don't mean to say that students have to use this throughout their life but on the first, in the first few, first couple of weeks maybe if they use it they can do more interesting things and therefore their interest gets built up, okay? When you teach them for which will happen maybe two weeks down the line, okay? Then obviously they can start using for, okay? Similarly, at some point you will talk about functions at that point you will talk about what main is, what it means for a function to return an int and so on. So at that point you should tell them that look, int main is what is the official way of writing a main program but that doesn't have to happen on day one. Okay, so the repeat statement is fairly simple. It says repeat so many times and whatever has to be repeated is specified in parenthesis, yeah? Sir, after pre-processing is there any facilities to see pure C++ statements? This is a macro, no? Yeah, this is a macro. After explanation of this macro, the output will be pure C++ statements. You want to see the C++ statement, the result of generating this? Yes, yes. Is there any facility in the C++? There probably is, I think, I don't know actually, I really don't know, okay? But have you seen the C++ pre-, the C pre-processor facility? No, that I don't know. Okay, but it's very simple. I mean, it is really simple. It's almost like you write a function call. You write, you define a function. It's almost a definition like that, okay? What you are doing is correct, sir. That is my doubt is, is there any facility to see the equivalence of C++ statements for this macro? Okay, sir. Okay, okay, I will, I can show you on paper. Okay. Is that okay? All right. So it is something like that, when you compile C program, it is going to create assembly language program. Yeah. But even before it gets to the assembly language program, whenever it sees this repeat, if a macro called repeat has been defined, then that repeat gets translated into something and only that gets compiled. Yes, yes. Okay, so for example, if I write repeat four and then say some XXX, okay? Then this will get translated to say for, say int, and I will use some name. Okay, let me just call it i over here, but I can use some old name over here. That is correct, sir. i equals, sorry, i less than i equals int i equal to zero. Let me just write it again. For int i equals zero, i less than four. So this four is the one that comes over here, i++. Okay, so this repeat part gets translated into this portion. Okay, sir. And this part just gets put over here. It's fine, sir. Was that your question? Yeah, that is okay, sir. Okay. Thank you, sir. Thank you. Yeah, any other? So in this program, for the first day students, can something be done that we can exclude that inclusion of the hash includes simple CPP? Because this is from my own experience that I'm saying, so when I taught just the simple program, like the Hello World program. Yeah. So looking into the first statement hash includes simple CPP, they asked me a lot of questions like, why we are including this hash include, what is the meaning of this hash tag? I know, I know, but I mean, at least, at least you should feel happy that now you only have one statement. Right? I mean, earlier you had to explain hash include i over stream. Yeah. You had to explain the namespace STD, using namespace STD. I mean, that is Latin and Greek, isn't it? But sir, in the first day, because it's very difficult to explain about a preprocessor directive. No, no, no, no, no, no. This I'm explaining to you. As teachers, I'm telling you what this, what this repeat statement is. You are not going to explain this to students on the first day. Okay. When you teach the for statement, then you can say that, that repeat can actually be obtained, be translated into a for using a preprocessor. You are not going to reveal, reveal this magic to the students on the first day. Right. Okay. Thank you sir. Would you please explain, so, okay, just repeat, act as a counter or, suppose I want to print the value, just like a for loop and while loop. Yeah. Is there an initial value and updation variable? Is there any facility in repeat? No, no. No, no. Okay. I must intervene. The moment we talk of repeat in the context of programming, automatically we think of a starting value, end value, increment, et cetera, et cetera. That is wrong. That is not how children perceive repeat. When you, just one second, when you tell people repeat something four times, they don't, they set a counter internally. They evaluate that counter internally. They don't look at the counter as a programming variable at all. Okay. And when we teach them for the first time, we don't want to talk about counter. We don't want to talk about initial value. We don't want to talk about final value. As Mr. Ranade said, all of these will come later. Okay. We'll have to teach a for loop later. Okay. We'll have to teach a for loop later. When we do that, at that time we introduce those notions. That's why I'm asking, sir. Yeah, yeah, yeah. Is there any facility then I will... No, not right now. Right now there is nothing. Repeat this. You can say repeat n times where n is a variable. Okay, sir. But that has to, whatever you write inside repeat, has to result in a value. Okay, sir. And that may need an integer value, obvious. Okay. And that many times it will repeat. That is the purpose. That's the objective of this repeat. I think in later lectures I will get information. So just wait for one minute. You will see how you can get a counter also. But just wait. It will not happen on, it should not happen on day one. Okay. This is meant to be a bicycle. Okay. What you're asking for is a jet plane. Okay. I don't want to give a jet plane to a student on day one. I want to give a bicycle. Okay. Yeah. So problem with us is that we already know the C, C++. Yeah. That is the problem. Yeah. The best thing from a complex mind. We never think about a simple thing. Because when, yeah, what we have learned, when I started in a first year computer science, I had learned basic language. So I don't have any problem at that time also because it's a simple thing, just like a simple CPP. That's why we all are thinking from that angle. Whenever it comes repeat, we are having a comparison of for loop or repeat loop. Wonderful point. Let me just add one more thing. Imagine how smart our students are that in spite of giving such a complicated introduction, they actually learn programming eventually. So my question is now try to imagine how easily they will learn more complex things if the introduction is done in an extremely simple fashion to which they can relate to naturally and then they grow into the complexity. That's the whole point. That is okay. But now the CBSC and all the other IICB and all the other international boards and central board has introduced the C and C++ and Java in their course curriculum. Right. So what happened when the students come to our colleges and they will ask the same kind of questions that we are asking right now. Because they already have that particular persona in the mind that how the C and C++ is working. I'll take this question before you. First and foremost, your statement is too generic. Even in IIT every year we get 30, 40 students who have not seen a computer in their life. And please remember we have to teach everybody. And in the initial days we must teach those people who have no introduction to computing. The people who have an introduction to computing may raise these questions. We simply ask them to hold and tell them that all the explanations will follow anyway. The entire course is surely about C and C++ programming not about that program. But he is discussing the most important articulation of the fundamental teaching paradigm. What to do in the first day, what to do on the second day, what to do on the third day. That's all. So you are very right. There will be several such people and you are talking about universal things. No. The EDX 101 that IIT Bombay will be conducting for global participation. There are 23,000 registered people and there are people from Europe who have not done any programming in their life. But they have seen a computer. There are people from Malaysia, I think Pakistan someplace and Afghanistan who are excited to learn something about computers. So don't forget there are people like that and there are many such people in India. So what you say is right and they are not going to be disappointed. But all that you have to tell them is whole. You know all those things don't relate. So that is why we use the term simple CPP or turtle graphics. We are not talking about C++. We are not talking about complex programming in the first few days. So the challenge in these programs is not really programming syntax. The challenge is figuring out what is happening in real life and translating it into programming syntax. Now that translation is very important and my experience has been that even people who have learned C++ have learned C++ in 10 plus 2 have feel that challenge. So what you have to tell them is you may know C++ but do you know how to draw a square? Do you know how to draw this picture? I will come to a complicated picture which was my first assignment when I taught discourse. There is a very specific reason why I chose that picture. Many students had learned programming, logo programming in their fourth year. So the moment I said logo they started looking bored. This guy is going to take us back to fourth standard. Why did I come to IIT to go back to fourth standard? That was the expression. Then I said, fine, you know logo but can you draw this? So I will show you what this is and then they got put in their place. They would not be able to draw this and the skill required to draw that which I will show you in a minute is the same for all students. So there is the challenge for them. So we are in fact making a more level playing field because our challenge is saying that the language syntax is not the important part. What is important is taking real life description and translating it. This challenge, believe me, 10 plus 2 people think that they have learned programming. They have only learned syntax. They have not learned much more than programming, much more of the programming. So here is that same square program. So it is, as I said, it is waiting a little bit and it is drawing the square. Now, let me show you the program. I was going to delay it till the end but I should show it right now since that question has been raised. So this is a program. This is a design that I want you to draw. This is what you might put on the border of a plate. Can you draw this? So all the people who have done logo programming in their fourth standard, fifth standard, tenth, eighth standard will look at this and say, yes, yes, there is something challenging over here. I would like to be able to draw this. So if they say this, I am happy. I have done my job. So this is the second program. This is the new statement. Here is another program for the first day. Again, take a look at this program and tell me what you think it might be drawing. So it is more complicated. Pack of cards. That's great. Somebody has really the right answer. So what is happening? I am starting over here looking in that direction. I draw one square and I come back and I am pointing in that direction again. But now I am going to turn right by 10 degrees and then I am again going to draw the same thing. And now I am pointing a little bit in that direction. Again I am going to turn by 10 degrees and again I am going to draw this. By the way, the best way to think about turtle programming is to pretend that you are the turtle. That works. So should I execute that program? Yes. So this is called cards in fact. So I am sorry, I did not put in the weight statements in this. The turtle has just run through this very fast. But as you can see, the square has been rotated and it has gone out. So that is roughly what I do on the first day. So what have they learned? They have learned control flow. They know that statements follow one after another. They know something about elementary iteration. Actually they know a little bit more than elementary iteration because figuring out a nested repeat is not hard. The other point is that look, if you make a mistake, what is the worst thing that will happen? The turtle will draw something even more interesting, more intricate than what you wanted it to draw. So figuring it out will be a challenge, will be an interesting game. So my experience is that nested repeats are also easy to understand. So you have learned control flow, you have learned elementary iteration, you have understood the basic idea of syntax, spaces, indentation, things like that. So we have to make a point to talk about that also. And the most important point is that you have got this idea that whatever you are doing you should observe the patterns. If you want to draw a square, you have to observe that the square is made up of four motions which are all similar. Do not write those four motions separately but put them into a repeat. If you wanted to draw a hundred side at polygon, it would be foolish to have to write hundred statements forward turn, forward write. You have to put a repeat. So this is sort of a key programming idea. You have to observe patterns and you have to take those patterns and you have to translate them into a programming language. So the typical homework on day one is something like draw a chess board. Somebody was saying several squares, make it into a chess board. Again nested repeats will do it. What is a circle? A circle is a polygon but where the number of sides is very large. It does not have to be infinity. It can be something like maybe 20 will be enough for most displays. We have to figure that out. How big is it that you need? Draw a five-sided star. Draw that. That's a nice geometrical challenge. How much do you need to turn? People figure that out. I find that students are quite happy to do this because they actually see interesting things happening. How do you not lose? You have generated this excitement. You have to carry it through the next lecture and so on. The trouble is that on the next day you probably have to explain how a computer works. Then you have to explain what are data types and variables. In all this, this excitement that you have generated might seem to go down. So what do you do about that? Well, take this program. Again, stare at it for a minute and tell me what you think it might be doing. So it goes one step. It goes 10 steps and then turns. 10 steps and it turns. It's doing a spiral. Subsequently, the length through which it is moving is increasing. Initially, it was moving through 10 steps because I was one. Later on, it starts moving through 20, then 30 and so on. So maybe we should see this. This is what it does. Sorry, I have just let it zip through. But you can guess that this is what it does. Now you can have variations on this. You want to have a circular spiral made up of semicircles. So all those are interesting challenges. Again, the idea point is that taking some real life description and converting it into programming code. Notice that in this, what we have done is we have reassigned a variable i equal to i plus 1. This is one of the difficult statements that many people have because it goes against what we learn in mathematics. But if you give them a program like this, this statement sort of becomes very, very visual. The effects of this become very visual and so it is easier to understand. That's my contention and hope.