Alright, so my name is Sonny Scroggen, Scrogg's son on the internet, and this is taking Elixir to the metal. So apparently one of my co-workers when he heard this talk title thought that it was going to be about Elixir and like music, like metal, and it actually was, but Johnny forgot to bring the drum set back here. So it's actually going to be a different talk. So this talk is about Elixir, right? And as we all know and love, Elixir is a dynamic functional programming language, it's built for scalability and all that good stuff that we've heard about already in this conference. It's known for this like trinity of features like concurrency, fault tolerance, and distribution. And it's built on top of this rock solid, awesome thing. But one thing that I think a lot of people don't really understand when they first start learning Erlang and Elixir is that this thing is like the ultimate orchestration platform. It allows you to build systems that you don't need to build everything in Erlang or Elixir and have it available inside your code. So it can talk to the outside world and you can also build supervision trees that actually support, you know, spawning processes like external systems. Maybe you have like a Python script that you need to run and because that code is already stable and doing what it needs to do, but you can write it in Erlang so that it actually starts that process and has a port communication. And if that process dies, then you can actually supervise it and have it restart and do whatever. So actually Erlang was originally built for Telcom and believe it or not, like you have to deal with hardware and stuff in Telcom. And so all of these features are built into this runtime system that we know and love. And so there's various ways that you can do this. And so you can use ports. There's this thing called Erl interface, which is really interesting. And there's also a thing called J interface, like if you want to do Java, which I don't know why you would. There's this thing called C nodes, which is really, really cool. So you can actually build external systems that use the Erlang distribution like protocol to act like an Erlang node. And you can send messages to it and it can send messages back, et cetera, but it's like an external system. There's this thing called port drivers as well, which is, there's a lot of the internals and stuff of various things are built with port drivers. And then there's this thing called native implemented functions or NIFs. And some integration examples, there's, MIX uses ports to like when you have like Git dependencies, for instance, it's going to use a port to actually like reach out to the Git binary on your system. Erlang's iNet driver is a port driver for all the networking stuff that happens within the beam. So like TCP, UDP, all that stuff. It's written in C, it's really, really fast. And then there's also this NIF called Jiffy. And it's a JSON encoding and decoding library. And so it's really, really fast. So if you're using like Poison or whatever, if you want to have like a really fast NIF or a really fast JSON encoder, then you can use Jiffy. And it's written in C and it's really fast. So NIFs, that's basically what this talk is going to be about. We have, it stands for native implemented functions. They're usually implemented in C or C++ sometimes. And of course they're, because of that, it's reserved for wizards, you know, these people that actually know what they're doing.  So Erling's fast, but it's not, it's not that fast, right? It was not really designed for raw CPU throughput. It was designed for this fault-tolerant system and giving you a lot, it's a lot more about how to build fault-tolerant systems versus speed, right? And so you'll want to write a NIF if you have to talk directly to hardware, for instance, since you can't really do that directly in Erling. Maybe you need to interop with some graphics library or whatever, or maybe the functionality that you need already exists in some C code and you just want to pull that in because it would take much longer to rebuild everything in Erling or Elixir. So the one thing that, don't try to read all this because it's really tiny, but when you get into NIFs, you're going to read this warning when you actually look at the documentation. And it's like, basically, the first rule of NIFs is don't write NIFs because there's things that you have to actually know, otherwise you can cause catastrophic failure throughout your entire system, which is bad, especially since we're running on the beam because we have these fault-tolerant guarantees and things like that. NIFs themselves are called just like any other Erling and Elixir code. You have a module, call a function, and instead of calling the normal byte code that would be running inside of that module and that function, it's going to actually reach out and load some native code and run that. So NIFs live in dynamic libraries, so depending on your operating system, it's going to be like a shared object.so or a DLL if you're on Windows. NIFs end up, what happens is they actually replace the normal Erlang byte code with this native code when the module is being loaded into the runtime. So NIF functionality, essentially, it can read and write Erlang terms, things like binaries. There's this really cool thing called resource objects that I'll talk about. And then you can also do native threads and concurrency as well. This is kind of how you would set up a NIF in Elixir. So if we were creating a JSON library, there's this module attribute called onLoad and it takes an atom of a function that it's going to call, so it takes zero Erty. So we have this init function, we're going to call that, and this we're just going to use the code priv to find the path to our actual dynamic library. And then we call Erlang loadNIF, and that will actually then do all of the replacement and stuff. And then so these functions here that we have, we just return errors. You can also provide the fallback actual implementation of these functions if you want. So if you want to pull in poison or whatever and just have it call it, if for some reason it can't actually load the native module. But otherwise, you just return an error if something bad happens. So here's the structure of init and C, EAC. All right, so Erlang provides a NIF API, and you can pull this in with the ErlNIF.h. And then you just basically have to implement all your functions, which they all have the same structure. So it takes an ErlNV. As the first argument, we have a count of how many arguments are being called, so basically the Erty of the function. And then we have all of the actual terms, the Erlang terms that are being passed into the function. And it's just a vector of Erlang terms. And then we just need to return an Erlang term. This ErlN thing, it's basically passed as the first argument. It represents an environment that hosts Erlang terms. And it also contains transient information about the calling process. So everything that happens in Erlang happens in a process. So every time you call a function, the caller of that function gets passed in as kind of a contextual information about the calling process, and it's available inside the NIF, or available inside the environment. All terms that basically belong to this environment, they're destructed when the environment goes away. And really it's an opaque type, so you can't really do anything with it other than just like pass it into the Erlang NIF APIs. Similarly, the Erlang NIF term, it's an opaque type. This kind of represents the Erlang term in C, and it belongs to this environment that's passed in as well. So the next thing we have to do is we have this ErlNIF func type. And what that does is it allows us to return a list of structs that represent the NIF on both the Erlang side and the C side. So we have the first thing in the struct is like a string representing the function that's in our Erlang module, or Elixir module. Then we have the Erity, and then we have like a pointer to the function that actually is going to do the work in C. And then we have the final thing we need to do, which is to kind of initialize everything. And this we tell it, hey, this is the module that you're going to attach yourself to. Here's the list of all the functions that we have, and then there's like these nulls are a bunch of other things that we don't care about, like how are you going to handle reloading and loading and various other things. But obviously I have no idea what I'm doing. I don't know C very well at all. I would never trust myself to write C, even if my life depended on it. That brings us to Rust. So Rust is a systems programming language that's built by Mozilla, and it's a really, really amazing awesome language. It's like a high-level, low-level language. So it's blazingly fast. A lot of function, you know, the people are writing, rewriting a lot of C programs that are notoriously like security prone, like for bugs and stuff, and trying to make things more secure, and because of the way that Rust works, it allows you to build programs that won't compile unless they are actually safe, and like basically just removes whole classes of these bugs that we see that cause all these security vulnerabilities and things. And not only that, but obviously like programs that crash at runtime. So Rust has a lot of guarantees for fault tolerance and safety and these things, which is really, really awesome. So some of these accolades that it boasts on its website. So zero cost abstractions. There's this really cool like trait-based generics that they have that allow you to kind of, it kind of gives you this object-oriented feel, but it's not object-oriented, which is really nice. It actually does have a lot of functional approaches.  But it also has like pattern matching. It also has efficient C bindings. So when I first started learning about Rust, I was really wondering like how it would be so cool if I could write niffs in Rust instead of C. And so I was thinking, well, if I'm thinking about this, surely someone else is also thinking about this. And so I really wanted to be able to write niffs in Rust and see how that goes. So the first library that I came across is called Erlang Niffsys, and it's essentially, it's basically like a generic binding of all of the C API, but translated into Rust. And so I started taking a look at this, and it was like, oh, sweet, I can totally like write niffs in Rust instead. The API here, this is like really just like a thin wrapper around the Erlang C API. So all the function names are like really like long and C-like, and it's very much almost like translating the C API, so you still have to like pass around pointers and do all these kinds of things. And so it doesn't feel like really like rusty. So I thought, well, maybe I'll just like build a higher level library on top of this. And I ended up coming across this library, which was like, yes, I don't have to write it. That's so awesome. But when I did find this library, it wasn't quite compiling on Mac, so I couldn't use it. So I got involved. I sent a couple pull requests, got it working, got all the Travis CI stuff working and involved in like within just like a couple of PRs, the maintainer Hans was like, well, since somebody else other than me is actually interested in this, why don't you just, I'll just make you a collaborator and we can like, you know, talk about this stuff. So basically it was like, all right, sweet. Now I'm going to actually like submit a talk about this stuff. And so I submitted a talk for this and I actually gave it about a year ago in NBC London. But I was really stressed because literally all the functionality that I wanted to talk about wasn't in this library yet. And so there was like a couple of months where it was just like working hard to like get all these things available so I could actually talk about them. So Rustler is basically, it's a library for writing niffs in Rust, obviously. It provides, you know, facilities for generating the boilerplate that you don't need and interacting with the Erlang VM. So it handles all the encoding and decoding of Erlang terms to Rust types and vice versa. And it also, it catches any panics that you might have in your Rust code. And it catches that before it unwinds back into C. And so really the reality with that is that using Rustler you should not be able to crash the beam with your niffs. Which is not, you can't guarantee those types of things with C niffs.  So getting started is really simple. We actually have like an Elixir mix task to like generate stuff for you. So we can create a mix new JSON. We add Rustler to our dependencies. This is the current version, but the like changes that I'm showing are actually going to be in master. So if you didn't know about this in your depths you can actually like add this sparse thing that tells it like a directory that you want to use. So also you can use github instead of git and you can just use the username and the library or the repo. So fetch the depths and then we can use mix rustler.new. And this is going to allow us to like generate our project. So we tell the module name which is JSON and it's going to go ahead and generate a bunch of stuff for us. We can also like specify here that we want our library name like our nift to be called fast json. So then you can add the rustler compiler to the list of compilers in your project. And then we have this rustler crates configuration here which allows us to specify you know all the different nifts that we have in our project. So we tell it the path and then we can tell it like what mode we want rust to be compiled in. So depending on if it's if we're in production then we want to be like compiled in rust for production which make it faster. Otherwise we'll just use debug so that it's faster to compile. So this module that we wrote before with rustler pulled in it shrinks down to just this. So you just use rustler and then it goes ahead and generates the init function for you and all that kind of stuff. So this is what our librs file looks like. So we have a couple of extra crates that we pull in. These are like external packages outside of the crates system in rust. So we pull in rustler. We pull in this thing called lazy static which allows us to like have atoms that are statically created and all that kind of stuff. And then we have extra and create json so I'm like pulling in an existing json parsing library that's already fast in rust. And then we have like a couple of modules. So we have a decoder module and we have an atoms module. And the atoms module is just simply like our atoms that we're going to be using within inside of our nif so like you know okay and stuff like that. Then we have this rustler export nifs so we specify the string elixir.json. For those of you new to elixir when you compile your module it always is elixir. whatever your module name is. And then we give it a list of similar structures before where we have the function name inside the module the arity and then some function within our rust code that's going to handle that. Alright so let's take a look at the simple approach of just using existing json parsing library. So we're just going to basically take a string or a big binary and we're going to decode that into rust types and then we're going to convert those rust types into erlang terms and then return it. So this is the decoder. Just importing a bunch of stuff and we have our decode function which is going to take the environment as the first argument and then instead of having the count of arguments and like a list of terms we just have an args and it's basically a slice of terms. And then this returns a result which is either a term or an error. So in rust one of the things that's really, really cool is that you can't throw exceptions or any of that kind of stuff. You literally just have types that you return and if you don't return the right types then it won't compile. So we don't have to worry about throwing exceptions all over the place or whatever. We can just use results. So here we just fetch the first argument out of the terms here and so we just call decode on it and this question mark is really, really cool. It's basically like it's a short way of basically saying, hey, do this thing and if it returns a good thing, if it returns okay then just like give me the result, like unwrapped. But if it's an error then go ahead and bubble the error up and then it's like early return of the error. So we get that, get our data and then similar to erlang elixir like a case we have match. So we pass our data into this JSON parse and it returns either okay in the JSON data structure or it returns an error with this error. If we get okay then we basically call this function called JSON to term. We pass in like stuff, we pass in the environment so that we can use it in there and then we return, we basically, this is like returning the tuple of okay as an atom and the term itself. So we're returning basically this like okay tuple. In the case of an error we just return error and give it the error reason. All right, so this is the JSON to term. It's basically just a recursive function that just goes through and tries to encode all of the JSON types to erlang terms and it handles maps and arrays and all those different things. So it just does that in a recursive loop and then essentially that's what we return at the end. All right, so let's time our nif. So we read in some big, big old JSON file. This is like eight megabytes of JSON, which I guess is not really that big but whatever. So this is the way we can actually like time how long it takes to run this thing. And so we call timer.tc and pass in the module function errors and then we get the time that it takes back. So this is like 1.5 seconds. So I have this like yikes here. Most people will be like, whatever, it just takes 1.5 seconds to parse that much JSON. And in most languages that's really, it's fine, right? You just have to deal with it. There's a lot of other programming languages that have foreign function interfaces and they're dealing with native code. In Ruby there's lots of, like most of the JSON parsing libraries are implemented in C as well. If you get a big file and you have to parse it and it takes a long time, that's just the way it works, right? But in Erlang it's very different. And so I'm going to get into kind of the details of why this is and why this simple approach of using an existing library is really the naive approach. And so when you are first learning about nifs, there's a reason why there's that giant big error or like warning and because there's a lot of things that can go wrong and one of them is taking too much time. So the part of the warning here is that a native function doing lengthy work before returning degrades responsiveness of the VM and can cause miscellaneous strange behaviors. And then this next part feels like one of those drug commercials like, you know, it's like strange behaviors, such strange behaviors include but are not limited to extreme memory usage and bad load balancing between schedulers. So this is definitely a problem. And really it's only something that I think that I've only ever seen really be a problem in the Erlang ecosystem. So to understand this we're going to take a little quick deep dive into how the Erlang VM works for those of you who are not familiar with it. So you have a machine.  So let's say we have eight cores. On top of that you've got your OS and your kernel threads. And then you start your application. And it starts an OS process that basically has the beam running. And then the beam when it starts up, it also starts up a bunch of its own threads that it uses for various reasons. It starts up eight scheduler threads, one per CPU core. It also has a bunch of other threads for like IO and stuff like that. But for the sake of this demonstration, this is the problem that we encounter. So each CPU core has its own scheduler. The job of the schedulers is to schedule processes. So each scheduler has a run queue. And it essentially is like a list of all the processes that it's handling. And the run queue has got all these Erlang processes in it. And it just goes for each one, pops the head off, and it runs the process. It runs the bytecode and executes for a given amount of time. So the way this works is that because it's running bytecode, the VM and the scheduler can actually understand the context of how calls are being made. And so if the thing is just doing like CPU intensive work, then it's actually going to only have a limit of what's called 2,000 reductions. And so a reduction is sort of equivalent to a function call, but it's not really documented to be exactly what it is. So I've heard that it can vary depending on the operation that some function calls cost more reductions than others. Also, if you use Elixir to wrap Erlang functions, just because you want an Elixir API on top, you actually end up causing yourself more reductions, by the way. So, yeah, think about that. The other thing is that because we're running bytecode, the VM actually understands what you're calling. So there are a couple of other cases. If your process is trying to read from the file system, the VM knows that the result is not going to get there right away.  And it will wait for that message to arrive and before it actually puts you back in the queue. And same thing for if you are waiting, receiving a message as well. All right, so the other thing that's really important about this is that there's this thing called thread progress.  It's a really interesting write-up about how the schedulers communicate and stuff and why it's really important not to block. So the scheduler threads themselves, this is kind of like just a nutshell of how this works, but scheduler threads, they share some data structures. And rather than protecting them with locks or ref counts, which tends to be like a cause bottlenecks, they essentially share progress with each other and essentially they use this knowledge to know what data structures can actually be released or garbage collected or whatever. And so I think before they basically, the beam is amazing because they continue to make progress on making this thing more and more performant and this is just one of the things that they've done that is pretty cool. So the key takeaway here is you don't want to block the schedulers. You block a scheduler and it prevents thread progress and it makes other schedulers wait.  And so a NIF should never take over the scheduler for more than one millisecond is what the docs say, but obviously you want to return as fast as possible. And the problem is that reductions are actually not counted for NIFs. So when you call a NIF, the scheduler has no idea how long it actually is running for. And the main problem is that if a scheduler is doing this type of thing for a very long time or very frequently, the beam will actually start shutting down schedulers because the beam is built for efficiency and even power efficiency as well. So if it doesn't need all those schedulers, then it will actually shut them down so you're only running processes on two schedulers or whatever. So that can be a really big problem and in fact the folks at React, the database, they ran into a lot of problems at scale because they were running a lot of NIFs and also some other things as well. So actually some customers were seeing what they call scheduler collapse and took them a while to figure out this bug. So we need to count reductions. So we need a way to do that in our function. And so this is how you do it. You can get process.info, you can ask how many reductions you have and we can then call the function, we can do some timing differences and count the reductions as well and then send it back to the process. Interesting stuff. So when we count reductions here, we can see that running this, it only counted 10 reductions and this is way lower than it should have been. All right, so how can we do this better? One option is chunking. Chunking is actually kind of hard for most problems, especially like JSON parsing. You have to do it very iteratively and then you also have to be able to preempt yourself and return back at any given moment. So it takes a lot, it's a lot more work, which required me to actually build my own hand-rolled JSON parser in order to do this. So the way that you do this is you now have a, we have a function called decode. We get the data and then we call a function called decode init and decode init is our nif and we pass the result of that to this decode result and depending on what the nif returns, did I actually do, yeah, okay. So depending on the return values, we can chunk and continually call the nif over and over again. And we actually have two nifs now, we have decode init, which initializes the thing and then we have decode iter, which is like iterative, like an iterator. And that's the one we actually call over and over and over again. So if our nif returns more something called a resource and then an accumulator, then we'll just essentially call this decode iter recursively over and over again. And then we'll also call decode result as well. So this brings us to this thing called resources. So there's a thing called resource objects and essentially it's like a smart pointer and it's like a safe pointer into some data structure that's inside the beam that you can't really use it, it's opaque. And if you actually like IO inspect the thing, it's just an empty binary. So you can't use it, but it essentially is this thing that you can pass around back and forth between erlang and your nif. And it keeps track of all these various things, like terms and all that kind of stuff. Another thing that's really interesting about this is that you can actually pass it to multiple processes so you could essentially build a global mutable state thing that multiple processes can actually use at the same time, which gets us into a couple of things that's interesting. But these resource objects, they're not deallocated until there are no processes that are holding on to this value. So once the last process is no longer using it, it gets garbage collected and then it's removed. So this is now our updated librs and we basically now have this parser and we also have a sync. The sync is where we just throw all these already encoded terms. And let's see. So we now have decoded knit, takes two arguments and then we have decode iter, which is the same type of thing. We also have this last thing is what we want to do on load. So on the previous one, we had none there because we didn't have to really do anything extra. But on this one, we actually have to do some work. So when the nif loads for the first time, it's going to call this load function and this takes an environment and allows us to initialize this resource. So we say resource struct in it and we pass in our type, which is our parser resource here and then we're good to go. And then we just return true. So here in our decode init, we have the same structure as before. We get the environment and all that kind of stuff and we also have our parser resource and it actually has a mutex of our parser. And the reason why we have to have the mutex is the same reason why I said you can actually pass resources around in multiple processes and so Rustler protects you against that by making you actually wrap it in a mutex because if you did have two processes that were trying to access the resource at the same time, if they were scheduled on two different schedulers at the same time and they were both trying to access the resource at the same time, this gives you a way to lock it and make sure that doesn't happen. And this won't compile at all unless you use a mutex, which is really cool. So similar to before, we grab the source, the data, we get our resource by creating a new one and we have this resource arc, which is atomic reference counter. We pass in our parser resource with a mutex with our parser that has the source and that of course is gonna go through and eventually it's gonna parse stuff. But next we create a vector of terms and it's just an empty vector right now and then we call our decode iter nif. So we call our decode iter nif and we actually pass in the environment and then we pass in our vector of the resource and the vector and then our empty vector and these are pushed in as terms and so this is so that we can like initially get called and then we immediately call ourselves so that we can chunk it. So decode iter, we actually pull the resource out, we create a vector of terms or we get our vector of terms, we call it the sync stack and then we create the term sync and we actually just like try to parse. So then we do resource.zero.try lock, this is gonna like get a lock on our mutex and depending on what that returns, if it returns an error that means that somebody else already has the lock so that's probably bad so we have to like bail out and we just return an error and otherwise we get this mutex guard and we just return the guard and we have this while loop here so we have while not consume time slice and then we pass in like a one here which I still need to figure out the best way to actually call this function appropriately. You're supposed to be able to like do some math and calculate approximate your like the amount of time you're gonna take or whatever but this is kind of a way to like actually accumulate accumulate reductions in the NIF itself so it's kind of a way to just tell the VM hey I'm actually doing work and tell me whether or not I need to like bail out so this thing will return true or false and so while it's false we will basically just parse some stuff so like we'll just keep calling it over and over again and then when we're done so if we're not done if this thing returns true or whatever then we have to like return this more tuple here so we have more and then our resource that we're passing back to Elixir and then our current like stack so it's like an accumulator that we can like pass back in and just keep pushing terms back on so now let's take a look at this we can see now that we've run that and we're now showing that we have like 11,000 reductions now which is much much better alright so that was cool there's also another way that you can do this in Erlang and it's called like basically rescheduling so you can do some work in your NIF and then like actually reschedule it in the NIF instead of returning back to Erlang or returning back to your Erlang code the problem is right now is that the way that the E-NIF schedule NIF API works is that we currently don't have a way in Rustler to guarantee that you're going to use it correctly so we've decided not to even put it in Rustler at this time so because we can't guarantee at compile time that it's going to be used correctly we're waiting until we can actually figure out the best way to do that so but when you combine like the idea of this rescheduling yourself along with consumed time slice it allows the chunking to actually be done directly in the NIF and the NIF itself will be rescheduled rather than like rescheduling it in your process you know space or whatever so yeah so it's kind of cool the other thing is threaded NIFs and this is actually I think a really cool way of doing NIFs specifically that you call a NIF and then that NIF basically just spawns a thread an operating system thread to go and do the work and then when it's done it can actually send a message to your process with the result and this way you end up getting when your first initial call to the NIF can return like immediately it can return like okay or whatever and then you just sit there in a receive block and wait like this so we have decode threaded now and similarly we just get the string out we use rustler thread we say thread spawn and we get a caller environment here and then we also get our own environment that we get here and then when we parse our JSON and we can basically do all this work in the thread so now we've basically pulled back out and pulled this JSON parsing crate from Rust back into our library because it's much faster and a better library than me writing a hand-written parser so once it's done we return like the okay and the result of it or an error but immediately down at the bottom here we're actually returning just okay like okay cool we got it and then right here this is kind of like how you would call it in Elixir so you would call decode threaded which is the NIF it's just going to return okay immediately and then we just go into a receive block waiting for the result so pretty nifty and then we can also like do some timeout stuff as well if we want to alright so the last thing I want to talk about is dirty NIFs so in OTP 20 they made this like on by default for a while it was experimental I think in like OTP 18 or something like that and so the idea is that now not only do you get like if you have eight cores you get eight scheduler threads now you also get eight dirty scheduler threads and the cool thing is that these scheduler threads are specifically for like doing lengthy work that you can't guarantee is going to not degrade the system so they don't operate on the normal thread or normal the normal scheduler threads there's some interesting things too that you can actually schedule your you can schedule your NIF on the dirty scheduler and then you can also have it scheduled on the regular scheduler and you can kind of flip flop and go back and forth or whatever which is kind of interesting so the way this works is you pull in scheduler flags here and when you're exporting your NIFs you just add an extra argument here to say it's dirty CPU there's also dirty IO as well and so you can specify that you want your NIF to run on these other schedulers instead of the normal one and obviously even in the case of doing dirty NIFs you still actually do really want to try and return as quickly as possible because if you end up hogging up a bunch of CPU time or whatever on the dirty schedulers it's also still going to eventually start affecting the system so the rule of thumb is that you still always want to have well-behaved NIFs and write them appropriately so that they don't take up too much time on either type of scheduler so with that I'm finished but this project has been really interesting to me I don't have a systems programming background or anything like that so it's really gotten me a lot of ideas that I want to explore and try to get out there and also encourage other people to explore and experiment with things so some of the ideas that I'm really interested in doing is to actually take a lot of the awesome things that are happening in the Rust community and maybe an HTTP server for instance and actually build that so that it is kind of done as a NIF and be much faster and more efficient but obviously there's a lot of stuff that needs to be learned along the way to do that but yeah, Rust is awesome Elixir is awesome and I think they work really well together so with that, thank you


