Okay, so now that we've heard Scott talk about smart data fabrics, it's time to see this in action. Right now we're joined by Jess Jowdy, who's the manager of healthcare field engineering at InterSystems. She's going to give a demo of how smart data fabrics actually work and she's going to show how embedding a wide range of analytics capabilities, including data exploration, business intelligence, natural language processing and machine learning directly within the fabric makes it faster and easier for organizations to gain new insights and power intelligence, predictive and prescriptive services and applications. Now, according to InterSystems, smart data fabrics are applicable across many industries from financial services to supply chain to healthcare and more. Jess today is going to be speaking through the lens of a healthcare focused demo. Don't worry, Joe Lichtenberg will get into some of the other use cases that you're probably interested in hearing about. That will be in our third segment, but for now let's turn it over to Jess. Jess, good to see you. Hi, yeah, thank you so much for having me. And so for this demo, we're really going to be bucketing these features of a smart data fabric into four different segments. We're going to be dealing with connections, collections, refinements and analysis. And so we'll see that throughout the demo as we go. So without further ado, let's just go ahead and jump into this demo and you'll see my screen pop up here. I actually like to start at the end of the demo. So I like to begin by illustrating what an end user is going to see and don't mind the screen because I gave you a little sneak peek of what's about to happen. But essentially what I'm going to be doing is using Postman to simulate a call from an external application. So we talked about being in the healthcare industry. This could be, for instance, a mobile application that a patient is using to view an aggregated summary of information across that patient's continuity of care or some other kind of application. So we might be pulling information in this case from an electronic medical record. We might be grabbing clinical history from that. We might be grabbing clinical notes from a medical transcription software or adverse reaction warnings from a clinical risk grouping application and so much more. So I'm really going to be assimilating a patient logging in on their phone and retrieving this information through this Postman call. So what I'm going to do is I'm just going to hit send. I've already preloaded everything here. And I'm going to be looking for information where the last name of this patient is Simmons and their medical record number or their patient identifier in the system is 32345. And so as you can see, I have this single Jason payload that showed up here of just relevant clinical information for my patient whose last name is Simmons, all within a single response. So fantastic, right? Typically though, when we see responses that look like this, there is an assumption that this service is interacting with a single backend system. And that single backend system is in charge of packaging that information up and returning it back to this caller. But in a smart data fabric architecture, we're able to expand the scope to handle information across different, in this case, clinical applications. So how did this actually happen? Let's peel back another layer and really take a look at what happened in the background. What you're looking at here is our mission control center for our smart data fabric. On the left, we have our APIs that allow users to interact with particular services. On the right, we have our connections to our different data silos. And in the middle here, we have our data fabric coordinator, which is going to be in charge of this refinement and analysis, those key pieces of our smart data fabric. So let's look back and think about the example we just showed. I received an inbound request for information for a patient whose last name is Simmons. My end user is requesting to connect to that service, and that's happening here at my patient data retrieval API location. Users can define any number of different services and APIs depending on their use cases. And to that end, we do also support full lifecycle API management within this platform. When you're dealing with APIs, I always like to make a little shout out on this, that you really want to make sure you have enough, like a granular enough security model to handle and limit which APIs and which services a consumer can interact with. In this Iris platform, which we're talking about today, we have a very granular role-based security model that allows you to handle that, but it's really important in a smart data fabric to consider who's accessing your data and in what contact. Can I just interrupt you for a second just so you were showing on the left-hand side of the demo, a couple of APIs. I presume that can be a very long list. I mean, what do you see as typical?  So yeah, we've seen hundreds of these services listed here. So my question is, obviously security is critical in the healthcare industry, and API securities are a really hot topic these days. How do you deal with that? Yeah, and I think API security is interesting because it can happen at so many layers. So there's interactions with the API itself. So can I even see this API and leverage it? And then within an API call, you then have to deal with, all right, which endpoints or what kind of interactions within that API am I allowed to do? What data am I getting back? And with healthcare data, the whole idea of consent to see certain pieces of data is critical. So the way that we handle that is like I said, same thing at different layers. There is access to a particular API which can happen within the IRS product. And also we see it happening with an API management layer, which has become a really hot topic with a lot of organizations. And then when it comes to data security, that really happens under the hood within your smart data fabric. So that role-based access control becomes very important in assigning roles and permissions to certain pieces of information. Getting that granular becomes the cornerstone of security. And that's been designed in. It's not a bolt on as they like to say. Okay, can we get it to collect now? Of course, we're going to move on to the collection piece at this point in time, which involves pulling information from each of my different data silos to create an overall aggregated record. So commonly each data source requires a different method for establishing connections and collecting this information. So for instance, interactions with an EMR may require leveraging a standard healthcare messaging format like FIRE. Interactions with a homegrown enterprise data warehouse for instance may use SQL. For a cloud-based solutions managed by a vendor they may only allow you to use web service calls to pull data. So it's really important that your data fabric platform that you're using has the flexibility to connect to all of these different systems and applications. And I'm about to log out so I'm going to keep my session going here. So therefore it's incredibly important that your data fabric has the flexibility to connect to all these different kinds of applications and data sources and all these different kinds of formats and over all of these different kinds of protocols. So let's think back on our example here. I had four different applications that I was requesting information for to create that payload that we saw initially. Those are listed here under this operation section. So these are going out and connecting to downstream systems to pull information into my smart data fabric. What's great about the IRIS platform is it has an embedded interoperability platform. So there's all of these native adapters that can support these common connections that we see for different kinds of applications. So using REST or SOAP or SQL or FTP regardless of that protocol there's an adapter to help you work with that. And we also think of the types of formats that we typically see data coming in as in healthcare. We have HL7, we have FHIR, we have CCDs. Across the industry, Jason is really hitting a market strong now and XML payloads, flat files. We need to be able to handle all these different kinds of formats over these different kinds of protocols. So to illustrate that, if I click through these when I select a particular connection on the right side panel I'm gonna see the different settings that are associated with that particular connection that allows me to collect information back into my smart data fabric. In this scenario, my connection to my chart script application in this example communicates over a SOAP connection. When I'm grabbing information for my clinical risk grouping application I'm using a SQL based connection. When I'm connecting to my EMR I'm leveraging a standard healthcare messaging format known as FHIR, which is a REST based protocol. And then when I'm working with my health record management system I'm leveraging a standard HTTP adapter. So you can see how we can be flexible when dealing with these different kinds of applications and systems. And then it becomes important to be able to validate that you've established those connections correctly and be able to do it in a reliable and quick way because if you think about it you could have hundreds of these different kinds of applications built out and you wanna make sure that you're maintaining and understanding those connections. So I can actually go ahead and test one of these applications and put in for instance my patient's last name and their EMR and make sure that I'm actually getting data back from that system. So it's a nice little sanity check as we're building out that data fabric to ensure that we're able to establish these connections appropriately. So turn key adapters are fantastic. As you can see, we're leveraging them all here but sometimes these connections are gonna require going one step further and building something really specific for an application. So why don't we go one step further here and talk about doing something custom or doing something innovative. And so it's important for users to have the ability to develop and go beyond what's an out of the box or black box approach to be able to develop things that are specific to their data fabric or specific to their particular connection. In this scenario, the IRIS data platform gives users access to the entire underlying code base. So you not only get an opportunity to view how we're establishing these connections or how we're building out these processes but you have the opportunity to inject your own kind of processing, your own kinds of pipelines into this. So as an example, you can leverage any number of different programming languages right within this pipeline. And so I went ahead and I injected Python. So Python is a very up and coming language, right? We see more and more developers turning towards Python to do their development. So it's important that your data fabric supports those kinds of developers and users that have standardized on these kinds of programming languages. This particular script here, as you can see actually calls out to our turnkey adapters. So we see a combination of out of the box code that is provided in near this data fabric platform from IRIS combined with organization specific or user specific customizations that are included in this Python method. So it's a nice little combination of how do we bring the developer experience in and mix it with out of the box capabilities that we can provide in a smart data fabric. Wow. Yeah, I'll pause. There's a lot here. Actually, if I could, if I just want to sort of play that back. So we went to the connect and the collect phase. We're going into refines. So it's a good place to stop. Yeah, so before we get there, so we heard a lot about fine-grained security which is crucial. We heard a lot about different data types, multiple formats. You've got the ability to bring in different dev tools. We heard about FIRE, which is of course big in healthcare. Absolutely. It's standard and then SQL for traditional kind of structured data and web services like HTTP you mentioned. And so you have a rich collection of capabilities within this single platform. Absolutely. And I think that's really important when you're dealing with a smart data fabric because what you're effectively doing is you're consolidating all of your processing, all of your collection into a single platform. So that platform needs to be able to handle any number of different kinds of scenarios and technical challenges. So you've got to pack that platform with as many of these features as you can to consolidate that processing. All right, so now we're going into refines. We're going into refinement, exciting. So how do we actually do refinement? Where does refinement happen and how does this whole thing end up being performant? Well, the key to all of that is this SDF coordinator or stands for Smart Data Fabric Coordinator. And what this particular process is doing is essentially orchestrating all of these calls to all of these different downstream systems. It's aggregating, it's collecting that information, it's aggregating it, and it's refining it into that single payload that we saw get returned to the user. So really this coordinator is the main event when it comes to our data fabric. And in the IRIS platform, we actually allow users to build these coordinators using web-based tool sets to make it intuitive. So we can take a sneak peek at what that looks like. And as you can see, it follows a flow chart-like structure. So there's a start, there's an end, and then there are these different arrows that point to different activities throughout the business process. And so there's all these different actions that are being taken within our coordinator. You can see an action for each of the calls to each of our different data sources to go retrieve information. And then we also have this sync call at the end that is in charge of essentially making sure that all of those responses come back before we package them together and send them out. So this becomes really crucial when we're creating that data fabric. And this is a very simple data fabric example where we're just grabbing data and we're consolidating it together, but you can have really complex orchestrators and coordinators that do any number of different things. So for instance, I could inject SQL logic into this SQL code, I can have conditional logic, I can do looping, I can do error trapping and handling. So we're talking about a whole number of different features that can be included in this coordinator. So like I said, we have a really very simple process here that's just calling out, grabbing all those different data elements from all those different data sources and consolidating it. We'll look back at this coordinator in a second when we introduce or we make this data fabric a bit smarter and we start introducing that analytics piece to it. So this is in charge of the refinement and so at this point in time, we've looked at connections, collections and refinements. And just to summarize what we've seen, because I always like to go back and take a look at everything that we've seen, we have our initial API connection, we have our connections to our individual data sources and we have our coordinators there in the middle that are in charge of collecting the data and refining it into a single payload. As you can imagine, there's a lot going on behind the scenes of a smart data fabric, right? There's all these different processes that are interacting. So it's really important that your smart data fabric platform has really good traceability, really good logging because you need to be able to know, if there was an issue, where did that issue happen in which connected process and how did it affect the other processes that are related to it. In Iris, we have this concept called a visual trace and what our clients use this for is basically to be able to step through the entire history of a request from when it initially came into the smart data fabric to when data was sent back out from that smart data fabric. So I didn't record the time but I bet if you recorded the time, it was this time that we sent that request in and you can see my patient's name and their medical record number here and you can see that that instigated four different calls to four different systems and they're represented by these arrows going out. So we sent something to chart script, to our health record management system, to our clinical risk grouping application into my EMR through their fire server. So every request, every outbound application gets a request and we pull back all of those individual pieces of information from all of those different systems and we bundle them together and from my fire lovers, here's our fire bundle that we got back from our fire server. So this is a really good way of being able to validate that I am appropriately grabbing the data from all these different applications and then ultimately consolidating it into one payload. Now we change this into a JSON format before we deliver it but this is those data elements brought together and this screen would also be used for being able to see things like error trapping or errors that were thrown, alerts, warnings, developers might put log statements in just to validate that certain pieces of code are executing. So this really becomes the one-stop-shop for understanding what's happening behind the scenes with your data fabric. That's your who did, what went where, what did the machine do, what went wrong and where did that go wrong? Exactly. Right in your fingertips. Right and I'm a visual person so a bunch of log files to me is not the most helpful of being able to see this happened at this time and in this location gives me that understanding I need to actually troubleshoot a problem. This business orchestration piece, can you say a little bit more about that? How people are using it? What's the business impact of the business orchestration? The business orchestration, especially in the smart data fabric is really that crucial part of being able to create a smart data fabric. So think of your business orchestrator as doing the heavy lifting of any kind of processing that involves data, right? It's bringing data in, it's analyzing that information, it's transforming that data in a format that your consumer is not going to understand. It's doing any additional injection of custom logic.  And this is available today? It's all available today? Yeah, it's all works and we have a number of clients that are using this technology to support these kinds of use cases. Awesome demo, anything else you wanna show us? Well, we can keep going. I have a lot to say, but really this is our data fabric. The core competency of Iris is making it smart, right? So I won't spend too much time on this but essentially if we go back to our coordinator here, we can see here's that original, that pipeline that we saw where we're pulling data from all these different systems and we're collecting it and we're sending it out. But then we see two more at the end here which involves getting a readmission prediction and then returning a prediction. So we can not only deliver data back as part of a smart data fabric but we can also deliver insights back to users and consumers based on data that we've aggregated as part of a smart data fabric. So in this scenario, we're actually taking all that data that we just looked at and we're running it through a machine learning model that exists within the smart data fabric pipeline and producing a readmission score to determine if this particular patient is at risk for readmission within the next 30 days which is a typical problem that we see in the healthcare space. So what's really exciting about what we're doing in the Iris world is we're bringing analytics close to the data with integrated ML. So in this scenario, we're actually creating the model, training the model and then executing the model directly within the Iris platform. So there's no shuffling of data, there's no external connections to make this happen and it doesn't really require having a PhD in data science to understand how to do that. It leverages all really basic SQL-like syntax to be able to construct and execute these predictions. So it's going one step further than the traditional data fabric example to introduce this ability to define actionable insights to our users based on the data that we brought together. Well, that readmission probability is huge, right? Because it directly affects the cost for the provider and the patient. So if you can anticipate the probability of readmission and either do things at that moment or as an outpatient perhaps to minimize the probability then that's huge. That drops right to the bottom line. Absolutely, absolutely. That really brings us from that data fabric to that smart data fabric at the end of the day which is what makes this so exciting. Awesome demo. Thank you. Fantastic, people, are you cool? If people want to get in touch with you. Oh yes, absolutely. So you can find me on LinkedIn, Jessica Jowdy and we'd love to hear from you. I always love talking about this topic so we'd be happy to engage on that. Great stuff, thank you, Jessica. Appreciate it. Thank you so much. Okay, don't go away because in the next segment we're going to dig into the use cases where data fabric is driving business value. Stay right there.


