Okay. Hello, everybody. My name is Miro Tsupak. I'm a software developer at the NSTech, which is a small startup where we're building a cloud platform for genomics. The NSTech is based in Toronto, which is where I live, where I attend the local Jack. But I spent the last month or so traveling in Southeast Asia. Singapore is actually my last stop. So I thought it would be fun to reach out to Michael and see if the local Java community is up for some interesting events. Yeah. He was kind enough to organize this. It was actually very last minute as well. We were exchanging messages on New Year's Eve as he was traveling. So thanks a lot for that, Michael. Thank you everybody for finding the time, so early in the new year. So the topic for today is Java 9 Episode 2, which as the name suggests, is a follow-up talk to the meet-up that you had a couple of weeks ago, which is about Java 9 as well. I wasn't here, but out of curiosity, how many people in the room were there? Okay. Almost nobody. So that's great because I actually watched the talk on my way here and changed mine so it doesn't overlap too much with those. But good to know. So the plan for today is this. We're not going to talk about modularity and G1JC, which were the main focus of the last meet-up. So I would just refer you to the recording. Those were actually pretty good talks. So if you're interested in that sort of thing, go check it out. We're also not going to talk about language features. There is a tribe of resources and effective with final variables, handling of underscores, private methods and interfaces, and a couple of really nice things. Those were covered at the last meet-up as well. We're also going to skip a couple of bigger APIs, such as flow, reactive streams, and optional, which I feel were covered well enough. So what are we going to talk about? We're definitely going to talk about JShell. We're actually going to use JShell to demonstrate the use of all these other APIs. And we're going to talk about enhancements to the collection API, streams API, completable future, and a couple of new APIs in Java 9 as well. Stack Volcker, process API, HTTP to client, and JShell. So hopefully that works for everybody. It's kind of a selection of my personally favorite APIs that are really small and often don't get that much emphasis. So I feel they're underrated anyway. And I think they're actually really useful and definitely worth talking about. So hopefully that will be interesting. And that is as far as I'm going to go with slides. The rest of this talk is going to take place in my terminals. I'm going to have a seat here. I hope you don't mind so that I can type better. And let's start with JShell here. So JShell is the tool that you can see here. Actually, can you see it well? Is it large enough? Okay, good. So it's a tool that's bundled with JDK 9 and it's essentially Java's implementation of Ripple, a medieval print loop. So it's a tool that loops continuously, reads your input, evaluates it, prints out the output. So it's very similar to JShell's as you know them from other technology stacks or programming languages, Gruy, Scala, Python. They have all had that for a while. And finally, Java is getting an official Ripple too. Ripple is really useful for a couple of use cases. Definitely if you're new to the language, if you're a learner of Java, but it can be also a valuable tool if you're an experienced developer. Really useful for just trying things out very quickly, exploring new APIs, prototyping, sort of increasingly building more and more complex code, or just kind of refreshing memory. Like if you're working on a project in Python for a couple of months and then coming back to Java and you do reminder of how certain specific things to work, JShell is an ideal tool for that. I've also used it at interviews. It's pretty easy. I think that's enough theory. Now, the main thing that you need to know about JShell is that it accepts two types of inputs. There's snippets, so the actual Java code that you want to evaluate, and there's commands to the actual JShell tool which always start with a slash and we'll use a couple of these throughout this talk. But let's start with something really simple. I'm just gonna type one plus one. And you can see two interesting things here. One plus one is two, and two was assigned to something called dollar one here. And dollar one is an implicit variable that JShell created for me. And it does that whenever you have an expression that you don't assign to anything, it automatically creates a variable for you. Could have, of course, created my own variable. I'm just gonna name it X and I have a variable called X. JShell provides a couple of keyboard shortcuts that you will see me use extensively throughout this talk. You've just seen the first one. Shift, tap and V means introducing your variable and infer the type of the variable from the expression. So that's very nice. There's also sort of standard tap completion as you would expect from any shell. So if I wanted to bring this variable, for example, I can just do something like this, take advantage of the tap completion here, and bring my variable X. There's also a few sort of syntactic shortcuts. So you've probably noticed that to evaluate one plus one, I didn't need to wrap it in anything. I just typed it as it was and got processed correctly. I also didn't need to use a semicolon at the end of my statement and it was fine as well. Similarly, I wouldn't need to worry about catching exceptions, even checked exceptions. So for example, if I wanted to put JShell to sleep, for a while, I can just do a thread sleep. That throws an interrupted exception, which is a checked exception, but I can just do something like this and it's gonna go through which is fine. And this brings us to the first commands. So there's command vars, which lists all the variables that we've declared. So there's two right now. Similarly, you can type methods and whole classes in JShell. So there's methods and types, but obviously I don't have any at this point. And there's also a slightly more general command list, which lists all the active snippets. JShell, by the way, has this prefix matching going on. So as long as you specify unique prefix of command, it's going to be found correctly. So I could have just done something like this. And that's pretty much it. If you want to know more, just type help. JShell actually has a really nice help page that tells you everything that you can do with it. Yeah, so like I said, it's pretty easy to figure out. So let's take a look at some of the new APIs in Java 9. So the first one on the list are convenient spectrum methods for collections. And Java 9 basically makes it really easy to create small immutable collections, which is something that was relatively tedious to do in previous releases of the JDK. And I'm sure everybody knows the drill. If I wanted to create a set, I would do something like this. So let's say set of strings, and let's call it a set and actually make it a set. Then to add a couple of elements, I would do something like this. And finally, to make it immutable, I would wrap it in collections, a modifiable set just like this. So that's okay. But there's a couple of issues with this approach. First of all, it's very verbose. I needed like five lines of code just to create a simple set of three elements. On top of that, it's not really a truly immutable set. It's more like an immutable view of the underlying set. If I kept the reference to the original set, which I have in fact here, I could still modify it. And there's performance overhead associated with supporting immutability, not to mention all the extra objects that I had to create in the process. So it's definitely not ideal, but Chava9 fixes that. And it fixes that by introducing static factory methods on all the main interfaces, list, set, and map. So if I wanted to create a simple list, I could take advantage of the off method here. And you can see that there's quite a few versions of this, 12 to be exact. So it's always zero to 10 elements and a single var arc method. And you might be asking, okay, why don't I just have a single method that has var arc like that captures all my use cases? And it's true, but it's for performance reasons because there's performance overhead associated with allocating the array to backup the var arc. So you're creating reasonably small collections, which presumably is the vast majority of use cases. You wanna avoid this penalty, even if it comes at the cost of polluting the API. So to create a very simple list, I can just do something like this. Let's call it a list. And if I actually try to add something to it, it's going to complain, okay, I don't know what this operation is. So yeah, it is truly immutable. If I actually try to determine the class, it's going to tell me that it's something immutable. So an interesting thing to note here, this isn't your standard array list. This is a very special implementation of a list. And those implementations are not actually a part of the public API. So you can only rely on the interfaces here. And you can only obtain them using static methods on interfaces, which are not inherited. So you cannot invoke them through the implementing class, which means that this is pretty much the only way I can obtain such a list. And that's just a really nice design pattern that I thought was worth mentioning. And it allows Java developers to modify the implementations in the future without breaking any sort of compatibility. So the API for a set is pretty similar. Again, 12 methods, zero to 10 elements, and varx. For a map, it's a bit different. And you can barely see it here, but there's only 11 methods here. So it's zero to 10 elements, or 20 in this case, because you always specify key and a value one after another. There's no varx method, and the reason for that is keys and values can have different types, and you cannot have two varx in a single method. So what they did instead is they created method of entries here, which takes a single varx of that map entry. So if I wanted to take advantage of this, I would just do something like this. And I have a small map where keys, the integer, and the value is the string. That's pretty much all there is to it. I just thought this is something worth explaining because it's something that I'm using extensively in all the other APIs, so just so that everybody's on the same page. So this brings us to streams. Collections are a very important part of the streams API. And streams learned a few new tricks as well. There's four features that I would like to mention to be exact. So the first one consists of two methods. It's take while and drop while. But let's take a step back and take a look at what we had available in Java 8. So in Java 8, I could create streams of arbitrary elements. I'm just gonna do ints, let's say zero to nine. It's exclusive, and I'll just print them. So I'll just use a quick method reference here. Of m numbers, zero to nine. Now what we also had available in Java 8 were methods limit and skip. So I wanted to get the first n elements of a list. I could just call limit, let's say limit five. And if I wanted to see the rest, I can use a complementary method, skip. These are good, but the problem with these methods is that you need to know this number in advance, which is often not the case. Sometimes you just know that you wanna keep taking elements while a certain condition is met, and you don't necessarily know how many there are before that. And that's exactly the functionality that was introduced in Java 9. So now we have methods take while and drop while, which are basically versions of limit and skip that take a predicate instead of an absolute number. So I can do something like this. Take while, step five and complementary method, drop while. So that can be pretty useful. Another useful addition to the Streams API is the method iterate. And we take a look at it. You can see that there's actually two versions of it. So the first one was available in Java 8. The second one was added in Java 9. And the difference here is this predicate here. So how is this useful? Well, let's take a simple example. Let's say I want to print all the even numbers that are less than 100, right? Even numbers less than 100. A very naive approach in Java 8 could be something like this. Going to iterate from zero, increment by two, then Streams are lazy. So I'll just take the first 100 numbers. So let's do something like this. And then I'll print them. And you can see that it kind of worked, but not really. And the reason that it didn't work is because I created an infinite stream here. And I did correctly filter first 100 numbers, but the stream kept going and at some point my integer went over and suddenly all my numbers were less than 100. And it's very easy to introduce a bug like this if you don't think about this carefully. And the interesting thing is that there wasn't really a good way of solving this in Java 8. And that's exactly the functionality introduced in Java 9. So in Java 9, I can replace this filter here with the predicate directly in iterate. And I can just do something like this. This is gonna work fine. And if you look at it, it kind of reads like a four cycle. And that's basically what it is. It's like a streamified version of four. So finally, a method that I wanted to mention that's directly on streams is a method of nullable. Again, let's take a step back of what we had available in Java 8. In Java 8, I could create streams of arbitrary elements. I could do something like this. What I couldn't do is something like this. Which makes sense, because you don't wanna have nulls in streams or collections for the matter. What I can do in Java 9 however, it's called the method of nullable that actually goes through nicely. But what it does, if we take a look at this stream, the stream is actually empty. So it didn't create a stream containing a null, it automatically interpreted it as an empty stream. So how is this useful? Well basically, if you're using streams heavily and you're used to sort of chaining many operations, you have many maps, then it's very likely that at some point you will end up in nulls in your streams and you will need to filter them out. Which means that at some point in your streams you will have to have an if statement in a block or ternary operator or some sort of condition like this to get rid of the results that you don't want. And none of these are really clean. So this essentially allows you to get rid of that extra null check and just make your code a tiny bit cleaner. So that's off nullable. The last interesting features in the stream API was actually in the collectors part. So collectors are the reduction operations on streams. So they typically aggregate elements from the stream to a result container and optionally they perform a transformation there. And there's quite a few of them built in the JDK. We can take a look here. And two of these were added in Java 9 and those are filtering and flood mapping. These actually work particularly well with the grouping by collector. So you might be thinking, okay, this look and sound very familiar and you're right because we do have a filter method and a flood map method directly on streams. And that's in fact almost exactly what these collectors do. They do the same thing that filter and flood map do but they do it on the side of the collectors instead of the stream directly. So how is this useful? Well, if we were in SQL world it would be kind of like difference between where and having as classes. So one of them happens prior to the aggregation, the other one happens after aggregation. And in many cases you can kind of simulate one with the other but there are a couple of cases where this makes a big difference. So let's try to come up with a couple of examples where we'll see this difference. So I'm going to construct a list of numbers here. I'll just do list. Let's say something like this. And so let's call this a list. And what I wanna do here is perform some sort of filtering and some sort of grouping to take advantage of the filtering collector. So I'm gonna filter the numbers that are greater than five and I'm going to count them by parity that's gonna be my grouping function. So let's try and do this in Java 8 first. So in Java 8 I would do something like this. I would convert this to a stream, filter the numbers that are less or actually I think I said greater than five. And finally I would collect them and when I'm collecting them I would simply group them and I would group them by parity which means something like this and then I would pass the results to a set for example. Actually I think I wanted to count them. Yeah, so let's do that. Yeah, so this tells us correctly that we have three odd numbers and no even numbers. Well it doesn't actually tell us that we have no even numbers, it's just kind of applied and the reason it doesn't tell us is because that information was lost. We filtered the numbers out before we got to the grouping stage so the grouping stage actually had no idea that there even were any even numbers in the stream and that's why the filtering collector can help us with this loss of information here. So in Java 9 I can modify this by adding actually I'm gonna remove the filter first and I will add the filtering collector here and I will filter the numbers greater than five and I must up somewhere, probably a bracket somewhere. Oh yeah, here we go. So in this case it actually tells us okay no even numbers and three odd numbers so you can see the difference here. Now let's try to do the same thing with flood mapping. So flood mapping is a bit tricky, we'll have to sort of craft the initially input a bit artificially to really be able to take advantage of this and similarly to flood map this helps us the most when we are dealing with nested collections in streams and especially if you have sort of duplicate elements it really points out the difference. So let's try to create some sort of a mapping like this. So I wanna have a mapping of things, two collections of things and ideally have some duplicate elements. So essentially I wanna have a multi-map that I would then convert it to stream but I can just start with a stream directly so I'll just do quick stream here and I will create a stream of map entries and I will just do let's say integer to a set of strings. Let's say something like this and I'm going to do a couple of these. Let's have some duplicates and finally something that does not duplicate with anything just for a good measure. Let's say something like this. So I have this kind of stream like mapping of numbers to collections of strings. So what I wanna do in my example I wanna go through the stream and aggregate the strings by the number that they're associated with. So let's try and do that again in Java, Java 8. Let's give this the name, let's call this entries. So it's already a stream so I can just call the method collect and I'm going to group this and I'm going to group it by the key. So for each entry give me the key and afterwards I'm going to extract the value. So I will use the mapping here and for each entry give me the value. And finally I'm going to aggregate this. So I've extracted the value I just need a container to put this into. So I will do something like this and hopefully I have enough brackets here. Yes, okay so in Java 8 I will get this sort of result. So we can see that these are correctly grouped by their keys, we only had two distinct keys and there's only two elements but we have all sorts of nested collections and it just, it looks at first sight like something that you should use flood map for. So let's try and do that in Java 9. In Java 9 I'm just going to change this. The flood mapping and this of course takes a stream and oh yeah I closed the stream before so let me re-initialize this. And you can see that here all the duplicates and nested collections have been nicely resolved. So two very small additions to the collector's API that can be very useful in some cases. So those are streams. Another very commonly used API in Java and again an API that was introduced in Java 8 is completable futures. Complatable futures if you're not familiar is essentially a framework for a synchronous processing in Java. So it's all kind of built around the class called completable future which as the name suggests is a future that can be explicitly completed so you can set its status and a value. And we have APIs for creating dependencies and sort of chain completable futures and that's how we model a computation. So we typically use completable future for a task in a bigger computation that consists of many tasks. The basic API as it was available in Java 8 is actually really simple. I can create completable future here. Let's say a future of strings and I'm just gonna call it CF. And then I can complete this future. Complete means I'm going to give you the value in my case is a string. So let's say something like this and then if I try to extract the value it's gonna give me the value it was completed with. So what happens if I don't complete it? Well, let's reset here and let's try to call the get method directly. And you can see that nothing happens. It's gonna keep blocking until somebody else completes the future from a different thread and that's sort of how we use this construct to synchronize things. So aside from completing the future normally I can complete it exceptionally. There's a method for this and that takes an exception. So I'll just give it illegal state exception. And now if I try to extract the value it's going to fail with the exception that I gave it. So that's how it works. You can complete a future normally. You can complete it exceptionally. So what's new in Java 9? Well, quite a lot actually. Completable future is a huge class almost 3000 lines of code. Many methods, many public methods as well. And in fact, many of these were added in Java 9. Most of them however are not too exciting. There's a bunch of utility methods, sort of factory methods and methods to support subclassing if you need to do that. There are however three methods that I'm really excited about and these are the ones that I would like to demonstrate. So Java 9 essentially introduced a new way of completing completable futures and that's based on a timeout. So in Java 9, actually let's reset here first. In Java 9, I can call complete on timeout which takes a value and it takes time. So I'll just give it five seconds. What happens here if I check it, it's not completed yet but if I keep checking at some point five seconds later it's going to be completed normally and if I try to extract the value it's going to say timeout. So this is useful if you want to wait to see if somebody completes it for five seconds but then if nothing happens you're going to provide a default value. So it's really useful in distributed environment. If you have microservices and you use completable futures for asynchronous computation and asynchronous communication between the services you can just wait for the service to respond but if nothing happens you will populate the value from cache or some sort of deflection like this. So that's completing normally based on a timeout. You can also complete it exceptionally based on a timeout. So let's reset here and I will call the method or timeout and that takes just time. So I will do the same five seconds and now we're going to wait five seconds. We can see that it's completed exceptionally and if I try to extract the value it's going to fail with timeout exception. So that's basically how it works. You can complete futures normally and exceptionally based on a timeout. So the last third method that I wanted to mention is a bit unrelated to these two but it also sort of has to do with default values and that's the method called copy. So copy essentially allows you to make a defensive copy of a completable future and this might not sound like much but it's actually incredibly useful if you're designing asynchronous APIs. So APIs that are returning completable futures because in this case you want to provide sort of one way synchronization. You want to give the client the ability to take the completable future and chain actions onto it, respond to the changes in the future but you don't want them to be able to write back to the future that you're using internally so you don't want them to be able to complete it. So it's kind of like a one way thing and that's essentially what the copy method allows you to do. So let's try and demonstrate this. I will just reinitialize and create a copy. Let's call this copy. Now we can see the original not completed, the copy not completed. If I try to complete the original, the original is of course done and the copy is now done as well and if I try to extract the value from the copy, it's gonna be the value that I put in the original. So that's one way. The client can respond to the changes in the original future. So what happens if I do it the other way around? Well, let's try this. Reinitialize the original, reinitialize the copy. Now I will complete the copy. And you can see the copy is completed but the original is still not completed. So cannot write back. And that's just, it's a really nice and useful feature. So these were kind of smaller additions to existing APIs that are important but I think it's time to talk about some completely new APIs in Java 9. And the first one that we had on the list was Stackwalker. So Stackwalker gives us the ability to easily, lazily and in a stream friendly way access Stacktraces. So just as a reminder, this is what we had available prior to Java 9 since Java 1.4 actually, we could create a throwable and call getStacktrace method on this and this gives us an array of Stacktrace elements. So if I try to print this here, this is my Stacktrace at this point in time. And this was okay but there are a couple of issues with this approach. First of all, it's very expensive. The JVM needs to capture the entire stack eagerly even if you only need the first few elements. There's no sort of convenience methods for filtering the stack. If you want to process it you just have to go through everything. You cannot obtain references to the actual class instances of the classes declaring the methods. Everything is a string here. And on top of that, you're not even guaranteed that you're seeing the entire Stacktrace. The specification says that the JVM can omit certain elements for performance reasons. So if those are the things that you need then you're out of luck or you were out of luck, power to Java 9. Because everything here is actually fixed in Java 9 in the new Stackwalker. So the new Stackwalker is actually pretty easy to use. I can just obtain an instance and call the main method there, which is method walk. And this method allows me to essentially treat Stacktraces as streams. So for each stream, I can just collect this, let's say to a list. And I forgot the bracket. And this is my Stacktrace. So it's very similar to the output that I got from the GetStackTrace method. But here, I can take advantage of all the stream like functionality. So if I was only interested in Stacktrace of step three, I can just use the limit method here. And that gives me the top three elements of my stack. Similarly, if I wanted to obtain references to the classes, I can just tell the Stackwalker to keep those references.  We're gonna use this one. And then I can extract that information. I'm just gonna remove the limit first. And I can use map for each frame, extract the declaring class. And these are all the classes involved in my stack. And now again, I can take advantage of all the stream's API. So if I was only interested in a particular class and see where that is in my stack, I can just chain a method filter here. And I'm going to filter for the util class there. So I will just do quick lambda. My class is equal to this class here. And you can see that there are two such instances in my Stacktrace. So really nice kind of little API for various specific things. And it's quite well done, actually. So the next API that I wanted to talk about, that's actually something that I'm really excited about. To me, that's probably the most underrated feature of Java 9. And that's the new process API. So if you're familiar with what we had in Java before, we had the API called process builder, which we had since Java 1.5. And it looked roughly like this. I can create a new instance of the process builder. I could give it a command, which is an external command that I wanna run in my operating system. I'm just gonna give it JPS, which if you're not familiar with it, it's a command that lists Java processes running in your system. And I can just start this. And that's pretty much all that this API allowed us to do. We could start for in processes, but that was about it. There was no way to get any information about the process, even really simple things such as the PIE. It's available here in Java 9, but it wasn't available before. So what people ended up doing is either using JMX, which is really hacky, or they would end up writing their own tools, which often involved calling something like PS and Grap. So we'd kind of use external operating system tools to get the information about your process from the outside, which obviously is really annoying, error prone, and it's actually really hard to do in a portable way. So it's great to see this functionality a part of the platform. So in Java 9, we can extract all sorts of information about processes through an interface called Process Handle. So I can, for example, obtain the handle to my current process and extract the PIE, simple as that. You can also extract all sorts of other information. You can see it tells me who launched the process, what command was used, CPU time, things like that. And there's convenience methods here to extract all sorts of information. Thing one that's going to be particularly useful is the method command line, which tells you how your application was launched. So that's nice. You also don't need to kind of limit yourself to management of the current process. You can get access to all the other processes in the operating system that are visible to you. So I can call the method all processes here, which gives me a stream that can extract some information from this, let's say for each process, give me info and command, and then I will just collect these. And these are all the commands running in my system. So really nice, very useful. A very useful feature of this API is also kind of a callback. So we're allowed to trigger an action when an external process completes, which is actually very nice. So let's try and do that. Let's try and construct a process with some predictable runtime. So I'm going to create a process builder here and call sleep. And I'll tell it to sleep for three seconds. And now I can just start the process immediately obtain the handle and call on exit. So on exit gives me a completable future. And we already know the completable future API, so I can just trigger an action when the computation is done. I will just do then accept. And I can just print the whole process handle. The two string method there is the PID. So just to recap what I'm expecting to happen here. A process is launched asynchronously. Three seconds later, the PID of the now DCS process is going to appear. Let's try this out. And here we go. So simple as that. And we also don't need to limit ourselves to kind of management of individual processes. You can create the whole pipelines in the sense of UNIX pipelines. We kind of connect the output of the previous process to the input of the next process. So I can just create a very simple pipeline here. Let's create a new process builder. I will launch my favorite command, JPS. Let's call this JPS. And then in the output, I will try to find JShell. So to find JShell, I will call grab and grab for JShell. And let's call this crept. And now to start the pipeline, I will just do process builder start pipeline. This needs a list. So I will take advantage of the new convenience factory methods. I'll just do a list of JPS and grab. And let's call this pipeline. And it's a synchronous. So nothing happening here. If I take a look at it now, it's actually going to say that everything completed. Everything completed successfully, exit value zero. So I can try and see what this process is actually found. So to do that, I'll need to get access to the last process in my pipeline. We're using X1 and open the input stream to its output. And now I need to do sort of standard Java boilerplate. And I'm sure everybody's familiar with, I will wrap this in an input stream reader and I will wrap this in a buffered reader. All so that I can call the read line method here and see that I actually found a process with this PID called JShellToolProvider, which is actually the process that launches JShell. And yeah, that's pretty much all there is to it. Just a really nice API. I'm super excited to see this as part of the JVM. And finally, it's not the kind of thing that you need to write yourself. So it's really good. And finally, the last thing that I wanted to cover here is the new HTTP to client. And the new client not only provides a much cleaner alternative to the old API, which was HTTP URL connection, but it also supports all the cool new things. It supports HTTP to with TLS. It supports a WebSocket, server push, proxies, cookies, asynchronous requests, basically everything that you expect from a mature HTTP client. The HTTP client is delivered as an incubator module in Java 9, which means that it's not part of Java SE by default. It lives in a special namespace. It can still change. And it's not resolved by default, but I pre-imported it into JShell so that we can play around with it. So just so that you know, now in order to demonstrate the client API, I'm going to need a server. And if there's anything that I've learned from giving live demos, is that you cannot rely on the internet here. So I'm going to try and write a very simple server in Java that we can use to test the client. So I actually really like this example because it's something that people usually think is going to be really hard to do or really complex in a language like Java, but you can actually do it very easily just with functionality available into JDK. And it's not even new APIs. It's all APIs that have been around for a very long time. So I will create the simplest possible server. So it's going to have one endpoint and no matter what kind of request is sent to that endpoint, it's going to respond with a fixed string. So let's start by defining the handler for that endpoint. So I'll do HTTP handler here. Let's call this a handler. And this takes an HTTP exchange and we're going to do a lambda here, a multi-line lambda, which is not good for readability. So don't do this in production code. And I'll just define a string here. Let's say, hello, Singapore. And I'm going to set the response headers on this HTTP exchange. So I'll just respond with 200, everything is okay and attach the length of my string here. And finally, I'm going to write the string to the actual response. So I will use tribe of resources and I will create an output stream, assign the response body here. And here, I'll use the output stream to write the string. And I have to do this for good bytes. This is an old API, but it's okay. And finally, close everything. So we take a look here. We can see our handler and looks pretty simple. Looks okay. So let's write out. So now we can create a server. So I will start here by creating a server and this takes a port. So I will give it, let's say, 8,000. And we don't need the backlog. And let's call this HS. Now I can create an endpoint. Let's say, slash hello. And I will attach my favorite handler to it. And finally, I can start a server. So hopefully the server is running now. Now in order to test that, we need to write the client. So let's try and do this with the old API first just to see how horrible it is. And then hopefully the new API is gonna look much better in comparison. So with the old API, I would start by creating a URI to my local server. So that's going to look something like this. HTTP, local host. I think I used 8,000 slash hello. Let's call this URI. I'm going to convert this URI to a URL just so that I can open a connection here. And this actually returns a URL connection, which is not what I want. I want an HTTP URL connection. And the reason this behaves this way is because this is a really old API that was designed with multiple protocols in mind. And even though realistically, HTTP ended up being probably the only one that's actually used. They didn't know at the time, so that's how it works. So to actually get HTTP URL connection, I'll need to cast this. And you can see that we're just starting out and this API is already really horrible. I'll just call it C. Then I need to set the request method here, which is going to be a get in my case. And that's passed as a string, which again, not very nice. And finally, we can try this out. So we can try and extract the response code. And hopefully, fingers crossed, we have 200. Okay, it's looking promising. So now let's try to actually read the response. So to read the response, I will turn the input stream on the connection. And here we go again, standard Java boilerplate, input stream reader, brought this in the buffered reader. And finally, call the method reline. And yeah, here we go. So both the client and the server work, but the journey to get there was quite painful, especially with the client side. So now let's try to do this with the new API. The new API is nicely separated and it's built around three simple classes. There's HTTP client, HTTP request, HTTP response, which should be pretty self-explanatory. So let's start by creating a client. I'm just going to create a new HTTP client. Let's call it a client. And by the way, if we take a look at the version here, it's going to say HTTP2. Now, to be fair, I'm not really taking advantage of this. I'm just talking to a very simple local server, but we're just using this to demonstrate the API. So this should be fine. Then I will create an HTTP request, which uses a builder pattern here. So I will just give it the URI that I have from before, call the get method nicely as a method here, and build it and call this a request. And finally, I can use the client to send the request to the server. And this also takes something called a body handler here. In this case, I'm just going to tell it to treat everything as string. Thankfully, there's a building handler for this. So I'll just use body handler as string. And let's call this response. So now to determine the status code, we can just do status code to determine the body and just call body. It's very nice and easy and very clean. It's actually really flexible as well.  And this, of course, returns a completable future. So let's call the response. Yeah, that's fine. And now, again, I can extract the value from the future and let's say look at the body. And here we go again. So very nice, clean, flexible. And that's it. The last thing that I wanted to show is actually kind of the first example from this talk. So if you remember at the beginning, we just used one plus one and evaluated it into JShell. And you've seen quite a lot of JShell by now. What I didn't mention is that there's an API behind JShell too. So we wanted to take advantage of this functionality in your application. You can code directly against the API. So let's try to explore JShell API a bit from JShell. So I will create a new JShell here. Let's call it JS. Now we have a JShell inside JShell. And let's try to give it our first example. So one plus one, this actually returns a list of events. I'm just gonna call these events for now. So if you remember, one plus one caused two things to happen in JShell. First, it introduced a local variable, dollar one, and then it actually computed one plus one. So let's try to check both of these in this inner shell. So I will take a look at the variables here. And this actually returns a stream. So I'm just going to print this. And we can see that we have a dollar one here. And now let's take a look at what it got processed to from the events. So I'm going to use the events, which again, it's a list containing a single element in this case that will just convert this to a stream, extract some information. Let's say for this event, let's take a look at the status first. And let's just print those. And you can see that it says valid, which means it was valid Java code, got processed correctly. So now if we wanted to make sure what kind of source code is associated with this event, I can just get a reference to the snippet and take a look at the source, but we know it's one plus one. And finally, take a look at the value. We can just call the value here. And you can see that it indeed got processed to two. That's pretty much it. It's actually a relatively simple API despite how much functionality is offered here. So feel free to check it out and play around with it. And yeah, this is kind of the list of my favorite APIs in Java 9. So I hope you enjoyed it. And if you have any questions, I'll be around for the rest of the evening. So feel free to come up and say hi. Thanks. And by the way, actually, before we go, I don't have slides, but I can save the output of this session and post it somewhere. So if you want to come back to these commands, you can just take a look here. And I will post it to where Ismar, here's my Twitter handle. So, yeah, thanks. Thank you. Dave, you are definitely the name of the classes. Why do you require an import from the nice piece of the audience? Sorry. For example, where you are using completion, potential, future, I have it. Yeah. You need to do the imports for these kinds of... Yeah, so I actually didn't show you that because I didn't want to waste time with imports. There's two things to consider here. So first of all, JShell comes with a set of default imports. And most of the usual stuff is there, all the core stuff, so a couple of core modules. But I also actually have a highly customized script here that I launched at the start. And I can show you that actually imports quite a few things just so that I can work with them without imports. And then I also set up an editor and stuff like that. For security reasons, it is possible to sandbox the show to prevent some kind of imports. I'm not sure. The main problem if I provide, for example, scripting using WebShell, integrating my web application, it's a security issue. If I disable, for example, Javio for writing on these, can they put in common, and so on. Yeah, so as far as I know, JShell just operates with everything that it has available in the JDK that you launched from. You can customize the JDK though. With the new modularity, you can select which modules you want to compile in the JDK. So I'm sure you wouldn't be able to accept the functionality after that. But it's kind of a workaround. I don't know if you can do it directly and just say, okay, don't import from these things. It's kind of more manned as a pro-diving tool rather than something that you would expose to a user on your system. So this is probably a general question. I haven't worked with the ACP libraries before because I normally use a framework or something that handles that for me. Yeah. Like how many, like isn't it mostly framework that you are able to do like it's free? Yeah, to an extent, like all of it, this stuff is just, you know, it's not new functionality. What's new about it is to have it done in a specific way in the JDK, but it's often about just standardizing what various frameworks we're doing before that, right? So, I mean, to an extent, yes. Like for example, the reactive streams, the Flow API, you'll probably never have to touch it because all the reactive streams framework are going to implement that. On the other hand, for example, the HTTP client or a completable futures, that's something that I use all the time because it's so low level that I just don't bundle library for this sort of thing. So that can be useful. And of course, language improvements would be in that category, too. I noticed the rebel seems a lot faster than the Scala rebel. Scala rebel often has like a little delay when you want to evaluate our system. No, like if there's some JVM trigger going on here or the... No, no, no. This was actually pretty sluggish, just based on the sheer amount of stuff that I'm importing. It usually starts within a second. And if I started here, it's going to take actually quite a few seconds to just put up, but that's just the imports. I don't know how come it's so much faster. I have no experience with it. It seems a bit faster than the Scala rebel. Sometimes the Scala rebel can do a bit better. I mean, Scala has, you know, that they have a different system as well. They might need to evaluate a lot of other things just because of the more dynamic nature of it. Yeah, there's a lot of type improvements that goes on there, right? And I think there's lots of times. So I would imagine that takes a lot of computational time, but that's what I was thinking. Okay, come on down. Cool stuff. Thank you. Thank you.


