Hi, this is Joho Sapin Bhartyan, behalf of the Linux Foundation. CNC have recently announced the graduation of Open Policy Agent or OPA. To tell more about what is OPA and what does this graduation mean, today we have with us, once again, Torin Sandal, VP of Open Source at Styra, the creators of OPA. Torin, it's great to see you again. Yes, thanks for having me on. I want to first understand from you quickly, what is the importance of Open Policy Agent? What is the criticality of this project for the entire cloud native landscape? Sure, yeah. So we started the project at Styra over five years ago now. And we created the project at Styra because we knew that these modern cloud or cloud native environments were going to require a rethink when it comes to things like policy and authorization. And so Open Policy Agent or OPA, as we like to call it, is essentially a building block that helps people towards that direction of kind of rethinking and empowering themselves when it comes to policy and authorization in modern environments. So it provides a very fundamental building block, which is a way of expressing policy and having it enforced kind of consistently across the stack in their environments, whether you're talking about Kubernetes environments or microservice environments or CI CD pipelines or even applications themselves. OPA basically provides a single, unified way of expressing and enforcing policy. Can you also talk a bit about how different it is to deal with policies in the cloud native world versus the traditional data center space? What we've basically seen over the last 10 years or so is a move to much more dynamic and ephemeral and heterogeneous environments. So in the last 10 years or so, we've seen an explosion in terms of the number of different technologies that any given organization will be leveraging. Every single developer is now empowered to choose a different programming language, a different database, a different execution environment, a different protocol for talking to their dependencies and so on. And so there's just been this tremendous kind of Cambrian explosion of choice when it comes to the technology stack that you're going to use to build your applications. And that applies in basically every part of the stack, whether you're talking about CI CD or microservices or even orchestration systems, databases and on and on it goes. So there's just all these different ways of running software today, of building software. And the challenge is that in the past, each one of those pieces of software would have its own kind of project or product specific way of expressing policy of saying who can do what. And so having 50 or 100 different ways of managing policy and authorization in a large organization, it creates a tremendous challenge. It's fragmentation that makes it very difficult to not only understand what policies you actually have in place to understand your security posture, but also to manage your security posture. Because now if you want to put down end-to-end policies that control who can do what across the stack, you have to go into each and every one of those systems and kind of configure them separately and understand how to configure them separately. And that's a very difficult task for developers, for administrators, for InfoSec and so on. At the same time, we've also seen a shift towards basically distributed systems. Distributed systems have become the norm. And so you can no longer rely on singular, centralized services that run on a specific server and a specific data center in order to control and in order to manage your applications. You need something more that kind of embraces sort of the dynamic distributed nature of modern applications. And so OPA was really designed for these more kind of ephemeral dynamic workloads and environments where you might have applications that are being deployed and updated every hour or serverless applications where they're being updated every few minutes, right? And so there is this need also for something that's supported this kind of ephemerality out of the box. And that's what OPA is really designed to do. It enables a distributed model for policy enforcement. And when we do talk about distributed, how much does hybrid or multi-cloud make it even more complicated? Because you're running your stack on maybe... And today, everybody wants to leverage different clouds, not only there are so many different reasons. So how does that help them maintain it across clouds? Well, I mean, yeah, I mean, that's part of... Open Policy Agent provides a way of unifying policy across a bunch of different environments, right? So whether you're running workloads inside of your own data centers or you're running them inside of Amazon accounts or GCP accounts or Azure accounts, OPA provides you with a single way of expressing policy across all of the workloads in those different environments, right? So this portability story is a very important one. And it's actually one of the important reasons why we ended up donating OPA to the CNCF, because we wanted OPA to have kind of a vendor-neutral home that could serve as sort of a rallying point around policy and authorization. And so by having OPA be part of a body like the Linux Foundation, like the CNCF, it really helps with this portability story of giving people confidence that they're gonna have a piece of technology that they can take and they can apply in all kinds of different environments and different cloud providers with different vendors and so on. It has been graduated, you know, at the CNCF. I have a couple of questions here. Number one is that if you do look at projects like OPA, they're already in production. Companies are already using it. So what does this graduation really mean in real world, not only to the project, but also to the users because a lot of users are already running it in production? What is the value of graduation? Yeah, I mean, so the CNCF, they outline a set of criteria that define what stage a project is at, right? And so the CNCF has different stages, graduation being the final one, being the kind of highest one. And so it's really just, it's really a reflection of the maturity of the project. Like you said, you know, there are already a number of, like a large number of companies that are running OPA at scale in production. That's what's required in order to get to graduation, right? So in order to get the project graduated, we had to go through a process of documenting how it's used, who's contributing to it, that it meets certain technical bars and so on, right? And so the graduation status is really a reflection of the maturity and the readiness of open policy agent for a wide scale to kind of deployment and operational use, right? So from the project's perspective, it's really that kind of reflection of maturity. I think more broadly for the industry, for the cloud native space, it's a reflection of the need for, you know, a solid foundation or a way of doing authorization and policy enforcement within kind of cloud native environments, right? The fact that all these different companies are running OPA for a variety of different use cases, right? It's used within Kubernetes, it's used within CIC systems, it's used with cloud provisioning, it's used in microservice environments for API authorization. It's even being used in the application now. I think that, you know, graduation is really, you know, it's just a further reflection of the fact that this is a need, I think that's necessary, right? It's a must have for modern environments. You have graduated. What is next for OPA? Of course, you have your own roadmap, which is open source, anybody can go and look at it. But from your perspective, what are the things that you are either planning, working on, or some challenges that you still have to resolve, or in general, just summarize what things look like for OPA. The project is kind of stable and widely used. So, you know, one of the things that we're always looking at improving is just kind of the onboarding experience, the getting started experience for new users, right? We want to make it as easy as possible for people to come on board and start leveraging the project for some use case they have in their organization. And we've seen lots of people be tremendously successful doing that in the past, but we want to make it even easier. So we're always kind of focused on that, that initial onboarding experience. Obviously with lots of users running OPA at scale, we run into interesting performance and kind of scale challenges and we're kind of committed to supporting those users and making sure that they continue to be successful as they continue to operationalize OPA and really rely on it more and more in the critical path of their systems. In addition to that, one of the things we did last year was we ran a survey and we asked people, what are you using OPA or what are you most interested in using OPA for? And one of the responses that was most interesting was that a large number is like something like 50% of respondents out of like the 150 organizations that completed the survey said that they were already or they wanted to use OPA around application authorization. So offloading the actual like application authorization decisions to an engine like OPA is tremendously valuable and it's something that a lot of folks are interested in. And so that's where we're spending a lot of our time and energy in terms of feature enhancements and optimizations and other work. So that's something to look out for in the next year is to seeing OPA leveraged higher and higher up in the stack. As you were talking about earlier about graduation that it's already in production, can you give us some example of some of the most exciting use cases of OPA? Sure, yeah. So the two kind of like broad categories of use cases that we see people adopting it for today are authorization, like configuration authorization, right? So use cases like Kubernetes admission control, right? If you go to a KubeCon event, you'll see tons of people talking about how they use OPA to implement different admission control policies using OPA, right? So these are basically allowing platform engineers, Kubernetes operators, administrators to put down guardrails or safeguards in their cluster to prevent really bad things from happening, right? To prevent container images from outside the corporate image or registry from running inside the cluster to prevent developers from like accidentally exposing applications on the public internet or allowing applications to talk out to the public internet, right? You know, a lot of organizations are concerned about data being exfiltrated, right? And Kubernetes is great. It's very powerful. It kind of hands over these tools to developers to empower them and to allow them to kind of self serve. But at the same time, that opens up a lot of ways that people can hurt themselves because now they're in complete control of the compute network and storage resources that make up those applications. You need some way to put kind of safeguards in place. And so we see a lot of people leveraging OPA for that kind of authorization use case of putting safeguards and guardrails over configuration whether it be Kubernetes configuration or Terraform configuration or cloud formation configuration, whatever it may be. So that's one broad category. Another broad category is around microservice API authorization kind of controlling which services can talk to which and which users, which humans can talk to which services, right? So if you're in a large organization, you know, you might be running hundreds or thousands of distinct microservices and you might have all kinds of different ways that people can interact with them, right? You can have services talking to other services. You can have employees talking to those services. You can have contractors. And you need some sane way of unifying policy enforcement across all of that because they're all implemented in different languages. They speak different protocols. There's different ways of identifying obviously humans versus machines. And you want a single way really of capturing that and enforcing it. And so OPA provides that. And so we see that being heavily used today. No, let's talk about the community side of the equation. Of course, the project originated from Chaira, a company, then it became part of CNCF. But if you look at this whole growth, can you talk about what role does community play, open source community play in not only improving the project but also kind of advancing its user base? We knew at the very beginning that in order for this to be successful, we'd have to rely heavily on the community to help guide us especially, right? And so we quickly got something working five years ago and we got it out there and we got people to look at it and try it and talk about their use cases and kind of inform the project direction. And so by engaging with the community that really helped shape the language and shape the use cases where we applied it. And so over time, we're super thankful for everybody in the community. We have a Slack organization. It's got like almost 4,000 people on it. And we're super thankful for all the folks that ask questions and file issues and ask for help and so on because it really helps us kind of like step back and reflect and think about how we can improve things and make things better and more reliable. So the community has been tremendously valuable when it comes to guiding and shaping what the project is today. And over time, we've also seen contributions from the community ramp up considerably. The project, while we started at Styra, it's now actively kind of maintained and contributed to by not only Styra but also Google, Microsoft, VMware and a host of other like individual contributors essentially, that have very specialized area of expertise, especially when it comes to things like integrations. We knew that in order for the project to be successful, the core of it is very kind of general purpose and domain agnostic, but it needs integrations in order for it to do anything useful. And there's a tremendous amount of knowledge and expertise that different people bring when it comes to those integrations. And so that's been absolutely key and that's come from the community. We couldn't have done that on our own as a small group of people. We needed like the community to help us build out these integrations and get them production ready and document them and talk about them to the world, right? You need people to go out there and talk about how they're using the technology in order for other people to see that and come along and help grow it. Awesome. I think now we have everything, anything else that you think that, hey, this is really important, not only from OPAS perspective but also from the cloud native communities perspective or you think we have covered everything in terms of this, I mean, graduation. No, this has been great. I just wanna thank the community again. It's really exciting to see how the project has kind of evolved and mature over the last several years. So a huge thank you to the community, to the CNCF, to anybody that's ever contributed to the project. It's been a great experience and we're really looking forward to where it's heading in the future. Torian, thanks for joining me today for this discussion. I look forward to talk to you again. Thank you. Absolutely. Thank you.


