console.readline and we'll set that into a user a value as string equals console.readline so now we have the user value so what we can do is attempt to compare that to one of the possible values here so I'm just going to do an if statement to begin with but we'll come back and we'll replace this with something a little superior to an if statement so if a user value equals we could just use magic strings right and say if it equals a Batman then console.writeline you know caped Crusader or Dark Knight or one of the other nicknames Batman has but we don't want to do it this way again because we don't want to work with magic strings we want to work with enumerations instead and so there's going to be a little bit of a disconnect because whenever we get content from the user we're going to try and convert that into one of the enumerations and if it doesn't convert then we're going to need to let the user know that there's an issue so what we're going to do is use this if superhero dot and then we're going to do this try parse method of our enum and I'm going to give it the user value and I'm going to try to let's look at the second version of this yeah I'm going to ignore the case and then I'm going to attempt to convert that into a into my value now I haven't created my value yet let's go ahead and dim my value as superhero so what we're going to attempt to do is take the user value that they typed in and we're going to try and parse that string that they type in into a type of superhero and if we can do that successfully then we'll go ahead we'll go if my value equals superhero dot Batman then console dot right line caped crusader else if my value equals superhero dot Superman then console dot right line man of steel else if my value equals superhero dot green lantern then console right line emerald emerald knight I believe and I think it's complaining because it wants things on separate lines like this console dot redline and so let's run the application and we'll type in superhero's name and I'll just say Batman and it types out caped crusader now obviously I don't have a lot of checking here because if I put in Wonder Woman I'll get nothing because we're just skipping over this we were not able to successfully parse what the user typed in and convert it to one of the enumerated values all right and this is not that great of an example admittedly because we're allowing the user to type in and then we're having to attempt to convert it but I just wanted to show that concept of how you would do it the to do examples probably something you're going to find more often because you'll have complete control of the data and you may want to present the data options to the user in some sort of either selection select one for Superman two for Batman or some drop down list box in a web based interface or in a windows user interface whatever the case might be but let's go ahead and just leave this the way that it is for now and what I want to do is come back to this example in just a little bit because I'm going to pair this up with the new with a new type of of decision statement instead of using the if will try something else which will be a little bit more elegant than what we did here all right so I want to introduce a new decision statement the select case statement you know the if then else if else and if it's really powerful you can do a lot of really cool things with it however if you need to do something simple it can sometimes be overkill here's an example of something you can do which with the if statement that is actually pretty interesting so I'm going to show you a complex if statement example and you should be able to find that in the code folder wherever you're currently watching this video and so as you can see here I can do some interesting things like use or inside of my if statements to look for ranges of things so in this case if the value that the user types in is less than one or greater than a hundred I can give some specific feedback that the option that they chose was out of the normal boundaries now if they select specific numbers 42 or 23 or anything greater than 90 then we can give them a message that you found one of the special numbers otherwise and find one of the special numbers so we can get pretty complex using the or in the and like we saw at the very outset when we're looking at various operators and here let's just choose like 86 you know you didn't find one of the special numbers but if I type in 23 you found one of the special numbers okay very simple example but you can see that with an if statement you can get very complex and test a lot of different cases let's close that down and close that out what I want to do however is create a new project so let's save what we have here and understanding numerations and we'll go file new project and we're going to create one called understanding select case and let's create a similar example to what we did before except we're not going to use the numerations this time around so console dot right line and then type in a super heroes name to see his nickname alright and then let's go a dim user value a string equals console dot read line and then now we're going to use select case and I'm just going to hit select tab tab and you can see the format of the select case statement and so what we'll do is evaluate this user value and in order to make sure that we are comparing apples to apples I'm going to call the two upper function like so so that and here I'm going to hit tab we can select and check for Batman for example or for Superman for example and I could continue to add additional cases like green lantern alright now here I can just do you know the console dot right line and type in caped crusader console dot right line man of steel console dot right line emerald night alright and then the case else we could just say console dot right line not found okay and then here we'll do the console dot read line and that should end the program so now let's run the application and yes admittedly we are using magic strings but you can see the elegance of and how quickly we were able to create a select case statement couldn't find it because I didn't type it correctly see therein lies one of the problems but how quickly I was able to create a select case statement as opposed to using the if else if else end if statement alright so now let me do this let's combine these two ideas together the select case our so let me close this project down and reopen up the previous project that we had the understanding enumerations and I want to take a different tact than we did here I'm going to comment all that out fact I'm just going to push it down here below whoops I'm going to actually use that and so go select tab tab we want to check my value tab tab here we are going to go superhero dot superman superhero dot batman we will go another case superhero dot green lantern and here we would go the console dot right line or I can just do something like a little bit easier we'll just do dim result string and then we'll do result equals superman or we could just do steal result equal crusader result equals green lantern and finally let's just go ahead and go here at the bottom console dot right line result and we should get the same results alright so it's a little tidier you can see there's just a little bit less code involved than if we do the else if my value equals each time and so for simple cases this will suffice we could also just put everything here on one line to even make it more compact using that line ending character the colon so we can keep it real nice and tight like that but at any rate you can see how they're used together then in these situations okay so that's really all that I wanted to demonstrate here we talked about the value of enumerations to limit and constrain the kind of data the amount of data that can be assigned to a given property we looked at a couple of examples of that then we looked at how we were able to utilize the select case as opposed to the if statement in those situations where we just want to evaluate one particular value against a number of potential cases as we saw here and then take some action some simple action based on that it's a little less verbose than the if statement if else if else and so on and we looked at some complex if statements of two other things like try parse which allows us to attempt to in this particular case take a string that the user typed in and find a match for it in our enumerations if it returns true that we did find a match then we'll execute this code but if it didn't find a match it'll just skip over the entire all the logic that we wrote inside that code block okay great let's continue seeing the next video thanks hi i'm bob taber with developer university for more my training videos for beginners please visit me at devu.com in this lesson we're going to talk about handling exceptions that occur within our applications we're going to discuss what can go wrong why things go wrong and how to build resilient applications that are impervious to crashing through the use of the try catch and try block in visual basic so whenever the compiler catches a data type mismatch an unresolved reference to a class or some malformed visual basic instruction it will refuse to compile your source code into a dotnet assembly until you fix the problem we've already seen this happen a number of times we usually get the red squiggly line will get the error list pop up those are called compilation errors and those are good because we can catch those and and fix them before we release the application to others right but there are other kinds of errors that happen only during run time in other words they happen when the compiled dotnet assembly is actually in the act of executing on somebody else's computer so there are countless reasons why this could occur but many times it occurs to do due to situations that are outside of control of the software developer for example if you're creating an application that cannot read or write to the disk for some reason maybe it's because there's a folder or a file that's missing or the file is corrupt or because the network access to that resource is unavailable or perhaps your application attempts to connect to a database and that particular table in the database that you were relying on is no longer there maybe the columns of change names maybe the structure in general has changed these and many more could cause your application essentially to crater to experience an exception at run time now in some cases the developer may not have foreseen a problem and therefore didn't account for it for example maybe the developer allows the users to type in their country but the user misspells the country name and you know as a result we can't find a matching country and we have bad data in our database as a result or perhaps the user is maliciously trying to break the application maybe they type in numbers instead of alphanumeric characters or alpha characters so as a software developer your job is to make sure that you account for every possibility everything that could potentially go wrong with your application a friend of mine was fond of saying that 80% of all code exists to solve 20% of all potential problems that can happen so generally software developers should be pessimistic about the reliability of any input into the program especially input that's human in nature somebody types in a value and hits enter be suspicious about that value because it probably is wrong it's probably not what you need it's not what you need to accept and you need to be tested to make sure is this really valid information that I can use in my application so if you rely on a file or a network resource trade it with great suspicion because it may not be there if you rely on a user to type data into the application treat that as absolutely evil alright you have to be very suspicious about anything you cannot absolutely control in your application and this is the software developers equivalent to defensive driving you should always code defensively so the way that a visual basic developer codes defensively is through the use of the try and catch and and try statements in visual basic which we're going to demonstrate in this lesson so let me give you a quick example of the kind of things that can go wrong here we'll create a quick example in our project gracefully handling it's exceptions and I'm just going to go dim content astring equals and we'll use the file we've used this once before I'm going to go ahead and hit control period on my keyboard and import the system that I own namespace file dot read all lines or read all text that's what I want read all text and if you recall we had a a path that we created earlier when we were going through the my namespace project we created a folder called test and there was a test one dot txt and let's go ahead and write that out to our console window and let's do that and now let's run the application now in this particular case I know that that file is there and the folder name is there alright but what if for example we were to either fat finger the name of the folder or the file name and what if we didn't account for that possibility that that folder the test folder and that file test one dot txt does not exist on our hard drive well at that point then what the developer sees when running in visual studio is this little nice message that says the director is not found or directory not found exception was unhandled so it will create a data type of an instance of a data type called the directory not found exception and that that object will have information about the exception that we encountered and it will tell us and give us information about the issue couldn't find the directory okay so as a developer I can see this and I can fix the issue however as an end user you're not going to see this you're going to see something much more ugly and let me just go ahead and quickly build this and then I'm going to open up our projects go to gracefully handling exceptions and look in the bin directory and run the application and this is what a user would see they're going to get this ugly error message that says gracefully handling exceptions was stopped has stopped working a problem has caused the program to stop working correctly windows will close it and notify you if a solution is available and then it gives you all that error message stuff in the background right so it's a it's a pretty ugly situation for your end users you want to make sure that whenever you release the application to an end user that you are accounting for all the potential problems so that they never see that ugly error message pop up all right well we can do in when to kind of mitigate this is to take into account in our application anything that we don't have absolutely complete control over now we have control over writing lines to screens and reading lines okay that's not the issue with the issue here is is attempting to access a resource that we as programmers do not have access to or may not have complete access or control over so in those cases what we may want to do is to wrap a try around our our code that could potentially be an issue now I deleted a little bit here but I'm going to go ahead and put it back in and just leave it the way that it is and I'm also going to just take this dim content a string and I'm going to move it outside of the try catch put it right here and then just do content equals all right and now I'm going to run the application again and this time well we don't get any error messages at all but we don't get any results either because we know that there was an issue alright so we can improve this by giving a little bit of feedback and that's what the catch is for what we can do at a minimum is just go console dot right line there was a problem and this is the bare minimum we'll run the application at the very least we'll get the message this was a problem so we attempted we tried to execute this code in this code block but we encountered an exception and as a result of that I executed this code block okay and then we could continue on and at least the application didn't die I think we can improve this a little bit more though by telling the end user what the problem actually was so let's go ahead and then use this error object or this exception object that has been returned back to us so like I said before whenever an exception happens the dot net run time will create an instance of an exception object an exception is kind of the grandfather of all exception related issues we'll look at some others in just a moment and so every unless we specify a more specific exception it will always roll up to this exception object we can take a look at the properties of the exception object things like the inner exception the source the message and so let me just use the message and display that then to the end user now in a real application I might choose to log that exception into a log file so that we can diagnose the problem maybe I'll even take that message and send it if I can to a database where I as a developer can look at all the exceptions that have been thrown by the various users across all the users of my application and be able to proactively find bugs and fix them but in this case all we're going to do is just report the message of the exception to the end user whenever we encounter it so at least we're giving some feedback here could not find a part of the path and so if a very savvy user looked at this and said I wonder if that that exists on my file system they go and look for tests and they're like oh there's no test directory maybe I need to change the name of my directory or maybe I need to report this error okay I think we can even improve this a little bit more and if we were to take a look at this read all text method I hover my mouse cursor over it notice that it gives me a list of potential exceptions in below this alright so there's an argument exception there's argument no exception path to long exception directory not found exception IO exception and if we wanted to learn more about these we could just do actually copy this and then go and open up our browser and in MSDN I might go site Microsoft.com and then just paste in file.readall text that should bring me to the MSDN article for that particular method and let's see yeah here we go let's click on this version of it there were two versions of that method an overloaded version and this will show me how the how the method is declared but the most important part of this are the arguments the list of potential exceptions rather that can be thrown from this and why they would be thrown so for example file not found exception the reason why this happens is the file specified in the path was not found maybe the files in an invalid format maybe the user doesn't have the required permission maybe there was some sort of issue when attempting to open the file maybe the disk is corrupted maybe the directory was not found or it was inaccessible or maybe we just didn't pass in the right argument so there's a lot of possible exceptions here and as I'm looking through and understanding how to call this method I can then account for some of these possibilities so instead of catching just an exception what I can do is this catch ex as and then here I'll go directory not found exception and then we'll go console dot write line and I can give a very specific message here there was let's say we could not locate the c colon slash test directory please ensure that it exists alright so now we're giving very specific feedback to the end user by checking for the most specific exceptions first and then the most generic or general exceptions last let's go one step further from this if we found the directory but we didn't find the file so here we go catch ex as file not found exception console dot write line could not find locate the file test one dot txt in the directory c colon slash test please make sure the file exists so it's a little bit more specific here now what happens when I run the application well the directory not found error is going to fire first because it's going to first of all look for the directory before it attempts to look for the file itself but now let's go ahead and modify the contents of our c drive here well actually let's do this we don't have to modify anything there we'll change this to test and then we'll just change this to test for that file does not exist I'll go ahead and make the appropriate modifications here inside of the text just to make sure that everything looks correct okay so now we've got the directory correct but we're looking for a file that I know does not exist and this time we're going to give a descriptive error could not locate the file test four dot txt in the directory c colon slash test please make sure that that file exists alright very cool so the key here is to look for the most specific exceptions first and then the most general exceptions last or catch them in the order in which we know that they'll be performed we begin by catching the most specific which was the fact that we couldn't even find the directory and then we move on and say okay well next up can we find the file itself no well if it's not that then it could be one of a number of other issues as we see here as we hover our mouse cursor over but we'll just not account for those necessarily we'll just say there was an issue alright and let the user figure it out on his own alternatively we could go and implement a catch for every single one of those potential exceptions the last thing that I can do here is it's not really necessary in this case but I'm going to add a finally statement and so here you want to add any code that should execute no matter what so for example maybe you need to close database connections so that you're not you know you don't have a lock on a database file or close file connections for the same reason because you don't want to keep a lock on a file so that another application can't access it maybe you want to clean up any work that you've done previously and just make sure that it's adequately destroyed maybe you want to set your your values and maybe set content equals something like no data found maybe something like that see how what that will do alright so there we go not only do we print the error message but then finally we'll always execute no matter what of course that might be a problem if we actually did find the data so that might not be the best one maybe something like maybe to do an if statement so console dot write if content dot length equals zero then no data found otherwise just print out the content I was doing this off the top of my head hopefully it'll work so let's try that alright so that case it works let's see if we move this to test three it did not it didn't print it in that case oh it did it actually printed it a second time so maybe we just need to put nothing in that particular case alright that would probably be the better course of action so there you go we just get it printed one time instead of twice alright very good so as we look at the entire structure of this try catch finally and try block on the surface it might seem to make sense to you to just wrap your entire application in a try catch and frankly that's a little bit on the lazy side some developers have done that in the past but they often will be ostracized by their end users because you wind up doing something very cryptic like we did here where we just create a general exception because we're not taking the time to understand all the specific exceptions that can pop up and we just say there was a problem here you figure it out alright that's not advocating for the end user and typically whenever you do something like this you're going to be printing out messages that the .NET framework will generate they're intended to be understood by developers not end users and so you'll see some error message that no normal human would be expected to understand except for the guy who actually wrote the application so the reasons that developers do that and sometimes take that approach where they just wrap an entire page in a try catch is because you know they leave the exception handling to the very end the software development process and that leads to this catch all situation where you're just like oh we're pretty much done with the app I just need to wrap everything in a try catch and this is a lazy approach to just slapping some code up at the problem and hoping that it takes care of it but in the meantime when users run into issues it's maddening for them and very frustrating and I'm sure you've been there and you've seen those maddening error messages before you have no idea what to do next you want to try to avoid that as a software developer take pride in your code take the time to understand the kinds of exceptions that can happen ask yourself when you type in code what am I relying on here what are the potential problems that could pop up and account for them the way that I've done here in these but then also be reasonable you don't have to implement every single exception the ones that are probably the most likely all right so you should try to put the same amount of attention into protecting your user from having to guess what to do next or how to fix a problem if you the developer can fix the problem then and the end user doesn't even have to know about it then awesome that's what you should do but if you can't well then at least identify the exact problem like we've done here in these lines of code and then tell the user what they could do to try to diagnose the problem on their own and at least you'll help them from not feeling stupid the worst thing you can do is make a user feel like they've done something wrong or that they feel dumb whenever they're using your application that's what makes your application polished and it's what users expect a reliable experience no surprises tell them what they need to know in order to self-diagnose and fix problems all right so to recap in this lesson we talked about defensive coding through the use of the try catch and finally and end try statements and the plan for how to plan for the inevitable problems that will pop up during the execution of your application we talked about handling the special cases first and then moving on to any general cases last and we talked about the mindset of the conscientious developer who seeks to advocate and protect the end user from maybe losing data or even having to make tough choices or feeling dumb and not knowing what you're supposed to do next with your application so using this that catch all strategy and just trying to wrapping it around everything like just only using this catch ex as an exception and nothing else that's not an ideal it's not a perfect solution and you should strive to examine every part of your application that relies on some exterior resource that is not directly in your control as a developer and then apply the try catch and finally judiciously in those parts of your application so you see here that I'm not wrapping it around the right line the red line because I'm not expecting those parts of my application to fail only those parts that rely on something that I cannot control awesome we're making great progress and if you're still hanging in there with me you're doing great I'm so proud of you we're almost to the end don't give up now we're almost there so see in the next lesson thanks hi I'm bob taper with developer university for more my training videos for beginners please visit me at devu.com in this final tutorial video we're going to be discussing event driven programming event driven programming is really at the heart of most of Microsoft's presentation apis whether you're building web or windows applications and for that matter it's at the heart of just about every other api in the dotnet framework class library this allows you the developer to plug in and respond by handling key moments or key events in the life cycle of an applications execution so up to this point in our simple windows console applications there's really been only one event that occurs the application startup event which in turn triggers the sub main inside of our module one where we wrote the majority of our code in this course however in a modern user interface whether it be a native windows application or a web based application users can interact with various elements on a screen whether it be buttons or text boxes they can move their mouse cursor around and hover over elements they can press keys on the keyboard they can type text into into text fields they can drag and drop various elements around the user interface and so on and so a software developer will write code that responds to those interactions that they want to enable so a given component let's say a button it might define an event let's say it's the click event for a given button but it may have other events too like hover over or drag over but let's say we're only going to consider the click button event the developer says I want to write code that performs this business logic whenever somebody clicks on that button and whenever that button event that click event is raised then I want to handle that event write code that will respond to that event so the developer creates a method and attaches it registers it with that event and says hey whenever you happen let me know because I'd love to run some code whenever that button gets clicked so as the application is running the user interacts with the application eventually they click that button the .NET framework runtime raises the event and notifies any methods that were asked to be notified and it would then execute that code as well that's attached to the event and I'm going to show you how events are used in a very very simple Windows application near the end of this lesson but first I want to start with the absolute basics and I'm going to create a timer example and the great thing about a timer is that it has an elapsed event so you give it how many milliseconds you want to run before it says I finished elapsing I finished elapsing I finished elapsing alright so it'll keep doing that until you tell it to stop and so what we're going to do is write code that'll say whenever you finish elapsing I want to know about it because I'm going to write some code and we're going to do something interesting like write something to a console window alright so let's go ahead and get started here by creating a new project called understanding events and inside of the sub main what we'll do is start by creating a new system.timers.timer and I'm going to call it so dim timer as system.timers.timer and I'm going to pass in how many milliseconds I want it to run between each elapsed event that it will raise alright so in this case I want let's see new keyword I want a thousand milliseconds or one millisecond to elapsed between each raised elapsed event okay so what we could actually do is simplify this right by hitting control period and just simplify the name selecting that option actually simplify I could actually add an import statement but hopefully get the idea okay let's continue on next what I want to do is attach to the elapsed event or register a handler for the elapsed event so here's what I'll do um we're going to go and use the add handler keyword we use the name of the timer and then the event that we want to handle so elapsed comma and then what I want to do is give it the address of a method in the computer's memory okay so methods have in memory and we want to say hey whenever the elapsed event happens I want you to add a handler and then call out to that event in this address in the systems memory so here we're going to just create something called module one dot and we'll give it a name let's just call um elapsed one or tell you what handle the timer one alright and then I'm going to hit control period on my keyboard and one of the options is to generate a method called module one dot handle the timer one and notice that we created a method stub a private sub handle the timer one and notice that it automatically creates the correct method signature for the event so it's going to send two things to us it's going to send the object that created the event and then it will give us additional arguments that we can take a look at and one of those arguments will be something that will actually print off the screen now because it's generated code it adds this throw new not implemented exception let's go ahead and get rid of that because we don't need it right now instead let's do this let's go console dot right line and then inside of here we will do handle the timer one event and then I'm going to put in the our minute second and millisecond when the event was signaled or when the event was raised so we're going to use the sync signal time all right so the next thing we'll need to do now that we've wired up our event to occur whenever the timer lapses after a thousand milliseconds now will do is simply go timer dot start and we'll just keep running until somebody hits the console dot read line and hits enter on the keyboard and then we'll go timer dot stop and then we'll just exit out of the program all right so let's see how this works on the application all right and so you can see every second forty seven forty eight forty nine fifty fifty one we are hitting our handle the timer one event now what I can also do is wire up additional event handlers in fact I can have two five ten different handlers that say hey let me know to whenever you raise all right not just that guy I want to know to so you can add multiple event handlers for every single event and to demonstrate this let's just do this and add handler timer dot elapsed and this time will go address of module one dot handle the timer to a hit control period on the keyboard to generate the method handle the timer to and it adds it right here and I'll just copy what we did here and I'll paste it here except I'm going to rename this so we can clearly see it handle the timer to so let's run it and now we're going to get every second we will get to entries fifty two fifty three fifty four fifty five fifty six for handle the timer one and two and we could keep adding additional handlers for the elapsed event of the timer if we wanted to now what I can also do which is kind of interesting here let me write this console dot right line whoops right line press enter to stop handling both or stop raising or stop yet handling the event twice all right we'll just say that and then here what I'll do is just go timer dot start and console dot realign and timer dot stop and then in between here what I'll do is do this instead of add handler will move whoops remove handler timer dot elapsed and this will do the exact opposite this will say hey I have this method that we're currently calling in or whenever we've we hit the elapsed I want to stop calling it just just unregister it and it's no longer going to be used so as a handler for our elapsed event so here let's watch how this works so I can press enter to stop handling the event twice and right now I'm adding two entries every second so I'll hit enter and now we're back to only handling the event once okay all right so I say all of that to say this I wanted to show you how to respond to events how events work and the various parts of an event a object will declare and raise an event and then we as developers can attach our code or add handlers to the various events that are raised by objects and then write any custom code that we want to in response to those events we can also say no longer do I want my handler to handle that event instead I just want to remove it so it's no longer listening for that event all right so events are natural to every type of app that you'll build I think I said that already and to demonstrate this what I want to do is build a really simple hello world application using the windows presentation foundation API to build windows applications so let's do this I'm going to go file new project and we're just going to call this WPF events I'm going to select a WPF application that's important all right I'm going to call this WPF all righty and what I want to do and I'm not really prepared to talk about WPF there will be entire courses on Microsoft Virtual Academy that will explain what you need to know about it but all I really want to do here is just drag and drop a button and then drag and drop a label or actually a text block that would be better let's put a text block right below it okay I'm going to select the button and I might change its content and say click me all right and then in the text block I might change the text and remove it just make it empty by default but I want to rename it to my text block and I'll rename the button as well to my button something memorable all right all right now the next thing that I want to do is come over here to the properties window and I want to have make sure that I have the button selected on the design surface that I dragged and dropped from my toolbox and here I'm going to select the little electric lightning bolts thingy over here on the right hand side and this will show me all the available events for an object in this case make sure it says my button type button and then you'll see all of the events that this button can handle you see wow there's a ton of events yeah many of these you'll probably never ever need or use but the one that you'll always use is the click event so what I'm going to do is just inside of this little white area here I'm going to double click and when I do notice that it adds a my button underscore click event all right and here I could write my label or my text block in fact sorry dot text equals hello world and so let's run the application and we're just going to click the click me button and notice it says hello world now you might say well this wasn't very satisfying because I don't see anything similar to what we did previously where did it actually wire up the relationship between the button and the click event my button underscore click well let's do this I'm just going to go and select the form itself so the entire window all right just the entire visual area in fact I'm going to make sure to select just outside of that because if you select just the inner part it'll be a grid that's used for layout purposes I want to select just outside of it and make sure that the word window is visible then I want to go down to initialized and I want to make sure to double click it so it creates this window initialized handler and then what I'm going to do inside of there is go ahead and do add handler my button click comma address of and then we're going to go main window dot and we'll give it a name handle the event one just like we we called it before I'm going to hit control period on my keyboard and select generate the method and leave at one all right and we have to do something a little bit funky here so just stick with me private shared um let's just call this result as string all right and then here I'm going to need to put um set result equals um string dot format and then here we'll go uh happened at and then hh minutes seconds and milliseconds and we'll pass in date dot now all right let's see if that works and then what I'll do is uh show the results in here let's see if that works and you can see it works now the first time you click it nothing will happen because the very first time you click it result will be an empty string but then every subsequent time the handle the event one will have fired second and it will be populated with values okay now what we could do is just make it happen one time and then we could do something like this remove handler uh my button click address of uh module one or I'm sorry main window dot uh handle the event one see if that'll work uh it doesn't work we'll have to put that someplace else maybe here after the very first time there we go that should work so let's run it and now the first time we click it nothing happens the second time we click it nothing happens but then every subsequent time it does not change the the date or rather the time why because after we run through this block of code once we've removed this handler so it never updates the string result okay so hopefully that's as clear as mud uh there are some things there hopefully I know that it probably didn't make a lot of sense uh with regards to dragging and dropping items and modifying them and using the properties window but at a high level just understand that everything in dot net is event driven and so events are what move the action of the application forward and here we were just handling an event that's wired up automatically for us through the beauty of the Visual Studio IDE but we can take control of adding and removing events to or event handlers to specific events ourselves by using the add handler and remove handler keywords and pointing them to the address of methods that we implement in our source code alright so hopefully that's uh that's the uh one of the main takeaways the main takeaway really is that events are everywhere you look and that if you can dream up an action that you want your application to respond to your first thought should be what event should the application be responding to uh what should I be handling as the developer and then you do your research at MSDN Microsoft dot com to find uh the specific events for the given objects that you have in your web page or on your windows form and then you implement those uh using techniques that I demonstrated here okay so uh that pretty much wraps up all the instruction content I'll have a couple closing words in the next video and uh then uh you'll be finished so congratulations for seeing the net that next video thank you hey congratulations you did it you're awesome it's a huge accomplishment to make it all the way to the end of one of these long form uh video courses and so it's a huge accomplishment a feather in your cap congratulations you know whatever I look at the the views for uh a course that I've created uh typically see the first two or three videos have an enormous number of views and then it starts to drop off rapidly from there and I used to be concerned about that but the good folks in Microsoft Virtual Academy assured me that that happens with every course and I believe that everybody has the best of intention to follow through and see something to the end but then life gets in the way uh and there's distractions and changes in priority uh that will interrupt even the best of intentions and completely halt progress but that's not you you are able to push it all the way to the end and now you're well mastering visual basic or at least learning more about visual basic uh from this point maybe it's learning more about dot net in general or picking a user interface technology whether it be for web or windows applications learning how to access data from databases using dot nets data access APIs and more and I have a pretty strong feeling that before long you'll be uh you'll be ready to build your own applications whether for yourself or for a company that you work for but whatever the case might be congratulations you earned it but let me encourage you to not stop there keep pushing forward you have the momentum keep taking daily baby steps uh daily progress no matter how insignificant it might seem is how you make real improvements in your life and how you add skills and your skill set there's a little sign that I have in my in my closet over here it just reminds me uh of this fact it says what you do every day matters more than what you do once in a while so please take that to heart and just make sure every day you get your hands dirty in the code and you write some code every single day but this was a great first step you've taken a great step in the right direction and I'm proud of you and you did a great job so in this last video lesson I want to wrap up the series and provide a few suggestions about really what the next logical steps for you are as you learn more about .NET from this point on so I want to assure you that some of the ideas that I presented in this course especially the more advanced concepts that I hinted at or I briefly discussed like object-oriented programming working with collections link some of those sorts of things they could require weeks or months of thought work before your mind is really able to truly digest them I know I personally spent many hours just staring at the wall thinking about something that I'm trying to wrap my head around the mind needs quiet time to reflect and you need to put yourself in a position to succeed by giving your mind time to discover to ask the right questions to allow those little neurons to make those vital connections inside of your noggin so honestly there are things that I learned about 10 years ago that I'm still trying to wrap my head around that's the nature of this business and the complexity of software development it's easy and it's as hard as you want it to be so many times I often find myself needing to read many different blogs and books and watch many different videos and see what they have to say about a given topic before it really starts to finally resonate with me I like to hear it from many different authors not just one how I can use a particular technology how I can apply that technology each author talks or writes about a given topic saying things in a slightly different way and sometimes that finally unlocks the idea for me in my mind but ultimately I hope you realize that you don't really need to know every single thing there is to know about visual basic or about programming or .NET in order to be productive today right now you don't have to be an expert first to write software and to do something meaningful I mean many of the websites and the applications that you see that were you hear the stories about kids starting these in college whether it be Facebook you know they didn't have all the skills they needed before they started they acquired those skills as they went along so I encourage you to do the same sort of thing in fact some concepts may only make sense to you after you have more experience after you've made some mistakes and a good example that's object oriented program you really never know how useful that becomes until you've seen one or two or three projects collapse under their own weight and you think there's got to be a better way I've been approaching this all wrong so at this point you have a good basic knowledge a visual basic the programming language but there's still a lot of opportunity to practice and to grow from here so no matter what type of applications that you'll probably wind up building there are other few fundamental ideas that you really need to become familiar with to be productive as a software developer first of all you're probably going to want to learn how to work with relational database like SQL server you should learn how to access data that's been stored in a database how to add or create tables and rows to those tables how to design tables correctly you'll also want to you know learn some of the visual tools that are available to you in visual studio that can help you to drag and drop and configure your settings your settings and selections for your data access and your database and then you're going to want to quickly grow past that and rely less on the visual designers both for user interfaces for databases for the data access and grow past that and rely less on the visual designers and visual studio however those are a great crutch as you're getting started the next thing that you're going to want to do is choose a presentation technology to master so you have no lack of options fortunately or unfortunately depending on how you look at it including ASP.NET web forms and ASP.NET MVC core MVC the latest the latest version of that framework for building web applications then on the desktop side there are windows forms which is an older technology and then there's WPF which is a newer technology of course you can learn the universal windows platform which is the newest API for building windows store applications and then there's also tools that are available to you that allow you to write visual basic or C sharp and create applications for many different platforms like Xamarin for example to create cross platform apps that will run on iOS, Android and Windows phone and you know if you're not sure let me suggest that at the very least in my opinion you should learn HTML and CSS and JavaScript in the past those have traditionally been considered web technologies however I think you're going to see increasingly that there is this convergence between those two things where you can write web apps that can be compiled into mobile apps or you can write HTML that can be used as desktop applications so I would encourage you even if you don't plan on doing formal web development for a career you still need to know the lingua franca of the internet which is HTML, CSS and JavaScript and I've created several fundamental series on Microsoft's channel 9 and I believe they're also available on Microsoft Virtual Academy for each of those topics HTML, CSS, JavaScript, jQuery and so on and then I recommend you learn you get deeper into how to build applications the right way and so you look at topics related to application architecture particularly how do you format or how do you separate the concerns of your application splitting up your code into layers of responsibility and why you would even want to do something like that when you take the time to learn how to architect your applications correctly you're hoping to split up your code into logical layers of responsibility that will help you withstand the impact of change on the software system so change can come from many different places as you're building software whether it be from changing business requirements changes in technology, changes from defects in software and required bug fixes and so on but in each case you can mitigate the impact of change in making changes in your software and your code by encapsulating responsibilities behind well established APIs it's just a next step beyond some of the things that we talked about regarding encapsulation earlier in this course I spent a lot of time thinking and talking about that on my own website oh there it is right there, DevU and so I'll have the last plug for that here in just a moment but from application architecture you're going to want to learn more about basic software design patterns and tactics and techniques and so I'm going to give you a list of keywords that you're probably going to want to jot down and add to your to do list and frankly each of these could spawn a whole book or video series and I've already alluded to object oriented programming that's the biggie there's also object oriented analysis and design obviously those two go hand in hand and if you can just get your mind wrapped around that first that's a huge step in the right direction but beyond that you're going to want to learn about the principles and patterns that guide you towards writing code in an object oriented fashion so there's a set of principles known by the acronym SOLID which are a set of five principles that help you realize the promise of object oriented programming in your application you're also going to want to learn about workflow so specifically you're going to want to learn about working in a team environment with other software developers sharing code using the source code repository using a tool called get or visual studio online I think they call it visual studio team services now you're definitely going to want to learn about unit tests building unit tests these are tiny little code tests that are continually testing your code to make sure that what you wrote today you know a month from now still working as you make changes to your code and some people have even gone as far to say that you should be writing those tests first before you actually write the production code to satisfy those tests that's called test driven development or TDD you'll see it the acronym sometimes you're going to want to learn about agile project management agile software development techniques defining requirements in something called user stories playing planning poker in order to determine the amount of effort required for given tasks in a software iteration iteration using agile boards to manage tasks between software developers can ban boards can be and boards and you're going to want to learn about the nature of iterative development you want to learn about developing a spike of functionality all the way through the layers of the system an architectural spike that will then help all the members of your team understand more about the intended architecture and so that you can all speak the same language as you're beginning to work on a project together so I've given you probably a couple of dozen terms there that you could probably spend a year or two just looking up those and learning more about them and fortunately you don't have to know it all to get started you know it's only in the last few years that I've even learned some of those terms and I've been doing this for about 20 years now so unfortunately there's so much to learn there's so little time and you just have to decide to either go deep or go broad my advice to you is to go deep and learn as much as you can about one single platform and be an expert in that platform and Microsoft is a pretty safe bet because they've been around for a while they're continually tearing apart and rebuilding their frameworks to keep them modern and relevant and they have so many desktop installs their server technology their cloud based technology their web based technologies they're all state of the art so again if you want to bet your career on Microsoft that's a pretty safe bet now you know again so much to learn so little time it's a challenge for everybody you have to really commit and make your full-time job the job of learning I've had friends at Microsoft who have confided in me that it's a challenge for them just like everybody else nobody just knows all this stuff automatically because it keeps evolving and new ideas keep being thrown into the arena of ideas but this is what makes software development so fun and so challenging also a little daunting but at least you'll never get bored as a software developer you might get burnt out but you won't get bored and there's a bunch of great resources on the internet not the least of which is Microsoft Virtual Academy also Channel 9 great place to learn as well however one final plug if you're ever interested in learning about C sharp and more about .net more about architectural topics for software developers more about web-based development then you'll definitely want to check out my website developeruniversity at http colon slash devview.com that's designed specifically towards somebody who's a beginner helping them get up and running as fast as possible I spent a lot of time pointing out what I feel are the most important topics the key ideas that you need to master including homework exercises interaction with me be a Q&A and even I have a live service where you can we can chat a couple times a week over go to webinar and so check it out when you have a chance so as I close I hope you found this course to be valuable if there's anything that I can do to help you out let me know I'll try but most of all I wish you great success in your career good luck and thank you for watching