I'm working diagonal back because I want to work with the round of the head. Now the key thing I want you guys to see in this part of the haircut is my finger angle comes out just a little bit. What that's going to do is help work with the head shape. I want to build up a shape towards the crown area and then tuck it in right at the occipital bone. Mary was very particular in the consultation that she wanted to leave as much length as possible on the right hand side. Because hairdressers we have to decide well if we're going to leave that much length how do we make it still look right.  Now the last technique that I'm going to do you guys have seen this before quite a bit. It's the tease cutting technique. This is Paul Mitchell Spray Wax.


My name is Gerald Ivan Sausier. I'm at the Armed Forces Retirement Home, Washington, DC. I'm a retired Borla Technician Senior Chief. Retired Navy Chief Fatty Officer Larry Gardner. Ken Fowler, Mass Chief Benjamin. Helen Sadowski, Retired Chief Yeoman. You guys are doing a great job out there. We have a sincere appreciation of what you're doing out there. And while things are a little bit different than when we served, the basic elements of service remain the same. We all do appreciate exactly what you're doing and how you're protecting this wonderful country of ours. Some of the active duty girls come here and it amazes me. Today they're Bosun's mates and Gunner's mates and everything that the men do. And I give them all the credit in the world. And I'd like to wish all my fellow shipmates above and below the water. Happy Veterans Day. Happy Veterans Day to all the military today. When you're out there and you're humping and you're saying to yourself, does anybody know or understand or appreciate what we do, you can know that at least 500 of us here at the Armed Forces Retirement Home do know that. Happy Veterans Day.