Okay, I guess we should get started. I Hate microphones. I can't move around and like wave my arms with them, but I'll have to make do anyway so This is a session called manage those dependencies and as you could guess already My name is Jacob and my Twitter handle happens to be exactly my name so if you want to To say something during during the talk give some feedback or maybe you just want to access the slides afterwards then I'm going to write those things on on Twitter and I've been Encoding a lot for a long time Many different companies many different languages and so on but I don't want to stand here and like recite my resume So you can just look me up yourselves if you want to What I do want to say is that I'm from Sweden and Is anyone else in here from Sweden? They're actually too awesome, then you can talk now because When I go places and say that I'm from Sweden people most often at least have some some kind of idea of what Sweden is like and Most people think something like this that Everyone walks around and like a coat and this brutish men and And always complaining about the fact that winter is coming but but I tell you Sweden is nothing like that because Ned Stark have no idea what winter is like. You have no idea what winter is like This is what winter is like So Anyway, I'm not here to talk about the weather but to talk about dependency management once again and Before I start I just want to say this So, yeah use your brain like don't take everything as truth But yeah, you use the bits and pieces that you find useful and and question everything And also, I I'm not here to talk about building like homepages for your kitten I'm here to talk about actual apps building building real apps that are complex and somewhat huge at least and Let's start with some some quizzing I actually found this quote a while back that said It was talking about a particular piece of technology and it said that it's a piece of the stack That's been notably missing for years and after using it for a while now. I'm not sure how I lived without it And when I googled around for this a bit I realized that people have had been saying this about source control like I started out coding without source control for I think maybe three years or so when I was in high school and I often copied my folders to like back up things in case I would screw something up Until next day or whatever. So this could definitely been said about source control but it has also been said about something else in this case and You can probably guess but let's rewind the tape and and look about what's happened in in a couple of different environments so I personally at least discovered Unix in about 99 before that I was purely a windows guy and The thing I found coolest about Unix of all the things was the fact that you never like downloaded These executable files to install stuff and had to choose which directory and where in your start menu You wanted things to be installed You had a command a simple one liner that installed something for you And you could put this as part of a script that would like install a whole setup or Install a machine to the exact specifications that you wanted and that that was really cool in my opinion And then as time went by I discovered the Mac as well and realized that oh There's software for the Mac that can actually do this as well Even if it's not as out of the box as as pure Unix And suddenly it started appearing in programming languages as well. I first encountered it in Ruby Where you have Ruby gems Where you do exactly the same thing you install the the piece of software that you want to use alongside your own code and It's not limited to To software or to building software anymore But even actual actual end users follow this pattern now sin since the app store Where you just you go to some place and you download and you install and it's done can't really script it But it's pretty much the same thing And lately I've been doing a lot of node JS where you have exactly the same thing again with MPM So of course, you know what I'm getting at already The theme at least so this quote once again was taken from one of the Microsoft evangelists talking about the Microsoft stack and in particular the the tool called nugget Which does exactly this for the dot-net framework. So so even Microsoft is catching on But what I want to ask here today and since this is the front end track is What's the JS approach to this? I am not talking no JS. I'm talking about client-side browser stuff How do we manage dependencies in general and That as usual with all kinds of technologies and all processes and so on there's a ton of different ways but the most common one and the one I think you've all used from time to time may be still is To find a library that you want to use like jQuery. Everyone wants to use jQuery So you look it up on the web You download the source You put it in a folder somewhere structured in in your project And then you let the global pollution begin Because you want another library and you want another library So this pollution that's just the beginning you start like piling these things on top of each other Like all these different things that you want to use you find somewhere and And this picture is even not that descriptive. I feel it's more like this usually and It becomes a maintenance nightmare and I suppose most of you have actually felt this if you work with Front-end development Don't touch the wires. Yeah, don't touch the the dependencies We've downloaded because this thing only works with this version and this thing only works with that and it's a house of cards And it that's not the whole story because it also brings a whole bunch of stupid habits Going about this in this way, so For example, we start to we want to minimize our our sources, right and concat files before we deploy And that's kind of a problem because if there's not a semi-colon in the end of a file that you're concatenating with another You can run into problems. So people start adding semi-colons to the beginning of their files, which is like what? What are you doing?  And we start to do like premature minimification every everything we download Can be downloaded as a minimified version or a non-minimified version And if we download the non-minimified we have to do it ourselves and if we download the minimified one we have to We have a hard time debugging our code. So maybe we download both of them and even start increasing the mess even more Because we want to minimize in the end anyway, not like before we've finished and There's also no choice, but to check in dependencies That's like a discussion of its own whether or not you should actually do that But in this case you have to because you have downloaded them from an arbitrary source and and you have to put them alongside your code and Since we're already copy and pasting libraries Like jQuery this and this for the version and underscore this and that version and so on Why not copy and paste some small pieces of code that we have in our different projects because those are like libraries? Right, so we we we kind of encourage copy and paste coding by by just downloading source and putting it in in our projects, so if you ask me the whole thing is like This is my feeling about it.  It's like JavaScript It's it's for adding adding stars that blink on on your side, right? So web developers for a very long time have been seen like this for more like system close developers It's like a toy language a toy environment where you do toy things or like an Add person or something creating a website, but it's it's not true anymore, right? It's not like that and haters gonna hate but front-end devs were like script kiddies It's not like that anymore, right? You know it and Just to back it up JavaScript is like super popular if you look at github JavaScript is It's actually 21 percent of the entire code there and I actually actually updated this slide just a month ago and I created it first a year ago and Obviously JavaScript is even more popular now It was like 19 before and now 21 and the funny thing is that none of the others had changed at all Except one that changed 1% I don't remember which one but the big change that had happened was that coffee script was suddenly here one year I go coffee script wasn't on the top 10 chart. So these 3% are actually JavaScript as well in a sense So JavaScript is really really increasing in popularity and and the medieval ages are kind of over We're not doing it want to do we don't want to do things in Playful just copy and pasting kind of way anymore. So that's that's what this talk is is all about and My idea is to cover a couple of different methods For dealing with this or tools rather So these are the ones that I want to talk about and I guess could start by asking is there anyone in here who know what all of these are just from looking at the logos Up with your hands in that case One maybe okay, then then you can leave because you know everything already But the rest of you have something to learn at least and hopefully you'll run learn something new as well So I'm gonna run through these Rather quickly, but just talk about what is it? How is it different compared to the other ones and what's there like strength and weaknesses in each of these approaches? But before we actually get to these Browser centric tools. I first want to say something about MPM Which is the node package manager and I suppose most of you know about node at least Which is a JavaScript environment or a platform for running JavaScript on the server? But how many in here have actually worked with node? Just a few okay good, so then it's useful to actually go through this so in in node you You simply do something like this when you want to to install a Library that someone else has written on the command line or it's actually really dark Well, I hope you can see it Otherwise you simply have to have to look up the slides afterwards and what I'm saying will hopefully be enough so we We use it to install packages and we do it by just saying MPM install and then whatever on the command line And it installs that Library into the project that you're currently in and then you can start using it in your in your server side JavaScript node code And you do I wonder if we can actually increase the Light somehow I guess you can't read this Yeah, not much to do about that now Sorry Wonder where's the switch? Yeah, someone could try Talking in darkness. Yeah, okay Good thing that it's not filming my face I think the highlighting most of the text is white. So only parts Will be hard to read and most of it will probably be seen anyway So And you can do this if you really want to if you go to speaker deck comm Slash Jacob Madsen you can find this presentation and follow it on your own laptop or whatever but anyway Another control question before we continue how many people in here are actually writing JavaScript now and then Okay, pretty much everyone. That's good. And so All the code here is just regular JavaScript except for this Require function which we use to import one of the the modules that we've installed and then we can use whatever functions it exposes Like this we get the object foo and then we we call the square method on on the foo objects and It's really easy to like publish a package using npm. You just The clarifying like this called the package.json where you say the name of your file Which are the main name of your project which has to be unique and then you have some metadata here about like What does it do so people understand it and what version is this and What other packages is this depending on and so on So that's how npm works and how we work with With packages on server-side JavaScript and I'm going to relate back to that when we look at the browser here So let's start from the beginning and look at the one. I think was developed first and at least was the one I encountered first Which is called Ender and The guys develop who developed Ender Thought of it as the no library library that instead of pulling down lots of different libraries You are supposed to kind of specify that which libraries you want and Bundle them together into like the complete package so to speak that you need And it's it's also a tool that you use on the command line You install Ender and then you say Ender build and then you name lots of packages that you want to install and Another agenda they kind of had was to to replace JQuery which was kind of monolithic where you got all these features at once and maybe you didn't need all of them So they built a couple of packages that Exposed parts of the similar functionality that jQuery had like a dumb ready function a query language for for querying dom nodes Using in CSS electors and so on and then other packages like underscore and yeah, whatever could be installed using Ender So you just say the names of your packages that you want an end Automatically fetches them and puts them into a file and you can include that file called under JS on your site And now all these things are there so you don't have to go out and browse the web for these things and you just use it The jQuery way so to speak it adds all of these libraries on to the dollar So you can use the map function from from underscore you can use the querying from the query package and and so on but I Don't think this is really really that useful because it makes things a little simpler you kind of eliminate the need to To do things arbitrarily and you have a systematic approach But it's not really structuring things differently because everything ends up on the dollar So everything you add is kind of global There's no No, like resolution or management of how how these things are supposed to interact everything's just crammed together And obviously it doesn't play well with jQuery because it uses the dollar and I found that quite challenging because it's Honestly, it's hard to to be without jQuery and Even if you don't use it jQuery itself, maybe you need a plug-in or two that depends on jQuery and yeah, then you're fucked so Moving on there are some other tools then that have like a larger idea and One that I really like is the one called browser if I And if any of you actually work with this or Or use it then you will know that this is the version one browser if I logo not the second one I've actually not migrated myself. So it would be kind of a lie to use the new one up there when I'm talking but the idea of it is to enable the node style package management in the browser and Yeah, and It uses the same pattern as a node, which is called common JS Which is a project with a goal of specifying an ecosystem for JavaScript outside of the browser and the weird thing now Is of course that we bring it back to the browser, but yeah anyway So it looks like this exactly like Like when we run code on node Except that now we say require and then we give a file path, which is where we'll find The files that we want to include So instead of running all our JavaScript as a long series of things in the same file executing all at once we can now split our program into separate files and Delay the running of them until we say require and then for JS or bar JS and so on and then we can start using the things they are exposing and The way you you would define the package in this case for example foo.js would be to do something like this We say exports dot square So we put the square function on a magical object called exports and Then we define the function to do whatever we wanted to do squaring hopefully so This will then this exports object will be the thing returned To the foo variable when we say require foo so everything will be available that we put on the exports object and This print line here console log loaded foo will be run as well when we include the foo package And now we do exactly the same thing with the bar package. We just expose some some variable we expose some function Yeah, we print something so if we run this What will happen is that The exports objects are returned from foo and bar respectively and then we print we want to print the square of four and Yeah, the version of bar and the cube of four So the word that things will be printed here is that first it will say loaded foo Then it will print the square of four then it will say loaded bar and then it will print the the remaining two things So the code in these files are it's not executed until you run require and that's kind of the important thing And Now I'm just talking about files that you have locally of course But the point is to use this regarding other people's code, of course so you include something else than what you've written yourself and Something that we can do is To load code dynamically because the require function takes a string as an argument and that string is not like Nothing is done with it at compile time. It executes when it executes. So we could toss a coin and Randomize whether we want to load the foo or the bar package and Then try to use the result that comes out of that And and log the version of that package and since the foo package We had before didn't contain a version variable that we print undefined if it loads the foo package And if it loads the bar package, it will print Yeah, whatever version we put in there. So So you can do this. It's kind of weird. I'm not sure if it's If it's something anyone has ever done for a good reason in production, but it's possible So where where browser if I comes in here is that browser if I is a little tool That takes this code that you write in this way and adds kind of the glue to make this work in the browser so Once again after you've written your code you have to you have to use a command line to To say that I want to browser if I my main.js file And I wanted to output a new file called bundle.js And it will open the main.js file and it will figure out what other files it depends on and then produce this bundle file and then you can add the bundle file into your site just as with With Ender So Like I said We can use this relative required To files that we have in our own File system or we can say require and then the name of a module for example Dom ready Which exposes a module that we have not written but is stored in the npm index and is put right into our program automatically So it's it's like Ender in the way that you install packages by naming them but it doesn't put everything into the global scope and makes it available everywhere But it returns it to a particular variable and then you can use that in its own context You can include it in just one of your files. You can include it Inside a function. I think I actually have an example of that. Yeah instead of just requiring a file Everywhere you can put it inside of a function scope and just use it Where you need to use it and then it won't clash with other things that your program depends on It works really simply It's a really simple process actually You don't really have to understand it But the only thing it does is that it wraps all of the files that you've written that looks like regular global JavaScript code into It pastes it into a boilerplate that looks like this Where the top is the name of the file and then it exposes a few variables that are the the magic ones that Enables this whole thing like the exports we've already seen and they're required to load the other files And of course require or buzzer if I creates this require and this defined function That's that's running here But you don't really have to know the details you can read read about it yourself And a cool thing is that this resolves nested dependencies so if I If I use browser if I and I load jQuery Then when I say require jQuery, I will get a variable back That is my jQuery object, and I don't have to put that on the dollar. I can name it whatever I want to So if I have something else that uses the dollar It's totally okay, and if I want to require one one version of jQuery in one function and another version of jQuery in another Function that's also completely okay because those functions are isolated and if I require two different jqueries that works perfectly fine and even better if I use a plug-in Or I use some code that requires some version of jQuery MPM will automatically get That dependency for me if I need for example Maybe some of you have used Backbone for building like a client-side architecture MVC so and so on it uses underscore as a dependency and if If you're using a jQuery plug-in that obviously requires jQuery to run. So you just have to You just have to ask for the thing you want and all dependencies that are needed to make that work are downloaded automatically and hidden inside of that you don't even know that it's installed and Therefore you can have different versions of jQuery at the same time supporting different different plugins that you run And you don't see any of that complexity. It just works so In some way it kind of unites the way you think of server and client if if you work with node and JavaScript in that way You just do it exactly the same way as you would if you were in a server environment and If we look at the pros and cons then it's kind of a very simple and reasonable model you just You just ask for things you want and if they are available in the global registry it downloads them from there put it in Gets all the dependencies you only worry about the top layer. You don't have to think about what's underneath and You get all the power and popularity of MPM, which is the fastest-growing package manager right now At downside of course is that it still bundles everything into one file so you can't really control how to How to load these scripts on your site For example, if you want different scripts on different pages on your site Then you have to run browser if I multiple times once for each site And you can't do dynamic thing or you can do dynamic things But if you want to for example load something when someone not open a new page, but clicks a particular button or Or delete something or whatever If you want to load a new JavaScript file at that moment to use some some new features Then you have to package that using browser if I As well, so you have to run browser if I once for each little use case you have in your application If you can't just bundle everything into one file and you're satisfied with that So that brings us to the next one, which is require JS Which I suppose a few of you have heard about Some hands to see up with your hands if you heard about it or used it not that many, okay? So the goal with require JS is Kind of the same thing they they also want to solve this problem but they do it in a quite quite different way and An important difference compared to the MPM and browser if I solution is that required JS is not a package manager Browser if I is not the package manager either and MPM is the package manager It has all the packages it knows all about the dependencies and so on browser if I is a tool to download these dependencies and Put them together in a structured way that makes it usable for you. So What require JS is is similar to browser if I it doesn't download anything for you Oh, no, it's even if it's even more specific than browser if I it doesn't download anything for you the same way browser if I does It's not aware of any package managing system. It's not aware of MPM. It's just a way to To bundle files together In a more generic way than the other tools did So let's look quickly at how that works Confusing require also creates Global function called require just like browser if I did but it's not the same function. This is a completely different one They just use the same name So competition deluxe This require function does not return a value. It's asynchronous like Like you're using Ajax or set time out or whatever it takes a function as a callback argument So here is that you give it an array of all the the files or or packages that you want to include and Then this function will return objects Containing those those files or packages so that you can use them inside of this function doesn't return it in the normal way and Obviously, there's a big difference here Because this enables us to to delay the loading of this This package we don't have to return it So if we have to wait a while if it has to be downloaded like on the fly This would not block the program the same way as browser if I would have done Because JavaScript only has one thread and if a function takes a long time to return We can't do anything else. So that's not okay, but in this case the program could continue running And idea is exactly the same as in in browser if I you just build up an object that Exposes all the functionality that you want to expose from your package and you return it But obviously it doesn't return immediately like I said instead. You just You return it from this function inside here so we can expose a function called through and a variable called bar for example And instead of writing the dependencies this way where we say that I want I want to depend on object one and object two And then have them passed into this function I can actually use the the same syntax as in The common JS like alternative that browser if I uses we can just say require and then the name of the dependency and and get it back immediately If we don't pass the array and give a require argument instead and this is just syntactic sugar It does exactly the same thing as what you saw before. It's still asynchronous. It's still It still works exactly this way. It's just a different syntax for specifying These names that might look more familiar in that But the difference of course is that this is statically analyzed required JS looks through your source code and reads all these require statements To know what it should love should be loading when this function starts so so Having these dynamic dependencies Like we did before with the time cost and then loading something arbitrarily that won't work here because the The packages will start to load before the code is run Like here we start loading dependency one dependency to before this function executes So they are passed into the function as arguments But that's not really a problem because no one does that anyway, but just understand the kind of limitation So the difference here is that the loading of our modules is lazy It doesn't happen as we write it and we then have to wait for it, but it It starts when we write that we want to use them, but it doesn't continue running The piece of code that uses them until they're ready And like I said, also, there's no package manager coupling. It doesn't depend on a particular system to fetch these These packages, but you can add you can use any package manager. That's compatible with require So If we in this case wants to we want to load some new code When we click a particular button or so on we don't move to a new page So we don't reload the page automatically, but we just want some new code to be usable then this would be a perfect approach because We It will be able to load that on-demand like exactly when that code executes and not block and it automatically generates like which It splits your program up to different files that you can load Separately so this let me go back this one that depends on one and two That can be bundled into one file So that starts loading when this when this code is run But you don't have to load that file up immediately in your program. You can start loading it When you need it But that's that's what will happen automatically The downside to this compared to browser if I is that while browser if I the browser if I model is a Simple and easy to understand and it's synchronous and so on The price that you're paying for Doing things asynchronously is is as as usual when we're doing asynchronous things that It suddenly starts to get hard to understand. What's going on? What's loaded when and how do I optimize the order of when these things happen? like how big chunks should I split my Application code into to optimize performance One huge bundle. Well, that takes a long time to load when the app starts So that's bad, but lots of files to load in parallel and load All of the time when I move around in my application. That's that's not the best solution either You have to like find the middle way and while browser fight doesn't allow you to do that But always bundles it into one thing Require js allows you to do it, but it doesn't really help you do it You have to figure out the best way to go about it yourself so Moving on If you have any questions, by the way, you can just yell them out, but otherwise we'll do a session at the end So now now lastly I talked about two different ways to in your code organize What should be loaded when and how things depend on each other? if we look at the other part of this, which is actually actually Storing and retrieving these packages that are reusable pieces of code We can look at this thing called jam Which is a package manager for JavaScript just like MPM but unlike other Repositories they're talking about MPM. Of course, we put the browser first and This is not going to be very Very different from what you've seen before it's exactly the same thing We have a new program this time It's called jam and we say jam install jQuery and this installs jQuery onto your current project But it has no way to load them to to integrate them into your JavaScript code so you have to use some Some dependency management system Or module loader on top of that for example require and if you If you've specified that you want to use jam and require together it will create a file called Yeah, in this case jam slash require dot j s that you can load. So this is the symbiosis between these two And Yeah, since it's used with required j s it looks exactly the same as the thing we saw before we can say required jQuery The function gets back the jQuery object and then we can start using it right there And we can publish packages the same way pretty much as we did with MPM But the file looks slightly different and it has a different name, but we still specify What's this piece of code that I've written called? What's the current version? What other dependencies do I have? and so on And you can do it at the same time this is actually an example of doing it at the same time where the dependencies object up here is for MPM and the jam dependencies down there are for for jam if they for some reason would be different So yeah Jam compared to MPM is is targeted at browsers MPM has lots of packages that depend on access to the file system web server stuff other protocols like TCP and so on That you can't really use in the browser. You can install packages that are not usable While jam is just for the browser it contains browser stuff only And the downside is that the index is definitely not as large as MPM it's the the little brother and It adds some packaging overhead if you want to work with both Systems and if you want to be compatible with both everyone who creates a package suddenly has to maintain twice as much complexity and integration so There's an even simpler or more. I should say Less abstract version of these that's called power Which has gained a lot of traction like the last year or so it's created by Twitter and That as well as a package manager like MPM and like jam But what they're trying to achieve is to quote them build a generic Unopinionated solution to the problem of front-end package management so they want to be kind of the platform for all the other tools to to build upon and It's actually dead simple Because baller does not store store files. It just it's just like It's more like a name server or something it maps names to whatever Yeah, you want those names to mean So you can use Bauer to say install jQuery or you can install a git URL You can install a URL to an a JS file. You can install Something that you have locally whatever can be installed and and when you say like in the first one Bauer install jQuery what it does is the same thing as in the three next lines It just installs some file somewhere and the people who have created jQuery have specific have Have submitted to Bauer what jQuery points to what file does that mean? So it's pretty much just a URL as well, but masked behind the name so Just as with others you can create a file you can say in my project. I want these different Packages I want to use mocha. I want to use angular. I want to use select two. I want to use bootstrap I want to use jQuery and then you do a Bauer install the same way as With other tools and all of those are installed and readily available for you to use except that There is no system here to load these files and so on this puts Put some of the files that you wanted into your file system And then you you have to load them the old-fashioned way using a script tag pointing to that particular file So the idea that Bauer has is that the other tools the the jam jam package manager or Require and so on can be built to support Bauer to use Bauer Underdhood to fetch things but then supply the more abstract way of of using them So The difference here is that it's This is like super simple borrower is just One liners on on your command line and you fetch the files and it looks as if you had downloaded it yourself But you don't have to search the web and like figure out what versions you need and so on At the time you You download you write this file instead say all the versions at once and it's all there specified in a structured way And it's very flexible you can you can Can use it or is or you're at least supposed to be able to use it together with the other tools And the downsides of course is that using just Bauer doesn't really do a whole lot for you It doesn't take take it the whole way. It just downloads files for you But it's it's a very simple tool to get started with if you've never used any of these To just see kind of the idea and what it's all about so if we try to draw some conclusions From these like very very brief overviews I definitely had not covered exactly how to use everything and Like how they work, but now you know of some of them and can start looking but Just as as like templating engines in the JavaScript world is is like a weed There are so many I guess a lot of you have seen Linked-ins comparison when they wanted to choose a template engine for their news sites and they did this Study of 38 different templating engines in order to find the best one in 38 solutions to exactly the same problem that's like crazy and Frameworks are like a weed these days as well, right with jQuery and lesson backbone and knockout and yeah everything We have frameworks for everything So while while JavaScript is great because it has so many different environments and different solutions JavaScript is also hard for the same reason and that applies to this package management and dependency management as well Like which one should I be using? Which one is right for my use case and Yeah, where where where should I start? That's the problem? and I Think we While we should be more like this and just like embracing Embracing the fact that we can't know everything up front. We just have to start using something and see where it takes us and so on All developers are more like this. I want to have the coolest tools I want to do everything the most awesome way right away and everything should be awesome But let's let's just do a quick review of some use cases for for when they would be applicable So I would say that if you have a small app And you don't reload a lot. Maybe you're writing a like a single page application or such and Maybe you're a Node.js fan Any of these then MPM members if I is a really good way to go While if you have a huge application That's really hard to get a grasp on you definitely don't load all of the code up front And it's really hard to optimize that by hand Then look at jam and require JS instead because they are designed to tackle that particular use case and if you're more like I Want to take some baby steps. I just want to start scratching the surface of this thing or maybe you're You're actually having an idea of an even better way to do all of this then what's already out there Then power is really good because then you don't have to start from the absolute bottom where we just download sources from all over the internet but you can reuse something and If there's something you should never do for for any reason because it just doesn't make sense is to use something like the Ender library It was written way back before the rest of these ideas emerged and there's not really any reason to use it anymore But I would say that The most important thing is to just do your homework use your use your brain think about what is it that I want and Go with that and just whatever you do just stop piling things on top of each other That's it for me. Thank you. So that's a rush through different Technologies any questions? Everyone is just keen to Try something out get your hands dirty I don't have a live example with Drupal But I have live examples with all the rest and I can I can tweet some links So if you there's my my Twitter handle Follow it and I'll I'll let you know and they're all compatible with all back-end frameworks They're not coupled in any way with node or anything else. So Drupal is perfectly fine. Okay? If there's nothing else then Thank you so much