Annie Mendoza here down on the field with head coach Tati Corba and coach What do you attribute? You know Tiffany McKee's success so far this season and in her in her career This is the the win today tied the record for program wins Tiff is a great goalie. I mean she's She's a great You know great person. She works really really hard. She's been huge for this program prior to me taking over and and again She's been outstanding for us this season and I think he last two games She wasn't really tested too much, but you know can't can't put the pKa on her That's you know, nothing she saves that she's the hero if not, you know, it's not her fault, but You know, I I said it before I think we're gonna need tiff going forward to Pull out some big saves and you know, we know that she's capable of doing that So, you know, we feel like we can do great things especially when she's you know in goal behind us And Elena raisner, can you just tell me a little bit about her today? She obviously had the The free kick goal she had to throw in that led to the penalty kick What can you say about about the game that she had today? Yeah, we've put Elena at a different position a little bit more defensive center mid and she's been playing really well there I think she you know, she was the center back and kind of having her at defensive center mid allows her to distribute a little bit more and Also cut things out in the back So yeah, in addition to that, you know, she's got a long throw and Obviously, you know, I think it was a good decision for her to put that on direct on goal For that goal and you know, happy to see that she got those points and obviously You know really contributed to helping us win today And I know coaches don't like to hear it But of course today was a fifth game fifth win in a row for you all going into going for number six on Wednesday What do you tell your team to keep them focused and what do you attribute this win streak to? You know, I think hard work and and honestly some luck I don't know that, you know, these last two games have not I'm not really been our favorite We knew we had, you know a stretch of games in a tight turn around so back-to-back games this weekend And we wanted to try and come out to an O heading into hood coming up next week And so, you know, I think teams buckle down teams working hard. I think our best soccer is ahead of us You know, I think we're we're in pretty good shape in terms of spirits and where our heads are and you know And I think we feel confident that hopefully we can do some great things in this conference awesome Thanks so much for the time coach really appreciate it for more on Stevenson athletics go to go mustangs.com