Hi everyone, but I'm gonna give some back story. So I started my YouTube channel two months ago, probably at this point. And I told my parents and like they're, I have to like disclaim, like they're literally the most supportive people in the whole entire world. Like both my parents were like, yes, love it. And then immediately my dad started giving me video ideas. I thought that it would be fun to keep a list and write down all of these video ideas so that later I could put them into one video and then you could just see them in all of their glory. So that is what this video is. Subscribe if you wanna see what I'm up to next week. It's, there's literally no way to tell. There's no way to tell. I don't know how anyone who subscribed to this channel could have been like, that's what she's gonna post next week because I don't, I don't even know. Hi, welcome, welcome to the interview. Oh, thanks. I'm like, I'm so glad to be here. Yeah, it's a good time. Yes, so first question. Um, what, what, what do you think about this? What, what do I, I think about that? What's, what's this? What, huh? What, what's, what do you mean? What's like the, the interview or like the, the room? The state of the world? Like I don't, what? Yeah, you know, or, or, or that. I don't know. I, uh, you know, like, uh, stuff.  It's that, this, this room is like, it's fine. I don't know. I'm, yeah. Yeah. And, okay. This is a dramatic reenactment of a real Uber ride that I had last year. Enjoy. Hi, how are you today? Hello, welcome to the Uber. I hope you're having a good day. We are gonna go and we're gonna drive down to the road and then we're gonna turn up here. I'm from New York. Where are you from? Uh, yeah, Maryland. Yeah, looks like we're at a light. I'm singing again because we're at a light. Yeah. Now we're gonna make a left turn. Yeah, gotta put our turn signal on because of safety. Hey, I got some loose M&Ms up here. You want some loose M&Ms? No, that's, that's okay. You just, you hang on to those. Yeah, thanks though. Are you sure you don't want any loose M&Ms from my hand? None? It's very strange. Yeah, well, we are gonna take this street now because it's the way you go. Yes, it's the way you go. Well, it has now been about 300 minutes and I haven't stopped singing for the whole ride. For the whole Uber ride, we're not gonna stop singing because singing is good for your soul. Hi, hi, small impressionable children. Okay, is everyone seated? Great. So this year, we're just gonna have a chat about Santa Claus, okay? Unfortunately, Santa is 300 million years old. He's an at-risk individual for COVID-19 so he will not be delivering your presence this year, okay? Because if Santa gets sick, if he gets this disease, no more Christmas, okay? This is dark. Oh, happy birthday. I got a card for my birthday. How nice, that's it, that's the whole thing. It's just that. Hi, everyone and welcome to Fix It School. So I know how to fix a lot of stuff, right? Yeah, because I'm gonna fix it, bro. These are my tools. Yeah, those are my tools. This you use to screw things in and out, okay? Which, oh, I don't know what this is.  Well, this thing's a little out of whack so just the first thing you gotta do is you gotta take your hammer, right? And you just, you get it, okay? Just like this, okay? And then it's done, so. Now we're gonna fix the washing machine. But also, sometimes the door won't come, you know.  You fixed the door, that's how you fix it, so.  Yeah, just get it right in there. And then it'll be fixed. So if you're ever like, I don't know how to mix food, all I know how to do is use tools, okay? Okay, you take your hammer and you just, and then eventually it'll just be one thing. Thank you for coming to my TED Talk. So my birthday is this coming Monday, which is exciting and I'm turning 21, but it's not exciting at all. So my dad was like, hey, you should do one of your pretending videos, but you should pretend to like go to different bars, but like that was, that was it. That was the whole video, so I didn't know what to do with that. So here's just a short scene of what, you know, maybe that would look like, hey girl, happy birthday. Yeah, you're 21, we're at this bar. It's so fun being at bars on your 21st birthday. Look, we're in a different one, and I am also your friend, Karen. Yeah guys, we're so excited to be at this new bar because it's where we are because we're at different bars. Wow, what a great 21st birthday. I love bar crawls. Oh my God, we're in, because it's where it's a different bar now because it's drunk. Did you know that because of where we are, we're in a different place because alcohol. Oh my God, I love alcohol, yeah, because it's your 21, because we're at a different bar. And oh my God, it's the guy from earlier. Yeah, I'm a little drunk too, but I got my hammers, everything's okay, it's all good. Yeah, it's great.  This was very fun birthday because it's where it's a different place than before because that's, yep, yep. That was the best 21st birthday ever. Yay, 2020. T-G-I-F. For some reason I just have that written down on my notes. It was said at one point, I don't know when. Everyone, thank you for, thanks for watching this video. You're ever wondering if getting pied in the face is like a cute experience. No, it's not, it's in my hair, it's everywhere. It's on my clothes, it's dripping all over the floor. So this is just a good indicator that I'm really dedicated to my craft. And because of that, I think you should subscribe, right? That'd be really cool. Yeah, I hope everyone has a great day.  Because this is probably one of my favorite videos that I've ever filmed, so really in truth. I just wanna thank my dad for these gems. So even the pie in the face, which right now I'm regretting, but hopefully when I'm editing this video, I will feel differently.