four o'clock in the afternoon rolls around. We're supposed to send a squad or a platoon out and check out the area. So we're strung out, going across this rice paddy. We're not in contact with anybody yet. We're trying to feel our way across and we get into a trench line that I'm sure was dug by the French many years ago. We're going along, it's kind of brushy, brushy area, so you're not sticking up like a sore thumb, but you're still not very well protected and you can't hide too well. And by this time we don't know it, but they know we're coming and they see us coming. They've already set up an ambush for us. And I look up and there's two NVA's quite a distance from me, I'll say over a hundred yards from me, stringing out Bob-Wire. So they're setting up some things there too at the base of the hill. Only the base of the hill is quite a ways away yet. And I see these little people coming down off the hill, bunches of them. And so I pointed at those two and got Hatton and Middorf's attention. And I pointed at the guy on the left and I pointed at myself, meaning I was going to get him and somebody else get him. So when I plugged him and they started firing and they got the other guy, all hell broke out up front. There was three trees growing together and I said to Sergeant Hatton, I said, I'm going to go over there by those trees and I'm going to pick some of those people off that are in that ambush. No doc, you don't go over there, he said to me.  I think if I get over there by that tree that you'll be able to, we'll be able to see some people and I can pick them off. Don't go over there. I mean just like I just said it, don't go over there. Less than 15 seconds later, now we have no grenades for smoke to throw out. We're amongst the enemy, but the people coming overhead don't know that, they don't know where we're at. They don't know we're right there in the same vicinity.  And he takes and he spins and he points that nose down and he fires and that tree went into toothpicks. And I looked at Sergeant Hatton and he looked at me just like I told you so don't go over there. Now I'm realizing a split second realization that, no Jim, you're not Sergeant Hatton yet, listen to what he has to say. So I hear some commotion and I kind of look up out of the trench line. If you stood up high enough you could look up out of the trench line. I looked up on top of the berm and over by some bushes were two guys laying there. And I get over to them and just as I get to them, I hear this ungodly explosion. Well it was an RPG that exploded nearby me and just pelted me from head to foot. I felt it, I mean I felt a sting of it, but with the adrenaline flowing and knowing that here's two guys, let's get going here, we got to take care of them, what are you going to do now? I got down next to them and I said, you guys hit. But you could tell they were scared. They had no weapons, they had left their weapons out there where the ambush had hit. And I don't know how they got away from that ambush and up in this area, but they did. But I looked up on the berm and less, about ten meters away, there's two NBA looking at me just like I'm looking at you. Only they got AK-47s in their hands and I had given my weapon up in Folger and Aiken. They don't have any weapons either and I said, gentlemen, follow me. And I'm weaving and literally could hear and see the bullets skipping off the ground, they're firing at me.  Those are one of the worst. We needed a helicopter and we needed it quick because I knew that this guy is going to have to get in there quickly if we're going to save his life. Well, they couldn't get in. They were getting fired upon and they couldn't get in. When they did finally get in and I got everybody on, Lieutenant Carrier says to me, get on, Doc. No, I'm not getting on. I said, why not? I said to him, you're going to need me. As I said, I looked up on that hill and saw those little ants coming down that hill so I knew that it was a lot of people out there. How many? I still didn't know. Do you remember anything from 1500 to 2500? NVA and VC out there. They harassed us all night long. And Carrier, he called in rounds, artillery rounds and mortar rounds and that type of thing to keep them off and we'd have a couple of helicopters come over the top of the gunners on them during the night. I could just tell that they're not trying to get us, they're not trying to get us yet. There's a plan I think they've got and I don't know how long we're going to be here. I don't know if we're all going to leave here or none of us are going to leave here.