The decision-making authority in an organization is important. As we learn about evaluating the performance of an operating unit and the management team, it is critical to understand where the decision-making power lies. Generally, there are two main approaches to decision-making from an organizational perspective, centralized decision-making, and decentralized decision-making. Since the inception of business, most organizations have held the power to make decisions in the hands of relatively few. We call this centralized decision-making. Generally, an owner makes all the decisions for a business. As the business grows, more and more levels of management are added, and it creates a tall organizational chart. There are some advantages to this approach, including coordinating activities towards common goals and being able to enact change fairly quickly. In the past 20 or 30 years, though, we've seen a shift away from centralized decision-making towards decentralized decision-making. Often, organizations that decentralized decision-making have flat organizational charts, whereas several mid-level management functions have been eliminated. Some advantages to this approach include faster decision-making. It frees up top management for more strategic decision-making, and it empowers employees to meet the needs of customers in changing and diverse markets.


Happy New Year, YouTube. In case you didn't see yesterday's vlog, my New Year's resolution... One of them. I think it's okay. Yeah, now you can watch. Scary commercial. We're good. Kids are watching the Broncos game. Alright, yesterday's vlog, New Year's resolutions. One of the things I've committed to, to help build my virtue in 2018, is to give up beer for the entire year. This is my last beer from Great Divide for the next 365 days. Yes, I'm going to enjoy it. I still will have wine and whiskey, but I want to be healthier in the New Year. But I really want to do it. I want to be serious about it. And one way to do that is to drink less beer. So cheers to the New Year, cheers to great tidings, great goals, great dreams for all of you out there in this New Year. Okay. Okay. In focus. We in focus. Finally. It's 2018. Finally. I get to get ready for a run tomorrow. Whoa, careful. All right, we're back. Oh boy. What I was saying is that 2000, I've taken three weeks off of running. No running for three weeks to rest the weary bones. Let's die, my Broncos. Guys, you got to be careful. Like I was saying. I've taken three weeks off from running. No running for three weeks to rest the weary bones. I want to run past the age of 40. I want to run competitively past the age of 40.  And now we're good to go. Joseph. So here we go packing my bag for the first run of 2018 in the morning. All right. Come on over, buddy. Show YouTube. Yeah, you're fast. Someone's ready for running. You guys ready for 2018? Yeah, say happy new year. Happy new year. It was like pretty short. Yeah, and that's, and then I'll sweep up. This is the longest and then I blinged. Yeah. Starting off 2018 fresh. Hello. All right YouTube. I was planning to wake up very early to start the new year off right to go on a long run up in the mountains. It's freezing up there. That's why I was getting all the winter clothes out. But something came off of work and that's okay. This is what life is all about, right?  So I'm still going to go for a long run, well, a run tomorrow. Maybe not as long, but just not going to leave early in the morning because I've got some work to do in the morning. So anyway, life is good. We're going to seek beauty in 2018. We're going to work hard. We're going to love others and yes, yes indeed, it truly is.