We're live at the World Economic Forum annual meeting 2023 in Davos. This is day two. Bro, this is more like once in a lifetime. I never imagined myself being here. I mean, being in a place where it's concentrated with world leaders, people that make decisions in the world. It's incredible, man, and I'm just going to tell each and everyone, this is the place to be. As an African, I've been so excited meeting the amazing Africans at Weth contributing to the conversation of the global challenges that we're experiencing. I've had the pleasure of meeting Dr. Ungazi Okonjo-Iwala, the director general of the World Trade Organization. Yesterday I met Idris Abba, which is the whole highlight for yesterday. I mean, today I'm meeting the finance minister of Congo and he's telling me that he's going to introduce me to the president. We've met lots of interesting people from different countries. So that's a wrap for day two. See you all tomorrow. Bye!


Before going to discuss the field work, we must know what is surveying. Because surveying is the art of making observation and measurement in order to determine the relative position of a point on the earth surface. So, when we are dealing with the surveying, surveying actually is the measurements of natural as well as man-made features. So, those natural features are related with the nature environment like mountains, like plains, plateaus, deserts and forest. Like the things which are related over the earth surface. So, but the man-made features are actually the built-up areas or the areas where you have the human economic activities. Now, the information or data that we get from the surveys are presented either geographically or numerically. In a plan, the tail is drawn while in a map, many features have to be represented by symbols but scale is too small. Information can be added as contours but spot heights only are shown on plans. All the man-made features are shown on the maps like built-up area which covers residential, educational, hospital, industrial parks, networks or as road, railway lines, transmission lines. In other words, all the land uses which are related with the man-made features. These maps have multiple uses as navigational, recreational, geographical, geological, military and their scale ranging from 1 into 25,000 to 1 into 1 million. In surveying, we can divide the field work regarding surveying into geodetic and plane surveying. In geodetic surveying, large areas of the Earth's surface are involved and the curvature of the Earth must be taken into account. But in plane surveying, relatively small areas are under consideration and it is taken that the Earth's surface is flat or horizontal plane. In this type of surveying, the recent techniques are used like we can use here the total station, the theodolite, the automatic level but once these surveys were conducted by the help of chain and tape surveys plane table surveys and prismatic surveys. Here we must know the accuracy of the surveying is depends upon the purpose for which the survey is being undertaken. So the survey actually controlled by the accuracy of the figures. Surveys are often classified by the topographical surveys. In this type of survey, these produce maps and plans of the nature and man-made features. So here we have a map of the colony which is actually made by the private property dealers or we can say actually the the area where you have the town plannings. So all the groups of built up area actually controlled by certain parcels. So these parcels are related with the residential places. So these are the residential places. All the groups are there. Groups of all level of incomes. So few are related with the low income group. Few are related with the middle income group and some are related with the large or high income groups. So built up area is controlled by a certain level of incomes. So this colony not only is comprises of the built up area but it also has parks and the areas which are controlled by the the commercial activities. So it means a colony is controlled by a certain man-made feature which have their own land use importance. In geographical field work, one of the most important survey is engineering survey. These include all the surveys work required before, during and after any engineering work. Now plans use for engineering designs and administrative purposes only. Before any engineering work are started large scale topographical maps or plans are required as a basis for design. These surveys are conducted specially for the design and construction of buildings, towns, highways, site plans and civil engineering works. So the geographical field works are conducted for making plans which are used for engineering designs and administrative purposes. Now this plan is actually related with the educational field. Now this is the map of the Government College University Lahore. So here you can see the parks or the area which is called the open spaces and some are related with the built up regions. So this is the old building of the Government College University Lahore and some are actually the places which are under new construction or built during the last decades. So we can make this type of map with the help of AutoCAD, GIS and the ground surveys. So some of the field surveys are conducted by the old and new methods but certain techniques are involved for the making of the plan regarding the engineering field work. Now the third type of the survey is the cadastral surveys. These are undertaken to produce plans of property boundaries for legal purposes. In many countries the registration of ownership of land is based on these maps. So here we have again the map which is produced by the surveyors but those maps are actually related with the purpose behind which is actually the property or the legal purposes. So in this way we can use the cadastral survey for the making of the map to conduct the surveys regarding the income tax or the property tax or other areas which are under the human controlled environment.