Shea Bear 1000 here. Today we're gonna do an unboxing video. Well it's a fan mail unboxing. This is the fan mail. This is the important one. This is just a couple things ordered a couple weeks ago. This came in early, came from California, came in three days early. This came from California, 45 minutes away from where this came from. This was a week late. Go figure. Let's check them out. Okay guys, so I got this here. We're gonna open this up first. We'll move these out of the way. I can tell you this is for my tractor. The orange one, the one that Jerry, the guy used to live across the street, gave to me a couple years ago. In this bag is a tune-up kit. Let's see what we got in here.  I've got a part for Monkey's Tractor as well, the John Deere, except it's been raining and my garage is a mess, so I can't pull it in, do any work on it. So I'm waiting on the rain to stop. We've been wanting to go boating, but again it's been raining.  We've got a new filter. I think I've got a couple of these in my drawer in there. Two new clamps and two spark plugs. Why they gave me two, I do not know, seems how it is a single horsepower, single horsepower engine. It's just a 16. Is it a 16 horsepower? I think it's a 16. And then we got our new air cleaner, so it should have a pre-filter in it. Yes it does. There's the pre-filter and there's your filter there. Mine's getting bad. I lost my plastic piece. It goes over this. I don't know. I don't think I lost it. I mean I think it's misplaced, but so anyway there's those two items. This item also came. You guys might remember the video on this one. It also comes with another filter. So I've got two filters. I'll probably use that big one. Got a little zip tie. We've got our gaskets here. Two gaskets. We've got our four hour anti-backfire valve. What this does is when you turn the key on, you know, this just goes to ground and this just goes to a power when you turn the key on. This is a little solenoid and it clicks and it opens up fuel and lets fuel come down inside of here.   Remember that engine's still turning even though there's no electric going to it. That engine's still turning for a few seconds, right? So it's still bringing fuel in and stuff.  What it's doing is putting fuel into it. It's going into the hot muffler and it's igniting. So that's that. So if your tractor's backfiring like that, it could be this not working right or dirty. Now the reason why I got a whole new carburetor, because the other carburetor, the carburetor itself is not bad. It's just the little needle valve for the, for your float, the float valve. It's just a little needle valve and there's rubber, there's a rubber tip on it and mine was real hard. Okay, so it's not sealing right. So I could have got a needle and seat for it. I think it was like 12 bucks. That was because I had to pay shipping. Perch itself was only two or three bucks. I got this whole thing for $18 now. You know it is an aftermarket, but what's on it's a, what they call it, it's a Nikki. It's a Nikki 6 and some guys like them, some guys don't. I'm one of the guys that don't. I'd rather run one of these aftermarket Japanese or whatever, wherever it's made. Things on it. I've never had an issue with these. Knock on wood, but I've never had an issue with these carburetors. They've always seemed to work good for me. So I might be in a lucky one, but I know the Nikki 6's. I've had usually the same problem. You think the float's sticking here. You can't figure out why is it flooding out. The float's not sticking. That's because that little rubber tip on the needle where when the float comes up pushes that needle up against the seat. If that rubber gets real hard it can't seal. You'll just keep getting fuel. Mine would be alright.  The gas, the gas off, I don't think it's got a valve. I think what I did was unplug the the fuel pump and let it start running out of gas and then plug it back in and be alright. So what it was doing was just building up fuel in there. So yeah, that's what caused that. So this should be alright. This should be the one I need. We'll see. I'll bring you guys along with me on this one. It'll just be a carburetor replacement and I will when we replace this. I'll take the old carburetor or take the bowl off, show you the needle and seat and show you what I'm talking about. Where the issue lies in it flooding out. So there's nothing wrong really with a carburetor other than that but they wanted like right up the road here for the needle and seat. They wanted like 12 or 15 bucks for it and I'm like I can just buy one of them. They're like yeah but it's not it's not OEM. I said well that's good because you know what? I don't want OEM when it comes to the NICU 6s. I don't like them NICU carburetors. So anyway I got a on one of my videos, a couple weeks ago. It was I'm not gonna try to find it again. It's a couple I think it was two weeks ago. I got a comment from one of my viewers and they say I'll let you know here. It's called their channel name is Have Heart Will Travel. This was two weeks ago. Sorry for caps because it capitalized when they were talking to me. It says I have a brand new never-used battery and charger for a Sony FDR-AX. It says 533 so I don't know if it's a 53 but I'm guessing it would be. But it said I would like to send it to you. How can we make this happen? I said well thank you very much. You can send me an email at BrunoBear5000 at gmail.com and then I'll give you the info you need. You were awesome. Thank you so much. And they've been in constant contact. This was supposed to be here Saturday. Okay now this came from Florida. I'm in Florida. I think they're within within an hour hour and a half drive from me and it was supposed to be here last Saturday. Not this past Saturday but last Saturday. It was supposed to be here. It just came today. So anyway if you're watching this thank you very much. Let's go ahead and open this up and we'll see. So this is the fan mail unboxing. We're gonna go ahead and see what we've got here. So that I mean that's very nice of them to send us. And when you're YouTube and you know you can never really have too many batteries. I've got four batteries now. And I use them all. Check this out. Alright. This is so cool. Alright. Let's open this up. Okay start to think that's the extra ones I ordered from my camera. This does look like the battery. Whoa this is a huge battery. Wow if this fits my camera this is gonna be awesome. I need to check this out. Battery for camera and camcorder. High capacity. Yeah no kidding right? I wonder how many should set right here. 7.2 volts. 5,950 milliamp hours. Let me see what let me grab my other camera or my other battery. Now this is this is the battery out of my other my old camera the one that got broke. So hopefully this will fit. It looks like it looks at the difference in them. This is a if I can read it to you. I can't remember what I used to know what this was. This is 1900 milliamp hour. This is 5,950 milliamp hour. Okay so and this is the charger for. Let's open this up. Again thank you very much for sending this to me. This is awesome because these batteries I can get the let me see here I'll tell you like right now I've got an hour and 26 minutes left on the battery that's in the camera rolling right now. So it's down it's down one bore so I can usually get and I done some filming with this but not much. So I can usually get about two hours out of that if if I'm not using night vision. If I'm using night vision that knocks it down almost half but now the ones I ordered my extra ones they're smaller than this. I'll I'll go get one of those. Aftermarket they're not Sony and these are these are 2,540 milliamp hours. What I say this one was 1900. So this battery in theory should outlast the Sony battery but it doesn't. I do have two of these in the charger. Now these these little ones like I said there's in theory they should outlast them because they're they're supposed to be 2,540 milliamp and the Sony is 1900 milliamp but like I said these will run down a lot quicker. I can I can get about an hour and 20 minutes to an hour and a half on these without night vision on these ones here. So I've got plenty of batteries but okay and I do believe my charger so what's this battery? The battery is BBM the BM. I thought it was a K-Star but the K-Star I have the same charger so if this will fit in here then I'll know it will fit in my camera and it does so I know this battery will fit my camera this is freaking awesome I'm gonna plug it in right now and but that's their channel name have heart will travel now I'm not gonna give out their email name or their real name just in case they don't want to be known but that is their their channel name and again I really appreciate it and they've been in contact you know has it come yet I hope so and I I had to graciously tell no it have not received it yet so okay so there's the there's the this is the aftermarket this is the Sony and this is the K-Star so that's that's amazing but yeah I don't even know how they could even figure this little battery I mean look the size difference on that this little battery which like I said the little ones I would use because I only had three until I got the new camera and then of course since I'm not using my old camera which is the same exact one as this I just using the big battery out of it so it lasts longer but these were just for backup but I mean how do they figure that you know lithium li-ion so I mean yeah but yeah there's no way this last but see it even says for Sony but it's not from Sony see this one says Sony right on it and this one just says for Sony BM so but I mean yeah it works fine it just doesn't you know and shelf life on it's awesome on all these these batteries shelf life are are very very good on them but like I say if you're using this thing this little battery here with night vision you might get an hour an hour out of it and also I've got hot shoe mount on this camera so if I was using a mic or a light you know the hot shoe what it does is power that so you don't need an extra battery it just uses the onboard camera battery so it would really run them down which I'm going to get one since I get the extra money I am going to either get a later I'm thinking about getting one of those mics that go with this thing they're very pricey but they're starting to come down but like I said they don't take their own battery they use the the battery from the camera itself so what I'm going to do is I'm going to go ahead and I'm going to put this puppy on the charger look at that thing I mean you guys see that so I'm gonna put this on the charger let it charge up and I'm gonna put it in the camera here and plus I'm running 4k now if I wasn't running 4k if I was just running 1080p you know I could get a couple hours out of like this battery I could probably get an hour and a half out this one as long as I wasn't running night vision or anything else but I run I film in 4k so that really takes the battery and my memory down you know so I'm gonna go ahead and plug you in and I'll be back with you when I got this in that camera okay guys so I have the battery that was sent to me in the camera right now I couldn't wait on it to get fully charged because I'm excited but right now I'm looking at an hour and 57 minutes and it's down one bar the same that this was down one bar and right before I changed the batteries over this is a an actual Sony battery this had one hour and 11 minutes left on it like I said that's in 4k so if I'm running in 1080p it's almost double like I said that's without the night vision or anything else running off this so that batteries that battery is so cool wow I don't know what to say man that is so cool so now I have four batteries or five batteries all together and this is the battery that's gonna stay in this camera wow that's amazing so there's my fan mail unboxing and my carburetor and tune up kit stay tuned for those and again have heart will travel thank you so much I really really appreciate this I could you know with with the battery that's in there now the one you sent me and the other four I got I I could I could film all week probably because I don't do a lot of time lapse or I don't do a lot of B roll you know to me people don't watch my videos for B roll that's why some people say well you talk too much well you know I just can't get on there I like to talk to you guys because I really appreciate you watching and supporting my channel so I don't like to just you know just not talk not even say thank you or anything like that so I do talk and I talk a lot well I'm sorry but I do because I feel like you guys are here with me but like I said I got three 64 gig cards I can I can go up to what is a hundred twenty four in this camera and things are expensive but I got 364 gigs gig cards and even on 1080p I would probably run out of memory before I ran out of camera or before I ran out of battery and battery life now so man again thank you so much and thanks to everybody for watching remember we got Halloween coming up so that's going to be a treat and but yeah so again thank you so much I appreciate it and I appreciate everyone that sends me stuff you guys are all awesome and thanks for watching I really do appreciate it and we'll see you guys in the next one Shae Berry the myth or man legend I'm gone for now we'll see you guys soon Brutus Bark bye bye stay safe and take care everybody