Good afternoon everyone My name is Greg Lockmiller. I work for NetApp. I'm in a cloud solutions group I've been with NetApp for about eight years working in various roles Wanted to share with you guys today a little bit about you know, sender volume types In some ways you can use them to match your workloads with storage capacity Storage performance how many people are familiar with the sender volume types? Okay, we'll go through some slides about how we expose some of the technology with cluster data on top Then we've got a brief demo that we can look at or you know go through real quick and show certain examples of how we expose The NetApp technology up through to the sender volumes with our driver So let's talk a little bit about what that is Again match the workload with the storage some of the things I hear with customers is the ability to match that workload You know like most technical people you know when I go get a new laptop I want an SSD and I want to put everything you know for fast access on an SSD drive But maybe pitchers or other things I'll put on a USB spinning media So you know the concept here is being able to match your workload to your storage You know do you have workloads that require low latency and high performance or for example? You have workloads that are they're there and they just need to be serviced little bit overview about sender and the block storage and volume types How we implement them within the NetApp driver and some things that we can share with you and how you can use that to your advantage And a little bit to how you differentiate that that goes back to the first bullet item matching the workload with the storage And we've got a brief demo and if we can get through that that would be great if not understand So we'll get into it. So matching the workload with the storage Obviously different workloads require different SLAs I've come from a database space and everybody wants the fastest workload possible with the least amount of Latency and that doesn't matter it doesn't have to be databases But it can be app servers or anything to do with DevOps or maybe a CI environment, too So it's the ability to differentiate on the sender back in when your tenants create sender volumes What storage is available to them and what performance characteristics that they can select or what you provide as a cloud Administrator and typically how some of this gets set up is working with your storage administrator and your cloud administrator And what you want to make available to your tenants. It also provides you for greater efficiencies Again coming from the database space. Maybe I'd have a database that was a terabyte in size and I would always ask for five terabytes and I never wanted to run out of space for my customers who were my you know consumers of the database infrastructure and And of that terabyte size and database, you know, maybe only 500 gig was really active data So it was always the purpose of over subscribing for my workloads for my databases And so when we talk about provide greater efficiencies, there's some technology within cluster data on tap the OS for the storage That we expose up through the sender driver the net app driver And that really goes along with some of the other features that we expose to and we're going to talk about that So it allows your tenants or your cloud administrator to provide features That align with your architecture standards align with your cost as well as how you can charge back to your tenants So what are what are volume types? I won't spend too much time here You guys already know that it's criteria used to how to define a particular service and how they use that storage So for example again, I'll go back to the database example I want high performance. So maybe I want to send her back in to provision my volumes my block the storage volumes on Storage that is high performance, you know, lots of memory lots of spinning media or SSDs things like that And we do this by utilizing key pairs And it's the extra spec feature of the sender as well as how we expose some new extra specs with the sender driver from that out So again, it's utilized. It's created by your cloud administrator and it's utilized by your tenet your end users So go back to an example here The technology here we call it flex fall. So just for Tech, you know, the taxonomy here being able to understand what flex fall means that is a storage object within data on top So maybe you have a need for deduplication. Maybe you have The need to store lots of ISO images or OS is those typically deduced pretty well So maybe you want to create a cinder volume using the surfacing up the night up technology and maybe using that with glance So now you have the ability to store many different templates and libraries for glance and you get dedupe capability It also works in terms of data points within applications. Maybe I have a cinder block storage for an application That has many PDFs How many people go online and look at their cellular wireless bills and they come up as PDFs a lot of times a Lot of times those are stored in somewhat like object stores or in file systems associated across, you know The different geographical areas and replicated another Opportunity for high performance would be maybe I want to use flash storage or different disk drives I want to be able to surface up the use of SSDs or certain types of SAS drives Maybe I want to put this particular back in and this volume on high performance hardware. I know as all storage vendors We all have different levels of hardware, right? You've got the top end to entry level So maybe you have a cloud environment with an entry-level storage hardware that you want to use for dev ops So you can you can associate again that your total cost of ownership and your return on investment in your hardware With how people use it within your cloud to and then finally what about Does anybody have concerns about quality of service being able to limit somebody from having runaway type applications So we also surface up the net app quality of service feature from the storage too So you can use that within your sender driver and then data protection We have a product like like any storage vendor to be honest with you snap mirror So you can replicate your data Again from different geographical data centers or within the same data center or even within the same cluster So you have the ability to define Not only your quality of service but being able to say I want to create a cinder block storage volume and I want it to be part of an environment that's replicated for snap mirroring and we'll show you an example of that walk Through how it's created and show you exactly it it gets placed on to a back end an NFS back in that's not mirrored And we'll show you on the storage that it's part of a snap mirror relationship So volume types are arbitrary. There's no set rhyme or reason. It's whatever you want them to be and what we do It's kind of hard to see but this will be available post summit But you have the ability to use different types of net up extra specs that are specific to our driver So you can use rate type Distype I can define a quality of service and I want to use quality of service I can say I want this to be a thin provisioned. I want it to be compressed or I want dedu So we surface up that technology through the driver through extra specs and that's how we bring that to bear We make that technology available through the use of extra specs and again the cloud administrator and the tenants can use those accordingly So again, maybe you have Maybe you want to define a particular storage type. We just use gold silver and bronze here. It could be tier one tier two tier three Whatever might Provide the right particular naming convention with your infrastructure in your ecosystem But and you know in this example in the gold we want to make sure it's part of high performance We want backups on an hourly basis. Maybe that data is worth being backed up So maybe that's something that you can offer out to As a private cloud to your line of business to your tenants or even as a service provider using the storage on your back end It can be replicated. I just spoke about snap mirror So being able to replicate that data and then obviously highly available And what we mean by there is being able to take advantage of the clustering technology be which is part of the data on tap and part Of our environments. So maybe silver Maybe I dedu but I still back it up and I still I still replicate it Maybe I have different SLAs and so I can manage the SLAs to the back-end storage and then also surface up some of the technology within that app and maybe Brian's then provision think about some of the data that It's not permanent. Maybe it's there for a couple of days or maybe it's there for three days You then provision it put it on SATA spinning media for example or some low-cost media and get a higher return on investment Again as a technical guy, you know, I like the SSDs on my laptop. I got SSDs in a device at home I put the critical stuff on there for speed that I want, right? So maybe in a bronze type level or a tier three. Yeah, let's just put Things on there. I don't care about for high performance or latency type things So it all depends on the SLA that you're trying to provide to your customers Another example too would be like in gold So another example too, maybe you use different volume types and you can use a database Maybe you have a database that you want to put or maybe you have an enterprise an enterprise CRM type application that you want to Put into the cloud and you want some very high-end storage So again, the names are arbitrary the volume types can be how you need them to be and you know That's the great flexibility about OpenStack and being a cloud administrator and offering these type of things to your customers Now not all of this is just NetApp some of this is available in the sender based sender driver today So hopefully, you know, there's some information there that you can take back and use even with an OpenStack deployment using non NetApp storage the NetApp storage features are these right here that provide, you know The features of thin provisioning DDo compression and Then you can define different back ends Even to define I can point it back in to a high-end storage device to a low-end storage device so real quick example How to how do volume types affect volume provisioning again? maybe with sender you have a couple of different back ends defined and Obviously the scheduler is going to look at what's the available capacity? What's the capabilities the type of filtering that the scheduler does? Our driver will report back some of the things that make that decision possible for sender But maybe we have an extra spec that says well, I need something to be placed on DDo And our driver picks that up identifies the appropriate Back end and the storage entities associated to those back ends to provide that capability So it would provision it You want DDo and it's going to provision it and back in B because back in B has flexfalls and storage entities with deduplication turned on Maybe sender back in a doesn't have any of the deduplication turned on so that's some of the net up driver feature set So here's some of the extra specs. You know, this is an eye chart and a little I don't want to go through it I don't want to you know read through any of it But just think about the extra specs capability of tarry talked about raid type Distype so maybe that's an interesting one where maybe you want your provisioning to be on SSDs or SATA drives or SAS drives then provision Be able to limit that candidate volume list only supports thin provision You know what volumes have thin provision turned on and then D Duke We've talked about that quite a bit so in the next next screen some of the other extra specs that we have available to be in snap mirror compression thick provision policy group And again, that's pretty important because you can define some back in with multiple policy groups and and now with us That's at a file level So if you create a sender volume, it's at the file level So now you can define some quality of service type metrics within that sender block storage device So another use case here may be gold is a distype SSD then thick provisioned In other words, I want to make sure space guarantee is complete. I don't want to thin provision anything silver quality of service We've got a typo Qs policy group something that's defined on the storage back in you associate that to your extra specs And then your scheduler and the net app driver will say, okay I need to go put it there because that's got the policy group associated to it and then finally bronze Maybe it's again SATA drives entry level hardware and I just defined a particular back in Now one of the things to again We talk about different types of semantics here, but these are just different types of volume types Maybe, you know temporary type block storage something that's not there very long Think about DevOps in and out things that are done for a day less than a day then provision Don't take up any space. You can oversubscribe your storage infrastructure and be in a pretty safe place there and get more return on your investment but these these particular volume types again, it's just arbitrary whatever you want them to be and a Couple of things in regards to this These are all net up pieces that extra specs that are part of the driver But this is also just part of sender right here right storage protocol volume back in name We support ice guzzies and NFS for For our back in and for our driver So I want to go into a quick demo Hopefully it won't glaze your eyes or anything, but it's a recorded demo and we'll spin through it real quick Show you a little bit about this particular environment go through some of the volume type creation So you can see the command line how it's done command line how we Provision a an object a sender object and then kind of say did it really go where we wanted to go? Are we just kind of showing it off or is it really it's in action? And one of them that will show particular is about mirroring and show you where the mirroring goes Bear with me while I go ahead and start this out So just to give you an example what back ends I have to find I've got NFS bronze gold silver ice guzzie The particular one we're working a lot with it's called C dot NFS one as a back end And these are what's NFS mounted the file system used by the back ends And I'll show you a little bit here about the file systems that are mounted So this is part of the sender drive the sender comm definition where you link to it. These are the file systems And so this is pretty quick and I apologize. It's a lack of time, but we're creating different Volume types right here. So in this example, I just created gold silver and bronze now I'll associate back ends to them so you can see how that's done And all we're doing here is saying okay I've got a I've got a type of gold silver and bronze and I've associated very specific pre-configured sender back ends to them And I'll show you the extra specs here in this particular example So in this case You know in a sender command line if you if I was a tenant and I had horizon and using the GUI I would see these as available and volume type in the drop-down So we'll move through the demo as quick as you can Another thing to set here I call seven mode we have two different types of storage operating system So we'll do seven mode and C dot So we're setting seven mode here. I've crewed now. I'm now I'm exposing some of the net app Technology I've created a type comp that's for compression and now we're to set the net app underscore compression to true And so if I created a volume of type comp it would look for a flex fall or a storage back in that had compression enabled Another one here for mirror. I set mirror up. I define it I give it a back end of or a variable net app underscore mirrored equal to true So now I have the ability to create a volume type of mirror and now I do another one for thin And thin provisioning is what that's looking for and I'm turning on the net app value of thin provisioning to true So I've created all of these different types of extra specs Utilizing the net app features one thing about the net app quality of service feature I can combine both front-end and front-end sender Q of s along with net app Q of s In this particular example here where it's called open stack dev. That's my quality Q of s policy group on the storage And I'm going to assign that to a particular back in in this case So we'll list all the extra specs here and we're going to go into with what little time we've got left to kind of show You the mirror example. I'll fast-forward into it. I'm pretty sure we're coming up to it here Again another list of the extra specs. I want to stop that real quick and kind of Give you an example So this is what it would look like if you were a cloud admin or even as a tenant You had the ability to run that and it show you it'll show you some of the extra specs over here Again volume back in name is just part of sender and then net up ddupe for example net up thin provision Net up mirrored net up compression again. Those are extra specs exposed by our driver So I'm just creating some quick volumes here a volume type gold. There's thin Again, no different seven mode because I wanted to go to a particular type of storage controller in OS Now QoS is being created and so all of these are created based on the volume types We just created and again all of this is done by the GUI Wanted to go through command line being a again being low-level guy. I like command line versus GUI So we're gonna validate the QoS here just to let you know what happened So we're going to the controller here and we've created a QoS Sender object and I'm going into a particular mode within the storage OS And I'm going to show you that that workload for that file is monitored by this QoS policy group Let me stop this one real quick. Whoops. Let me go back. Sorry Come on stop. Oh, well, I can't get it to sync up So what what it does with what I was going to show you with the net up C dot feature is it shows that particular Cinder block storage volume being monitored with a QoS policy group So here we're creating a mere volume and we'll get into the back end in the next couple of steps creating a cinder volume We want to make it be replicated. We want that particular cinder block storage that's associated to be part of a replicated environment We're gonna find it Get that out of the way. We'll find it in the file system. All of this is in FS So we'll find it in the file system We'll locate it. I want to find this particular object. It's in the file system. Then we'll show you which Which particular NFS server serving that up and this is the last piece of it. We just got about 10 seconds So this is the NFS server I defined it So it's got mirroring defined as part of the name so we can find it and then finally we're gonna confirm that that particular object is part of a snap mirror relationship and All I did was do a snap It's effectively a status of a snap mirror replicated environment and finally we see that this particular file system and Storage entity is part of a snap mirror replicated environment. And so all I did was use the net app driver I defined an extra spec to leverage the net app specs and I bring that up through so now you can create cinder block storage That is replicated to another site for DR and we'll have some blogs and some other Collateral around this exact use case so how you can restore that too We have the ability to do what we call a single file restore So I can restore a particular object within that flexible and we'll show you how to do that So be on the lookout for some blogs and some other ideas. Thanks for your time. My time's up And I appreciate you taking time for me. Thank you