Well, that sounds really accomplished doesn't it I love my own bio But anyway, I will try to do my best to substitute for the whoever is on the apprentices because I'm not obviously I Do have my own web TV show on YouTube you can feel free to look at this. I'm gared Leonhard. I live in Switzerland I spent 70 17 years in the US as a musician and producer and Then as an internet entrepreneur and I went through the whole transformation of digital music from Napster to Spotify in fact Spotify is based on my first book called the future of music and I remember the day that we had a meeting with David Bowie to write the Book when he was still there rest in peace and he said music will be like water And then we said that's good music like water So we wrote the book on this theme and now we have Spotify. That's how it goes sometimes So here's my job really in a nutshell It's really quite simple. I don't predict the future There are some people who can do that Alvin toffler and others side. I observe the future and This is a really important skill from our clients to because now the future is basically here. I Mean 10 years ago. We said down. We talked about the paperless office and the cloud and you know Artificial intelligence been 30 years the self-driving car 30 years Electric car didn't happen But now everything is happening at the same time now. It feels like we're we're like in this warp drive of change Right, so basically a lot of people these days. I speak to they're saying oh my god the future There's robots unemployment automation Donald Trump The Brexit the Italians Whatever right so the future is bad and then when you go to see a movie the future is also bad Right is X machina and it's a terminator and you know, there's her and all these movies So people are worried about the future and then they look at things like these graphs, right? They make us feel like everything is going south, right? So the more co2 less fresh water more dead zones and dead species all true and Then we have those things, you know, these are modern worries Demographic wall getting older seriously older, right? The whole workforce is getting older Automation will take our job. I mean that that is not our job, but some jobs, right? That is a fact inequality has some argue increased Doesn't look like it has not but regardless of this, you know, if we're looking at those kind of things You know all the things that are happening in terms of like cyber security for example, right? People are saying God cyber security huge topic exploding I think the future is awesome. I Think it's better than we think because if you look at all the amazing things that have happened the last 10 years We used to pay 20 quid for a CD now. We have Spotify for 10 quid 20 million songs We send free messages on whatsapp Poverty has declined almost 70% in some countries We're just about to reinvent energy for example to renewable energy So here's a list of things that are happening without being sort of naive about the problems, which I'll talk about, right? But the future is not as dystopian as it looks I think this is primarily because it's all happening at the same time and we feel a little bit overwhelmed Especially when you're not 20, you know, so this is all the things happening in the next 20 years We're gonna be able to solve the food problem By vertical farming for example, but what's called smart farming? We're going to be able to stop or reverse global warming until that happens. We'll have to put up with it So there's no doubt with it the next 20 years as far as global warming is concerned Will be lots of dire catastrophies and those kind of things, right? But we can then solve it We can prevent diseases by genetic engineering. We can desalinate water. We're going to have abundant solar energy That's all technology. There's only one thing that we have to do We have to actually agree on what we want And we have to use technology to the positive effect Because you know what we have now is essentially technology is Coming to the place where we have several technologies that are as powerful as nuclear weapons Artificial intelligence genetic engineering geoengineering We can completely change the world with that to the good or not so good, right? This is really a question of how we use it so I Live in Switzerland, right? And I think I would bring some Swiss cars with me as an example of what is happening in terms of innovation I'd Richard Branson has invested in this company That is growing meat in the lab. It's not artificial. It's actually meat cells from animals, but it's not animals and it's called clean meat and Currently it's about two thousand dollars a pound. I tasted it the other day Tasted very good actually, you know, it's actual meat You know, it's basically not grown on the on the animal, but in the lab, you know, they call it from lab to fork Kind of funny, but so, you know for two thousand dollars a pound. It's not very feasible, but Branson and Bill Gates have invested They do all this weird stuff, right? In five years the price will be just like regular meat in ten years one-tenth That is an interesting angle because you know, you wouldn't think that this is a reality But basically I think what we see happening now quite simply, but you know, we are in the future. That's already here, right? It's just unevenly distributed William Gibson science fiction author If you want to define the future of your business, you have to look where it already is And you can see that Basically the five to seventy a time frame you can expect you can see the future. They are pretty clearly so I'll show you some of those ideas and then we can Discuss it later. We have time probably not to all try this curve is the most important, right? The exponential curve You heard about Moore's law Metcalf's law. That's an old hat But here's a key point. We're at the takeoff point of this curve We're actually at the point of where it actually starts to matter. We're just four four eight sixteen thirty two So if Moore's law continues, which it seems like it does for almost everything Then in just five years, we'll be at 256. I Mean that it's just mind-blowing speed 30 times up the scale one billion The kids of my kids will never know how to drive a car. They won't know what a city looks like They will not know what it means to be offline, which is a strange thing So there's things are going to happen like this whole list of things I'm sure you're aware of it will change our lives of businesses, and I think it's 90% positive If we can agree on what exactly we're going to do here I mean since you guys are doing a lot of marketing discussions to advertise in the future of media You know, it will be very important to keep those things in a positive framework I mean, we've seen plenty of examples how it can go wrong And so all of those things are happening now at the same time and This is really quite clear. We're going to change more in the next 20 years than the previous 300 years 300 years ago industrial society Before that, of course the invention of the printing press Then television the internet. Yeah, that was all big stuff. But now Technology is actually changing us On the mobile phone that's kind of changing our behavior But to go on to our heads with virtual reality that is changing how we see the world Then going inside of us by connecting us directly to the internet that that's not a joke You know, this is actually looked at when Elon Musk the new release and Our society has changed vastly because of technology Most of it good, but some not so good like this idea of saying now you're going to find everything you need inside of the screen Well, it's quite obvious that you know, you will not find happiness in the screen You'll find something there, but it's not the same because that's about engagement with people So this is a really important trend, you know wait to say well all the changes that I have already happened You know e-commerce books the the mobile phone companies e-commerce all these things now the car is Transportation on top of this wafer On the beach we have the newcomers right education banking Insurance medical the same transition. We saw in the music business. What happened there? It just takes a little bit longer So consider yourself lucky you on top of this wave now going along and it really what drives the wave is three three points First I've said this for about 15 years Data is the new oil I mean data is the force of society and this is what we're struggling with today Because these data companies you're on top 20, which I'll show you shortly they run the world and We use data of course we've been discussing data all day long right to better achieve our goals in In fact now in 2016 the data economy was worth roughly 7.8 trillion dollars More than the entire oil and gas and nuclear energy of the world So who really has the power today is not the oil and gas companies or the military or it's the data companies In fact, sometimes they're the same of course, but The next thing AI is the new electricity artificial intelligence If you have all the data, there's nothing you can do without AI Because you know think about that if you're getting a hundred million data feeds some social media about a product It's all happening real time without having those tools. You're not going to get it. It's just not humanly possible so to process the data we need intelligent machines and Don't be mistaken about this.  It's much more, you know, human intelligence is like 50 things at the same time So this is really just machine intelligent. The last one of course is the Internet of Things Connected cars, connected houses, smart watches, like all of those things coming together McKinsey says roughly a shift of 65 trillion dollar economy What people refer to as smart everything Very powerful stuff, but of course and we have to say well, it could be heaven or it could be hell, right? I mean clearly If your car is connected Your home was connected your money is digital You're using the blockchain for transactions Your health records are online, which they have to be sooner or later It could be heaven because things may be cheaper Like you know your medical coverage could be cheaper if you're sharing But then all the people could get into your stuff like they do now on Facebook As has been discussed again this morning That is a big question so who's in charge and who's controlling this and you know I like to say jokingly science fiction is becoming science fact. I mean voice control Has been around for at least 30 years Kind of work like dragon software and those kind of things you can speak to it and you know But today we're getting to the point where you can say Well and in just a little bit maybe you're too it's a hundred percent if you speak, you know Discipline, you know not flowing in any other languages or like my own name You know cannot be used on Siri because Siri says I'm a nerd not Gert right or a turd or whatever You know would You see all the variations I tried on Siri didn't work right but but now you know We're going to connect the cloud by speaking to the machine like a friend Literally That will be extremely confusing and Extremely powerful So in the future when I go to buy my trip to Cancun You know, I'm not going to go to the search engine. I'm just going to say hey go into Cancun figure it out Because the machine knows everything about me my schedule my money my credit card. That's already working Alexa That's what Amazon wants to do and Google is switching entirely to AI to voice-controlled AI So Google is essentially making a copy of your data and then you can access it with voice control Great if you're for example, 85 years old You want to watch TV today on the internet that that'll be a tough one, right? In just a few years you sit down your couch and say show me Colombo or co-jack or you know that old stuff, right? And you can just pick and it will just play in whatever language I Mean that's pretty amazing stuff for the future And then we see a machine learning machines that are capable of looking at data and making sense out of it Like you could you can feed entire air traffic data in there and then it will tell you a better way of doing it The city of Los Angeles just put all the traffic lights online and they're saving 10% by the machine telling them how to switch the lights It's impossible for humans Things like this right now. We never thought that a robot could actually do this in 850 kilogram robot, right? You can now act like a human. I mean look at this stuff I mean it's a think a backflip right of a machine like this coming up right mind boggling I mean, it's you never thought that it's actually possible for a machine to do that And traffic control like for example intersections are going to be controlled by machines So that in the self-driving car you'd never stop I mean you're just rushing through the intersection because the machine has figured out that the car in two hours will be exactly at this point Which means you can't drive anymore Think you figured that out right if you're a lonely human here you're in deep trouble So that's not good for Germans, you know, I love their cars, but yeah, but let's look at exponentially different way I mean the you've seen this before but it's really powerful stuff I mean the amount of information data is a new oil could be heaven could be hell I think primarily it's a good thing because all the things we can do with this Look at the stuff in terms of the value for computer equipment the hard drive capacity Essentially going through the roof the adoption curves, you know, this is all taken from Mary Meeker's latest deck You may have seen Mary Meeker's time of Perkins just came out a couple days ago 300 pages. You should download Just look for Mary Meeker with two E's in adoption of new things like I Mean Lexa for example very powerful So this is exponential world and one thing we have to realize here is that if you're one of those guys here a silo, right a bank a Car company a record label. That's the worst case a publisher If you're in one of those silos the cloud is going to eat you and this is what's happening every we used to say jokingly Mark Andre's invite softwares eating the world Good for a quiet. Yeah, I guess I Think about this now its platforms are eating the silos Amazon is eating retail And of course, you know, that's a great example. What is happening here is that you know, very very powerful trend Look at those companies here also from Mary Meeker. I Mean, look at this right going from this measly sum of roughly one one thousand four hundred billion. That's 14 trillion I guess Going up three times in a very short time frame companies that didn't even exist and Who are they?  I know if you if you realize this right But every Amazon Prime customer will get a free bank account free banking no transaction fees No peer-to-peer sharing fees zero First in the US rolling out now. I mean talk about, you know platforms eating silos So if you're Lloyd's Bank or I mean Lloyd's is trying really hard. I think they'll they'll get there, right? I mean, this is a hundred million people and then we have this tiny thing called quantum computing Which is computers in a 3d environment filled with gas so not using transistors or CPUs, right? Primitively put Million times the computing power has already launched at CES this year in Las Vegas Million times the power that is essentially what we need to run all of those processes like programmatic advertising All the things that we already do in these days Essentially building an artificial brain That's only five seven maybe ten years away from mainstream So this machine that's running my presentation in ten years will have a million times computing power Just like my mobile phone today has a capacity of the machine that brought the Americans to the moon So that's all really interesting stuff and then we get to this you never heard about this before right essentially Machines will eventually surpass us in intelligence Well intelligence meaning of course processing right not everything else I mentioned that shortly So we shouldn't be concerned too much about that part of it But what happens at this point? It's called the singularity the point of infinite Technological power. I think that's pretty amazing stuff, but we have to think about this, you know very soon That's roughly ten years away The question is no longer if we can do something But why I think that's already the question ready So in your business the question is not if you can do something because the answer is probably yes Just the question of firepower maybe money in ten years that stuff will be standard and then we have to say Well, why are we doing this? What is the value to the customer? Do we treat the customer like an algorithm do we set up a better mouse trap in marketing right this whole concept of saying You know, we're going to build a better place to catch the customer That is good today because you know, it's it's hard to build that place in ten years effortless So when I speak to people about the future It's very important to realize we're not talking about tomorrow We're talking about today that is reaching into tomorrow or backwards. The future is no longer by the time frame. It's a mindset And I would propose to you if you want to be there in ten years, you have to have a future mindset And this is what it looks like it's exponential Combinatorial open right. This is about open software. We talk about this all day long today convergent holistic Holistic means you figure out a business model that works for others as well Talk about uber Airbnb, right? I love these guys, but Does it consider the other part of the equation? Interesting debate, you know, it's very successful or very disruptive, but is it actually building an ecosystem? I mean open source is famous for building ecosystems obviously It all comes together So it's about the mindset and now if you're looking at this that's happening all around us Substantial scientific advances in pretty much every sector of society whether it's nanotechnology neuroscience genetic engineering So to make sense out of that we need a futuristic mindset So if you cannot answer the question, what will you be in five years? You're in trouble because the five years will be next year. This is crucial So sit down at home and say in five years. I will be and My company will be in five years like this For example, I in my company. We have four to six people working on future stuff We used to write research reports and sell them for like ten thousand pounds, you know And we realized it's useless because you know now the research report is Google You go to Google trends and he asked Google trends Or you go to IBM Watson if you have access and you say what is the future of the Swiss Frank? IBM Watson will tell you That's my job in there So now we're moving on to creating more human values more understanding which machines can't do I Give an example. That's very important here for our work Machines can look at numbers infinitely powerful numbers But if you ask a machine to look something that's in between the numbers Like something you're trying to say but haven't Or something you're trying to hide but the other person knows even though it hasn't been said right or something that is accidental Machine wouldn't understand what the world you're talking about It's either a zero. It's a one. I mean, it's not like the computer can say well He changed his mind or there was an accident or maybe he lied a little bit Like customers do right We do so in this world we're moving into the world what I call the mega shifts in my book, which is Technology was humanity. You know where to click if you want one I think some of you already have one but so the mega shifts here are very important This is our script for the next 10 years and you wouldn't believe how many companies I talked to they talk about digital transformation like the the miracle stick as the transformation Well, that's a bit more than that because It's a moving target. You know, we basically have all of those things of virtualization Things moving into cyberspace from reality and Cognification which is thinking machines all Basically covering each other. There's a website. I run called mega shifts calm But you should zero zero in on this. I'll give you some examples so you can visualize what it looks like For example, here's the North Face. They use IBM Watson for cognitive e-commerce So here if you you go to the website, you say, I'm gonna go hiking in Yosemite next week Then you don't have to poke around for the right jacket because Watson will look at the temperature the predictions The weather record of the previous year how good you are in hiking how big you are what your body weight index is and whatever Right and will I find one jacket for you instantly? I mean, it's a simple example for I mean with a jacket. It's pretty trivial, you know when it's about other things Probably more complicated Disney is using this connected device in the in the theme parks to make a complete match with who you are and of course There's tracking involved, but I'm not so sure that's such a good idea, but Spotify is doing a great job with artificial intelligence for example making playlists the most powerful feature on Spotify isn't the music It's everything around the music The social connectivity the playlists very powerful as a musician. I made 20 records With different names so don't look for them here But they are on Spotify and the other day the Spotify made a playlist for me saying these are 50 songs So we know that you would like and 10 of them were for me And Spotify couldn't have known This is how smart the system goes and so This bank drum bank and 26 They using all the mega ships to basically wipe out that just passed a million user mark yesterday And completely digital native millennial bank Using this and this is what they all do. We talked about this earlier as well the experience, right? Forget commodities goods even services and we're moving towards experiences And this is primarily because the human brain is wired for experiences What is most important to humans is not facts It's not calculation. It's not algorithms its relationships and Experiences I Think this has been known for a long time, but now, you know companies that make experiences Such as Airbnb. They actually have a product called experiences, right?  Kevin Kelly jokingly says that the next 10,000 business ideas you take an old business you put AI in front of it Yeah, I mean it's funny when you go check the news, you know every day There's news saying oh, you know shell oil is using AI to like, you know, clean up the garbage or whatever good luck for that, but This is what's happening, right the maker shifts and I think it's important that we don't forget this Ultimately, it's not we're not selling the customer some some algorithms, you know some Logical thing, right? We're selling something that they would need for some other reason a human reason And so when we have this, you know, we're already living in this world where data is coming together with machines Virtualizing things and then we end up here, you know in this place where we have a sort of a brain, right? I mean if you're marketer, you love this idea, right? I'm not talking about Skynet here, you know, I've just This is really what's happening with these all of these platforms, whether it's Amazon Google Facebook Baidu Alibaba They're making digital copies of what we are. I mean, that's that's the idea That can be terrible it can be bad it can be really good But you know the bottom line really is that we have to think about this in the future, you know Basically, we're heading towards this and again without any judgment Some of that could be absolutely amazing. We could sell billions of lives if we connected medical care in the cloud DNA research But we have to think about you know the this concept, you know of What we can do with technology you've seen the movie X machine, right? I think customers and consumers love the convenience of not this but the previous one But they kind of worried about this technological Domination, you know the abuse like you know, you've seen of course similar scenes in Black Mirror for example, right? Which resonates with people a lot because it brings us up. So the thing about this is this is not per se bad It's just when you do it too much. It's bad when you when you overdo it when you don't when you lose your borders So this is very important. I think for all of us.  We can say well, it could be great if we use it correctly could generate lots of value But if we overdo it, you know, we built this perfect mousetrap. I think Facebook really make makes the best example for this I'll tell you more about Facebook in a second, but it's like Facebook wasn't hacked Mark isn't a criminal It wasn't intentional, but still, you know, we have a problem It's very hard to figure out, you know, it's like you can't point your finger in all different directions But you know when you're looking at this basically saying okay, this is really what it comes down to right? Technology is exponential, but we are not You are not going I mean maybe a hundred years. We can be exponential by you know changing our brain Or changing our body Right now we have to sleep we need food We have downtime. We're just not exponential. We're not efficient. We're not fast There was a joke the other day somebody said, you know technology makes everything faster and Humans make everything slower That's kind of what it is. And so I think we have to live with this also when we do our work We can't expect people to be exponential like a computer because it just won't happen And decisions aren't made on algorithms And then we have you know, we're already living in a world where we can safely say that technology is the new religion I mean, that's We admire it. I Mean, I'm not religious, but We have to think about this, you know, how far are we going to go because you know, basically mobile devices are already our external brain And Marshall McLuhan already said in the 70s, right that every extension that we have also amputates a piece So we go further and then we lose other things that we used to have Maybe that's not a big deal when it's about maps But when it's about dating family planning probation When it's about this, you know virtual reality, I think it's extremely interesting in a business to business context Could possibly make us super human in a way Very powerful, but we have to be careful that we don't end up, you know falling off the stack here when we don't have it I mean, I don't know if you notice the feeling sometimes when you're out without a mobile phone if that ever happens Off a bit, but you know, you feel like you know, you you can't defend yourself. You're completely like unplugged, right? And after a while you get used to it But imagine you live in a world where you you're wearing a virtual reality helmet for work like a doctor or lawyer All right, and then you take it off if you're like, oh my god, it's so boring Well, it could be a potential issue, you know with artificial intelligence giving us advice all day long Could we forget how we do it like sort of a mental viagra, you know, we can't do it without it kind of thing Kids grow up like this I mean we can laugh about this today because it's not a big deal, you know But but think about that in the future, you know, maybe these kids will not learn how to build a sandcastle Because the sandcastle is so boring compared to the iPad, you know Maybe they stop wanting to learn how to write because they can just speak You'd be surprised as the first people saying that our kids shouldn't learn how to write You know hand write, I'm not joking here, right? Because we can just talk So kind of an odd topic, right? But clearly what we have here We have this right? This mix of the two we have to make sure that now in our work. We focus on this What Steve Jobs called the magic? This is about ethics We decide what is the right thing to do as a bottom line Supreme Court judge Potter Stewart said Ethics is known the difference between what you have a right of the power to do and what is the right thing to do Now that is the perfect description for a Facebook problem They have enormous power the biggest country in the world Now they're gonna do the right thing is the GDP are the right thing I have no idea I think that's sounds massively complicated obviously But I mean how we're going to balance this I think you know for our work How you position yourself between those two that is will define your success Will people look at you as a brand as a person as reliable as trustworthy?  I mean look at the mobile phone companies, right? You switch instantly from you know, whatever is two cents cheaper No brand loyalty So magic technology Steve Jobs talked about this a lot. I'll show the example from Google duplex you've seen Google duplex Probably at Google IO or so, you know, it's a machine that makes phone calls for people It's a virtual digital assistant that can go and call anyone to get anything done Like getting a dentist appointment or you know, so here's a short demo. You may have seen this already I'm looking for something on May 3rd I have sort of a riffing off of this topic in a different variation. This is not officially from Google So if anybody's here from Google, I apologize, but this is another take on on the same question Hello Hi, can I talk to Diane, please speaking? Hi Diane. I'm calling on behalf of John to schedule an appointment for what?  What are you talking about? I'm very sorry, but John has decided to end your relationship Yeah, so that's interesting. You know, I think there's a lot of potential for toxic relationships here And this is the problem with technology, right? I Love I think I love this idea. You know, so it's hard to say whether that's good or bad But there's certainly lots of abuse here I mean, you can imagine where that would go, you know, if you you make phone calls of people perhaps So this is going to reboot marketing this whole idea, right? We're going to go inside of people's brains and look around for information like Amazon X echo Alexa We're going to make digital copies of people There's actually an app for this called replica Don't try it, please But that's what they do so that when you die your family can keep talking to you This is the purpose of the app, right? Very interesting stuff And of course, you know How do you reach people without overreaching? Without addiction that is the primary question for any brand and the answer is a Relationship When you have a relationship, you don't just say you know what I really love you because you're so efficient I That's stupid There's like a thousand reasons why you would love somebody It's not just efficiency or you know all that stuff, right? It's I mean looking at this, you know We're going to have to figure out how these companies keep their license to operate This is an important question My view that will be very hard for Facebook to do other ones will be do better I think Google is making a great effort here But you know now mark is talking about all these things, you know to save himself from falling into the deep hole here in Europe I deleted Facebook three weeks ago. I was maybe the first 10,000 ever on Facebook Was a big decision took three years But I decided not to advertise on Facebook anymore not to use it It's essentially an AI Facebook is an AI a data mining AI Can we live without it? That's hard, right? It's kind of like okay very difficult question, but maybe it's like this, you know, maybe it's a burning platform I don't know, but I think what is really happening here is that we have to look at the future and say it's no longer about just Stupid disruption, you know disrupt this, you know move hard and break things Move fast and break things the Facebook motto It's about construction now. So building things Building things that actually work We keep that in mind when you're when you're working on projects I mean we're not looking just for this a disruption effect, you know, that's kind of over We have to look a little bit further like data mining now, which is the most common way of advertising and my view has hit the peak Some of that will always work because of various circumstances But really what we're talking about now in the future is what I call data mining with a why Of course, it's always going to be a little bit of both That's just the reality of commercial relationships But if you put your sides in data mining, I think you'll fare well Because it creates relationships It's possible to have this idea of saying, well, you know, it's as I like to say, now data is great, but data ism Which is adoring data, you know, loving data more than people is not It can be successful for a little while Because you obviously have lots of output right, but I love the saying from this guy also supreme court judge If you torture data long enough, it will confess to anything. So that's not to say the data is useless. It's not it's very useful But let's not believe everything that we hear from a algorithm. I Mean, there's a few things that we also know that are important Yeah, so also to remember that it's not, you know, what I call artificial smartness not artificial intelligence That's completely unlike human intelligence Most machines that we have today that are so-called artificial intelligence.  I think we have to focus on the low-hanging fruit what I call intelligent assistance IA That's basically fancy software. That's what we're doing here, right? We're looking at intelligent software We're not looking at human software or human thinking. That's far away. We're at least 50 years away from that. I Wouldn't contest that in 50 years. We can have a machine that can be like a human But it's not going to be in the Elon Musk time frame. I don't think yeah I mean look at this example, right this artificial hand If you if you should have an accident and lose your hand You can buy a prosthesis The million euro prosthesis to replace your hand million euros is one percent has one percent capacity of the human hand for million euros That's what we are today You have a prosthesis you can do stuff like pick up a glass It's 1% even at the very very peak More of edge says famous scientists whatever is simple for human is very hard for computer and vice versa Let's keep that in mind when we think about software and how we deal with customers and clients because you know We're moving in into this world on a rapid way That is going to really push us, you know Picasso said and Kevin Kelly then followed on this computers offer answers people are for questions and This is why I believe we will not become useless in the future As people have argued turn we will lose a lot of jobs that are routine jobs because computers will learn them Can we rise above that we can? What does it take well a lot of things right, but it takes a little bit of rethinking you know machines don't do relationships and They shouldn't Let the machines do the monkey work The heavy lifting the bookkeeping the accounting that the filing the the research the fact-finding all of those things and Don't think of artificial intelligence as a mousetrap, right? I mean, I can't tell you how many people I talked to that are saying you know now that we have AI we can fire lots of people Make more money and get our customers more, you know They can't leave very bad idea This is really what our customers want they want experiences they want transformations They want what's called perma in psychology positivity engagement relationships meaning you know You with stuff pretty simple So let's not forget about this because culture is also the biggest success factor when I meet companies that are transforming Culture is a success factor whether you can look beyond the immediate today. It's all about culture Why are Americans leading 95% of data commerce in the world? Because the culture says we go forward no matter what Invent everything in Switzerland we perfect everything We don't want to invent we go to America to do that So I'll wrap up now because it was time is up But you know for your future in terms of jobs is very important to realize that the end of routine is coming That's 10 years away until the computer learns pretty much every routine But that's not the end of human work. It's just we have to get busy moving above the routine If you're a bookkeeper, you will not have a job on the lowest level If you work in a call center, you will definitely not have a job. That's 17 million people So if you look at the positive part, I think the flip side of this, you know all of these things that we consider human They're still very much unattainable for machines That's how we build relationships trust Client understanding, right? That's the jobs for our kids of the future. So I'll do the quick summary then I'm off Because I got to go to Lisbon tonight, but we will distribute the slides Later because I know they were quite a few So you can review them. So the future is better than we think let's change our frame of mind And let's build things that are magic not toxic Don't build toxic stuff or even manic stuff Because doesn't really have a future and it works for a while, but it doesn't work for a long the ticket really is exponential combinatorial open converged Mean this is of course when we talk about software that to me is the key Data is in your old man and machine overlapping. So yeah, this is really for us We have to figure out how we're going to lead and what I call the ethics of technology What is good technology and what is not what is good for the client and what is not, you know If you're an airline you primarily concerned about what is good for you Using technology, I mean, I don't know if you observe. There's a great example And airlines have been using technology to actually reduce the power of the customer And and that is really changing now. So think about that in a different way Smart machines are not humans We shouldn't treat them. We shouldn't give them rights. We shouldn't elevate them We shouldn't think about their ethics. They are just machines And we should use them as such and then I think we can get to a good place, right? The end of routine is not the end of work if you have kids don't let them learn any routine The more our kids work like robots the less work they're gonna have So make them into humans rather than just that I just published a movie About artificial intelligence is a short one with a complicated URL. We need to talk about AI comm It's actually on YouTube. So it's just a shortcut if you want to watch this and of course my book is Here so thanks very much for listening. I'll close with a statement by David Bowie one of my musical mentors Who said in the 80s the future belongs to those that can hear it coming? And I'm convinced if you can hear it coming you'll be there in the future because that's inevitable. Thanks for listening