Hello, it's Waylon Chow and this is Canadian Legal System Module 1a part a In this part, I will give you a brief introduction to law by looking at what is law Examining the differences between the two legal systems that we have in Canada the common law system and the civil law system Examining the difference between a public law versus a private law and then looking at the different sources of law that we have in Canada What is law? Law is similar to rules law is also similar to morality or ethics The key distinction is that with laws Laws are rules that can be enforced by courts. Let's look first at rules versus laws So we can say that all laws are rules, but not all rules are laws So there are many many rules that we are subjected to in our day-to-day lives that are Not considered to be to be laws like for example Whenever we play a sport like soccer, there are many rules that apply when we play when we play that sport a Big rule in soccer is that you're not allowed to touch the ball with your hands So if you break that rule that rule is not enforceable by courts You don't go to court to say that you know the other player touched the ball with their hand But that rule is enforced by the referee Now with morality or ethics compared to law When we commit a moral wrong So a moral wrong is something that is that goes against some kind of moral rule that a person holds So if if you if you if you lie to your friends There are what we call informal sanctions. So these are informal or or Undefined consequences that flow from the moral wrong that you committed So if you lie to your friends, you might lose them as a friend or it could also damage your reputation So none of those consequences are specifically spelled out anymore. That's what makes them informal If you commit a legal wrong if you break a law, there are specific Consequences, there are what we call formal sanctions so if you if you break a law by Committing a theft there are specific Consequences that flow from that it could be imprisonment or payment or payment of a fine In Canada, we have the civil law system and the common law system The civil law system is found only in Quebec. Quebec is the only Canadian civil law jurisdiction In every other province, we find the common law system Now when we use the word jurisdiction just to take a step back here We mean a particular geographical area that uses the same set of laws So each province in Canada It could be considered to be a jurisdiction because each provincial government passes laws that apply Anywhere in the particular province the whole of Canada could be considered one jurisdiction as well because federal laws apply Anywhere in Canada a means of municipality could also be considered a jurisdiction in terms of the bylaws that a municipality passes Now with the civil law system civil law traces its history all the way back to ancient Rome and in particular France The the civil law system without getting into a deep Discussion about it is essentially based on a code of legal principles The common law system traces its history back to back to England So any any country that used to be a colony of England is likely to have a common law system For example, Australia and New Zealand and also here in Canada and also the United States Is also a common law jurisdiction the distinctive characteristic of a common of the common law system is that There is much greater reliance on what we call judge-made case law We look very carefully at the written decisions of Previous courts in making decisions in current cases and what what that legal approach is called It's called the doctrine of precedent There are many different areas of law, but we can categorize every area into either public law or Private law public law is defined as law that regulates our relationship with government and Private law regulates personal social and business relationships Let's now do a quick quiz to Illustrate the difference between public law and private law on the left-hand side of the screen you will find different areas of law and Your challenge is to determine whether each of these areas is public law or private law Please pause the video at this point so that you can attempt this quiz Constitutional law is considered to be public law Constitutional law are the rules that set up our political and legal system and also Rules that protect our basic rights and freedoms against government laws or actions That in Canada we call the Charter of Rights and Freedoms, which we will discuss a little bit later So that those rules regulate our relationship with government. So that's why it's considered to be public law Contract law is considered to be private law So these are the rules that govern the creation and enforcement of agreements between individuals and businesses So that is private law because private law are rules that regulate the relationship between individuals businesses and organizations Property law is also considered to be private law property law are the rules that Regulate the ownership of property. So that is private law Tax law tax law is considered to be public law. These are the rules Regarding the collection of monies by government from individuals and businesses So, you know, when do we have to file tax for and how much taxed do we do? We need to pay though that has to do with money that we pay to government. So that's public law tort law tort law are the rules that Determine liability arising from what we call a private wrong committed by one person Against another in a future module. We will talk in detail about various about various torts tort law is considered to be private law Criminal law so these are laws that set out particular behaviors as Offenses against the state so they could be for example, you know murder theft fraud Those are all examples of criminal offenses So criminal law is considered to be public law criminal law Every time you commit a criminal offense It's it's considered to be an offense against the state even though there might be a victim for that crime Strictly speaking from a legal standpoint the offense is against the state. So that's why it's considered to be public law the last area of law that we have here is called administrative law so a lot of administrative law are rules that the government has set to Regulate business using government agencies or boards or commissions or or tribunals So some of the areas that administrative law Regulates as broadcasting international trade energy development competition labor relations relations and municipal zoning So administrative law is considered to be public law One point to keep in mind is that a number of different areas of law can apply to the same situation So if you know for example for some reason you you punch me in the face I don't know why you might do that, but but you did the applicable areas of law there are Criminal law I could call the police and the police could charge you with the crime of Assault so that's criminal law and criminal law if you remember is considered to be public law Tort law could also apply tort law is considered to be private law I could sue you under tort law for the tort of battery and Claim damages for the injuries. I suffered from you striking my face So in that one situation we have both criminal law and tort law applying or in other words both both public law and Private law applying to the same situation the three sources of law that we have in Canada are The Constitution legislation and the courts the Constitution we will examine later on in this module in this part of the module We'll look at legislation or what's also called government made law and also the third source the courts Legislation is often referred to as government made law It is law that is created by any type of government in Canada It could be the federal government provincial government or a municipal government Those those governments are in particular the federal parliament and provincial legislatures in creating laws are using The powers given to it under the division of powers in the Constitution which we discussed in the previous module The three types of legislation are statutes regulations and by-laws Statutes are laws made by either the federal parliament in Ottawa or a provincial Legislature the provincial legislature for Ontario is the one located at Queens Park in Toronto Either the parliament in making law or provincial legislature They are they are exercising the law making powers given to it under the Constitution in the division of powers Now any statute the name of any statute will have the word act at the end So when anytime you see the word act, you know, it's a statute for example The the federal parliament has created the the statute which governs banking in Canada called the bank act the process of creating a statute is a long and complicated one There is a there is a similar but slightly different process for the federal parliament versus a provincial legislature We will have a simplified Overview of the federal process a federal legislative process At the very beginning of the process the proposed statute is called a bill So that bill is introduced in the House of Commons, which is a part of the federal parliament The House of Commons will will examine that bill. They will vote on it three times So those are called first second and third readings in between those Readings the there will be one or more committees Made up of members of Parliament who will examine the bill in detail After the House of Commons has approved the bill in third reading The bill is passed on to the Senate the Senate Does something very similar to what the House of Commons did it will vote on it three times with a first second and third reading and It will also review the bill in detail by by groups of committees After the Senate has approved the bill The very last step and this is usually a just a formal step that that that occurs But it is a necessary step to make the law to make the bill into law And that step is sending the bill over to the Governor-General the Governor-General is The representative of of the Queen in Canada the Governor-General just simply signs the bill Upon signing which is called Royal Ascent The bill becomes law it becomes an act at that very moment The second type of legislation or government-made law is called regulations the way to think about regulations is by looking at Statutes as containing all of the general rules and then the specific rules that we need to Implement those general rules are found in the regulations For example in the Income Tax Act, which is a statute created by the federal Parliament It requires that employers deduct tax from employees pay Now to determine the actual amount of tax or the formula to determine the amount of tax that has to be deducted We don't we can't find that the Income Tax Act. We find that in the income tax regulations Now you're probably asking yourself Why why do we make life so complicated by having two sets of rules in two different places? We have to look in more than one place to to figure out how much tax we need to deduct The reason that we have these specific rules and the regulations instead of the statute is that The regulations are much easier to change and quicker to change than than statutes To change a statute or to create a statue We have to go through that legislative process that we that we looked at in the previous slide and that legislative process is complicated it's long and it's also Quite often very political The the process of creating or changing regulations in comparison is is very quick. It's usually not not political So if the government needs to change the the rules or the formulas for determining Tax the amount of tax that needs to be deducted from an employee's pay They can easily do that if those rules are contained in the income tax regulations versus the income tax act Now who has the power to make or change Regulations to determine that we have to look at the specific statute and see what it says Who does it give that power to that power is usually given to a? government minister or a a specific commission or a tribunal Regulations are considered to be subordinate legislation The third type of legislation in Canada is called bylaws by laws are created by municipal councils if you recall in the previous module where we Talked about the division of powers under the Constitution The Constitution gives the provinces the power to create municipalities Whenever a province creates a municipality in that process that the province has to pass on some power To the municipality that gives the municipality the ability to make its own laws Which are called bylaws So bylaws are also considered to be subordinate legislation You know for example For the city of toronto, you know way back when the ontario legislature passed a statute called the city of toronto act and that and that act Created the city of toronto And also gave powers to the to the city council of toronto To pass bylaws on various specific matters which would include things that cities typically deal with like parking rules Zoning municipal zoning So anything anything that the city has the power to do that power came from The province Let's now look at a quick quiz question. Please pause this video so you can consider this question The answer is c bylaw The town of blackville created a set of rules for the licensing of businesses. Those rules are considered to be bylaws bylaws are laws created or passed by municipalities The third and last source of law in canada is the courts The courts in canada perform various functions One function is to interpret and apply the constitution So remember the constitution includes both the the rules governing the division of powers and also the charter of rights and freedoms Another function is to interpret and apply legislation. So legislation would include statutes regulations and bylaws The courts and this third one is something that's not obvious to most people the courts themselves Can also create and apply its own law, which we call common law Or a more simpler way of referring to it is judge made law for example The rules that many of the rules that govern contract law Are do not come from Any kind of government legislation? It doesn't come from any act or or regulation or bylaw Many of these rules like for example the rules that govern the creation of contracts Those rules come from legal principles In previous in many previous and older Cases written by judges. So over the years Many of these legal principles have been developed from case to case in order to create A general set of rules which govern contract law


