 We are continuing with his talk now. Okay, coordinate based graphics, this is how you might, how simple CPP lets you do things. Circle C1 200, 225, 225 will create a circle called C1 centered at 200, 225 with radius equal to 25. Similarly you can create a rectangle if you wish called R1 centered at 200, 200 with width 50 and height 70. You are allowed to move around or rotate these objects. So if you say R1 dot right 45, then that rectangle will turn through its center. C1 dot move will cause that circle to move 10 steps to the right, 10 pixels to the right and 20 pixels above. And an elementary, this is something like lecture 4 or something like that. An elementary graphical input facility is also provided. You can say int z equals get click. What this does is it waits for the user to click on the screen. And whatever coordinates x, y the user clicks at, 6, 5, 5, 6 times x plus y is sent back. So z gets that value. So if you want to know where the user has clicked, then you have to take that z and divide it by do integer division by 6, 5, 5, 3, 6, that will get you the x coordinate. Do modulus by 6, do z percent 6, 5, 5, 3, 6, that will get you the y coordinate. So basic graphical input has been established. So at this point, reasonably interesting animations can be done. You can move around squares, circles, things like that. You can click. You can say, oh, I want that circle to come over here. All those things can be done. So what are the educational goals? People are having fun, but we should also have some education going on. So implicitly, we have introduced the constructor and members and tags. As you can see, this C1 of 200, this thing is just a call to a constructor. I'm not going to tell the students anything about constructor on the first day. But I'm going to tell them that this is how you create a circle called C1. I'm not going to tell them about constructors. Similarly, what is going on over here is dot right is just a member function call. I'm not going to tell them that this is a member function. I'm not going to tell them about objects or anything like that. They are focusing entirely on drawing things, making rectangles, moving them around. But implicitly, they are learning. They are learning constructor syntax. They are learning dot notation and everything like that. Now I want to talk about recursion because I think recursion is a really important idea in computer science. And its counterpart, induction, is the most important idea, perhaps, in mathematics. So recursion and induction are among the most important ideas in computer science and mathematics. So first I'm going to show you a demo which will enable you to draw what I call a mathematical tree. Well, a mathematical tree in the sense it doesn't look like a real tree. It's kind of a tree that we draw in computer science. So there is a branch, there is a root, then two branches, two branches, and so on. I'm going to draw it from bottom up. We usually draw it from top, but that's OK. So this, the tree has a natural recursive structure. The left side is just a small tree, the right side is just a small tree, and the whole thing together is a big tree. So it has a natural recursive structure. So we can use this, showing this graphically will just be a mirror of this relationship. I'm also going to, OK, so the recursion becomes visible, we'll see that in a minute. I will also draw something which looks like a realistic tree. This again is drawn using recursion. Again it has a very tiny, very simple looking program, but that simple looking program does some interesting magic. So let me go to that. So I have slowed down this drawing, otherwise it happens very fast and it doesn't tell you in what order things get drawn, but you noticed how it got drawn. The left side got drawn first. Even in the left side, OK, let's run it again. Maybe I should have slowed it down further. The left of the left gets drawn first, then the right of the left and so on. So let me show you the program. So you see that the program fits in this tiny screen. So there is a recursive function which contains a weight. So 1, 2, 3, 4, 5, 6, 7, 8, 9, 9 lines, there is a recursive function and then there is a main program which is just three lines. So that's how large the program is. I want to show you one more recursive program. So let me show it to you first. So the tree, you can see that the tree is fairly small. The tree function is just about this long. And then the main is just this. The main is also very small. So let me execute this. So this is also a recursive program. But there is a little bit more going on and cheating here. There are things going on here which I have not told you about. So what is happening over here is that when I am making a recursive call, I am passing the turtle as a parameter. So that's why you are seeing many turtles over there. And then the turtle is a graphical object. You can scale it down also. So some scaling is also going on there. As a result, you get something like this. But this is drawn by using that very short program. So I am not drawing one branch at a time. It's just recursion at its very, very exciting best. So drawing a realistic tree we saw. So now I want to talk about other uses of graphics. So the way this graphics has been implemented, you get the code, by the way. So you get the code. So you can see how the graphics has been implemented. Now when we are talking about inheritance during the course, we have to have some good examples. This graphic system itself is a good example. So there is a superclass. There is sort of a base class called Sprite, which contains all possible graphic subjects, which is a superclass of all possible graphic subjects. Rectangle, circle, polygon are subclasses of Sprite. Turtle itself is a subclass of polygon. You can see that in the code that will be supplied to you. Like everything that happens in, like the usual way it happens with inheritance, the Sprite will hold all attributes which are common to all the objects in all classes. So for example, data members like where that Sprite is to be drawn, every Sprite has to be drawn somewhere. So those coordinates will be present. It is oriented in a certain manner. So that orientation will be a data member in the Sprite class. Movement, every Sprite can be moved left, right, whatever. So all that is also a member function in the Sprite class itself. However, the subclasses will hold information which is special to those classes. So for example, rectangle needs to have some additional information. What additional information do you need to keep in order to be able to draw a rectangle? Can somebody tell me what additional information do you need? What information do you need in order to have a rectangle? Width and height you need. Position is already there. Position is already there in the Sprite class. But in the rectangle class, you need the width and height. So there will be data members width and height. But there is also a member function which will actually draw that rectangle. So this function will be different for every class. So there will be a different function for drawing a circle. So this hierarchy, the inheritance hierarchy, there is a built-in example we have once we do this graphics. There are a few other uses of graphics. You can generate interesting examples. There is a formula layout example. There is an example of n-body simulation which I will talk about. Then in general, you can do visualization and visualization I have found helps remove bugs because if there is a bug, then that will get seen in glorious detail. All right. Now I want to come to some traditional issues in introductory programming. So this is the same list, so let me just go over it. So this is always a contrary when we teach introductory programming. What is the difference between algorithms and programs? Of course, we can give definitions, but operationally what is the difference? When I think of writing programs, I think of when I think of program design, I think of writing a program in which you basically know what needs to be done. So if you are given pencil and paper, then you would be able to do all the calculations and you would be able to produce the result. That is what program design is. Algorithm design, on the other hand, is figuring out what needs to happen in order to solve that problem. What calculations do you need to do? From time to time, people sort of mix these things up. People might say that, oh, I want to ask a difficult question in CS 101. And then they ask a program design question. I'm sorry, an algorithm design question, which in my opinion is not quite fair. I mean that is not a part of the course. So you should ask questions which are parts of the course rather than questions outside. So the important point to be noted is that for introductory programming, the focus should be on program design rather than on algorithm design. However, recursion I make an exception for. So recursion is an algorithm design technique which has to be understood. Maybe not understanding how to design new algorithms, but even to a certain extent because it's a new way of thinking and it's really fundamental. So I have lots of examples of recursion in the book. One more thing that I have done is that although I'm saying that the focus is not algorithm design, it's something like this. If you are learning a new language, say you are learning French. So learning French becomes more interesting if you sort of read some French literature. Otherwise you are just reading meanings and words. That's not very interesting. You have to learn, you have to read something interesting. So analogously I feel that when you are learning programming, even though you are not going to invent new algorithms, you should study some interesting algorithms, okay? So the book contains lots of interesting examples which have been explained, okay? So some of these I'm listing over here. There are several of those which I'm not listing, okay? And there also are some advanced chapters which are meant to excite the students to go further and so they have just been just to vet their curiosity, okay? And coding many of these is left for exercises, but the explanation is in enough detail so that people can actually write the programs once they understand what the algorithm is doing. Okay, should we teach object, how should we teach object-oriented programming? We did a survey of how programming is taught and we found that there actually are people who teach object-oriented programming from day one. On the very first day they will introduce what is an object, what are member functions and things like that. But by and large that doesn't seem to be a good idea. I mean that seems to be a very tricky idea, okay? Because I think it is like putting the cart before the horse. I mean if you want to have object-oriented programming, then you have to understand member functions or you have to understand members. But how can you understand members without understanding simple variables? So there is a lot of difficulty. My philosophy is fairly simple. I pose problems, okay? I pose the simplest problem first and then make more and more complicated problems. And I teach whatever is needed to program to solve that problem. So in this course, eventually you will get to a point where yes, now object-oriented programming is needed. In my opinion that is the point at which you should teach object-oriented programming, not earlier. Everything should be driven by this utility idea. Students should be able to see why we are doing things. Okay, so there is a chapter on inheritance-based design. So inheritance is treated very, very seriously. There is a chapter on it. In fact, an application has been developed in an earlier chapter and then that application I rewrite using inheritance. The new implementation is nicer in that it is easier to extend it. And in fact, a non-trivial extension is actually worked out in the text. Software engineering, I would like to make a few comments. So first of all, writing the specs of a program must be stressed. Many bugs come up because students start programming without fully understanding the problem. So it is really important to write down what is the input, what is the output, what are the conditions, what are the constraints between the input and output. This is easy to say and very easy to forget. We tend to think that, oh, I have understood the whole thing, but then we forget that there are these corner cases that we have not understood and our students are like us. So writing things down is important and I have tried to stress that. And for the more difficult problems, I have tried to write down the specs to somewhat gory detail. I think invariance and program proving are also important. Not because I believe that every program should be completely proved correct before it is released out into the open, but because the basic skills are important. You should know what it means to prove the correctness of a program. So I have discussed this with several examples and from time to time I have asked students to write down invariance. What do you think the value of this variable be at this point in the program? So things like that, reasoning about your own program is very important. And this is extremely important because I have seen students try out a few examples and then they declare that, oh, I have a running program. I mean these students have to be challenged and they have to be made more responsible. I also have a discussion about how to generate test cases. Nothing very earth shaking, I mean the usual thing, sort of try to make sure that all corner cases are covered, use some random cases and things like that. But by putting a chapter in the book I think students will do it more, more conscientiously. So some of these things are things that we know but we don't always carry out. There is a discussion of libraries, string vector map are covered in reasonable depth. I also developed from scratch a baby version of the string class. So this illustrates memory management and class design in general. The priority class, the priority queue class is used and they're discussed also in the chapter on simulation. There are a few unusual topics that I discussed. In the 2011 standard of C++, a really nice idea which was there earlier in Scheme and Lisp and all such languages called lambda expressions has been presented. This is sort of an alternative to function pointers or function objects which you might be knowing or you might even be knowing this of course. But it makes several things very, very compact. So I have given some prominence to this idea. I discussed in fair detail things like reference counting because the moment you step slightly outside the introductory arena, you should not have, you should be able to use memory properly. So there is an appendix which talks about reference counting. And there are some very nice language features already. C++ 11 again has some very nice language features for doing reference counting. I spent a fair amount of time on simulation, gravitational simulation, airport simulation. I also have a chapter where there is an example of Dijkstra's algorithm. So Dijkstra's algorithm can be viewed as a simulation of a real-life system. So I discussed that real-life system and I simulated and as a byproduct of it, you get shortest path calculation. So I will do some of these demos. So plate design you have already seen, line fitting I will show you. So let me just go. So line fitting is probably something that you have done. So it asks me how many points I want. So I have given five points. And now I have the screen on which I am supposed to click in five points. What has happened is it has fitted a line, the best possible line through these points to minimize root mean square error. I guess I have set it up so that it goes away very quickly. But anyway, the point is made. Line fit. So why am I doing this? So this is a programming exercise. As far as its math is concerned, it's a fairly straightforward piece of mathematics. But the point is that this example, this programming exercise becomes much more real when instead of specifying the coordinates by typing them in, you can click the coordinates on the screen and then instead of printing out an equation of the line, you actually see the line on the screen. So people will be much more interested in solving a problem like this. If they have graphics, if you just give it to them as a problem, as a textual problem, they will solve it, but they will not have as much fun and they will not like it that much. So spiral we saw. Button-based controller, then tree drawing we have seen. Button-based controller, formula layout, gravitational simulation, airport simulation. By the way, all of these require less than 250 lines of code. Many of them require less than 50 lines of code. So you may be tempted to think that many of these are difficult problems, but they really are not. Please read through before deciding to classify them as difficult. So I want to show button-based controller, formula layout and simulations. So this is another way to control the turtle. So what I'm going to do is I can manufacture buttons now. So I have everything, simple CPP has everything so that you can manufacture buttons. So I can draw rectangles, a button is nothing but a rectangle. There is a text class. Text is a graphical object so I can place text in it. If I click on forward, the turtle moves forward. If I click on left, the turtle turns. I can go back and I can make it go forward. So I can keep doing this. This can be done in week two or week three. The only additional statement it needs is the if statement. The moment you do the if statement, you should do this because it's sort of... I mean as I said, you have to keep the excitement going. So this is a way to do that. So it doesn't require that much, but people use buttons all the time and they see here that whatever they use, they can themselves manufacture. Okay, layout. So this is the formula layout problem. This is really small, isn't it? Unfortunately, this control plus plus, control shift plus will not work on this. Oh, there must be a zoom or something. Oh, it will not work on this. So I will just explain it on paper. So I want to draw a formula which looks something like this. So even this is too small. So what is the problem over here? I have a formula like this and I want to use the graphics machinery to draw this on the screen. Okay, so how will I specify this? I will specify this as say one plus one... Sorry, one upon... Okay, let me just write it. One plus one upon one plus... Like our usual expression, I will specify it. I want to write a program which will take this description and generate this. Okay, so this turns out to be a nice example of recursion. It has been discussed in the book. I wanted to show it to you but I guess I will not worry about it because this thing is turning out to be rather tiny right now. So I'll just go on to the next demo. Okay, now what I'm going to show you is a gravitational simulation. So there are planets, they have velocities and they attract each other by gravitation. All of these you can calculate. So if a force, if a body exerts a force on another body of attraction, then that force is in a certain direction and the force is proposed by Newton's law, the force is equal to the product of the masses divided by the square of the distance in between them. So you can calculate these things and based on that you can see okay, the earth is currently right now over here, it is going in this direction, the sun is over here, because of its attraction it really wants to go straight but it will turn a little bit and it will go in this direction. Again at each point it will have to turn because of being attracted and this calculation has been done in this program. It is a fairly simple calculation. It might seem complicated but it actually is not really that complicated. There is a chapter which discusses this. I think I had to give this as a redirection rather than... So obviously the red circle in the center is the sun, this is the earth, the orbit happens to be a slightly eccentric over here but the calculation is reasonably simple. So it is slightly more complicated than what you might write without very little thought. It is a little bit more complicated. But this thing that you have learned in physics, you can actually experiment it on your screen. So you can figure out whether what they teach you in physics actually does make sense or not. Let me show you one more. So this is a simulation of an airport. So aircraft will come in, they will land and then they will go along some taxis ways and then they will halt at some terminals. Of course I don't have beautiful pictures of the airport and aircraft and things like that. Everything is very schematic and you have to use your imagination. So please humor me. So this is an aircraft which comes in and that is the terminal where it lands. So it is going to wait there for a little while. This looks like the two aircrafts collided but that is not the case. I have made those aircraft sizes very large and therefore it appears that they collided but the whole point of this simulation is to make sure that they do not collide. As you can see, while that aircraft is passing on this runway, the previous aircraft waits. So they have to keep some distance in between them. So things like this are in fact done routinely when people build airports or train stations or anything these days is built with simulations. So having a simulation exercise is very important and I think this is reasonably within the reach of your students' abilities. Not on day one but maybe on day 100 they should be able to do this or day 150. Certainly by day 200 they will do it with absolute comfort and it's okay for you to tell them on day one that look, this is what you cannot do today but this you will be able to do on day 200 because you have to set a good goal for them. So at the end more or less I'll just finish up. So we have to excite the imagination of students and then challenge them. I guess I should just put down two quotes because this is a quote which I like which says something like if you want to build a ship don't drum up people together to collect wood and don't assign them tasks at work but rather teach them to long for the endless immensity of the sea. So you tell them that you make them want to go on big voyages and the rest they will do themselves. There is another quote which I would like to share with you. This is by Bertrand Russell. It says when you want to teach children to think you begin by treating them seriously when they are little giving them responsibilities talking to them candidly providing privacy and solitude for them and making them readers and thinkers of significant thoughts from the beginning. That is if you want to teach them to think. So on that note I will conclude my talk. What are the contents of CS 101? Is it C or C++? This is my first question and second I want to ask that can we get some lesson plan that till when how many days we will go with simple Cpp and then we will continue with IO stream and all. Certainly. So in chapter 5, 6 I think repeat statement is dropped because loops are taught. Now functions are explained in chapter 9. So when functions are explained after a basic description of functions you tell students that int main is a function you really should be declaring as int main rather than as main program. Can you give a lesson plan? So I am planning to put together I was going to stop over here but this last point transparencies for the lectures will soon appear on Nagra Hill home page and also my home page. So they will answer your questions but very briefly the moment you introduce functions int main can be introduced and even namespaces can be introduced and so at that point namespaces int main and IO streams can be introduced. So from that point onwards they can deal with ordinary C++ except if they want to do any graphics. Plus if we set up these much goals as airplane and all. These are long term goals we have to finish up simple CPP within 2-3 weeks I think then when will they prepare airplanes? So even that code that I showed you that was about 250 lines of code. Will they go with those codes or they learn other things of CPP? So this is an application. So first of all everybody doesn't have to do that airport simulation. I think everybody should learn some simulation not necessarily airport simulation. Some can go with that also if they like. Right, so that's exactly the point. Few of them can go specialize in simulation most of the time most courses have a project. So there are several chapters in which material is suggested for projects. There are 2 chapters on simulation where this material is suggested. There is a chapter on this gravitational simulation which is a different kind of a simulation where material of that kind is suggested. The ideas which are suggested in gravitational simulation will actually apply to things like circuit simulation also. So these simulations will later be combined with other programs also. Then only they will be helpful. Students will ask what are the applications of these simulations? The applications of these simulations are if you want to build an airport you have to do this, that is it. So it does not have applications in school but if you want to, I mean look people today can get information about lots of things. In fact what I want students to think about is if there is something being built we are going to have elections in a few days or you probably already had elections and our students must be able to understand all these different things and they should be able to apply their knowledge to all such problems. So therefore I think I am very keen that students acquire the tools to do all these things. Let me give some concluding remarks to your question because similar thoughts are in the minds of people generally. You asked about what is the lesson plan followed in IITB? What is the syllabus in IITB? I do not know whether you have read my paper on the blended MOOCs for Indian students which I had circulated. A specific observation that I have made there is that two teachers teaching the same course in successive years may teach it completely differently. So please understand that is what was happening. When I taught the course before Professor Ranade I did not use simple CPP at all. I tried to use some easy windows with some reference to graphics not because of the graphics but because of the points that he made that letting people handle graphics makes them learn easier but that was a separate process. Sridhar Ayer will be speaking to you soon and who has been teaching this course after him does not use simple CPP at all. So please understand that there is no standard way or standard lesson plan that can be stipulated but since we are going to use this book as a guide for our course and even for EDX CS 101 next year for example when I will be teaching it with Professor Suprati will more or less follow this. So the material that will get prepared for the teacher's training will be based on this but that is not necessarily the only way of doing it. And in fact each one of you each one of you should be able to evolve one's own teaching plan since not all of us could be accomplished programmers or accomplished teachers like Professor Ranade we might take help. That is exactly what we do when we use a standard textbook somebody has done a lot of work and it is much easier for me to understand that plan and follow that plan. Now most of our teaching happens. It is in that context that the book is used but it is not like there is a standard lecture plan in IIT Bombay which is followed etc. Absolutely nothing of that. Sir actually we people are used to having a standard syllabus and we need to follow it. Yes. We have to do it. That is because you have never questioned that rule in your life. Sir we have questioned but are head of the department I don't know. We also are heads of the departments. The point is if I have the conviction and if I have the courage of conviction I can always deviate from that quote. The important point is my students should learn to program as long as they do anyway we are standing between tea and our people. Thank you sir. Thank you very much. So I hope you have enjoyed the recorded lecture by Professor Abhinav Nanade as it happens we are in for a big surprise including me. You will recall that I had mentioned at the beginning that it is unfortunate that Professor Nanade is not able to speak to you personally because he is probably in some remote corner of Ladakh. As Providence would have it he went early morning to the Mumbai airport and his flight was cancelled so he was dumped back and he has returned to IIT Bombay campus. So I am privileged to introduce Professor Abhinav Nanade in person. So Abhinav, thank you for joining us. Although I understand that your family would be very disappointed by the fact that you are not in Ladakh and you are in the mutant precincts of IIT Bombay again. But it is a privilege for some 8500 colleague teachers who are sitting here. I would request him to say a few words and then we will probably go over to a couple of remote centers if they have any questions or comments to make or if they wish to ask anything to Professor Abhinav Nanade. I would request workshop coordinators to raise hands if there are any queries. We would not be able to go back go to more than 2 or 3 people but it would be fun for him to interact with he has interacted with all the workshop coordinators extensively when he was here and I think he would love to interact with some of you as well. But before that I would request Professor Nanade to share his thoughts or what I would say, concluding remarks to his long listening. Professor Nanade. Thank you Professor Fatak. It is a privilege to be here. Yes, I am disappointed that I missed my flight but I am actually quite happy that I am able to speak to you. I just want to make a couple of points before I will be happy to take questions. The first point is that the introductory programming course is an extremely important course certainly for the computer science departments because that's the course in which the computer science department makes the first impression on the student. And as you know, first impressions are extremely important. How you, whether you challenge the students in that course or whether you bore them will determine how the students are going to look at your department. Even for other departments if you make the students feel that look computer programming will help you in your studies not just teach them syntax but actually enable them to apply the ideas then the students will get excited and students will want to do computer programming and it will be not just good press for computer science departments but I think we will see a much more capable kind of student coming out. I believe in teaching somewhat challenging courses and you may be surprised that or perhaps you may not be surprised that in my effort to make my course teaching challenging I do over extend myself from time to time. What I mean by that is that there are topics on which I might actually commit grave blunders in class I will say something wrong then the next day I will go and apologize to the students I'm sorry this is what I did but the surprising thing is that students forgive these blunders very very easily. If the students believe that you are going to give them something of value students are very very easy to please in this sense they are very easy to they are very willing to forgive you so my request to you my appeal to you is that do try to over extend yourself maybe extend go go a little bit try to be a little bit more adventurous and so long as the students see that you are trying to help them you are trying to get the fun back into learning they will love you for it and of course our tradition is that if our students get better than us that is what we are there for so I think please do take this very seriously so with those somewhat heavy remarks I will now throw the floor open for questions apart from everything else I hope you appreciate the passion that oozes out of every bit of his thinking and every bit of his talk so thank you Mr. Ranade there are several set of hands raised let us go to Savita engineering college we have been teaching computer programming in normal way but the graphics way of teaching which Ranade sir explained was excellent and we have also been even though it is not in syllabus we have also been trying to introduce graphics by asking them to create analog clocks to prepare calendar and such things to move a ship and so on but the only problem is when we teach graphics through this the students ask why should I do graphics with this when I have lot of graphics tools for doing all such things and I don't find use of using doing graphics in C anywhere else in the company so that's what is the question if you could say where do we apply C graphics in the real world now then it would be useful for encouraging our students to learn C graphics as well as second question is that how to change the mode of that is from 16 color to 256 color in C programming because I heard that program is also being did in C graphics it occupies only less memory just a few kb's so how to do that if you could say that also it would be more useful sir thank you okay so let me take the first question which is what is the use of graphics so very recently I got a query from a student who wanted to do game programming what is game programming game programming is primarily graphics based programming of course when you do game programming you are dealing with much higher quality graphics but the basic ideas are there in this simple cpp graphics as well what are the basic ideas that you have to draw shapes that when you move them you have to keep track of them you have to keep track of their orientation so these are all the basic ideas so even if you just think of the graphics itself graphics itself has direct use being able to use graphics there are many many students will want to know will want to write games okay at the end of the course often in the projects many students do beautiful games using the graphics so I think there will be some students to whom you may have to explain that these are some of the uses and again visualizing algorithms is becoming an extremely important idea with the handled devices you can do graphics on handled devices and you have to now the time is that people don't really want to do text based input wherever they can wherever they can do graphical input that's what they want to do and therefore this is just a basic introduction to graphics as input output and of course there are the other reasons for example if you want to understand recursion if you do it graphically as I showed it will be a much more direct way of understanding the second question I didn't quite get you are saying that there is nothing to do with cc++ it depends upon the graphics package yeah so the resolution will be fairly good I mean it will be just the standard x windows kind of resolution I think you may be talking about different graphics package I think there were other graphics packages where the resolution was not very good so the number of colors was limited here you can get you will see in chapter 4 I believe that you can specify a color by giving it's blue component green component and red component so you can get any shade that you want however it is to be kept in mind that this is not a graphics course the primary goal of the whole exercise is to learn how to program so students should not get too worked up with graphics because then they will graphics is very very attractive so you have to sort of also hold them back from too much preoccupation with graphics but this will be a reasonably good system for first year as a first introduction we will now go to NITTR Chandigarh Sir I want to know that how that tree was created using recursion the basic idea is that if you look at a tree I can think of a tree as a trunk on top of which there are two trees there is a branch which goes out but whatever is on top of the branch I can think of it as another tree tree really does have a recursive structure there is the trunk on top of which there are two trees if I look at those individual two trees inside that also there is a small branch and then the branch separates out so basically that is the pattern that was used in this recursive program so as a result that recursive program is very very short there were I think there are two different recursive programs one in which I was branching only it was only producing two branches at every step that was sort of the simple program and then there it was it was turning those branches one of those branches was shorter but again the program doesn't become very complicated if you give these programs to students you will frequently see that students will produce their own interesting trees in fact one of my exercises was you know how to draw trees now so go out and observe some real trees and try to make your tree look like say a people tree or a banyan tree this is not... so you have to use your imagination a little bit but you have to just challenge your students into doing something new that's about it Thank you I think we can go over to one more center at least LDRP Institute at Pujrat okay over to you sir Sir my question is what is the ultimate objective to teach students this graphic in the beginning of C++ program yeah okay so I will give a quick answer the first chapter and the preface especially gives a more detailed answer which I will request you to read so there are several answers I tried to explain in the talk that if students can do graphics then many many concepts can be very easily explained very often we have quite a bit of difficulty in explaining recursion for example recursion is an important topic but if you try to explain it it's easy to get confused whereas on the other hand if I try to draw a tree on the screen it is it is very easy to follow in my opinion how the recursion is going to work this is not the only concept even the very basic concept of control flow how loops work okay that gets explained quite nicely with graphics a very important programming idea is that whatever application you are doing that application contains some patterns so suppose you are doing a payroll application then there are some things that you do repeatedly okay so in writing any program you have to understand what the pattern or what is repeated again and again now in some applications this repetition may be obvious in some other applications the repetition may not be obvious something similar works with pictures as well that when you draw an interesting pattern you have to first figure out what exactly the pattern is and once you figure out that pattern then you have to make that pattern be reflected in your program so essentially the same game that you are playing when you write any old program which is understanding the pattern and expressing it in your program is being played when you draw graphics also but in graphics the pattern that you see is something that you understand intuitively whereas in other places the pattern that you see may be difficult to understand so here what we have done is that we have simplified one part of the process so our students don't have to jump six feet at a time but they can jump three feet only and that's how the learning can get improved and my experience has been that if you give graphics as a toy to students students love it these days we have a big problem with attracting student attention students want to know look what can I do with it students have their own personal agendas every students want to do something with whatever he or she has learnt here you are giving them a chance to say that look take this and use your own creativity and do something interesting with it so in all these senses I find that graphics is very very useful to have in the classroom Dronacharya college we can see you over to you actually I was working on simple cpp using windows 7 platform so when I was drawing circle there are certain problems which I was facing firstly it was slow secondly the code block hang for many a time so is it specifically designed for ubuntu platform or it's working for windows 7 as well thank you over to you okay so code blocks is now working on windows as well as unix so you should be able to download code blocks and right away start using simple cpp through it okay so I think there are instructions put out and or they will be put out shortly but you should have to do you will have to do very little work to get code blocks running and simple cpp running on top of it in fact I will elaborate more on this point in my session but already I believe at each remote center the simple cpp and the code block setup composite setup should already be available if there is a problem we can discuss this during the lunch break individually one on one and sort this out but there is no and there is further simplification that we are doing but I will get back to you later during because of my Shastra University over to you Shastra so how can I create executable application package for this program outputs like visual basic we are having exe creation and in android development we are having apk file creation at the end of the project for this pattern drawing we can see the output on the screen how this application package can be created by clicking that executable file I can see the output without the help of compiler it's a basic portion so code blocks will produce an executable on windows it will have the suffix exe as you suggested okay exactly so what the name of it and all that I think the documentation will tell you but exactly like other exe files this will be a standalone program which will not need the compiler any longer so you can give it to somebody else they don't need to have code blocks there and it will run similarly on unix again an independent executable file will be created on unix for some reason the default name of it is a.out but that can be changed you can give it whatever name you want and then you can give that file to other people if you want to share it with other people alright I think at this juncture we need to stop this interaction and we'll say thank you professor Ranade thank you very much sir and best wishes for this course and as I said I'm very happy to be here and I'm glad that I had the opportunity to answer a few questions thank you so much sir