 Good morning. In view of the decreasing attendance in the class, I have decided that from next lecture onwards, every lecture there shall be a quiz. So, please bring those writing pads which some of you might have used during school days, small pads where you can clip a paper and write on it properly. So, please bring that otherwise you will be inconvenienced in writing the answers to the quiz. We shall have a 15 minute programming problem to be solved at the end of every lecture from Friday onwards. Since we are not conducting conventional quiz and our attempt to conduct quizzes using clickers have not succeeded to the way they should have. I will wait for one more term, next term I will use them, but we need to have evaluation as well. So, I will use those quizzes conducted here in the class from now onwards. Today I propose to discuss the basics of another extremely important area professionally which is called software engineering. You will recall that I had mentioned something about the course projects in the last lecture in a rather hurried fashion. I have delineated the submission schedules and the activity schedule. So, I will be discussing the course projects after having discussed the main points of software engineering. We will first look at the principles of software engineering, try to give a definition. We will then discuss the activities which are covered under the software engineering ambit. Any organized activity that we do requires measures to be institutionalized to find out how effective that activity has been. These measures are often called performance metrics and we will discuss the process maturity measures which have evolved over years. The ER model and the functional model with the data flow model is something that will not be discussed in this class today, but later I will put some supplementary material on these. Those of you who are interested might read these. These are modeling techniques to model information systems. They are traditional modeling techniques. There are too many of them. In fact, we have a separate elective course on software engineering. Mostly computer science students take that course. There is also an elective for the postgraduate students of non-computer science branches. It is also open to senior undergraduate students which is called modern information systems in which we discuss these models in greater details. But we will discuss the activities that you as students of programming are required to undertake whenever you do a professional project such as the one which you are going to embark on when you undertake CS 101 course projects. So, some specific issues relate to user interface design which we will discuss in this class. At the end of this discussion, we will stipulate the software requirement specification document that is required to be generated for any problem that you solve which is non-trivial. First of all, consider the role of software. You are already familiar with the basic notions of hardware and software. And at one time, you will recall we had distinguished between different types of software stating that software such as operating system, language compilers, etcetera, is called system software which does not solve any real life problem directly. But without that system software, solving real life problems would become exceedingly difficult. The kind of software that we write for solving real life problems is typically called application software. And indeed, this entire course on programming is about developing skills to write that kind of application software which will solve real life problems. We generally distinguish between scientific computational problems and data processing problems. Although that distinction is not really true because even in scientific computing, the amount of data that you handle requires you to understand data management and data processing. As also in conventional data processing tasks these days, there is so much of computations and so much of analysis that you need to understand how to solve computational problems as well while addressing data processing problems. In short then, the programming skills that you learn here both for computational problems as well as for processing records in files, etcetera, all are required in solving any real life application. And application software development constitutes the major software business in the world anyway. In any business and when I say business, I do not mean trade or commercial business, business as in any activity. So, any activity whether you take gadgets, right from washing machines to televisions or you take large information systems, the most familiar to you all would be the academic information system which this institute maintains or the hostel information system which your hostels or hostel coordinating unit will be maintained. Banking transaction processing is another application, railway reservation is another application, missile control is another application. All of these applications, the functionality in these applications is always provided by software. Hardware is only the basis on which your software runs. On top of the basic hardware, you run system software which is operating system environment and so on such as you have Ubuntu here or you would have Microsoft operating systems in many places. On top of it, you have language compilers. As I said, all of these are pieces of system software. And needless to add, good system software is the basis for developing good application software. While developing and deploying application software, the fundamental requirement is to save your time in developing that software. Imagine for example, the programs that you compiled, if you did not have an interactive compiler. Today what you do? You write a program, some file dot CPP and you say C++ file dot CPP. It compiles, it gives you errors. You have an editor, you immediately go to the editor, correct those errors, again ask for recompile. Typically how many times in a lab you recompile a program? Roughly any idea? At least twice, maybe 5 times, maybe 6 times, maybe 10 times. Imagine when we were doing, we were, I was teaching programming in, let's say, 1977. It was about almost 40 years ago, 35 years ago. At that time we had a machine called EC-1030, Edimaya Systema, a Russian machine, which is a copy of an IBM 360 mainframe, which was one of the best computers in the world. But programs had to be fed using punch cards. So you wrote your programs on special sheets, then special type is called data entry operators used to punch cards for you. They would make mistakes occasionally. You will submit a punch card deck to the computer center. Let's say you submit it today. Typically, second day evening or third day morning, you will get back your punch card deck with a printout of the program and the compiler errors. Now, the error making capability of human beings were no different in those days. So therefore, people would require two or three compilations at least before they could got a cleanly compiled program. And it would take six days of total time to get three compilations. How would you like if you compile your program? You can see the errors, but you are told come three days later to correct those errors. So what would you do in such a case? In such a case, you would be extremely careful about the errors that you make. So it was not uncommon for people to take the punch cards and read card by card, every line that was written, the program line, and confirm that every line is syntactically correct. A missing semicolon could result in two days of delay. There were occasions, you see, when you punch those cards, many of you would not have seen those punch cards. I will try to get some to show you those. They will punch holes. The holes is what would be read by a card reader. But while the trypists punched those cards, the card punch machine also typed a small line at the top of the card which you could read. Sometimes the printer ribbon on that card punch machine would conk out. And you will not be able to read because nothing is printed legibly. You may not believe it, but most people had learned to interpret the holes on the card. Say this is I, this is J, this is opening bracket, this is equal to, and that is how they could confirm. Because it was unimaginable that you would lose three days just because of some silly errors. Of course there would be genuine errors. But let me tell you that that discipline which was forced because of the time that it took to compile a program and get the errors. The discipline which was inculcated ensured that people made far fewer errors first time when they wrote the program. So the net result of the modern technology that you have, the compiler technology, the interactive terminals, the interactive editors, all of which save a lot of time, it also makes all of us less disciplined in our approach to program. Overall still it saves a lot of time because it all said and done. Whether you recompile five times or you recompile ten times, within half an hour you are able to get your program straight which was impossible earlier. As a result we conclude that good system software is the basis for fast and effective application software development. So you have operating system, you have programming languages, the programming language that you are studying C++ is called a third generation programming. I have already commented that there are many programming languages in the world although there are three basic paradigms of programming. The procedural programming, much of what we have studied in the first part of this course is procedural programming. The next paradigm is object oriented programming which is what we shall be discussing in the remainder of the course primarily to buttress whatever we have studied in procedural programming. And there is a third paradigm called functional programming often used by people who work on artificial intelligence. Although these are three different paradigms of programming, each paradigm supports multiple programming languages, many of which are still popular. Consequently I will remind you that knowing a particular programming language is the most useless claim that you can ever make. But knowing programming principles is the most useless claim that you can and should make. However that programming is assisted by the programming language compilers that you have. Additionally there are a whole lot of tools to build software which keep evolving. There were no interactive editors earlier. In fact if you see line editors even today some of you would have used VIM for example or VI which is the basic editor in actually a command driven line editor. But interactive editor have saved time further. You can actually have additional features in editor which can show matching brackets. So if you miss a matching bracket you can actually know where to insert etc. So these tools keep evolving. Additionally you have some fourth generation languages which are called specification languages. The most popular amongst the fourth generation languages is called SQL or structured query language. It evolved in early 70s out of a great work done by started with one professor called who developed relational algebra and based on that he defined a language called structured query language which today has become the most popular query language for managing any kind of data in relational database management systems. As I said we shall not be discussing that but such tools further reduce the time required to process data. All of these collectively are often called RAD tools. RAD stands for rapid application development. So faster, quicker, better is the motto of all technology development in general and definitely software technology development in particular. The point is when we say that time to develop software has reduced, has software itself reduced in size? For example you can imagine that the compiler which produces the machine language translation of your programs, the machine language instructions could be 10 or 20 times more than the lines of code that you write. So clearly a third generation language permits you to solve the same problem by writing one tenth of the text. SQL would have another magnitude of change. Should it not mean that the program size is shrinking? Well, program sizes are shrinking for solving a specific problem. But the fact is that humanity has concluded that larger and more complex problems perpetually can be addressed because they come within the realm of the possibility of being able to write program. So in spite of all the tool development, the software, application software development continues to be a challenge. Lines of code or the number of instructions that you write in a programming system, nobody talks about a single program. Most of you have been writing one program at a time, either for answering questions in an exam or for giving an assignment in the lab. But an application software typically will consist of several programs. Even the small project that you will be doing in this course through a group activity is expected to have anywhere between 2,000 to 5,000 lines of code. But 2,000 to 5,000 lines of code comprising, let's say, anywhere between 12 to 20 to 30 functions and main program is often called a trivial piece of software. A non-trivial piece of software will have 10,000 lines of code plus. Any significant real-life application would have anywhere between 20,000 lines to 50,000 lines of code. Medium complexity applications have 100,000 lines of code ranging to a million lines of code. The typical banking centralized transaction processing systems often have 2 to 3 million lines of code. No single human being, including the noble laureates amongst you, would ever imagine writing 3 million lines of code. Even the act of writing will take longer than your lifetime. It's not possible. So the moral of the story is that modern software development is a group activity, is a team activity. And the projects for this years 101 are designed to give you a glimpse of what that team activity is. The typical lifespan of a software is about 10 to 15 years. What happens after 15 years? Why do you have to throw it out in general? Here are some comments on that. First of all, software is developed or engineered. It is not manufactured, like a car or a scooter or a bicycle where you are manufacturing plants. Some pieces of software are indeed manufactured, which are those pieces. You take any standard software, the same software is being used by millions of people. Take for example, word processor. The most popular word processor is the Microsoft word. Now Microsoft word has been written and it also contains a very substantial amount of code developed by a large number of people, mostly sitting in Seattle, some sitting in Bangalore, wherever. But once this code is written, once a package is made, then that package can be embedded by copying it onto a CD. And that CD can be manufactured including the copying process. So you make one million CDs of the same program and that program can be distributed. That is the only manufacturing that can happen. However, such pieces of software which are standard package softwares and which are used by people without absolutely changing any functionality, whatever functionality that package gives is acceptable by people. Spreadsheets, word processing packages which are called office automation tools. More nearer to real life application are tools which solve accounting problems. One of the most popular accounting packages in India is called Tali. It was developed in India and it is considered one of the most selling application software or accounting software in the world because in India most of the small scale, large scale industries use Tali. This Tali was developed by a team of people led by Van Bharat Goenka and this software is also manufactured. So they copy it and multiple copies and sell it. But in the accounting package there are problems. Somebody says, look, I not only want to do this accounting but I want to connect my accounting package to some other application which I have developed so that the transactions could come directly into this package. Let me give you an example of interfaces which are required across multiple applications. There was a time in IIT when the library application where you enroll for the library, books are issued, et cetera, et cetera was developed on a tool called FoxPro and it was running in the central library independent. Academic office had a system of maintaining records of the students which was running on the mainstream. Account system was separately developed on a micro computer and that was running separately in the accounts office. Now if you enroll yourself as a student with some role number and name you have to enroll independently in library because that library system is different. You have to enroll independently in accounts office because you have to pay the fees which has to be recorded. So it was not uncommon for the same student to be named differently in different applications or spelled different. What should have happened? The moment you enroll you are given a role number and you come to the academic office. Automatically some packet of information should go from academic office to central library and that packet of information should be used to enroll you in the library automatically. LDAP for example is one such common enrollment across the institute. Once you have a LDAP login ID there is a system called Lightweight Directory Protocol System which is implemented by the computer center. It is a distributed system. So what it guarantees is that once you enroll most of the application system doors will open to you using that LDAP password. Now this kind of integration is important in real life and in order to make such integration feasible it is required that any applications of the development that you undertake must be amenable to further change. Compared to the real life changes that you have to make in application software this change is trivial. What are the important changes? The important changes will come about because the functionality that was originally defined undergoes changes. Let me give you an example that you will appreciate. Do you know how the CPI is calculated for you? You know the formula? Okay. What happens if you fail in a course? Zero is multiplied by the credits. Does that continue to happen in the numerator? What happens if I fail in a course three times? So my semester performance index in three semesters will go down because of that zero, zero, zero. And suddenly in a summer I pass. Now what happens to my CPI? Anybody knows the rule? Nobody knows the rule. If I am not mistaken the synnet has ruled that the moment I pass a course in summer or wherever all my pass since are washed out. That means my CPI even if it computed using my zero scores in the three earlier attempts or two earlier attempts will be removed from the computation and only the pass score will be made. This was not so at one time. At one time if you failed you stayed failed. Even if you passed you got that grade whatever you got but the CPI did reflect your failed grade also. In order to ensure that once people pass a course their past is not reflected in the CPI sometimes synnet made this rule change. Obviously the software which was computing CPI has to undergo change. The previous computations are no more valid but the people who wrote that software are no more there in the institute. This is a very common theme that occurs again and again and again in major software development. Software is developed as per the specified functionality, specified computational rules etc. etc. It starts getting used. People start using it. There are teething problems, some errors here like the bugs that you have in your programs. But eventually it stabilizes and suddenly three years, four years later the organization says oh this is not how I want to do business now. I have changed this rule number 13B, I have changed that rule number 17A, this computation has to be different, this procedure has to be changed. Obviously the programs have to change but the people who wrote the programs four years ago are invariably not there in that organization. Imagine now you struggle hard enough to correct errors in your own programs. Now you are given a program written by somebody four years ago written in exactly the same sloppy way that you are currently writing programs which means no comments, extremely complicated logic and you are told the boss the CPI has to be calculated differently now. Now you will read those 5000 lines of code in that you will find which function calculates CPI if somebody has meaningfully named the function saying float calculate CPI parenthesis parameters, parameters. Instead if somebody says void abrakad abrakad something, no comments. How will you figure out? What I am hinting at is it is extremely important that when you write a code even two lines of code it must be understood by human beings because it will be read by human beings. Typically it will be read by four years later somebody has not by you. It has been proven that if you read your own programs after six months often you don't understand what you are doing. If others have to read it life is miserable but that unfortunately is the life of all software professions. This activity of modifying existing programs to meet new challenges in the business, new pathers in the business is suddenly called maintenance. It is called software maintenance. Software maintenance is not hardware maintenance. It is not like bicycle maintenance where every week you put a oil in the wheels and whatever whatever. That maintenance is not required because software does not wear out, hardware wears out. In that case the way software maintenance works is you have to keep modifying this software. Now imagine that four years ago something was written and some of you modify that software. After that modification is done system stabilizes next year again something else changes. Not in CPI computation maybe hostel allocation rules. Third year something else changes. Maybe hospital whatever whatever some procedures. Within four, five, six years the original software does no more resemble the current software that you have. It has become a behemoth. Different people have added patches, different people have written additional functions. It is not uncommon to find five different routines calculating CPI because the first fellow was asked to modify the CPI computation, decided that the original function was A badly written, B was not working correctly and C in any case I don't understand how it is written. So I will write a new function. So he will say DBP function calculate CPI. Two years later somebody will say who is this DBP? Hopefully the program is written XYZ CPI computation and like that the software enhances itself. It becomes like a huge animal and when that happens the software is unmaintainable and when software becomes unmaintainable it has to be thrown out. You have to start from scratch. Meanwhile the technology takes leaps and bounds. The old technology there are for example applications, good applications, accounting applications, inventory applications written in IBM 360 assembly language because at that time FORTRAN was the only main programming third generation language that had evolved in 1956. COBOL which is a data processing language came about in 1960 but applications which were written between 1952 and 1960 were often developed in the machine language or assembly language of IBM 360. Maintaining that application people had to write assembly language code. But in 1965-1970 when about 10-15 years had passed people said it is stupid to maintain this application because now I have so many powerful tools let me rewrite this application in a new generation technology. So in a nutshell then 10 to 15 years is generally the life cycle and when a software becomes unmaintainable you rewrite that software. And to emphasize the point that while package products may exist the large scale application package products, one very important package for example used universally by most companies which do manufacturing, which do trading, which do accounting whatever is called ERP or enterprise resource program. So ERP packages are quite popular. SAP is one of the names of such ERP package. Whenever you get such package software it is not like it solves everybody's problem because every manufacturing organization also does some procedures differently than other. So such packages also have to be customized and that customization then becomes the application software on top of the package which altogether must run properly. In general then professional software development and professional software maintenance is a hazardous activity. So people said this is not on. In the early days of programming, programming was considered an art, not a science or not engineering. In fact the first treaty on programming written by a very renowned academician professor Donal Kanot, the treaty was titled Art of Computer Programming. The first few books which he wrote are considered still the Bible in programming. But it was still called art because people said constructing an algorithm and making some functionality implemented requires artistic thinking. That is all right when individual programs are concerned but when you consider large programming systems if there are 20 artists working together on painting a single painting, can you imagine what will happen? So while some artistic flavor is still required in the mind, these 20 people have to work almost like a disciplined army and a disciplined group works using principles which are evolved for engineering applications and for management. Unfortunately engineering is something that you will be learning over the next few years and management is something which you are not formally learning although you don't know it, all of you know some management or the other. Consider any activity you plan either singly or in groups. There will be some management involved, managing yourselves, managing your notes. Why do you have separate notebooks typically for physics, chemistry, maths, etc. Because you can easily find out physics quickly, chemistry. Imagine if you had a single file containing notes which are put in ascending order of let's say time, date wise. Now suddenly you have to recall when pointers were discussed. So among those 10,000 pages you have to find out first of all those pages which relate to computer programming classes and then within that which lecture, which day, what was done. So the simple organization of information is that everyone does. But consider organizing larger events. You will find that one of the best learnings that happens to the student community on the campus is when you organize events such as performing arts festival or tech fest or mood indigo or hostel functions. Take a simple hostel function. A simple hostel function would be organized let's say by a couple of secretaries and a few volunteers. What will all involve? What is involved is you have to decide okay this is the evening time or night time after dinner we will have this function. We will have this function in the lounge. Somebody has to arrange for a PS system. Somebody has to put up notices. Somebody has to announce that coffee has to be served at 10 o'clock in the night. Somebody has to arrange the list of speakers who speak on that function. If the function is a cultural event people will have to hunt talent in the hostel who will sing, who will present a guitar, so whatever. This is non-trivial organization and it takes time. So what do you do in such organizations? You form first of all a leader who is typically a GSEC or whosoever it is, then that leader will form a team and will say okay you do this, you do this, you do this. Suppose I have been given charge of organizing for PS system at this time. I alone may not be able to do that. So I will take another set of students from the hostel and say you go to the PS system chief, find out how much money he will charge for renting this, whatever, whatever. Now that is management. You all will learn it implicitly. But there is an explicit learning of management that is required when you handle large complex projects, whether they are engineering projects or otherwise. Since software is defined as an engineering activity, here is the definition of engineering. Engineering is the analysis, design, construction, verification and management of technical or social entities. So social entities also require engineering approach for analysis, design, construction, verification and management. And when you apply this approach to software, you get software engineering. So this is the definition given by IEEE in 1993. He says application of a systematic, disciplined, quantifiable approach systematic, quantifiable approach and disciplined approach is software engineering, the application of engineering to software. Now to engineer a software or to apply engineering to software we must define a development process. How do you develop a program today? Typically in the lab you develop a program by reading the handouts. The handout has four or five programs given and there is an assignment. The first impulse when you see an assignment is to first download all the sample handout programs and see which one fits closest to this. And say okay cut these, these, these, these many lines, paste them here. Cut, return zero, etcetera, paste it here. So you have to write less. Now you figure out what that assignment is and try to put in a few instructions somewhere in between. That is not how professional software development is done. When an assignment faces you, then what you are supposed to do is pick up a piece of paper and pencil and think about that assignment. Write down the idea of the algorithm. Imagine there is no program available in the world. Design an algorithm, design an approach. Write in plain English what you would do. You will process this first, you will read this data first, you will multiply this, you will write this on to file, whatever, whatever, whatever. After doing all that you will, you will have what is known as the design of your algorithm. Then you will write that program. When you write that program then and only then you will go to the terminal to type. That is the engineering discipline. Imagine if cars were made the way you write software. So somebody imagines I will have a nano. And then he says there will be a door here, there will be a steering wheel here, there is here. Okay cut paste. So steering from Maruti, this from this, this from this, nano. It won't run. And even if it runs nobody will purchase it. So what people do they go to the drawing board first. They go to the conceptualization phase. They do a design, they do a prototyping. They test the prototype and after the prototype they say alright this can be manufactured. What are the problems in manufacturing? I will require carburetors, I will require brake pedals, I will require this. Do I make all of them? No. Who are the people who manufacture these small things? Do they manufacture as per my specification? Otherwise a brake lining picked up from some supplier may not fit my wheel because my wheel size is different. A huge amount of engineering exercise is undertaken before even you begin thinking of production. Applying that approach to software is actually software. These are various steps or activities that one undertakes while developing software of non-trivial nature. So you start with functional specifications. What has to be done? You do systems engineering. Systems engineering is understanding all the system components that you have or you will require to meet that functionality. Then you do a feasibility study. In software the feasibility study will be I am solving this problem. To solve this problem I have to write software. The problem has to be solved within 6 months. If my software development is going to take 8 months it is useless. I should say it is not feasible. Suppose the software is required after 2 years. I conclude after my feasibility study that I can develop the software in 8 months. It is acceptable. Except that I estimate the efforts required. Efforts incidentally are measured in terms of person month. So whatever software one person can deliver in one month is called person month. So there are techniques in software engineering of estimating how many person months will be required to develop this software. So 8 months may be the calendar period. But imagine if I decide that it will require 800 person months of effort. That means 100 people roughly will have to work as a team for 8 months on this. What is the cost of a person month? Any idea? How much is the salary of a software professional per month? Let us consider the average. Not the top experienced people. Young people. 100 people team we are talking about. So a large number of people will be young trainees. 20,000? 25,000 rupees per month? 40,000. 40,000? It is turning out to be an auction. 50,000. This is a lopsided auction because people who are interested in higher salary are bidding. That is not correct. Anyway, one thumb rule and this is the first management thumb rule that you should note. If the salary that an individual is paid by the organization is x rupees per month, the cost of that person to the company is typically 3.2 to 5.7 times x. You appoint me as a programmer. The first day you take me in, I am a brilliant guy from IIT with CPISO and so, yet I write the programs the way you write in your assignments. If I am given a task, I will box it up. So I am given training. Does that training come free? No. Then I am given an assignment. For every assignment that I do, along with some people with me, there has to be a team leader who does not write any programs, but examines whether we are working properly or not. There are ladders of supervision. When I join your company, you pay me salary, but you also have to give me an office space. Any idea how much a table and a chair space costs in Nariman Point in Mumbai? Any idea how much it costs in Hiranandani? That cost has to be won by that company. For 8 hours when I will be sitting in that table and chair, somebody has to pay the rent, somebody has to buy that furniture. These are hidden costs. So the cost to the company is much more than what the company pays you. Say 40,000 rupees is the average salary including entry point, whatever. The average cost to the company could be anywhere between 1.2 lakhs to 1.5 lakhs. It is not uncommon for the top Indian companies to ask for a person-month cost, which is on an average 1.2 lakhs to 1.5 lakhs per person-month. Imagine for the time being that this software will be developed by a small company which does not have three times the overhead, etc. And the cost is 1 lakh rupees per person-month. 800 person-months means how much money? 8 crores. So I can develop this software in 8 months and it will cost you 8 crores. At the end of it you will get a readymade software. And I require that software only 2 years hence. So that fellow should be very happy. Except that fellow comes and says, this is very nice, you know, 8 months you will develop the software in 8 crores. But you see my company makes 1.5 crores annually. That is my business. After I use your software, I hope to double my business. So I will start making 3 crores per year. So can I pay you these 8 crores 10 years later? Obviously the answer is no. That is part of the feasibility. Economic feasibility of any major activity is an important early part. I am explaining this all to you because you will not be doing these steps in your project. But later on in your professional life you will be required to participate in these activities. So the feasibility study, the system engineering and allocation to hardware, software and people of different components is something that you will not do. Let me explain this allocation to hardware, software and people. Have you seen the way bridges on the highway, the way bridges where the trucks which are loaded with some baggage, luggage. They are weighed. You know that every truck is permitted to carry only so much weight. And one has to inspect. Now you cannot at any point in time stop a truck, ask it to unload everything, weigh that separately and load that again. So what is done is unladen weight of the truck. That is when the truck has nothing in, is actually recorded by the company which says that truck. And these trucks pass through the way, on the way there are way bridges. So they will just go and stand on a platform. That platform is actually a weighing bridge. Earlier that weighing bridge used to indicate on some dial the total weight. And you subtract from that total weight the empty truck weight, you will get the weight of that. That would be recorded on a piece of paper a certain way it will be given to the truck driver, etc. In modern days that way bridge is automatically able to convert the collected weight in digital data, automatically able to send it to a centralized computer. Consequently in any large project of software development, you will say that such task should be done by hardware. But not everything is done by hardware. The hardware will only give you that data. Somebody has to write programs to integrate that data. What is people? There could be occasion when that hardware fails. In which case the old style dial is the only thing where a person will have to take down the weight and provide the information. These kind of allocations of different functions are done during this phase. Once this is done then the major activity starts. And the glimpse of software development process that you will have a chance to look at will start from this point which is called systems analysis. We will discuss systems analysis in some greater details. This is followed by system design. After completing these two steps coding is done. Coding is writing program. A system analysis effort results in a document called software requirement specification document. The software requirement specification document is what we are going to discuss because all of you have to write that. In a professional environment if eight physical months are going to be taken to complete that software at least one month calendar month is spent in systems analysis. Obviously it is not done by 100 people. It is done by maybe 10 people. They go to your organization, find out what procedures you follow, what data you have. We will discuss whatever. And they prepare a software requirement specification document. This document is reviewed by both sides. The users and you as developers. It is signed off saying yes these are my requirements. Then software design takes place where you say okay for this particular set of applications I will have 10 modules. This module will have 50 programs. That module will have 107 programs. That module will have 200 programs. Whatever, whatever. Broadly these programs will do the following. Only after the design is completed, detailed design is done. For every function algorithm is written in pseudo language. Then this design document is reviewed. And after that the first line of code is ever written. So do you understand the engineering approach? The planning and the design and the review has to be so rigorous that once that is done no matter who writes the programs as long as that person writes the program correctly to translate the specification the total system will work is the guarantee. That is what you need to learn here. This is not all. How will the program be tested? Will you test your own program? Of course you will. But will an organization depend upon your own testing saying, So there is a separate team which is going to test the program that you write. And there is a separate testing procedure. And there is an acceptance criteria for the end user. After all you are going to deliver this software to some end user. And the end user must be happy with what you have developed. How do you define happiness? If that software makes that person smile is he happy? The software must work. How should it work? Now there could be a lot of arguments in the software requirement specification you have written that in the functional requirement there shall be a menu. And when you press one or the menu choices will dictate execution of this function of that function of that function. Now suppose the user says no no no this is not how the menu should look like. Somebody will have to change the program. So right at the beginning acceptance criteria is defined between the user and the developer. And according to that acceptance criteria tests are again conducted by end users. So eight months may be the time for you to develop the software. But one month may be additional time that the user requires to conduct user acceptance test. And it may be anywhere between four months to two years to implement that software. Because implementing it means creating master files, creating all the data putting that training people etc etc. This is huge huge huge task. What we in this course are attempting is merely to understand as I said to get a glimpse of the software engineering process pertaining to the programming effort. The other parts of the system are not going to look at. As I said you require basic project management of the kind when you manage an event in the hostel or wherever. In addition you require so many other things. You require to handle software teams. You would have handled teams in the process earlier. What kind of teams have you handled in the hostel functions or whatever? How many people have worked in a group or a team to organize anything? An event or activity or whatever. Several people. So what is the most important task that you do when you assemble a team? Let's say you assembled a team of eight people. Yes? Come on you have participated in group activities. What do you do with the group? The first meeting. You have to organize let's say a hostel event and some eight people or four people or five people are there. So how do you start the meeting? You may say how are you after that what do you do? Sorry? Address the issue. Address the issue. So first of all somebody has to identify the issue. So let's say the team leader is the one who says these are the issues that I have to resolve. After that what? Everybody claps and goes home? Something else happens. Allocate the work. Sorry? Allocate the work. Allocate the work. Is it right? You allocate the work. You say alright these are the separate tasks that has to be done. You take care of this, you take care of this, you take care of this, you take care of this. How do you allocate the work? We give a specific individual the work. Yeah but how meaning? What will you keep in mind while allocating the work? The capability of a person. Capability of a person to do a particular work and any experience if that person has. Now when you stay in the hostel for sufficiently long time you generally know who is able to do what better. In a programming environment how do you adjust the capability? You presume that every member of the team will be able to write any program. However can you presume that every member of the team will be able to write good English documentation describing something? Can you presume that every member of the time will be so meticulous in testing that that person will be able to test, will imagine 20 different types of data scenario, will be able to write that much data, do all the Golagiri require and test the program to prove that this program done work correctly. Can you assume that every individual has that? You can't. Managing programming teams is extremely difficult. Is more difficult than managing any other teams. Particularly when the so called capabilities are intrinsic and innate they are not known. And in fact most of the times people are learning those capabilities. It is not that people are born with capability. Coordination and communication takes maximum time. You call a meeting of 10 people. Any idea how long it takes to schedule a meeting? Suppose you as a team leader decide that I want to call a meeting of 10 people to discuss something. What will be the process? You will send an email to all 10 saying a meeting is organized tonight after dinner in hostel for long. Okay. 3 people out of 10 respond that tonight I have a bridge tournament in my hostel. Tonight I am going home to meet my parents. Tonight whatever whatever. Only 7 people are available. What do you do? Can you conduct a meeting with 7 people? Well yes and no. You may conduct a meeting with 7 people. But during that meeting you have to allocate tasks to all 10. You are allocated tasks to 3 who are absent. Typically in such meetings the people who are absent are given the most difficult tasks. Typically when you send an email and I am one of them I will say I can't do this. I throw up my hands. Coordination and communication is extremely difficult. It takes physical time. It is not an intellectually challenging activity. But it is a management challenging activity. And that you have to learn to do. And that is why discussion, decision making, give and take, adjustments is a perpetual requirement of any kind of software engineering management. There are process and project metrics as I mentioned. Typically they are based on lines of code. How many lines of code a person can write per day? The productivity. Any idea? How many lines can you write in a day? How many? Ten thousand? One thousand. Five thousand. Five hundred? Okay. Whosoever claims five hundred please come up. I would like to felicitate you. Noble prize would be in order perhaps. So let me explain. Five hundred lines is not uncommon. My own colleague Professor Ajit Divan has sat down and written thousand lines of code in one night. And it works because he is Ajit Divan. Not all of us can do that. And not even he can do that every day, day after day. That's the point. So when you say productivity per person per day, it is not to be counted on the day when you are at your prime and you can write anything correctly. Average lines of code delivered is the count of productivity. Delivered lines of code. Delivered lines of code is not written lines of code. So you have to take the total project duration. You have to take the total number of persons who worked on that project. And you have to take the total lines of code that were delivered at the end of the project. And that division will tell you what is the per person productivity. In a large team there could be several people who have not written a single line of code but they have contributed to the effort. If they were not there you would have to do that work. Like testing for example. So programmer productivity is not counted like that. In general, even in a programming team where most of the people are writing programs, the programming productivity is typically between ten lines to thirty lines a day. Ten delivered lines. It is not that everybody writes religiously ten lines today, ten lines tomorrow like that. You do write five hundred lines on one day. And then you spend next five days in re-looking at those five hundred lines. And then somebody has spent five days in testing those five hundred lines. Eventually the productivity drops down to this. And this is known to be independent of programming language that you use. That's the reason why you have to use higher level programming languages. Most of the metric, measurement metric is based on LOC but there is something else called function point analysis. We will not deal with that right now. Project shielding and tracking is an important activity. You have to finish a project in eight weeks. Then you have to diligently say in first week I will do this, second week I will do this, third week I will do this. It is not like an assignment submission where you do everything in the last night. It's not even like exam preparation where you said two days before the exam I started reading the books. It's an open book exam anyway. Then work that way. In a complex project if you slip out for one week you probably dead by then. You can't recover in the second week. You can't recover in the third week. You can't do a proper job. So proper shielding and tracking is absolutely important. There are models which have been prepared. The most famous is the software engineering institute model at Carnegie Mellon University. There is an institute called software engineering institute which defined what is the maturity level of software development process in any organization. And they call it capability maturity model or CMM model. There are five levels. CMM 1, CMM 2, CMM 3, CMM 4. The first level is automatically assumed to exist whenever the group of people start to develop software. So any software development effort will always start at CMM level 1. Majority of the companies in the world when they want to outsource software development to any software company such as TCS or Infosys or Vipro, they will ask what is the CMM level of your organization. Typically level 4 or level 5 is required for major projects to be undertaken by a company. The largest number of level 4 and level 5 companies in CMM levels for software development in the world are in India. So that is a great strength that the nation has developed over the last 30 years. As I said, every group which starts software development activity is expected to be at level 1. You may not know this but you are all at CMM level 1 already. You know what is that CMM level 1? CMM level 1 is defined as processes ad hoc. That means if there are 5 members in a team, one member is doing things one way, another member is doing another way, third member is doing third way. Very few processes are defined. There are no ground rules. Variable shall be named like this, file shall be named like this, indentation shall be like this. Even these ground rules are not defined. So nothing is defined. There may be a loose agreement but it is not documented. And because of all this, success depends entirely on individual efforts. You agree that that will be the modus operandi? Now there are other levels. Those of you who are interested can read up the net, the CMM levels and find out more details about it. This is the classical system analysis that you will all be required to do as I was telling you. Represent information domain of the problem. Any problem that you undertake? Which data and how it is manipulated? What is input? What output is desired? Rules governing values of data. What validations you will perform? Anybody gives any input trash will you accept it? If the first wrong data that comes your way, will your program crash? Or you will detect that and say this is an error? These are important things. Rules governing, processing logic, the algorithms. Particularly for computational problems these become extremely important. Let's say you are simulating a game. Game of snakes and ladders. Now what are simple computations that there are positions of pieces on the board and you throw a dice. Suppose you get five, five gets added to this, you get the next number. Then you have to investigate whether that is at the bottom of a ladder or top of a snake and then you come down or go up appropriately. Those computation rules will have to be recorded properly in the system analysis. Understand the software requirement. What functions should the system perform? Specify software functions, specify interfaces, specify constraints. All of these must result in a software requirement specification document. During the system analysis you will complete this work. You will model all interactive screens. How the data will be captured? How it will be validated? If there are any queries, how the response will be retrieved? You will have to model reports. What are the content of a report? How it is to be formatted? Whether it should be on screen or on printer? Are there any special interfaces required? What are the layouts of the forms and screens? Files if you are using? What is the source file in which you will get some data? What is the target file in which you will write data? What is the specification of that file? What records are going to be maintained there? Any other operational consideration? And after all that, ease of view, user friendliness of your software. One of the aspect is, for example, keystroke minimization. So ensure that the user does not keep typing something unnecessarily if that work can be reduced. These are some of the generic points. All of you will have to keep these in mind when you do the systems analysis for the course projects. And finally, you will have to prepare this document. It is called an SRS document or software requirement specification document. For a trivial project, the SRS document would be about 15 to 20 pages long. For medium to large projects, the software requirement specification document could be about 1,000 to 2,000 pages long. And for really complex projects, it could be multiple volumes. It could be 10,000 pages. All of those 10,000 pages have to be written by people, have to be reviewed by people, have to be understood by users. So consequently, larger complex programming problems take enormously large amount of time. Now you, when you are doing your course projects, which is a team project, as you know, teams have been formed. All of you have formed the teams by the way. Team leaders, et cetera, have been nominated for. You will be writing a document of this kind as a part of first stage submission for your project. It will have an introduction chapter. It will give the functional specification. It will then describe the data that will be handled, both the incoming data, outgoing data. If it is a majorly computational problem, the amount of data will be small. Nevertheless, it will have to be specified. You will have to specify user interface requirements, what screens will be shown, what questions will be asked, what data will have to be submitted. You will have to specify interfaces to other systems. If any, you won't have most of them. You will have to specify an acceptance criteria, meaning how will you test your own software. And you will have to say that this software testing will be done by these people from my team. And they will have to embark on a testing procedure independent. And then there could be appendices. So appendix A does this in greater detail. Appendix B does something else, et cetera. All of this will have to be prescribed in the document. Now please understand that this document is not written in C++. This document has to be written in English because that's the medium of instruction. And let me tell you all of us, because our heritage is not English. We learn to speak and use our own mother tongue before we learn English. We are generally not very good in articulating our own ideas and understanding in English on our own. We can understand what is written in a book. We can understand when somebody speaks, such as I am giving a lecture, you can understand. But if you have to write down 10 lines in English, specifying something about this or something about that, you will find it often harder than writing C++ program. But there's no choice. When you are doing a software development project, this document has to be prepared. So consequently, my suggestion is preparing this document will take some non-trivial time. And you have to start working on it right from today.