What I create is It's beautiful. It's art. It's it's something tangible you can hold and look at and inspect and You know people aren't all of some things how I can turn out Apart from just a raw stock of metal. Hi, I'm senior airman Ryan strip matter I'm a metals technologist and I love creating innovation Metal technology that our role out here is to fabricate parts for the aircrafts using manual or CNC capabilities Precision in our career field is very critical Especially in the manufacturing of parts some of our tolerances for making aircraft parts could be up to three thousand seven inch, which is basically the width of a sheet of paper We can pretty much help out anybody. We're not strictly Governed to a flight line and we can fabricate one-off parts for different shots Even as far as making innovations to help with their procedures they just come to us with a problem and ask for a solution and We'll sit down and we'll do measurements and some reverse engineering and come up with something that helps them out in any of their procedures After finishing a job, even if it's just simple aircraft parts It's just gratifying to know that you just made something out of nothing and Saved an aircraft or help a shop out and that will just continuously be used So you kind of have like a forever mark on impacting the mission. I love this job I can turn anything in my head Into something you can just get extremely creative. You can really challenge yourself. It's a it's a constant battle against yourself to make To make everything better


Have you ever wondered how music can evoke emotions or why a certain song instantly brings back a forgotten memory?   Do you know that everything vibrates from atoms to galaxies, each emitting its own unique frequency? I look at frequencies like words carrying information. Instead of electricity, information might flow through frequency within our bodies. Cool, right? Our DNA also resonates at specific frequencies, and when they're off, disharmony can occur. From the chance of monks to the tuning of instruments, cultures have long-used sound for healing and connection. Historical and cultural practices suggest frequencies hold healing potential. Turns out, scientific studies show frequencies can influence mood, cognition, and even physical health.