Hello and welcome to the session. In this session, first of all let us give an introduction of annuities. Now in today's life a number of transactions take place like sale and purchase of goods such as cars, washing machines, lands etc. Some of these things are very expensive but it is not possible to pay the total cost at once. Therefore payments are made in installments over a period of time. Now the installments are calculated in such a way that the seller is fully compensated by his waiting time by paying interest calculated compoundedly. Therefore annuities can be defined as a sequence of fixed equal payments made over uniform time intervals full intervals of time with compound interest on these payments. Now these intervals may be a year, half year, a month, three what is a payment period. Now a payment period can be defined as the time between sequence of payment is made on first then it is an annuity with payment period of one month. Now let us discuss what is a term or duration of an annuity. Now the total time on the beginning of the last payment put the term or duration of an annuity. Now let us see who is an annuitant. Now the person the annuity is called annuitant. Now let us see what is an installment. Now the installment is defined in what is a cessation period. The time that intervenes between the payment installments annuity is called its cessation period. Now let us discuss types of annuities. Now there are three types of annuities. First is annuity certain. An annuity certain is an annuity which begins fixed dates and the payments fixed number of intervals. Now bank gathering deposits are the example of annuity certain and the second type of annuity is annuity contingent. Now in annuity contingent payments are made that have links of an event such as death of a person, marriage of a girl etc. Now in this case the term of an annuity is unsurpassed for an indefinite number of years. For example life insurance premium. Now the next type of annuity is perpetual annuity or perpetuity. Now it is an annuity whose payments continue the end of the periods. Payments are made when it is called an ordinary perpetuity and if at the beginning of the periods the payments are made then it is called perpetuity too. So as the term of this annuity is infinite therefore the beginning date of perpetual annuity is known not the terminal date. For example endowment fund to give scholarships to multiple students every year in a board examination is a perpetual annuity. Now let us discuss the classes of annuity certain. On the basis of payment date annuities certain are classified into three classes annuity too. Now if the payments and installments are made in the beginning each period the annuity is called an annuity too. For example recurring deposits, life insurance premium payments etc. Now the second type is ordinary annuity or immediate annuity. Now in this type of annuity a series of payments or equal value is made each period. For example a personal loan from a bank. Now next let us discuss deferred annuity. Now if the first payment is postponed or deferred the expiration of a period of time to a certain number of then annuity is called deferred annuity. This also called reversion in this case the term begins after the expiry of certain period called the deferment period. For example the pension plan of life insurance corporation of India. So in this session you have learnt about annuities, types of annuities and classes of annuity certain. So this completes our session. Hope you all have enjoyed the session.