Now I would like to invite Mr. Ashok Bhasin, head digitization hero motor corp to join us on stage and share his insights on driving business growth through marketing effectiveness. I request you sir to please join us on stage. The evening has just begun ladies and gentlemen you can do a better round of applause. Thank you, a very warm welcome to you. I don't know what you did to enjoy yourself. Good evening everybody. Thank you, Anurag, for the very warm introduction to the evening and I see lovely friends and fellow colleagues from the jury as well and I can absolutely vouch for it Anurag that we didn't try to be honest I think we were just being ourselves and I saw somewhere that this is the toughest jury. I don't know how what the benchmark is but yes the intention was to be real because this is about real people, real marketing, real advertising, real business and it is about real awards. That morning when Anurag sort of kicked off the morning he spoke very briefly like he did today so man of few words but a lot of achievements and he said look this is about the awards and this is the jury and it's for all you people and we will now be out of the room and absolutely apart from the lunch break where also he kept a very brief interaction with us sort of how you what time is your flight and where are you going. They absolutely stayed clear of it I think that's wonderful Anurag, Naval and the entire team to keep it that way not that if you tried we would have got influence but I think it speaks volumes of what you are trying to achieve as a mission and the fact that several of us from reasonably preoccupied jobs were here that day and including today it is because we see an honesty of purpose here so thank you very much for that and ladies and gentlemen welcome I'll keep it brief so the mission was delivering business growth through marketing effectiveness there is so much that can be said about it but I will keep it brief to a few points that I want to underline nothing that I'm going to say is going to be new and nothing that I'm going to say is going to be radical some of it would be known to you and you say why did he have to repeat it but it would be repeated because in my judgment and experience it is worth the re-iteration second it would be because we may think it is true but this ain't affecting yeah my industry many other yeah this is good this is for those FMCG guys or this is for those durable guys this is happening in telecom and this is happening in auto wheels and this is happening in two wheelers the most important thing is I would just like to edit on the title and I know that must be the intention I think the first thing is it is not about driving business growth and I see senior investors and stakeholders like Mr. Rai who build companies and businesses across sectors and several of you it is about driving profitable business growth business growth can be accomplished and we can see several examples of that so the first thing please read the word profitable before you think business growth is the end goal it is about profitable business growth of course sometimes the profits don't come in year one sometimes they don't come in year three but they have to come they have to come soon enough to pay for everybody including all of you in marketing the second is very important and we went through this when we went through the jury this is about marketing effectiveness and this is much beyond advertising and media advertising and media plays an important role but as all of us know marketing is a lot more it is about the product the price the distribution and all of those things and the most important thing eventually is about effectiveness I was born in the age when televisions were moving from black and white to color and it was about broadcasting the word that I learned was broadcasting I think from that we have reached a stage today the more you can narrowcast the more you can narrowcast the more likely you are to be talking to the right consumer at the right time with the right message and almost certainly hopefully with the right cost unless you're getting swung by this very sexy media property of the New Age called the YouTube Masterhead I have certainly signed on YouTube Masterheads at a certain cost at a certain stage a few years ago today I see a huge amount of sorry for my words but an advertising marketing person's greed our campaign had a YouTube Masterhead guys if it doesn't make sense please don't do it it's costing a few million rupees now think about whom you want to talk to and how you want to talk to so I think we have to get into narrowcasting the third thing is if profitable business growth has to be driven it is not about consumers and categories and I go back to the first point that I said that we say let me give you an example live from the industry that I'm currently a part of and I would say two things here first is about our industry and the second is about is it about product or something else so you know the automobile industry the worldwide some by confession some by necessity and some by at least cocktail circuit conversation do recognize that the three largest disruptors of automobile business in one form or the other is not General Motors it's not Ford it's not Volkswagen in some form or shape it is Tesla in some form or shape it is Apple in some form or shape it is Google who would have thought that when it happened to cameras from codec to digital we thought that was the end of it and then something came like a camera on the phone the whole category wiped out then it happened to music on the phone category gone it's happening to automobiles the other related point is distinguish between product service and solution if you stay very focused on your product all the time there is a high risk it's not a guarantee but there is a high risk that in today's world you will make a mistake of either missing the bus or boarding the bus at a high cost or boarding the bus and the bus doesn't go too far and you reached hundred meters and the world moved on it's about solutions I know it's not yet happening to Hershey's chocolates but in a lot of product categories it's about the consumption of the service there is a huge wave huge wave of moving from ownership to consumption in a large room of this nature a few months ago of extremely talented young people I asked and they're 20 plus something so most of them are probably on a rag and you know mr. Bella's age but not mine and the question I asked is how many of you own a two-wheeler hardly any hands went up so it prevented me from the next question how many of you own a hero because I want to get my market share but coming back to the point how many of you have a driving license let me assure you when I crossed the age of 18 the first thing I was trying to run for was somehow to get a driving license several of the youngsters are not even looking for that license they would they would look for mobility solutions which would come without owning an asset which would come without owning a driving license which would be without owning a two wheeler which would be without owning a car so what does it mean for the market here there is this huge example going on of you know cross category competition etc which is about shared services but let me talk of another aspect which in marketing I think is more important today than ever before and I know our Volkswagen colleague from the industry here and that is about the sea not of the consumer not of us it's about collaboration the future money spinning is not going to come out of products automobile industry is already talking about money from services not the repair workshop because as the electric vehicles come the repair instance is going to come up number of moving parts will be few dealers are already thinking what will happen to the workshop it's about services the critical thing is how are you going to collaborate I don't know if several of you have heard the Volvo the Swedish brand one of their most important collaborations most recently is Volvo with Amazon and this is about the in car delivery you hit the app you order your groceries which in any case the app knows from artificial intelligence and machine learning and all that and it knows your car it has the code you're working the delivery boy from Amazon comes delivers your two cans of milk six eggs Hershey's ketchup couple of other products thrown in locks you get the delivery notice they're done it's in car delivery this is about Amazon and Volvo would we have thought Panasonic a digital mobility company is today doing a business of about seven to ten billion dollars just with automobile company Panasonic when I started my career it was about televisions it was about Panasonic those rice cookers and today they are in the car so I think profitable growth narrow casting solutions not products think of money beyond the product to be made services not by milking the consumer but by addressing needs and then think about the ROI of all of that and lastly do remember and this will come out of not because anything in this world has become easier but it has become significantly easier to experiment we all know the compute power right the compute power on my whatever iPhone 7 not even 810 is probably more than the first computer that we ever worked on right it is compute power is high data storage is like virtually free Abdul virtually free what's happening with that the computer is coming right where you are I haven't had the courage to get a Google home or an Alexa or something in my home because I'm dreading if it comes there is a likelihood that the level of conversation that me and other members of my family will individually and collectively have with Alexa will certainly be more than the conversation that my child has with me or my wife probably will have with me but imagine the amount of mining that Alexa is able to do the kind of movie you asked for the kind of show that you asked for that your wife actually wants to go for the afternoon that the child actually is looking for which bar it has all of that it is all of that so marketing is about leveraging all of these things it has become easier to experiment and therefore please raise the level of experimentation and guys I'm talking very little about advertising because it is normally the I would say over positioned element in the marketing mix and I know you're all advertising cats so less I try to say anything about it better because I'll learn from you as we learnt at the jury looking at some very fine work please experiment but as they say please try try more fail fast but please try to fail cheap something and working out stunk works and clear modeling is the in thing you can't get it perfect you try to make it perfect the ROI will not work on it in three years you got 80 90% right go to the market model it try it experiment it and see what happens and then from there if you can fail forward which is really learning from whatever didn't work that would be brilliant a classic case of what I call and I'm making very bold statement here because I want to be provocative to myself and to all of you let me give you the example of the automobile industry to towards the closing so every month in this country which has only 35 40% penetration of two-wheelers almost 2 million two-wheelers get sold there is enough data to say that the average conversion rate in two-wheelers and I know the cars number are slightly different I'm just saying the example of two-wheelers because it sounds bigger and sexier average conversion rate is 25 to 30% which means for every two million consumers who bought in the most liberal definition there were only six million who are even seriously considering evaluating assessing moving on the predisposition curve to perhaps eventually consuming 6 million there is research clear research that most people at least in two-wheelers entered the category active search phase only about three months before actual buying most people now visit a store only one point two times this used to be five times so one store visit that's your opportunity to convert they probably make one or two calls to your call center on which all companies say we are raising our spend on digital on true caller on cloud telephony and I can bet pick up 10 websites pick up that dial number and you'll say your call is important to us and then it'll go back to some kind of English your call is important to us your call is important to us and you don't hear a human voice you don't hear a chat bot you don't hear nobody call ends 55% is the drop rate of average calls call centers of top hundred companies in most cases if six million were in the search phase and average three months at most the entire two-wheeler industry should be trying to talk to at any point in time no more than six into two equal to 12 that's the only people you need to talk to when the rest of the people need some kind of air cover of reinforcement etc but what's happening we're talking to billions of people so it is about narrowcasting it is about profitable it is about experimenting and please reinvent the business model the business solutions how you will make money how you will get your customer engaged otherwise the customer that you are acquiring is actually not going to spend a lot of their wallet whereas actually if you work on that consumer there is a lot of stuff that can be done in all product categories in cross sell up sell depth of consumption more chocolates more drops per glass of milk etc etc so those are my few key thoughts the jury was extremely interesting I won't say more to it and I can tell you that some of the awards were consciously discussed and debated and not given because in many cases the issue identification was right strategy in most cases was not too off but the connection between what good great work we saw of advertising with the brand Harjeet was missing so what's the brand connect what's the how's it working for your business what's the business outcome so ladies gentlemen thank you for listening fail fast fail cheap fail forward and eventually succeed and make money for whoever your stakeholder is good luck and thank you very much have a nice evening