and welcome to the fourth day of the two week workshop. Today we are going to discuss fundamentals of C programming language. Essentially we will cover the notion of data types in C, notion of expressions, conditional execution and iterations. As I had mentioned earlier since we will not cover things in which we actually teaching your students in very elaborate fashion. What I would like to do here is to cover those aspects of the elements of C programming language which I believe are important and perhaps indicate a way in which these important aspects can be put across to our students. Very obviously, those of you who wish to use this material in actual lectures will have to curtain past these slides and use these appropriately in the larger set of slides that you will have for your actual lectures. So here we go. First we extend the Dumbo model of computing to the real world computers. We indicate that we have studied the abilities of a modern computer through a simplistic model represented by Mr. Dumbo. We know that Mr. Dumbo can store values in his memory. We have modeled the memory as a cupboard with a set of drawers. We know that he can compute and compare values. So that means he can do manipulation of values. We know that he can exchange values with us. That means he is capable of doing input and output operations. More importantly, we know that Dumbo is incapable of doing anything on his own. He will only follow instructions and therefore he is capable of executing instructions which are given by us. And last but the most important factor of a modern computer that the computer is a stored program machine. So we model it in our Dumbo model by saying that we can give Mr. Dumbo a set of pre-written instructions which we call a program and which Mr. Dumbo can store and automatically execute instructions of that program one by one. We have noticed that Mr. Dumbo has a memory which is divided in locations like drawers in a cupboard where each drawer can contain a single value. We also clarified that in this memory model each location has a tag. The tag is usually a name or a number. We introduced the notion of number here to indicate that in actual practice the memory locations are addressed through numbers. However, at our level of programming, we emphasize the notion of a name working as a tag. Further, we have observed that a location is never empty. It always contains some value. Now this is slightly hard for our students to understand. How can a location contain a value unless we have put it? So we try to indicate that these values might have come from some previous computing activity done by Dumbo. Essentially then when our program starts execution, each drawer in the memory including those which have been tagged by us or named by us will contain some value. Since we have not given that value or Dumbo has not computed those values as per our instruction, these are sort of initial undefined values. We have represented them using a question mark put inside the drawer. These are some of the important points that we wish to make to reiterate our Dumbo model of computing. Now we make some comments on the capability of Dumbo to execute instructions. So we have said that Dumbo can exchange information with us which means he can read a value given by us and put it into a designated location. Dumbo can compute a new value by evaluating an expression and assigning it or putting the resulting value in a designated location. Further we observe that whenever an input operation or a computation and assignment operation takes place, the original value in that location, that designated location is replaced by the new value that we put it in. The new value could come either through an input operation or through an expression evaluation followed by an assignment. It is useful to repeat to our students that input operation and assignment operation are only two operations which can change the value of a variable or value of a tagged location. Lastly Dumbo can show us a value in any location which is actually equivalent of an output statement. Having reiterated these simple things we now move over, I am sorry, there is still an important aspect that needs to be mentioned. We have indicated in our simplistic model that Dumbo has a stored program capability. What it means is that the instructions in our program that we supply to Dumbo have to be stored somewhere. We have indicated that these are also stored in the same memory perhaps in a separate set of locations. It is perhaps useful to emphasize that the separate set of locations do not constitute a physically separate memory but rather may be an equivalent of two cupboards or three cupboards instead of one cupboards or portions of a cupboards being used for storing data values and other portion being used for storing instructions. Equally importantly we state or restate that whenever we give a program comprising of instructions that we have written for Dumbo, Dumbo will execute these instructions one by one automatically and in the given sequence. Lastly to instruct Dumbo we must use a precise language. This language is called a programming language. So you see now we are slowly connecting our simplistic Dumbo model of computing to the real world computer. Observe that we have used the words like program, we have used the words like memory, we have used the words like programming language. These are essentially words which describe the real world computer. We now proceed to further expand this simplistic model around Dumbo to a real world computer. So we say that Dumbo in the real world is actually a computer machine. We observe however that computer is a complex machine made up mostly from electronic components. Now the values in memory locations will actually contain binary digits or bits which are we used to represent numerical values or character strings or for that matter the picture element intensity or any other symbolic representation of information that we wish. The point that we are making here very subtly but importantly is that internal representation in an actual computer will be done using binary digits or bits. Note that we have not yet talked about binary representation or number systems that will follow immediately after this explanation. Secondly the instructions that need to be given have to be in a precise language called machine language. Now this machine language is a new concept which we are introducing. It may be useful to state here that machine language instructions since they are also to be stored in the same memory of the computer they will probably also be represented using some bits. Indeed it is bit patterns of different kind which represent different instructions for an actual computer based on the machine language defined for that computer. We further state that a modern computer is actually a machine which has evolved over decades of research and because of this research additional tools and techniques have been developed which permit us to instruct a modern computer in a human like language. Notice that earlier we have said machine language very early to Dumbo we had given instructions which looked like instructions in a human like language. We now connected up by saying that because of the evolution in technology and methodology and tools associated with modern computers it is possible for us to instruct computers using human like language. However since we have stated that modern computer can understand instructions only in machine language we now quickly add that there exists a tool called compiler which can translate these instructions in the machine language of the computer. Notice that when we use the word tool people might believe that it is like a gadget like any other machine. It is not necessary to explain that this tool is a software tool. Indeed at this stage we have not distinguished between software hardware and such thing. Notice it to say that there exists a tool which probably sits inside the computer. In our simplistic model we can call it an assistant Dumbo. So an assistant Dumbo which takes our instructions in a human like language and compiles them in the machine language for the benefit of the main Dumbo who will execute these instructions. Next we notice that the modern machine will exchange values with us in a form similar to us. That means we shall be using let us say a decimal notation or an exponential notation or a string notation with which we are familiar with in order to give input values and in order to see output values given by the machine. And therefore we state that the modern computer is capable of interacting with us using a notation which is familiar to us. Obviously modern computer would therefore be capable of converting the values that we give in decimal notation to an internal binary representation and vice versa. Exactly how does a modern computer do it? We shall explain later but we can hint that the compiler which generates machine instructions corresponding to our instructions in human like language is capable of inserting instructions for doing these conversions both ways. We then add that a special program called operating system controls the operations and interaction with us of any modern computer. We can state here that since this special program helps in operating the modern computer it is called operating system. We need not at this stage elaborate at all on what the operating system is or what the components of operating system are. These can be described in my opinion towards the middle or end of the course. However if the syllabus and the sequence of teaching so demands in your institutions you can actually talk about operating system briefly immediately after introducing the basic hardware and number representation in such things. I will try to put together a sequence of slides which will help you follow up this kind of sequence of teaching and I will send it across to you and briefly elaborate it in one of the sessions later. But in our opinion here the majority of teachers who have taught computer programming here in our opinion it is detrimental for proper understanding of modern programming concepts to introduce the notion of hardware operating systems binary representation etc. too early in the programming course. We further indicate that we interact with modern computer using special gadgets. Typically these are a keyboard using which we can type our instructions and our data values and a monitor which displays to us any value output by the computer. Students will not at all find this strange because these are the devices which they will see immediately in the lab and many of them would have actually seen and used a computer earlier. So this is perfectly fine to introduce the notion of a monitor and a keyboard without talking much about it. Do not forget that there will be some students in your class who would have never seen a computer in their lives and that is the reason why although the formal laboratory sessions where people will do actual programming may start slightly later in the subject teaching schedule that you have. It is my recommendation and we have found it extremely useful that in the very first week when the students come to your colleges they should be introduced to the computers in terms of showing them the monitor, the keyboard perhaps exposing them to the computing environment although they may not understand why they are typing certain commands for the operating system it is useful for them to have an exposure of that kind. This is primarily for students who have never seen a computer and believe me there will be some even in IIT in the class of 830 students I found about 58 students who had absolutely no inkling of what a computer is. They came from a village background where they had never seen a computer. The next point that we make about modern computer is that our interaction with the computer begins with the operating system. It is important to emphasize that things like login that we do or things like command typing that we do whether it is in Ubuntu or whether it is in Microsoft operating system or any other place we are actually neither writing a program nor executing a program I mean executing a program written by us but instead we are interacting with the operating system we are giving operating system certain commands in a language that is completely different from the programming language that we are going to study or which we want to emphasize in this subject. So we say that our interaction typically begins with the operating system and this interaction is either through text interface where the operating system shows us a command prompt note the dollar sign can be explained as a command prompt why prompt because whenever a dollar appears the operating system is prompting us to give a command to the computer or we could interact through a graphical window like interface please note when I use the word graphical window here I do not imply windows operating system of Microsoft graphical window is a generic term it is useful to state here for example that a graphical window interface is provided by most operating systems the one which we use is called Ubuntu there are many operating systems Ubuntu is a version of Linux which is a version of Unix these things can be stated without detailed explanation what is important is to emphasize that there are many operating systems that are available with modern computers this is important from the point of view of not those students who have never seen a computer but those students who have not only seen a computer but written programs on that computer I would like to emphasize again that a job of a teacher is not to teach to the average student but to every student in the class so just as we must take care of those who have no background in programming we must also challenge those who have a lot of programming background we know today that several students in 11th and 12th standard actually do a lot of computer program and therefore it is important to clarify concepts that they might have wrongly learned or inadequately learned while doing programming on their own through the schools one such concept I have found is that most of these students work on one environment typically that environment is a Microsoft environment there is nothing wrong with that environment it is a beautiful environment and people write programs using either turbo C or any other C compiler but they tend to believe many of them tend to believe that that is the only operating system that exists in the world it is therefore useful to emphasize right at the beginning that there are many operating systems one of which is open to which we shall be using there is a Microsoft operating system there is HP UX they are mainframe operating systems like ZOS and so on it may be useful to throw in a few names to indicate to the students that there are indeed many operating systems which are used at different places and different levels going further we now say we show an interaction with a C Dumbo or a Dumbo which is capable of running C programs observe that in the screen there is not a single mention of either a C program instruction or C program compilation but what we are showing is the interaction with the operating system most of you would of course be familiar with this it is possible for you to expand this interaction to show compilation of a C program which has been previously stored in computers desk notice that we have not introduced the disk per se but we can perhaps talk about file system directories, sub directories and files which modern computer is capable of supporting through a device called desk we may simply add that we shall have a detailed discussion on desk and the file system and so on later but effectively when we interact with modern computer today in the lab what we shall see is an operating system prompt and we can give several commands such as PWD to display the current directory or CD for changing directory or LS for listing files and so on here is a program for adding two numbers which we had seen in the first session in the previous session which has been rewritten this has been rewritten to permit simplification of input-output operations all my colleague teachers attending this workshop would have noticed that handling input and output in C is very clumsy there are very specific instructions for doing computations assignment for executing conditionally certain statements or for specifying iteration but when it comes to input-output C programming language does not have any instruction whatsoever this is because originally the C programming language was planned to be as close to the machine as possible and as easy for translating into machine instructions as possible and therefore the C language which was defined by Carnegie and Richie and other colleagues in Bell Laboratories did not have any input-output instructions the input output has always been traditionally performed in C and therefore in C++ using functions now at this juncture it is extremely difficult to convey to the students what we mean by functions so instead we can state that input and output is carried out by special instructions which require that the instruction be a single word instruction and followed by whatever input-output we want to do one at a time we shall put it in parenthesis consequently the instruction that our students will see will be something like put string get num i put string put num i etc what is this put num i or get num i well get num i is an abbreviation for getting an integer number put num i is an abbreviation for getting or putting out or displaying an integer number if we do not wish to confuse students with i or f which are integer or fraction or floating point numbers we can simply write this as get number put number instead of writing put string we can simply say put message we can even say read number write number we can simply say display number we can simply say display message why are these possible because what we are using as you would have observed we are using the hash defined command available as a pre-processing command for C compiler so notice that I am defining here get num i a as scanf %d and a for those of colleague teachers who are not very comfortable with C programming concepts of scanf and printf we shall have a separate session tomorrow on basic IO where I will clarify these things however since most of you would have taught C programming you would be familiar with these notions all that I am doing here is in my program I am actually hiding the uncomfortable function calls such as scanf and printf by writing hash defined macros so this get num i a will actually get replaced by scanf %d and a so whatever is the parameter that I give in get num i for example this value this entire line will get replaced by scanf and the value of a will be read it is very useful to try and see how all of us together attending this workshop can help better teaching of C programming input and output statements during the early days of teaching by simplifying such things this simplification does permit hiding scanf and printf detail notably the control strings such as %d it is extremely difficult at this stage to explain the notion of control %d %s %f etc etc because these are not natural thing these are artificially connived string expressions which have been defined traditionally and historically for using C input output functions they actually stand with us as millstones around necks most other programming languages have very decent English language like input output statements C does not have it however as I said I can use any choice of wording that I wish to define these macros and use them in my programs notice that if these three lines are visible to our students right at the beginning then they will still get confused wondering what is this because this line define get num i a scanf %d and a more confusing than just scanf so what we do is we have to use include statement in our program to say include stdio.h instead we could say an include statement which say my header file.h and in that we will include stdio.h and also other headers that we wish to define such that the students see a simplistic include statement even if they do not understand it they will routinely put it and go ahead but in their program they can use simplified input output through such defined nomenclature. Here is a program written to convert temperature from centigrade to Fahrenheit value we have seen that earlier in the last session and we discussed this we had used C in and C out notice that C in and C out are probably the best abbreviation that you can get for input output unfortunately these are actually operators by the way these are what you call elements of an object class and therefore they are far harder to explain in their complete details but they are much simple to use for initial students however we can put these abbreviations as I said here notice that this first slide is only the abbreviations and the general comments to indicate what the program does however this slide shows the complete program which says int main float C float F put string temperature in centigrade get num F C put string and put num F again people may get confused what is put num F and what was put num I maybe we can say instead of put num F we can say display fractional number or write fractional number similarly instead of get num F we can say get fractional number something which may be meaningful for students intuitively and which we can define using these macros is recommended for usage it is at this stage that you can proceed to describe to our students how integer numerical values and fractional numerical values are handled inside a modern computer through the C programming compile C programming language compiler for example now we can say that when we say int x in our program it results one location in memory for x to store integer values so x is now implicitly the name of a variable note that we have not been talking about the notion of a variable so far at all we are merely using x as a tag attached to a memory location which is indeed the correct definition of a variable the fact that that variable as a type is indicated by our saying int x so this explanation is quite often very good and sufficient int x results one location in memory for x to store integer value at this stage we may indicate that the maximum possible positive value could be 2 to the power 31-1 and minimum negative number would be minus 2 to the power 31-1 this presumes that we are talking about a 32 bit machine we can also state that on some computers which have covers with smaller size drawer such large numbers also cannot be put in instead the numbers will be plus 2 to the power 16 minus 1 and minus 2 to the power 16 minus we notice that when we say 2 to the power 31 it is almost equal to 2 into 10 to the power 9 so we relate a binary representation here to a decimal notation which people would be familiar with now this means that about 9 digit number can be stored that is the significance of 10 to the power 9 see our students will almost always think in terms of decimal numbers just as all of us do it is impossible for us to think in our minds in terms of binary numbers we are not computers we are human beings and we have been taught a decimal number system right from our childhood and therefore how many digits a number has would be naturally answered by all of us and our students in terms of decimal digits that is the significance of equating 2 to the power 31 to 2 to the power 2 into 10 to the power 9 because when we state this students can intuitively guess that the largest number which can be stored inside a machine would be a 9 digit number we proceed to state that C programming language permits us to define larger memory locations which can store larger values so how do we store larger number we shall use long integers by saying long x instead of index and this word long x can be related to our driver model by saying that we have a long driver or we have a wider driver or a larger driver so when we say long x we state that the maximum magnitude can be 2 to the power 63 minus 1 students will wonder where do this funny numbers like 63 and 31 come it is your choice to either state that 32 is the number of bits that a driver can hold or a 64 can be a number of bits which a larger driver can hold as a matter of fact those of you who have already discussed hardware earlier can relate our model with the actual computer by saying that if one driver holds 32 bits then we can allocate 2 drivers to hold a single number one part in one drawer another part in another drawer thereby indicating that the storage capacity of long x will be double the size of the storage capacity of ordinary int so sure we can state now that the real computer uses binary number system or base 2 representation and thus the value limits are expressed in powers of 2 it will be useful to indicate or 16 to suggest that it could be power of 2 or it could be power of 16 indeed on most computers as you would although when floating point representation is used the exponent is always treated to be an exponent of the base 16 rather than base 2 that permits you to represent very large and very small values more effectively so for the time being we will continue to believe that our Dumbo uses decimal values that is best representation and this is quite natural and logical because through the C programs that students write both the constant values that they put inside their programs as well as the values that they give as input and the values which they receive as output they will invariably see decibel numbers fractional or integer but they will see decibel numbers and therefore they will not take too much of convincing to assume that digital computers somehow can handle our decimal numbers that we give or we want to see into and from binary representation which will be internal to the computers so we conclude that our computer effectively does decimal arithmetic of for us however it does so with limitations the only limitation we have seen so far is the limitation and the number of digits that our number can have for example if I want to represent a 500 digit number we have no mechanism known at this juncture how to make computer represent and handle 500 digit numbers later on in this workshop and in your course it is useful to indicate what is known as a multi digit high precision arithmetic by which artificially you can store a very large number such as a number with 500 digits into an array rather than individual memory location but that will come later and in this workshop I will indicate through some examples how that can be done however basically we reiterate that the computer can effectively handle decimal arithmetic for us however it has limitations for integer numbers the limitation is the maximum number of digits that a number like this can have but we also have to indicate what is to be done with fractional numbers here we introduce the notion of floating point representation we already use the word float in conversion program from second degree centigrade to degree Fahrenheit this is perhaps time to explain what does that float wire means so we say that float wire results one location to store a number in floating point format we are not introduced the notion of a point or no student will ever understand or imagine why any number should be floating so this word floating point is an extremely artificial word which cannot be naturally understood by any student you will recall that when we always students and we are trying to understand programming this notion of floating point would have appeared very funny to us when we first heard it and this is what will be the natural reaction from all our students does not matter that is the reason why we have to explain why such funny term has been used so we now proceed to state that a floating point representation for a number or this format will have two components and these two components of the number are stored in the same location in two separate compartments so you can show a sort of compartmenting of our drawer one part stores one one part stores one component another part stores another component the part which is the first component is called mantissa and the other is called exponent very fortunately most students who have done 12 standard maths would be able to understand mantissa and exponent many of them would have heard and use these terms however there will be several who will again get confused and it is therefore important to explain to them what is mantissa and what is exponent so we say that a number value of this kind is taken as m into b to the power e this they will understand we now say that m is mantissa and e is exponent and b the capital B that we have shown here is some kind of a fixed base which we know and which the computer knows then we say a computer uses B base as two binary or 16 which is called extra decimal however for the purposes of our understanding and also our usage we shall continue to take the base B to be our usual 10 why because that is what we will use at our end when we supply a fractional value in a floating point representation we will use decimal base 10 if we get a value from computer we would expect the computer to convert that value in a decimal notation and give it to us so it is perfectly alright for us to say that while the computer may use base B as two or 16 as far as we are concerned the computer uses the base 10 however it is important to indicate some subtle problems that this conversion of base may end there but that may come at a later stage so here is what we emphasize to our students that no decimal point is actually stored by our computer however it is assumed to be the at the beginning of mantissa for example if a number is written as minus 4127 as the first component and 11 as the second component we emphasize here again that this is called mantissa and this is called exponent then we state that the computer will invariably take this to mean minus 0.4127 multiplied by 10 to the power 11 similarly if we write plus 1 9 4 6 2 and minus 21 as mantissa then it will always be seen as the computer to mean 0.19462 into 10 to the power 21 the reason why the point is called a floating is explained later we can write the first number for example as minus 0.4127 e 11 this notion this notation will be known to most of our students but to those who do not know this it should be explained that e stands for exponentiation operation e is not a base or something e merely is the notation used to separate out the mantissa part from the exponent part so whatever comes to the left of e in our writing is mantissa whatever comes to the right of e in our writing is the exponent and both mantissa and exponent can be individually positive or negative once this notation is explained and we tell them that when we write values in our program or on the terminal we always use decimal number notation and therefore the base for such representation is 10 and not to our 16 we further elaborate that this same number can be written in multiple ways for example I can write it as minus 0.04127 but increase the exponent by 1 to say e 12 all I could write it as minus 41.27 e 9 which will mean the number is minus 41.27 into 10 to the power 9 which is same as 0.4127 into 10 to the power 11 the computer uses this notation to internally store the number but since we can write the number in any one of these forms we say although both of them represent the same number and therefore we say that this representation is generally a floating point representation where a point can be made to float from the beginning somewhere in between right to the end in fact it is possible to write the whole number as minus 41.27000000 something e minus something of course that is artificial and that is not correct but it is just to emphasize that the decimal point can be written anywhere in the mantesa as long as the exponent value is correctly adjusted to represent the true value with this then the notion of floating point is made clear to people and then we say because we can use a floating point representation in our writing we want computer to have a similar representation and that is made available by the programming language through a data type called float. What it means is that when I designate a computer memory location or a drawer in a cupboard in our simplistic model to have a floating point value it essentially means that the computer can store in that location a mantesa and exponent and once it stores it it will always use what is known as a normalized mantesa which means that the decimal point for us and the binary or extra decimal point for the computer will always at the beginning of the significant digit of the mantesa. So it will never have point 000 something or it will never have something 0.0 whatever it will always have point some non-zero digit and then the mantesa is represented with the exponent adjusted correctly to represent whatever value we give it notice that even if we supply a value as minus 41.27E9 which is exactly the same value written slightly differently once the C program instruction is executed to take this value from us internally it will always be stored in this normalized form or its equivalent binary or extra decimal version. Now we come to the more important point that because we have a single drawer in which we are storing both the parts the mantesa part gets crowded and fewer digits can be stored in mantesa then what would have been possible had a single integer number been stored in the same drawer we can remark at this stage that ordinarily a single location can contain up to a 9 digit decimal number however when it comes to store the mantesa it can store mantesa of only about 7 decimal digits however the exponent can be between about minus 100 to plus 100 notice that this is possible because the bits which are used to store the mantesa portion are assumed to represent a power to base 16 and not a power to base 2 when a power to base 16 is expanded the power to base 10 it amounts to a very large power both negative and positive in terms of exponent again we indicate that just as we had a provision to store large integer values we can store large fractional values or floating point values as well large not in terms of the magnitude as indicated by the exponent but with better precision in short it is very important to convey to our students that there are two parts of a floating point number one is the precision which deals with how many digits can be represented of the number that we have the other is the exponent which represents the magnitude of the number very large or very small and we state now that when we say double z the mantesa representation capability in terms of precision increases to about 14 decibel digits indeed this is the reason why it is called the double because it has almost double the capacity in terms of digits so instead of 7 decimal digits you can represent about 14 decimal digits at this stage it is useful to indicate the kind of problems that you may have in doing computations with numbers represented using floating point and represented using binary base rather than a decimal base since computers offer limited precision the computations will lead to inaccuracies it is useful to indicate the inaccuracy through some examples for example when you add a very large floating point number to a very small floating point number the sum may be equal to the large floating point number only we have an example in one of the slides here which can be used as an illustration of this point what we state is special care must be taken to handle such round off errors and that there are there is a huge amount of research in what we call numerical computations which provides methodologies special techniques and algorithms to handle and minimize such errors in our programs a sample example can be given a very popular book called numerical recipes in sea originally this book was written as numerical recipes in Fortran then you have numerical recipes in sea and then you have numerical recipes in sea plus plus by the way those of you who have not seen these books I will request you to try and access these books and read them the probably the most excellent collection of techniques to handle numerical computations while minimizing errors and I am not talking about small time numerical computation just as finding roots of an equation or something of course roots of an equation of a very large linear system are covered but so are covered solution of differential equations partial differential equations series computations and so on and so on an explicit book which many of you will enjoy reading and actually using in your computational activities in summary I state that this is the statement made by Leopold Kronecker some of you might have heard of Kronecker delta it's a it's a mathematical function which we come across in impulse response computations in control systems and so on so he said God made natural numbers the rest in the work of man indicating that human beings have spied the life of ordinary humans by introducing fractions decimal numbers and so on but he also points out that man has extended God's work by making numerical computations far more meaningful to solve problems on the real life and he said God made natural numbers the rest in the work of man I have added this humans made fractions and decimal numbers the rest in the work of Dumbos and this is definitely detrimental to the computational process which human beings have evolved using fractions and decimal numbers because we face a whole lot of errors which need to be corrected by special techniques before going further I would I would like to just use this slide before breaking off for a small interaction and then having a break this is about what happens when very large and very small numbers are added this is just one example where round off error may lead to very hilarious consequences in floating point arithmetic if we use floating point arithmetic using a computer to calculate Avogadro number here is a line which is I am showing out of sequence which says the value of W and Avogadro will differ in the 23rd digit what is the significance of this let us look at the remaining lines of this slide we define float w and float y y is equal to 1.5 then we define Avogadro as 6.023 10 to the power 23 for those of you who recall their physics lessons from the college days we will remember that Avogadro number is actually 6.023 into 10 to the power 23 it is an extremely large number 10 to the power 23 is a very large number so actually there is nothing like 6.023 it is not a fractional number the actual number is 6 0 2 3 0 0 0 0 0 0 so on till you become a tire of counting and that is the Avogadro number what is being illustrated in this small example is what would happen if to such an Avogadro number I had a value 1.5 so here we say W is equal to Avogadro plus y in actual practice if we were to add these two numbers you know what would happen the result in human terms would be if you take the Avogadro number and expand it to all the digits then I will have 6 0 2 3 0 0 0 0 0 0 0 here to which I will add 1.5 and therefore the result would be 6 0 2 3 0 0 0 0 0 0 1.5 which means that the number W and the number Avogadro will differ in the 23rd digit unfortunately the machine has no mechanism to store these 23 digits and therefore even we know that when we say Avogadro plus y the value of W will be different from y as far as our Dumbo computer is concerned when we make this statement W is equal to Avogadro plus y what we will have is a value of W which is actually since floating point stores 7 digit of Mantissa all digits beyond this are ignored and therefore W is equal to Avogadro now this is indeed funny we know that W is different from Avogadro but if we make the computer compute these it will not be different at all you will notice that we had some part of the lab assignment yesterday to illustrate this point namely the limitation of the storage we are not emphasize computations and the loss of precision to this extent but this is something to be kept in mind and perhaps you may casual up additional lab exercises to indicate to your students how careful they have to be because the loss of precision due to round off errors this is clearly a round off error Avogadro plus y actually in even our floating point notation will be 6.023000015 e to the power 23 however since all those digits will be forgotten only 7 digits of Mantissa will be stored you will essentially get the same value as Avogadro incidentally you might want to tell your students what would happen if I mix the arithmetic operations this is also the time where you can introduce the notion of arithmetic operations for example we can tell that the computer converts from float to int and vice versa as needed automatically so we might have defined values which are floating point or values which are integer but when we mix them in arithmetic operation they will automatically be converted as desired however it is useful to indicate some pitfalls which may happen for example if we are defined int x equal to 10 and float y equal to 6.5 then operation x equal to y will result in 6.5 to be rounded down since x will be given 6 it is useful to indicate that while the location for y had the capability to contain a fractional number in a floating point representation the location for x being defined as int can store only integer type values and therefore so x is equal to y will result in rounding off 360 by x an integer result will be calculated because x is integer and the value written here 360 is integer however if I write the same value as 360.0 indicating to the computer that I imply a floating point value rather than an integer value then when a floating point value is divided by an integer value the result is floating result I leave it to you to think about what will happen when 360 by y is done the result is floating although 360 is integer actually y is floating point so this way we can introduce the notion of mixed arithmetic to our students and how does the computer handle mixed arithmetic it will be useful at this juncture to define the arithmetic operators and their precedence for example people would have guessed already that star would mean multiplication because we have indicated that in our representation of floating point operation however they would not immediately understand the notion of this percent symbol at all as an operator it is useful therefore to indicate that we have star slash percent to indicate module operation plus and minus we can indicate the precedence of evaluation in a complex expression by saying star and slash have higher precedence than plus and minus star and slash have equal precedence but they are evaluated left to right and similarly plus and minus and x is equal to m percent n means m modulo n is calculated so if m is 10 n is 4 m modulo n is actually remainder of what happens when you divide 10 by 4 so if you divide 10 by 4 you will get 2 as a remainder and therefore remainder is calculated here the modulo operator has the same precedence as star and slash an interesting aspect about modulo can be explicitly stated this is often missed out in the early teaching that if both m and n are positive the modulo remainder calculated is positive if both m and n are negative then the modulo remainder calculated is negative however if m is positive and n is negative or m is negative and n is positive curiously the C programming language does not define what should be the sign of the remainder it is left to be implementation dependent it is interesting to run a program containing such a modulo calculation on different compilers and see exactly what you get as the sign of the remainder I will leave it to you as an exercise and we emphasize here that if we do not like the precedence in an expression naturally defined by C we can override it by using brackets which are put around any portion of the expression to override the default precedence of the operators we will take a short break from lecturing here


It's what you expect from your home technology and it's why millions of families trust 2GIG. Now, 2GIG elevates your home security and control experience even more with the all-in-one E-Series smart home security system. The new 2GIG GC3E makes a sleek statement on your wall. Its ultra-intuitive, large touchscreen makes smart home security and control easy. One-touch arming ensures your home is secure and energy efficient while you're away. Fully encrypted sensors enhance your peace of mind while the easy home control delivers exceptional comfort and convenience. And with smart areas, you can independently secure different parts of your home, like the in-law unit or home office. Packaged delivered while you're out, use your smartphone to let the delivery person into the garage while keeping the rest of the home secure. Not sure you locked the door? No problem. Check remotely with your smartphone. Kids home from school? The GC3E notifies you on your smartphone when the system disarms. Go hands-free and talk to your system through your favorite voice assistant or set your lighting and climate scenes with a touch of a button. When not in use, the screen turns into a photo album showcasing your favorite memories. Peace of mind and more from 2GIG.