Okay, good morning everyone. Welcome to our class today. We see 310 on church and ministry administration. Let's take a moment to pray and then we will get started. I request somebody to pray. Thank you, Jesus. At this time of the month, I'm going to talk about the church and the administration. We'd end up with the students and the teachers of the soul. So this is the way we guide ourselves. But because of all of us, I'm here with you and I'm here with you, to work together, to learn and to help us to improve our qualities, that is for me. When you go home, you've got so many teachers as well. Amen, amen. Alright, thank you. Thank you everyone. So last week, last few lectures, we were talking about church staff. How do we take care of the church staff? Today, we're going to go to the next lesson, which is volunteer management. How do we work? How do we properly engage with volunteers? So let me share the PDF and we'll get started. Volunteer management lesson number 8, how do we work with volunteers? Now, when we look at it from the scriptural standpoint, Romans chapter 12 verses 4 through 8, the scripture is teaching us, Romans 12, 1 Peter 4 Ephesians chapter 4 or 7, 11 and 12, that God has given different gifts, different graces to His people, which means that church congregation, essentially every believer has some grace, some gift, every believer. So when you look at the church congregation, if you have 100 people, 100 people should be serving. Of course nowadays, maybe 30% will be serving, 70% are just coming and going. But if you look at it, actually something is there, each one of them, all the 100 people in the congregation actually have something they can do. They have some grace. In some area they can serve God and Romans 12 says, we are all part of the body and each one God has given grace. And 1 Peter 4, 10, 11 tells us that as each one has received the grace, they must use it to serve others. So from a church perspective, our motivation must be, we want to get everybody involved. We want to give everybody some opportunity in some place. Not everybody can of course be on the stage and preach, but we should create as many opportunities as possible for every person to serve. And this is where volunteers comes in. As we encourage people in the congregation to serve, they want to serve as volunteers. Not all of them are going to leave their jobs or leave what they're doing and join the church staff. They will have their jobs, they will do what they're doing during the week, but they will give some amount of time. Maybe four hours, five hours, some people will give one day. They may give their skills, they may give their energy, they give their time in order to serve God. And so as a church, we need to create opportunity for people to serve. We can't force everybody to serve, but some people will come on their own and say, I want to do something. I have this skill, I have so much time. How can I serve in the church? How can I serve in the church or even outside, but in the ministry? So this is where we should enable this and facilitate this to happen and this is where volunteers come in. So what we need to think about is how do we invite and engage volunteers? So that's important, right? How do we invite people and how do we engage them as volunteers? People should know that we are encouraging them, we're inviting them. They shouldn't think that, huh, Pastor doesn't want me to do anything. He just wants me to sit here. No, no, actually the other opposite is true. We want you to come and do something, right? Find something that where you can contribute as a volunteer. So that is our motivation, but they should understand that that's where we are coming from. They may not say, just sit and go. Please, whatever way you can do something. It may be on a Sunday or it may be some other day of the week when there is some work to be done. So we need to think about how can we invite them and how can we engage them? So even if somebody wants to volunteer, of course we have to guide them. We have to oversee them. We have to manage them, things like that. So there is, if we invite them to do work, it means more work for us also to oversee them and guide them. But we have to engage them correctly. And to what extent should volunteers serve? Because we can't just give them the responsibility because they may not have full time to handle it completely. They may have time to do a little bit of it. They may have time to serve in a certain capacity. So we can't just say, just do the whole thing, right? So we have to think through on to what extent can we involve volunteers in the church or in the Christian organization. And then how do we need to change? How can the church or the Christian organization, how can we structure ourselves and adapt the ministries and programs so that there is space for these volunteers to participate so that volunteers can be a part of it. So this is something we need to think about. Now, one of the things that, let me say this, one of the biggest difficulties is in how the church staff and the volunteers work together. That is an area that needs a lot of attention because otherwise there can be a lot of conflict between church staff and volunteers because they are not doing the job, they are not coming, they are not doing. Volunteers say, you are getting paid, I am not getting paid. You must be doing it, why are you making me do it? So those kinds of things could happen. I am not saying that always happens but it could happen and they need to manage that and make sure that the volunteers look at church staff with respect. This particular church staff, he is full time with the church, he is working for the church. He could be like the volunteer, working in a corporate office or doing something, earning lots of money but these people who are church staff, they have made a decision, they will give up those other opportunities and come and be part of the church staff and that means they are dedicating all their time and their skills in order to do the ministry. So we have to respect them. So volunteers must look at church staff like that. We have to give them that mindset. Here the church staff are people who have sacrificed other opportunities in order to come and work so that they can come and dedicate themselves for the ministry. They have made a sacrifice so volunteers will respect the church staff. Then the church staff must also respect the volunteers because volunteers are busy, they have their own responsibilities. They are working for some organizations, they have families, they have full time responsibility outside but in spite of that they are willing to come and give their time and effort to do the ministry. So if both sides, if there is mutual respect, then they will be able to work together. We respect each other. Each one has their own position and we can work together and balance it. So one of the things we must do in order to make this happen is involve the church staff in deciding and determining how to engage the volunteers. Let the church staff decide. You decide how you want to involve the volunteers. So in different areas of ministry where there are full time staff, you say, okay, see you engage the volunteers but you decide what work you want to give them. What portion of the work can be done by a volunteer that you decide because the rest of the work you have to do. So we let them let the church staff decide for their own areas of ministry to decide. So for example, that's how we work. Example, catalyst. Catalyst ministry, they're going to the school. We have paid staff, but we have also more volunteers. I don't know what the number is about five or six people. I think it is now. So if the team has seven people who are staff, five are volunteers. So there are more volunteers. And that's how catalyst ministry is running right now. Of course, we are open to having more staff but staff means they have to work full time or they are committed. You're going to be working Monday to Friday. Volunteers will say, okay, I can give you one day in a week. I will do the work. Or I can give half a day. So that gives, okay, they can volunteer for that. So I let example, Pastor Celina is leading them. So I say, okay, you decide how you want to run it. If you want to hire five staff, you can hire five staff. That is up to you. The goal is we must go and serve the students in the schools. That is the goal. That is the ministry. How do you want to run it? Full time staff or volunteers, you decide. You leads. So she will decide, you know, whatever if there are more volunteers and she's okay, I don't need full time staff. If there are less volunteers, then you need more staff. And that all that, let them decide. Let the church staff decide. Whoever is responsible for that ministry. So like that, in different areas of ministry, there is a combination of church staff and volunteers or working together. The person in charge of that ministry, we let them decide how they are going to, you know, do their ministry with the mix of staff and volunteers. So that they feel like, okay, this is how it can run best. And they know what they can delegate to volunteers, what they need staff to handle. Now, what are some of the benefits of volunteer engagement? Like, you know, if you have more volunteers from the church or the ministry, you know, obviously there are lots of benefits. One is congregation feel, they feel part of the church ministry.   You know, this is our church. You know, we, this is our church, I'm volunteering. I feel part of this ministry, which is true that those things will not happen unless these volunteers come and do their part. So it makes the community that sense of belonging is there. Secondly, it gives people the opportunity to exercise and nurture their spiritual gifts. So that is what we said when we began, you know, that God has given everybody, every believer, God has given gifts and graces. When we let them participate, then it's actually they're giving, being given the opportunity to exercise and nurture spiritual gifts. They can pray for people, whatever, you know, whatever they can do, you know, teaching children's church or the youth or the teens or different areas. They can exercise their gifts. They can serve and the local church is able to function as a body. That means every person, every part of the body is doing something. You know, it's not, no, no body is, no part of the body is lying idle. And it also is an opportunity to turn, put all the learning and equipping, put it into practice. So you can listen to the sermon, listen to them and switch. But now, come on, do something with us, you know. So when we give them the opportunity to serve, we're actually telling them and giving them the opportunity to practice the things that they're being taught from the word of God. Of course, then it also helps us have more people to do the work, a larger workforce to sort of speak. That means there are more people who can carry the load. It doesn't become burdensome on just a few. And we have the benefit that there is no financial expense for volunteers. So volunteers are really giving them time and things. So the financial expense on the church also or church or ministry is also less. So these are some of the benefits. So the church really stands to benefit from having volunteers participating. But at the same time, we must understand that our limitations are not, everything can be done by volunteers. So, for example, volunteers are available only for small periods of time. So they can give maybe a few hours on a Sunday. That's the only time they have. That means the work that we give them to do should fit into that. I was like, okay, you come, you be a greeter for one hour. Be a greeter, be a usher. You attend, take care of the parking lot, whatever. For that amount of time, they can do their work. But we also need church staff. One day to Friday, we'll be taking care of all the other things that require full-time attention. So volunteers are there. Sometimes volunteers may have other priorities. So imagine somebody who's working. Okay, he starts volunteering. Suddenly his office says, hey, you need to go for six months. You need to go and work on site in the US. So he'll say, hey, next six months, I'm not here. So, okay, you can't sit down. His job is there. So he may be workplace demands, work-related travel, those things. So obviously those become, those are of higher priority. Another thing is that when working in the church, volunteers need to transition from corporate culture to church culture. That's also important. In corporate culture, when you say something, hey, your junior has to do it. You're the boss. They have to do it. In church culture, it's slightly different. You have to be patient. You work a little bit more gently, things like that. So they need to move from corporate culture to church culture. In corporate culture, it's like, hey, if you're the team leader, everybody listens to you. Here in the church, the team leader, you are going to serve.  So that shift needs to be made. And so knowing how to behave in the workplace and in the church, they need to make that change. And in some cases, volunteers may overcome it and under deliver. They'll say, yes for everything. But then when you actually see, practically they cannot fulfill it. So they may not come to certain things and they overcome it and under deliver. Out of zeal, they may be very zealous. They want to do something for God. So they commit to everything and they take on a lot of commitment. But then when it comes on practically, they're not able to fulfill those commitments. So then it becomes a problem for us on how to manage things and so on. So these are some of the challenges that we face with volunteer engagement. Now, the way we work and I think in many churches and Christian churches and organizations, they will have volunteer teams to handle different things. So that's how we also work. That means there are many areas of ministry where we have identified. We said we can involve volunteers here, example in worship ministry. Our worship team, I don't know what the number of people are right now, maybe between 40 to 60 people, I don't know what the exact number is. But that's the team. Only a few of them are full-time staff, like the two, three, four, what a worship pastor is. The rest are all volunteers, sort of, let's say about 50 people, maybe five people or less are actually staff. The remaining 45 in the worship team are all volunteers. So it is okay because commitment is Sunday and not every Sunday, but certain Sundays in the month, whatever you, the person is comfortable. I can do two Sundays a month, that's okay. Some people may do three or some people may do one. Whatever you're committed, you can, you tell us. That Sunday you have to come prepared to do your part.  So that means that is the level of the commitment. So that we can engage, but of course they have to practice and come. And they just can't come without practicing. So they're practicing also. They are committed to doing that. That means so much time they have to give to practice and then come. So things are so example, you think about people who handle camera. So we can have volunteers there where they can come and only on Sunday morning you hand me the camera, but video editing. That requires a lot of work that happens during Monday to Friday. So for that, you need full time, somebody full time, you know, who will be available during the week.  There's that different things are happening, creating the graphics and all that. So that requires more work, more time, more commitment. So for that we have full time stuff. But if it's just something that, you know, that needs a couple of hours on a Sunday, those are kinds of things that we can give to volunteers. So we need to understand, okay, what can be done by volunteers, what needs dedicated full time stuff. And then we establish reasonable expectations.  And so they're able to work together. So we look on page 39, I've just listed out different teams, volunteer teams, where volunteers are actually serving at ABC. During a Sunday morning church service. Of course, you know, we have volunteers who are serving as greeters, parking lot guides, some of them will stand and guide the traffic, security assistance, information desk, registration desk, welcome lounge, connecting that is connecting with people, book table, ushers, office recounting, media presentation, stage decor which happens on certain occasions, sound and setup or live streaming, live stream moderators, online prayer, we used to do it, we don't do it now. Announcements sometimes, worship team, people are serving there, some people also minister to the world, print and other teams that we put together. So there are a lot of opportunities, even on a Sunday service, different areas that people can volunteer. Also in the ministry work that happens, like we said, worship, all the live groups are led by volunteers. Volunteers are serving in the youth ministry, Christian professionals, men's, women's, prayer teams, member care, performing arts, publications, catalysts, college outreach, campus elevates, campus groups, events, admissions, camps and conferences, special projects, so many ministry areas, volunteers are serving. So along, in many of these areas, they are serving along with church staff, they have to work with church staff, but these are all areas where volunteers are involved. So they feel very much a part of the whole ministry, what's happening and we are able to work together. Now, I've explained this earlier, the hub and spoke model. Let's quickly go through the bottom of page 39. So basically we have pastors and ministry leaders who are heading up various ministries, most of these people are full-time with church. We have the gray area that represents the church staff, people are working full-time for the church. And then the red area is representing all the volunteers, lots of volunteers. So taking this whole pool of people, we form many teams. All listed there on Sunday service and other ministries, they're all teams. But in each ministry area, there are teams, groups of people, which is a mix of volunteers, church staff and the pastors. So in every ministry area, almost like I said, the team is comprised of volunteers, church staff, pastors, they're all working together. So that's how all these ministry areas are functioning. So it's easy to start up a new ministry area. Just find some, the pastor is going to be leading that. Some church staff who need to back them up, volunteers, ready to go. So that's how we start up even new ministry areas that can be done. So now what I want to do is kind of get into some of the details on how we manage volunteers, how we work with volunteers at ABC, some of the lessons we've learned and so on. So volunteer recruitment, that means getting people to volunteer is a big thing. So what we do is every Sunday, every Sunday. So we want to make it, let me put it like this. We want to let people sign up anytime. We can't say, hey, you come only in January, the month of January and sign up. Then they have to wait 12 months to sign up. It's not practical. Anytime somebody wants to volunteer, they can sign up. So what we've done is we have created a web page on our website for volunteers. They can just go there and all these areas of ministry are listed. They can just check where they want to submit and immediately their name, what they've signed up for comes to us. And then we can reach out to them, say, thank you. We tell them, hey, just reach out to them. I'll talk to them. Thank you so much for signing up.  And then if it's a simple area, we can start them off immediately. If they need some training, like if it's example audio, video, those things require a little bit of training, then it's okay. You come for next three Sundays, you come, be trained, learn how to do it. Then you can start engaging. So those kinds of things, depending on what the area is. But the point is, every Sunday we announce, there's a little slide that comes in the announcement. Sign up to be a volunteer. That means we are open to this anytime. Anybody can come and we are constantly reminding people, hey, sign up, sign up, sign up. And then in addition to that, we remind people about these opportunities. And on different occasions, we might intentionally remind them that, hey, there are these opportunities that you can sign up. And so we provide these opportunities for all of us to participate. Now, I've just mentioned here on page 29 of page 30, sorry, why some churches, ministries hesitate to enlist volunteers.  Should we have them involved? Things like that. And they hesitate. Why? Sometimes they feel threatened by the skills and competencies of volunteers. Obviously, these volunteers, people in the congregation, they may be more skilled. They may be professionally much better because they are working in the industry. So, hey, if they come, they will tell me what I should be doing. Because they may know much better than me and know more than me and all that. So they feel threatened, the church staff of the pastors. Or sometimes they may say volunteers are not as spiritual as us. They don't pray as much as us. Why we should engage them in the ministry? Or sometimes they may feel that, you know, if we engage volunteers, they will take us in the wrong direction. They'll pull us in some other direction. So these are all fears. But I think we need to let go of these fears and we need to know how to manage things properly. So what if somebody knows more than me or has better skills than me? It's a good thing. We can all benefit from their skills. The thing is, I must let go of my fear and I must know how to engage them well. I should relate to them and say thank you so much for coming and sharing and discuss them with them, learn from their skills and so on. So if I let go of my fear, never can manage this whole thing well. It will be good for them and it will be good for the church. So we should not be threatened. And yeah, they may not have as much time as us here to spend in prayer in the world. But with them engaging with us, they will become stronger spiritually. So it's actually a win-win. So they win, we win, this is a better thing. And they don't have to pull us in the wrong direction. We can listen to their ideas and then prayerfully say, this is the way we want to go as a church. So we don't have to be afraid that volunteers will take us in the wrong direction. So we need to welcome them and they're not feel threatened to engage with them. The next thing is like I was saying, volunteers, we need to make these opportunities known. And one of the things we realized is the most effective way for volunteer recruitment is personal contact. What I've noticed is that you announce from the video, nobody will move. But if you go and say, hey, you know, John, can you please help? Immediately, so I've been waiting for you to ask. I've been waiting for you to ask me to do something. So like I'm thinking every Sunday I'm asking you, their announcement is coming. But they don't feel that as a personal invitation. This one announcement is going to everybody. But when you personally say, hey, can you do this? They feel so happy. So that is something we've learned, right? If you want to get more volunteer, you have to go and personally ask. Can you please help in this area? Of course, you have to ask them for the right place. So most of them are when we approach them personally, they won't say no. And they will most often they will say, yes, I've been waiting to do something. I've been waiting to see how to serve God. So personal contact or somebody invites somebody. Like somebody in church asks someone and say, come and help. That's that either the pastor goes or somebody else. Come and help. That is the best way to bring people in as volunteers. So what we always do and all our pastors, you know, even in the first time visitors and so on, where they make calls, we ask people, you know, would you like to volunteer? Would you like to sell? Of course, if some people say, you know, I need more time or that's okay. Or they may be going through a very busy season in life. They say, okay, I'm very busy, but maybe after a few months I think about, okay, that's right. We can't force them. But we ask, we keep asking. It's because that's the best way to get them to be involved by personal contact. Then other things like I mentioned, every Sunday there's an announcement that goes up. So some people might see it and then, you know, sign up and we have special volunteer drives on certain Sundays, which is okay. We will, you know, intensely get people to highlight the areas that people can volunteer and get them to sign up. Or we also, time to time, tell people to share their testimonies. How have they benefited from being volunteers in the church? You know, so we get them to share their testimony. And then that encourages others to sign up. So enlisting volunteers, the sign up process is very simple. We have a simple sign up form online so anyone can sign up anytime. It's very simple. And then we want to immediately respond. So like if a volunteer signs up and we don't respond within one few days, they'll think we are not interested. Oh, I signed up. Church didn't give me any opportunity to help. So when they sign up, the message goes to our events coordinator. And immediately his response when he's immediately called them and say, hey, you know, talk to them, find out what they want to do and get them involved, get them to start serving. Some other things we found useful is to have clearly, clearly written down description of what they need to do. So we put everything in a written form for every ministry area. People are serving them. They can read their volunteer guidelines and they'll understand, okay, this is what I'm expected to do. So we have it written down. So that way there is no confusion. And we also train them wherever there's need for training. We communicate our policies, our guidelines, and to whom they should report to and how they should be accountable. So these are things that we cover as soon as they sign up to serve in a certain area. So they can actually start serving. These are things we tell them. That means there's no confusion. You have to come at this time. You have to do this. This is what you must do. This is who you report to. This is what is expected. So otherwise they may say, yes, I'm coming. So I don't know what time I was supposed to come.  Those things have to be handled. One more thought and then we'll go for a break. Volunteer demographics, the stage 31. You know, when we are engaging volunteers, it's also actually an opportunity for us as a church to build bridges across ages and even across the mix of people. So what happens in many churches is older people, they will talk to themselves. Younger people will talk to themselves. Teenagers, they'll be by themselves. So what you have, you have groups within the church. Older people, teenagers. And so how are you going to get them to mix with each other? Because there is a benefit. You know, the younger people, if they work with the older people, they can learn something. And the older people can also learn something from the younger people. They can benefit from each other's thing. But if you just leave them like that, they'll all be their own groups. The same thing if there are people from different regions. For example, people from the north or they all seem to stay together. People from the south, they all seem to stay together. I'm not saying always, but generally it's like that. So how do you mix them up together so that they can be a good interaction? So volunteering is a good opportunity to do that. So you put little older people, younger people, teenagers, put them all together in the same team so that they work together. Same thing with people from different cultures. Put them all in the same team. You all work together. So volunteering in church actually becomes an opportunity to bring people across ages and across cultures to bring them closer to each other. It's a great opportunity. If you put them in the same teams and let them work together across ages, then they'll all happily learn from each other. So we intentionally try to create teams. Now of course it cannot happen in every way, every area, but in many areas you can do that. For example, in children's church, we have little older people, little younger people, they're all serving together. So they have to talk to each other. They have to interact and they have to learn from each other. They have to adapt to each other's way of thinking. We should believe to some extent that some older people, younger people, they are working together. So it's a good mix. It's a good healthy thing to do, to have these people work together. And it's a great opportunity for learning to happen, mentoring to happen. All the people can care for the younger people and so on. So it's a great advantage and we need to recognize that and make use of that in the whole volunteering. Any questions so far? Let me see online. Any questions around following? Yeah, definitely a question. So I just want to ask about, so I come from, I've never seen volunteers this much as I have seen in APC. So it was a shock to me to see the church people volunteering and then they are the church and they are the one who is working. So it was so different for me. So how do we actually implement in a place where they have never been a volunteer? I have seen churches where actually they don't trust each other to give a position to someone they don't trust. So mostly people in authority or the pastor, they are the one who takes care of everything that happens in the church. As far as I have seen in many churches. So how do we implement it over in those places? Do we have to preach about it? Or I just want to know how do we start up? Like there should be volunteers in church. The idea of volunteers itself, I have I haven't seen in some churches in Tamil Nadu. So how do you actually give that encouragement? Yeah, very good question. And so I think the first step is that the mindset of the leaders, the pastor should change. The pastors should actually see that this is God's will. So it's not just in about whether the church will benefit or not. This is God's plan. That is why God has given gifts and graces to everybody. It is not given gifts and graces only to the pastor. The Bible says like we started up with the scriptures in Romans 12, 1 Peter 4, Ephesians 4, 7. God has given gifts and graces to every person, different gifts and graces. So therefore, it now becomes the pastor's responsibility, the leadership responsibility to actually give them the opportunity to use those gifts. Otherwise, what God has put in them is going wasted. It's not being utilized for the purpose of God. So by not giving opportunity, we are actually disregarding God's gift and grace in the lives of all those people. So first thing I would say is the mindset of the leaders, the pastor should change. That they need to realize that this is actually something I have to do, I have to do to honor God. Then of course, the mindset of the people also need to change. The mindset of the people in many cases is, oh, I just have to come and attend church and go away. I don't have anything to contribute. So people also need to know, no, no, no, actually God has put something in you. God has given you certain gifts and graces. Now you need to discover it. You need to use it to serve God and serve people. So even the thought process or thinking of the people must change. And that thinking happens through the preaching of the Word. Through the preaching of the Word, we bring up these scriptures and say, hey, God has given all of us gifts and graces. God has given all of you gifts and graces and you need to start using it in whatever way you can.  So like at APC, we say every believer is a minister. That means you can do something to serve God. When we say minister doesn't mean you have to become a reverend or bishop or something. Minister simply means serve. So everyone can serve. So that's how we change the mindset. So once the understanding is shifted or changed, then we have to think of the practical ways, how to go about it. Simple thing is form teams. Don't make it too difficult. Don't make it too hard and they won't serve. Keep the entry barrier very simple. You want to serve as an Asha? All you have to do is come at this time. Stand here and do this. Keep it very simple. You want to serve as a greater? Very simple. You have to come at this time, be here, smile and shake hands and welcome people to the church. So try to keep things very simple. And of course, in certain areas, they need a little bit more work. Like if you're going to serve in children's church or teams or youth, there you have to come prepared. The lesson that you're going to teach and all those things, of course. But make it easy for them to come and volunteer itself. So slowly you build that culture over time. And then you'll have a very healthy congregation. That's a great question. You're the same. I'm a literature student. Dearly church, cheers. Remember how many people, each of you remembers? Correct. As we go, we're going to be faster than the people. Right. So in all of them, some of the churches of the pastor that are going to stay, they want to bring their own family and lead to that particular church. And all of us have neglected it. All of the people are there. That's the main reason for the church. They're not faster than the pastor. Yes, you told the freedom of the followers. People are more talented than the pastor. That is the real challenge for the pastor. But as you told me, you have to change the movements. Because we are here to serve our community. The one of the main reasons was violence. There's a lot of people in this world that are different from each other. They're almost educated and they have been put to bed. And they're worried about whether the church is not matched to bring them into the community. They have to judge people in the community. Right. The concept. So we have been able to provide them with a better understanding. Right. Right. I suppose we have to change this mindset. Yeah. Think about it. Yeah, yeah. Yeah, so what Pastor John said, you know, you know what sharing here in the classroom was that he's sharing his observation that the mindset of the leaders needed change to engage people in the congregation. Typically it's the leader thinks about just themselves rather than the whole congregation also feels threatened that people in the congregation may be more skilled than themselves. So that's why they don't tend to engage people. Yeah, so for the benefit of online students. Okay, let's go for a break. We'll go for a 10 minute break and we'll be back in 10 minutes and continue our class. Thank you.