My name's BJ Clark. I guess there's still a few people filtering in. I work for a company called Goldstar.com. We sell event tickets for half price. And if you're from around here, it's OK if you've never heard of us, because we don't sell tickets here.  OK, you guys don't look very excited. Are you tired? Let's get excited. Woo! Woo! OK. So my talk's called Dr. Strange Love, or How I Learned to Stop, or How I Learned to Stop Wearing in Love, HTML, CSS, and JavaScript. I have a picture here of a guy. I don't remember what the guy's name is in the movie, but he's Slim Pigans. That's right. And he's essentially writing a nuclear warhead after it's been dropped out of a plane. And I think that's a pretty apt metaphor for people who really like doing front end code, because it always seems like a good idea. And then somewhere along the line, you realize that in the end, it's going to be painful. But this is sort of a collection of pro tips, and tricks, and techniques, and things I've learned over the years. Doing front end code. Pat was, we were pairing up here earlier. I met Pat in about 2002, I think. And he was a Java developer. And I was basically a designer. And we started making apps and stuff. And I ended up always doing the HTML. And then I got really tired of being the only guy that did HTML, and Pat doing Java, or Ruby, or whatever. And I was like, why don't you do any of this? And he's like, I don't know any of that stuff. So I've set out to change that. I'm going to make all Ruby developers actually like doing HTML, CSS, and JavaScript. So it's not that hard. It's not that bad. I know I started off maybe with the not the right metaphor, I guess. So pop quiz, how many people in here make web apps? Or something that has to do with the web, right? So how many people write Ruby but don't have anything to do with HTML, CSS, or JavaScript ever? I know Pat's lying. Really, you write Ruby that doesn't do any HTML? Really, sometimes. But sometimes you do. So it's HTML, JavaScript, and CSS are almost completely unavoidable if you write Ruby. There are very few, I think, use cases for writing Ruby that doesn't have anything to do with the web. So I've made a little fake application. You can see that I've ripped off Flickr. And I don't know if it's a copyright violation or not to change the name and remake the application, but I'm going with it. And it's just to illustrate a couple things, a couple techniques. And I don't know if Flickr even does these things, but I wanted to use a couple tricks. And so I made this. You can check it out on GitHub. I'm BJ Clark on GitHub, and it's Dr. Strangelove. And so it's just a basic Rails app, 2.3. You should be able to get it going without any trouble. There's nothing funny in it. No, I'm not going to Twitter it. But Pat will Twitter it, so everybody follow Pat. Anyway, this is a love story in three parts. And the third part, excuse the profanity, but sometimes I don't think people actually care when they do JavaScript and that's unfortunate. Caring is good. So anyway, why? Why even care about your HTML? Why care if you do things right? Like browsers don't care, right? Well, I've worked as a consultant and I've worked at numerous startups and it's incredible the amount of time you waste when people don't care who came before you, right? And if you don't care, you will end up wasting your own time down the line. It's a legacy code thing. It's just something that if you cared up front, you will love yourself in the end. And this, the app that I have on GitHub that you might have had enough time to get the URL for, it validates as HTML5 and we just learned about HTML5, that was great. But the first tip I'm going to give you is if you need to support browsers that don't support HTML5, validating your website against HTML5 probably isn't going to help you very much. So maybe you should think about validating your website against HTML4 or something that would probably help a lot. I don't know if people out here deal with IE6. We make a lot of money off IE6 at Gold Star. We have lots of people like eight or nine a second come to our site using IE6 still. And a few more than that come using IE7 and almost nobody IE8 and I've never seen IE9. So if we ignored IE6, we would literally take zeros off our bottom line and the business people don't really like that. So this validates against HTML5 but we validate against HTML4 at Gold Star and we don't validate very well. And we support IE6 and we support, we have even thought about trying to support Web TV still because people still come using Web TV which if you've ever used that is extremely, extremely painful. But anyway, getting on to what is good HTML. If you go out and you went to some of the designer conferences like Event Apart and stuff like that, they'll tell you that good HTML is semantic and you go, well, I don't know what that means. And it just means that it's meaningful. It's something other than divs and paragraph tags and spans. Those aren't very meaningful. They have a place but they don't mean anything. What does div mean? Does anyone know what div means? Right, maybe. There isn't even, nobody even really knows what div means. No one even knows where it came from. It was some guy at Netscape in like 93 or something just said, well, we need a divider or a division or something, let's call it a div and let's start wrapping our content in it and then we have something else to style with CSS. So the first pro tip is learn HTML, learn what's out there. If you only knew four or five Ruby methods, could you write a really awesome Ruby program? Probably not. Well, if you only know four or five HTML elements, you're also not going to write a very meaningful HTML document. So has anybody ever used the sample tag? Even heard of it? Abbreviation, site, ordered lists versus unordered lists versus definition lists and there's many, many elements. There's even more in HTML five as we heard. Learn them. And the next thing is use tables for tables and lists for lists. There's a backlash against laying out with tables. Yeah, laying out with tables is bad but some of us display tabular data and those go in tables and some people, some of us display lists of data and those go in lists and whether it's unordered or ordered or a definition list or whatever, put it in a list and put it in the right list. I don't know how many times I've seen a div within sets of divs inside of it that make up key value pairs. Well, that's actually a definition list and there's an HTML element family for that. And then HTML five, I usually talk about that and I'm not gonna talk about it because we just learned about it. The next thing is understand the difference between IDs and classes. That's, some of you will go, well duh and some of you will go, I might not actually know that. These are really important and they have different uses and you can't validate a page that has two of the same IDs in it. It doesn't validate, that's not legal. An ID is an ID, it's unique. Rails has things to do this for you. You can do div four and pass it an active record thing and it'll give you an appropriate ID that's unique and an appropriate class name. It's already in there, people never use that. It's in there, it's done, it's free. Dom ID will give you an appropriate Dom ID for any given active record object. It's in Rails, all the helpers in Rails use it. Your designers or whoever does the CSS, if you don't do it, will love you if you use that because that makes it really handy. Microformats, who has, who's ever made a webpage with a microformat in it? A few of us, so microformats are awesome. Who's written Ruby code that used a design pattern? Like, you know, Delegator or something like that, right? Most of us, a lot of hands. Microformats are design patterns for HTML. So if you think that using a design pattern in your code is a good idea, then using a microformat in your code is a good idea. And there's, this gives you free things. Browsers have extensions that do special things with microformats. The most basic and I think widely used one is the H card. Has anybody ever used an H card? Basically, if you use the proper set of class names and attributes in HTML, someone can download your information directly to their address book. And on an iPhone, it goes right into their contact list. So if you have your contact information on a website where you were making an intranet site, intranet site, or something that had a phone directory or something in it, you should encode it all in microformats. Microformats have been around since about 2004. There are microformats for many, many things. Media, like photos, videos. I use a microformat in the most widely used one in the sample app is this H media microformat. And it looks scary, that top box is what goes in it and it doesn't really make any sense FN, like that doesn't really mean that much. That's just formatted name. But it tells you exactly what needs to go into the microformat to make it essentially machine readable. And the data mining stuff, if you put this microformats in your app, you get actual daily use out of data mining because I have down here MoFo and XOXO. MoFo is a microformat parser for Ruby so you can curl a page that has a microformat in it, pass it into MoFo and it'll spit out all the information that was microformatted in it and it's like one line of code. It's not really built in to many browsers but there are extensions for just every, I think every browser, maybe not IE6, but modern browsers. There's numerous Chrome extensions. There's Safari hacks that go back to Safari 2 or Safari 3 and stuff like that. And so it has a dual use, it has that use but it also has the use of how do I lay out my page and what do, if I'm gonna put an image or review or a comment in the page, like what elements go into that? The microformat I'll tell you and the XOXO format is actually a microformat that you can use for navigation and there's a gem for that and so if you link to your in the page, if you link to your RSS feeds and stuff like that using this XOXO gem it'll, you can get all those links out of the page very easily. This is an example of the XOXO microformat. If you notice it looks just like HTML because it's HTML. It just has a couple classes and specific attributes that make it into this special microformat. So it's not hard to get into microformats but they're very useful and they get you past that what you name stuff and what elements do you use. This is another sort of trick or technique I use which is I call it doing resourceful views and so in this app we have a photo and so there's a photo partial and the photo partial renders a microformat for a photo and it takes a photo object out of your database. So you can call render partial and pass in an object, a photo object into it and it renders out a completely microformatted photo anywhere you wanna go or anywhere you want it to be and now you can use that throughout your application anywhere you need to display a photo and it's right there, it's really easy, it's microformatted, it matches our domain objects and it's reusable and everybody knows what it looks like, it's easy to style, it's easy to style in multiple places and you just kind of, you just get benefit all over the place from just setting up sort of, it's a coding standard. Usually I store a URL from S3 in the database and that's what, but using a decorator or something you can, it doesn't even need to know that, your partial doesn't even need to know what's there, if you pass it in a decorated object instead of an active record object or something like that. We have the same thing for tags, this application does two things, it has photos and it has tags. So anywhere I wanna display a tag, I have a tag partial and I pass in a tag object and it looks and it renders out a tag and my designer knows what a tag will look like HTML, why is anywhere in the application now and he can, he doesn't have to know any programming, he can just write some CSS styles and he's done. So that's, those are my HTML pro tips. Next thing is CSS, this is a flag of Cascadia. It's a little obscure. You can look it up online, the Republic of Cascadia. I'm from Portland in the Republic of Cascadia. Yeah, it's a really obscure slide, it's okay. CSS is boring. So, so WebKit, so this is a, this is from a site called, I just drew a blank, Quirksmode, sorry, Quirksmode. And if you go to Quirksmode.org, you can see this awesome, this is the first page of many pages of every HTML, CSS, and I think JavaScript method or element or rule or selector or anything that a browser knows and whether it works in essentially every browser since IE5, including Opera and Conquer. And I bring this slide up because I'll point out that WebKit supports almost all of these. If you look at the WebKit column, which is Safari, it's green on all of the things. And to show you how to use this, if you click on, say, CSS2, it'll then bring up another page that looks a lot like this with the actual CSS2 rules. This is indispensable, hey, the Quirksmode itself is indispensable, but I also find that developing in WebKit to begin with is a really nice way to go about it, both for CSS and for JavaScript. And that's because WebKit tends to stick, WebKit's either Safari or Chrome, WebKit tends to stick to the standards. And if you develop things that work for the standards first and then go backwards to things that don't support standards, such as IE or older versions of Firefox have lots of things that don't actually follow the standard. You tend to do a lot less sort of CSS hacks or, which this has all of the CSS hacks, or weird tricks or whatever to get around all the inconsistencies with CSS. So that's the number one thing that I think most developers complain about is I never know what's gonna work. I try stuff and it breaks or it works differently in different browsers. This tells you all of that. This will tell you how it works, why it doesn't work, when it was supported, a hack you can get around it, whatever, that's all in this. CanIUse.com, I don't know why I didn't put the site on it, is another thing that if you have something specific you know you wanna use, you can see if it actually works in the browsers you need to support. I think it's CanIUse. It's either .com or .org. I'm sorry I didn't put the URL in this. But between those two you can actually get a handle on what things in CSS you can actually use on a given day and for the browsers you need to support and whatever. The next thing is, I went to Rails conference, I don't know how many of you went to Rails conference, but there was one of the very few things that had to do with front end Rails code was a session by somebody that I don't even remember. And he said, don't use CSS frameworks, that's just looking for trouble.  They have something called a reset, almost all of them. This one is an example of 960.gs, which is 960.gs. That's a TLV I didn't know. And the reset will basically reset all styles in all browsers to the same thing. That's the number one thing that creates CSS inconsistencies is the default font size in IE6 is one thing and in Firefox it's another thing and in WebKit it's something else. And this sets all of those things to the exact same rules. All the margins are now zero, all the padding is now zero instead of worrying about, well, some of these, if I accidentally didn't put in a padding, it would be 10 in some browsers and zero in other browsers. The other thing it includes is a clear fix. So when you're trying to mess around with floats, which is the other thing developers hate about CSS, sometimes you just need to say, okay, stop floating all these things and put this thing under it. And that's what a clear fix does. And it's built into all of these frameworks and it's as simple as throwing a div in that's called class clear fix. And everything below that will come below, visually, everything above that div. So it's sort of a reset. As far as using the grid itself that comes in a lot of these frameworks, unless you've heard of a guy named Joseph Mueller Brockman, or you're really into 1960s Swiss graphic design that is all about using grids and typography, you probably don't care. So don't use the grid. You don't have to use the grid. All of these, almost all CSS frameworks include a grid. Just ignore it. Don't use it. Do whatever you want. But use the reset, use the class fix, use the default styles and they'll get you to 85% of where you wanna go and then you just have to figure out color theory and design concepts and stuff like that. So it's no problem. Graceful degradation is something that we all need to start thinking about because it's the only way to go forward. The idea with graceful degradation is it's okay if stuff doesn't look perfect in IE six. Stop trying to jump through hoops to make rounded corners and have gradient backgrounds in IE six. Cause they aren't gonna care.  Half of it doesn't work. They're used to bad user experience and they just keep trudging on. So just ignore them and use CSS three as long as it doesn't break your application. In this, if you look at the sample app on the right is in Chrome, on the left is in IE six. The only difference is that tag doesn't have rounded corners and it doesn't have a gradient background. That's a trivial example. This is a site I'm actually making right now. IE seven, we don't have a rounded by now button. In WebKit, we do. Is anyone gonna care? No, the rounded looks better and it fits with our design nicer and it only took about three lines of code to actually make that happen and we could have spent like three hours trying to make it rounded in IE seven but who cares? They're not gonna care. They're not gonna notice. The web's broken. So this is how we do it. This is if you, once you get, if you look at float left, all of them need that. If you look at background, now we're starting to set a default background that uses a WebKit gradient. If you notice the lowest common denominator line, so every browser's gonna have gray to start with and we then go back through and start adding more styles that are more complicated. The WebKit gradient, the Mozilla border radius stuff, the box shadow using an RGBA value which allows us to have alpha transparency as that fourth thing so we can say that it's black but we could put 0.5 instead of 0.1 on that last line. That IE six is just gonna ignore that and that's fine. Their users are also gonna ignore it. They won't ever even know but it looks nice in other browsers and it's not complicated. It doesn't, this isn't gonna like bloat things up and it's just a few lines of code.  That's one of the tricks or it uses a transparent pixel and writes it in there and that stuff's a lot slower in IE six than you'd imagine and it really slows down your page load and you could have just done this and got on with your life. The next thing is that I think a lot of developers don't tend to get this concept is that object, is that CSS is actually a lot like an object oriented programming language that doesn't have any computation. So you can't do any math in CSS and you don't have any variables but the rules to how you put together classes and IDs and style things is not unlike how you can extend things in Ruby with modules. Like we saw in the scraping presentation that he extended things in development by including more modules and stuff. That's how CSS works. So you can give high, you can style every div on your page with a white background and then go back in and say well these specific divs I actually want to have a green background and that's composition and you can, if you assign something to all divs it inherits to all divs no matter where that div is on that page and you also have namespacing. So by saying the class photo navigation and then image we're only talking about images in the photo navigation divs and those photo navigation divs can be anywhere but we're only talking, we're not applying the styles to the image. To all images we're only applying it to one's namespaced by photo navigation. This is a little bit contrived and I don't know if that Ruby code actually works but in my mind that's kind of how I think about how you do CSS. That Ruby code on the right could, I think pretty easily end up generating the CSS code on the left. That looks a lot like programming to me. Everybody says CSS isn't programming. I don't know, that looks a lot like programming. That looks a lot like object oriented programming. And when you start thinking about CSS in a little bit more, a little bit higher concept than it's just this dumb thing that makes pages look nice. If you actually treat it with a little respect and care what you're doing it'll treat you nice and thinking about it at a code level I think is the first way to get to that. By the way there's something else called object oriented CSS which is like a whole sort of technique to doing CSS that a woman who goes by the Twitter name Stubber Nella and I'm not even sure what her full name is talks at design conferences and that's something different. So I'm not talking about that. I put that caveat in because I got questions last time I gave this presentation about what this wasn't at all like what she was talking about and you're right, it isn't. So moving on to JavaScript. When you start talking about JavaScript the first thing you really need to talk about is do you need to build your pages to work without JavaScript and then we'll get to the next ones. So do you have users who turn off JavaScript? Does anybody, I met one person one time who said that he definitely knew people because he worked at a bank and it was like a security thing like 10 years ago that they couldn't use JavaScript. Does anybody else definitely have users that won't use JavaScript? Really? Right. So you can go for his use case and build your site like that. I tend to find that's actually ends up being a straw man because guys like you are a few and far between and you'll click. There's two of you. There's two straw men in here. So I do it because I like testing and I like testing with Cucumber and yes you can test JavaScript-y things with Cucumber and it's never felt right to me. It's always felt right to just build the stuff to not work to work without JavaScript and not have to go through culerity or selenium or some of those things. Like I like to just have it fast and not open up browsers and be all crazy and or not have to have this complicated CI environment. I like to just do Cucumber tests that are fast and work great. So I build stuff that doesn't work with JavaScript and it's really not that hard. You just can't use any of Rails built-in JavaScript-y things, which is okay because that code sucks, right? This is a link, I think this is a link to destroy which is one of Rails built-in RJS helpers and if you can debug that JavaScript I will give you a cookie because that is ridiculous and it's unmaintainable and it breaks all the time and you spend more time debugging and you can't test it. You can test it through selenium but you can't test it in any sane way that you would like to do on a daily basis and since I like to write code on a daily basis I like to do sane things on a daily basis. You also can't reuse it so that's the JavaScript itself. You could reuse that link and generate that link wherever you'd like but you can't reuse that JavaScript. It's actually not really that hard to write reusable JavaScript. This is a little trick that I learned from a coworker years ago which is you set up named closures which sounds really scary and it's not. We have, I set up a closure called FOTOR and that's my application. I keep all of my applications code in there and then I know that my application isn't messing with a plugin and plugins aren't messing with my code. I don't know if you get into, I don't know how many of you use jQuery plugins but all the time we end up with crazy things because they conflict because jQuery people love to do things in the global namespace. Every tutorial out there will show you how to write jQuery code in the global namespace and it'll step on each other all the time. So this is how I do it. I have anything above that return, I can write functions in there and those are private functions or methods or whatever and you can call those from inside of that named closure and you can't call them from outside that named closure. That sounds like a pretty good idea. I think programming languages have done that for quite a while because that tends to help with maintenance and anything inside of that return function which I usually leave as only an init function are callable from the outside world and the only thing I put in my document ready is calling that init so I'm setting up this tag widget. If you play with the code that I put on GitHub there's a little tag widget you can add and remove tags and there's an X to remove it and stuff like that. This is what that init function ends up doing and it's just setting up, it's just going through the page and it grabs all the divs and links and stuff that I care about that are gonna do something and puts a event handler on it and when that happens I call one of the functions that are inside of my named closure that I could unit test or whatever, they're my code. They're not somebody else's code and this isn't gonna step on anything. This is an example of the remove tag feature. So if you notice I don't ever use this in any of the code either because this always changes in JavaScript what this is and it never ends up being what I think it should be. So I try to stay away from this and I try to stay away from writing code in the global namespace and then I don't get problems where I'm dealing with elements that aren't actually the element I want and I don't have functions that step on each other. So I set up, I grab the editable tag and I hide it and I call it JavaScript request and it's pretty simple but I've never seen a jQuery tutorial that actually showed you how to do this. They would just tell you to, this is an example of the way jQuery would tell you to do it. This is for the edit tags feature. So they would just grab all the edit tags and they would just assign a click function to it and they would hide and show things based on that and that's all in the global namespace and other things could do other things to edit tags and it could call other methods and you just never know what's going on. But instead if you put it inside of a name closure you get all the things that come from namespacing your code in other programming languages also now exist in your JavaScript. This is the code for adding a tag and you can see all I'm doing is wrapping an Ajax request in it but if something changes if what happens when you add a tag changes in my app I'm not, I have it in one place. I have it in one file. It's not buried in line in some HTML. It's in one place. It has a name that makes sense. I could search my code and actually find the add tag stuff which you can't do with the Rails helpers and this has just saved me so much time. I don't know how else to sell it to you. So I'm not using IDs on any divs. I'm not grabbing just a specific div. I'm not using this, I already mentioned that and the closure is basically by setting all of this up in a closure each tag and each sort of tag widget inside of the page is its own thing. If I used IDs or classes, the JavaScript would be and I used Rails helpers, the JavaScript would just be repeated in the page every time if I had multiple tag widgets or whatever in the page and if I was safe I said I wanted to just take the return of an Ajax request and stick it in some div and it wasn't inside of a closure. It might stick it in all the divs but if you look in the JavaScript you'll see in a couple places where this would allow you, you're only working inside of the div that the click came from or whatever and that's all done through closures. So anyway, I know I went fast. That's my presentation. Here's where I am on the web. If you have questions. If you have things and stuff to name space but I've also seen views doing that where basically you have to design it because in that sense you would tend to do you know one class, one JavaScript class on profile. Right. And then you have to think about the dependencies and how many files you're gonna bring in to run on the page so that I can format performance. Yeah, right. So to reiterate what he said, if you do everything in external files you end up sometimes having to import lots of JavaScript files and that kind of thing. What I do to handle that is I have lots of files. I like having lots of files. I like having my code split up like that and when I deploy I concatenate all of them into a single file. Where I've worked before I worked at aboutus.org and we actually had a kind of over complicated system to do this but it was good in theory in that we had different sort of roles or something that if you were in this context we can concatenate certain JavaScript files together that only needed to be in this context and then we would concatenate other JavaScript files maybe all of them in one context and only a few in this other context and so you can set up contexts that you, so you only ever have one file per context but you can have multiple contexts throughout your site. So say if you had like on our site we have checkout and that's kind of a big deal and it's separate from browsing for events. So we could have one JavaScript context for, and this goes for CSS as well. We could, we don't do this now but we could have one context where we only have JavaScript and CSS for browsing events and we have another context with a single file that's only for checkout because those things are actually pretty separate and look pretty different. No, go ahead. But then you have to, I don't know what you're using on the, when you deploy to package all those assets but then you also have to make those rules as you package depending on your context. Right. So that's tricky. I mean we're doing the same thing and what I've noticed is that the way those namespaces were actually designed is that it basically forces loading everything or those separate contexts because of the dependencies. Right. And basically you end up loading 600K worse of JavaScript that you don't need. Right, yeah. That's the anti-pattern for sure. That would make the case for not namespacing and going with a dryer. Right. Right. One thing with jQuery is that when you, using this, is that when you select an object and you assign a function to something, it'll actually bind the function to the object that you're selecting so that it'll, it makes it a little bit easier using this to use jQuery. Yeah. Yes, there are, I would say that there are good reasons to use this and if you have a really good reason to use this, that using this is good, but the anti-pattern that I see is using this all over the place and you look, reading through the code, this has no meaning to me. So I never know what this is when I just have to go in and fix something. So selecting a specific element and assigning it to something and then pass, you can pass that into the, to the dollar sign function and I think it does very similar things to just using this. You just have to do it yourself. That's what ends up happening. So, yeah, if you don't have a designer, this talk was probably kind of boring for you and you should use less. But if you do have a designer and you have to work with somebody who doesn't program at all and isn't technical, then less just ends up adding headaches. Less fixes all the things that programmers and SAS for that matter. I use less, I guess SAS 3 is a lot better than SAS 2 was. But SAS and less fix all the things that programmers don't like about CSS, which is you can't do math and you can't have variables. But you're, if you have to work with a designer, they probably don't want math and they probably don't want variables. So if they're gonna do the CSS, just let them do CSS and I don't think you actually gain that much from less than SAS. But if it's just gonna be you, yes, SAS is great. Compass is like a CSS framework built in SAS that you can use and it's awesome, but your designer will hate you if you have one. Yeah, yeah, less.js is maybe outside the scope of this. But yeah, it's pretty cool. I would check it out also. Questions, any other questions? Cool.


Can you tell me a little bit about your research into the paranormal? Well, I started my working life many years ago as a magician and so lots of my research looks at how people kid themselves that they are looking at something paranormal and actually it has a normal explanation because that's what magicians do all the time.  So I guess I use that background to springboard into looking into paranormal claims. So what are we talking here when we say belief in the paranormal? Psychics talking to the dead. What are some specific examples that you've dealt with? Yeah, so I've looked at mediums who claim to talk to the dead. Psychics who will tell you something about yourself that they allegedly picked up through their amazing abilities and sometimes predict the future. And that can take many forms. It might be a tarot reader. It might be a palmist. It might be somebody looking at the tea leaves or a crystal ball. Very rarely you will get people who claim psychokinesis, mind over matter. So they'll focus on a spoon for example and it'll start to bend something like that. All those things would come under the remit of extraordinary abilities. I've seen some pretty convincing examples of psychic ability. So a psychic might claim that something will happen in the future and it seems very detailed and specific. And then the person who's being read it turns out to be true for them. What's your response to that? I think when you go to a psychic or a medium there are several psychological mechanisms at play. So one is what's called Barnum statements, these very general statements that are true of everyone but we think they're just true of us. So the notion that you look at someone's palm and say you've got a lot of untapped creative potential. We all like to go, oh yes, my goodness, how terribly insightful. So they're just true of everyone. Some of them are double-headers. So you're the sort of person that enjoys going to parties but also you enjoy being alone with a book and of course that covers both extroverts and introverts. Other times there's a lot of predictions being thrown out and then what happens is that if the prediction comes true the person remembers the reading and forgets all of the other predictions which didn't come true, which are kind of spread betting, if you like. Sometimes there's self-fulfilling prophecy. You say to somebody, oh my goodness, you're applying for some sort of new job and they go, yes, oh it's going to go really well. Well now they're extra confident and they go into the interview and so the prediction creates the future. So most of the time when someone's talking to us and they talk about what they're going to do that evening or whatever it's pretty vague and we sharpen up those comments to make sense of them and that's what's happening when you go to a psychic. The difference is they can't actually predict the future. So the fact that we are so good at communicating with one another that we can infer what somebody means even though the words aren't there means that we're wonderful interpersonally and it's also the price you pay then to go along to a psychic and trip yourself up thinking they can actually predict the future. So all of these different mechanisms are at play. To me what's interesting is it doesn't look like that. It looks like you go in, this person tells you all about yourself, predicts something about the future, comes true, isn't that incredible? Actually it's quite complicated. There isn't one psychology there, there are several psychological mechanisms. It seems a common explanation for these kind of beliefs especially if you're a non-believer in the paranormal is people are just stupid, they'll believe anything but you mentioned that there are a lot of psychological mechanisms behind there. Do you think it's true that psychological mechanisms are a more powerful way to explain this stuff than say motivations and personality? I think the notion that people who believe in this stuff are stupid simply isn't true. There's been some research looking at IQ which is if you like a measure of intelligence and a belief in the paranormal, there's not much of a relationship there. There might be a small one but it's not particularly striking. I think what's happening is that a lot of people want to believe in this stuff. Why else would you go to a psychic? You are probably looking for some sort of guidance and so I always say it's a little bit like going to a doctor if you didn't feel very well and the doctor says well what are the symptoms? You say well you're the expert, you tell me. It would be a ridiculous thing to say. The two of you are there to work on the problem together and I think that's the attitude of most people going to a psychic. I have a problem, we are here to work on it together and so all of those biases flow in as you try and make sense of the situation. And there is some research suggesting that if people are having a tough time in their lives if they're facing uncertainty or as a child they face a lot of uncertainty and upset then that tends to bias them towards believing in the paranormal thinking there is a magical solution to their problems. So the people that are going along to a psychic or a medium can be quite psychologically vulnerable and of course one of the issues here is whether going along to the psychic or medium helps and whether they'd be better off in a more mainstream counselling scenario. Can you tell me about the nature of superstitious belief? Why do you suppose it is that we all believe some pretty strange things? Well superstition is fascinating in part because it's so widespread so although only a third half of people believe in a psychic or a medium almost 90-95% of people would touch wood, cross their fingers, whatever it is so in that sense we're all irrational, let us not believe that we're rational creatures. Why do we go for it? Well I suspect because we're told from a very young age that there might be something to it. Otherwise you might get bad luck and that's a real problem and it only takes a few seconds just to touch wood or whatever. If it was a very elaborate ritual I suspect it wouldn't catch on quite so quickly if the idea was you have to do three forward rolls and a star jump every single time you say something like I hope that goes well then people wouldn't be quite as superstitious so part of it is it costs very little and if it is true the benefits are enormous. The other thing is that we often are one trial learners so if we do something like we wear our lucky shirt and we go along to a job interview and it's oh my goodness it goes wonderfully then we think wow this somehow this shirt is somehow linked to me doing well and I'll wear it again next time in exactly the same way that sports people will lace up their shoes in a certain way because when they did that once suddenly it was a great performance. So we are naturally good at linking things like that which leads us to be superstitious particularly under conditions of uncertainty and of course the most superstitious groups are sports people who have to perform in a certain window of time actors are exactly the same so it's uncertainty that drives that belief. I would say to both skeptics and believers try and base your thoughts and your beliefs on the evidence. I mean that's what you do in many different areas of your life you wouldn't go along to buy a used or a secondhand car and you go I know I'll trust my intuition if you didn't understand about cars you'd take somebody with you that did because this is an area where you need evidence and I would say if you're going along to a psychic or a medium understand the tricks of the trade be an informed client and if you see them being used get out of there. My name is Richard I think about the paranormal.


Consider using step-by-step animations.


I am Samedha and you're watching Around the World in 8 Minutes. The story we take you to Columbia where a national strike was observed by hundreds of thousands of workers, teachers, students, doctors, pensioners, peasants, indigenous and afro-descendant peoples in the defence of life, land and democracy and in opposition to the neoliberal and extractive policies of the right-wing government led by President Ivan Duke. The protesters demanded that the current government respect the peace agreements signed between the former government of Yan Manuel Santos and the former guerrilla group, revolutionary armed forces of Columbia. They also opposed the national development plan proposed by Ivan Duke's government. The national development plan is based on the recommendations by the International Monetary Front proposing economic development on the basis of extraction of natural resources. It also includes reforms that are against peasants, workers and other social sectors of the society. Trade unions, teachers and students took to the streets with their demand for an increased budget for education that guarantees free education, food and transportation for all. Doctors demonstrated to draw attention to the crisis in the healthcare sector with respect to the healthcare professionals as well as patients. Pensioners mobilized to demand a better pension and retirement plans. The Colombian peasantry also came together to demand policies that benefit the sector and to demand an end of the agro-industrial model. Social and human rights activists mobilized and condemned the increasing assassination of social leaders and indigenous and afro-descendant communities. They also demanded that the government take measures to guarantee security to social leaders and to resume peace negotiations with the National Liberation Army to ensure stable and lasting peace in the country. The call for the national strike was given by around 190 social movements, trade unions, political parties and indigenous and afro-descendant organizations. In response to the strikes, the government had deployed 20,000 police troops throughout the country and over 3,000 in Bogota. Several incidents of violent police repression were also reported in Bogota and in the department of Antiquia and Bolivar. Police officials pushed people and threw tear gas that affected thousands of demonstrators in the Plaza de Bolivia in Bogota. In addition, the National Army and the police also tried to obstruct the mobilization in the North Santander. The mobilization in Colombia finds resonance in the kind of mobilization that have taken place in London, UK, Buenos Aires, Argentina and Venezuela. For our second story, we go to the United States where activists in the capital city Washington DC have been on a sit-in inside the Venezuelan embassy for almost three weeks now. They are protecting the embassy from a possible occupation by the Venezuelan opposition forces which have been led by the self-proclaimed interim president Juan Guaido. This group of activists called the Embassy Protection Collective is being led by the rights groups Code Pink and Popular Resistance. In their efforts to protect the embassy, they have been campaigning and reaching out to people asking them to join in. The Collective has been organizing regular events inside the embassy and has also put up anti-imperialist art and banners. The activists are residing in the embassy 24-7 with the permission of democratically elected legitimate Venezuelan government led by Nicolas Maduro. The embassy was closed in January after Maduro was pulled out all Venezuelan diplomats in response to the U.S. recognizing Guaido as the president. However, even under the strained relations, the United States cannot forcibly enter the premises of the Venezuelan embassy without securing permission from the Venezuelan government as per the international law. The Vienna Convention says that even in the case where diplomatic relations between two countries break down, embassy premises must be respected. The U.S. is continuing its attempts to overthrow the Maduro government which is recognized by the United Nations and most of the world and replace it with a puppet regime which is being led by Guaido. However, Guaido remains unpopular back in Venezuela as the citizens have been successfully resisting the coup attempts. Taking control of the Venezuelan embassy to Guaido's appointed officials is another attempt by the U.S. to hand over additional powers to him. However, activists inside the embassy have made it clear that they are willing to risk arrest in order to protect the embassy premises for Venezuelans and they are ready to stay there for as long as it takes two nations to reach an agreement that protects the diplomatic property. Lastly, we take you to another protest in the U.S. where students of the Johns Hopkins University are protesting the university's association with the anti-refugee force ICE which is the Immigration and Customs Enforcement. These protests have entered their fourth week on April 23rd. The students are also expressing their anger at the university administration for proposing to deploy a private police force with jurisdiction within and around the campuses. The students are demanding that the university withdraw all contracts with the ICE and abandon plans to constitute a private police. They are also demanding that the university pledge the amount received in profits with ICE contracts to the Baltimore Immigration Defense Fund. The Legal Defense Fund was set up by the city administration of Baltimore in March 2018 to aid refugees who are victims of the Trump administration's crackdown. Other demands include the recognition of workers' unionization in the university as well as the inclusion of student and faculty on the university's Board of Trustees. The protests have been going on since July 2018 when JHU was set to renew the contracts of ICE with its constituent faculties, the School of Medicine and the School of Education. The contracts provide various training programs and certificate courses for law enforcement officers including those of ICE. The School of Medicine has been associated with ICE since 2004. The university administration makes millions of dollars through these contracts. According to the University Gazette, when the School of Education signed a contract with the IC in 2009, it received a total of about 11.4 million dollars. This is just the tip of the iceberg with regard to JHU's involvement in military and industrial complex, said an op-ed which was written by three current and former students in the Baltimore Sun. According to a wise news list of the most militarized universities in the US, JHU is among the top defense contractors in the country. That's all that we have for you today on this episode of Around the World in 8 Minutes. For more such stories and videos, do visit our website peoplesdispatch.org and follow us on YouTube, Facebook and Twitter. Thank you for watching.


Su-tao chiw, jeni vu-dii vi-dii o kai hudi o nocte mi sybile vols parola chii peri kalkai affeeroj Sa ednau e, mi vols diri, chiu vi jam viis mian nouvan rubandon cher mia chefa pajo de la YouTube kanalo Sa vi anka rao ne vidis ji, iru tijen, sybile malfarumu nouvan folieton cher vi ne vols firmi chitium folieton Al vi ne povas plul aldi mian belan vochon To, malfarumu nouvan folieton, iru ala chefa pajo de mia kanalo kai perigadujen Ji estas jela supara de la pajo, vi ne povas mis vidi jen Ji estas tijen, ji estas tree aloga okul frapa To, sybile rigadujen jien havas bazeliskojn, min, anasujn, dinausaudojn La esperantan flagon, an, affe, mi frigeseis en meti sharkojn, se tyo ne gravas Sybile rigadujen, kai poste reveni chitien, kai didu al mi, kion vi opinias prei jit Cher mi tre-shatas jit, kai ser vi ne-shatas jin Mi batos vin, kai mi tranchos vin, kai mi stelos vin hranon Kai vendos jina cinaj amikojte mija edzino Mi nes-tsias kjell mi elektus ilin, sess Mi nes-tsias kjell mi subite idis tiun drekten en si tyo rakonto Ne gravas Kai nun, le dua fero To, mi jus reveni zde interviu Mi debis voiachi du hodon tijen kai du hodon tereen La interviu... Mi pensas ke tiun idis glate Mi posas respondi al apai pato de la domandoj La domandoj nes-tsias tiun malfazilai Sess mi ankarau nes-tsias Kjell mi vere volas premi la poste non Chari ji estas tre-for Sess la salado estas multi pli alta Ili ankarau ne donis al mi la poste non Sess mi simbile pensas Se ili detsidas ke ili volas havi iudian Kjell vi ne volas tijon Sju mi vere volas tijen Chari mi intensas havi Infanon en la veronta jaro Havi Mi intensas stadigi familion Mi nes-subite povas havi infanon Grom se mi idus al lumeio kai shtelos tijen Sess mi ne faras tijon Mi nes-tas unun al tijai homi Do, mi nes-tsetas Ču estus bone ideo Per premi tijen Chari ni bizonas al monon Ao chu Mi simbile Ne premi tijen Ne premi tijen Kai daurigi labori Chela nun al laborejo Kjuh estus 5 minuto in forpiere De mia domo Chari tijen Mi povas pli helpi leidzinon Čirk al domo Ā, mi nes-tsias Mi simbile parolacas Mi didis ke mi ja faros tijon Do, mi nes-tsias Mi parolacas Ā, eba vi povas Doni al mi sugesto Mi nes-tsias Nuri vi Nuri al vi Kjuhi havas Infanon Chari kjell mi acceptos Concilon de homo Kjuhi havas Infanon Čari vi nes-tsias Piri tijon Kjuhon Vi parolacas Ču ne Ā, kai le-dua fero Ā, jes Mi didis raconti Piri tijon Čiu fuj Kjuhi mi ides heimen Ā, komprineble Mi e familio Mi e familio Lodjas in Tasmanio Či estus malgrande Insulo Kjuhi penders De la subapato De Australia Čiu fuj Kjuhi mi ides tijen Ā, kun mi eidzinon Mi e panio Čiam shartas Čitis fanetson Či le fakt-to Či emi estus tr'e bona bubo Ċn es-tsias Kjuhians Či-šyt-as f жad ti ts hyd Ām, kaijaz tijway Čis- shagtas men-chi le fakt-ton Čia kjuh-a i-m je-s tois Mij-tsish cha-tas Čai-tis Ā, mUNGđi Čud Marshall Čijw And everybody, for reinstates, are talking puzzled and wondering if Alright there maybe is a foreigner – even when you're a child, and do not think that way. But later I explored the subject. And I wasn't a child alone, in fact, it emerges often. Children often find food szakas gaps. THE COW 1975 I don't know how maybe I needed deeper Seriously explore the subject but many children like to do it so you don't have to but in fact, I have to ask you all when you are a child do you like to eat a hundred meals you can tell me the truth I don't judge you because I did it and I just declared that to the whole of Esperanto so you don't have to when I go to a convention maybe a few people give me a hundred meals in fact you don't want to do that so yes, give me your strange stories about what you like to eat when you are a child and the other thing this always happens to me when it happens my brother has a picture of me when I was a baby and in the picture I sit there like a baby with crossed legs and I have my finger like that and I push my own cat in me and it's just a baby picture of me and I push my cat and she always likes to show this picture to everyone and the first time when my wife went to Tasmania my brother almost always went to the hospital because my family lives in the hospital almost always took the picture and showed this picture and said here is my beautiful baby when he was a child was he beautiful and of course my wife looked at him saw him pushed the cat and thought what are you doing in fact she probably thought what are you doing but I don't know how to respond to that I don't know she always says that if I'm too many people she asks for a copy of that picture and she posts it on Facebook and of course I don't like that so in fact I have to go home and find it and bring it but now I have a new question for you do you have parents I suppose you can have two parents it's that strange but do you have parents have strange pictures of you and they really like to show these pictures to all your friends to your wife or even to all you have those pictures and of course clarify what happens in the picture to all of us in the comment below so I think I'm enough to talk at night so if you like this video like it, share it subscribe to my channel if you haven't subscribed yet and I'll see you all in the next video and if you're not there I'll find you and I'll take pictures of you when you do something strange and as always I want to list a lot of thanks to my Patreon subscribers and that's it Robert Podd, Alexander Tolfes and Tom Linsley Slavich and Robert Nilsson Lupe Serres and Jason Napushan and Ludisto and if you want to donate to my channel because it's better than the first ten you can find the link below in my description


Hello, guys. Thanks for coming. Unfortunately, today, we are going to enjoy this quality of the slides. We couldn't fix the hardware issues. But anyway, I think just pay attention to what I'm saying, and you will get some useful information by the end of this conversation. Well, so a couple of words about myself. My name is Dennis Magda. Presently, I'm taking a role over Director of Product Management at GridGain, and at the same time, I'm Apache Ignite PMC Chair. But anyway, so don't be afraid of my current position. You're not going to listen about all the marketing stuff throughout this conversation. Because I'm a software worker. I joined the company as a software engineer, and I'm still a negative contributor to Apache Ignite community. And Apache Ignite is we're going to talk about Apache Ignite in relation to the Kubernetes during this presentation. Because Apache Ignite is basically a distributed database and computational platform that we are developing at Apache Sartfeyer Foundation. And I'm going to share with you my personal experience on how you could stick together Kubernetes with our distributed database. And even more throughout this conversation, I want to give you an understanding on where is the responsibility of a distributed database if you plan to deploy one in Kubernetes? Where is the responsibility of Kubernetes itself? And what's our role? What's the role of DevOps? And what's the role of application developers? Well, so considering this in mind, our agenda looks like this way for today. First, as I said, I'm going to use Apache Ignite as an example for this conversation. But basically, the concepts and the solution that I'm going to cover today can be, and basically is adopted and can be adopted for the rest of the distributed databases, such as Cassandra, such as MammonSQL, such as Redis. There is no any difference because usually the main difference between a distributed database, and just let's call them regular databases, is that when you have a distributed database, you have a cluster of machines that are deployed somewhere. And if we deploy this cluster in Kubernetes, we should somehow stick databases clustering component with the Kubernetes environment. And that's actually, in our experience, the only and the essential thing to care about if you're going to run a distributed database in Kubernetes. That's from the database engineer standpoint. And this is why we are going to briefly look at the clustering and deployment component of Apache Ignite. Then I'm going to talk about orchestration specificities, how are they different and what's required to consider for this type of deployments. And after that, I'm just quickly will explain what we exactly did for Apache Ignite and how actually you can deploy Apache Ignite in Kubernetes. And the same concepts, again, can be reused and actually reused in other distributed databases. That's Cassandra, Redis, on my SQL. Okay, so, and finally, the last five minutes will be dedicated to a short demo. I'm going to use my laptop. I'm going to run, quickly run Apache Ignite cluster in a mini-cube environment. And we will try to scale it out and scale it down to see how we can use Apache Kubernetes facilities to maintain our cluster that is already deployed in Kubernetes. So, but before we go to these details, just three minutes of the high level or review of Apache Ignite. So how many of you have heard about Apache Ignite? Okay, good, a few folks, but then it's a right slide to show. So basically in short, Apache Ignite is distributed database and computational platform. At the core of this database, we have the distributed storage, right? So this distributed storage is called memory-centric. It means it's called memory-centric because it stores, it treats RAM as a primary storage for your data and your indexes. RAM is not just a caching layer. That's you are not required to use disk layer in Ignite in general. If you're fine, you know, with the memory only. But anyway, when many companies and users go in production, they still want, they still think about durability because if by some reason a cluster goes down, the data will be lost, right? And to avoid this, you can enable the persistence. The persistence Ignite supports provides its own native persistence, which is also distributed across the cluster of your machines, or you can use a third party persistence, such as a relational database or no SQL database, for instance. And on top of this distributed storage, on top of this distributed database, the community built a variety of different components, such as key value APIs, SQL, queries, computations, machine learning algorithms, and many more. But our goal of today's conversation is to take a look at the core of the system at the clustering component. That is responsible for taking separated cluster nodes and for uniting these cluster nodes into a single unit called a cluster machine. And so in Ignite, we have two types of cluster nodes. The first type is, we call them server nodes. Server nodes are actually your data storage. They store the data, they store indexes, and they process all the queries and computations that are coming from your applications. And applications are usually connected to the cluster by means of so-called client nodes that you can see on the slide to the right. And these client nodes provide you all the APIs available in Apache Ignite. In addition to the client nodes, if you kind of, you can use GDBC or DBC drivers, you can use REST protocol or you can use binary protocol. If you can connect to the cluster from different management or monitoring tool or tools you use for data analysis. So that's, but then when we know about server nodes in cluster nodes, then we want to deploy them somehow. And Ignite can be literally deployed anywhere you like. So for instance, you can deploy as a developer when you start development of your next application, you can deploy the first cluster on a local laptop. You do not need to go to your IT department and negotiate in some environment. All the development and the initial testing can happen on your personal machine. However, when it's time for advanced testing or the time for the production, you can deploy your cluster on premise or you can deploy it on cloud. And what's interesting about the deployments, the cluster deployment and lifecycle can be orchestrated and provisioned by different solutions such as Kubernetes. And here is we're going to talk about Kubernetes. The deployment in Kubernetes is not that difficult as you will find out. Actually, the main thing of the clustering component is to let all the cluster nodes to discover each other. Here is in this picture, you already see a connected cluster. So all the nodes know about each other, they can communicate, they can exchange messages, they can accept different queries and calculations. But before this cluster is united, every single node needs to discover each other and join the cluster. And to achieve this in the networking component, we have a special thing called IP Finder. The responsibility of the IP Finder is to provide a new cluster node with the list of the IP addresses of the nodes that are already in the cluster or the nodes that might be or should be in the cluster. And when the new node will start the joining process of the cluster, it will pick one of the addresses provided by the IP Finder and will connect to the cluster via that IP address. So it's pretty simple. And this is actually how it works. And there is a variety of different IP Finders available in Apache Ignite. For instance, the basic two ones are multicast IP Finder and static IP Finder. So for instance, if you start, let's say, your cluster on the local laptop or in your private network, then you can use multicast IP Finder because a new node will issue real broadcast multicast packages into the network. And if there is any other node in this network that is already part of the cluster, the nodes will reply to this new node with their own IP addresses and the new node will be able to join the cluster by receiving this information. But probably the simplest way to let all the nodes to fit all the IP addresses to the nodes is by providing the static IP Finder. Static IP Finder simply includes already known IP addresses of your machines where you're going to run cluster nodes. Actually, this type of configuration really works for on-premise deployments when you can know the IP addresses in advance and you just prepare the configuration for your cluster nodes. You give this configuration to the machines and that's it. But when you decide to deploy your cluster, when you decide to deploy your distributed database, let's say, in the cloud or on the Kubernetes supervision, neither static IP Finder, nor multicast IP Finder will work for you. Because if to talk about Kubernetes, we all know about this. It's unlikely that your Ignite cluster nodes or Ignite parts will know even its own IP address in advance. So the IP addresses are unknown. And here we are going to the orchestration specificities of distributed databases such as Apache Ignite in Kubernetes. So again, there are two things that are related to the networking component of the database. The first one is cluster discovery. This is what I am just talking about. And here is, as I said, nodes, cluster nodes, do not know IP addresses in advance. So they will not be able to join the cluster if their addresses are unknown. And also the IP addresses of the nodes can be changed over the time if you restart your cluster machines, right? So it's not under our control. It's up to Kubernetes to decide what would be the next IP address if I restarted one of my cluster nodes. However, once you find a way how to provide, how to share IP addresses among all your cluster nodes that represent your distributed database inside of the Kubernetes, you will be able to get a workable self-contained and self-healing cluster. Specifically, if to talk about Apache Ignite, once all the nodes are interconnected, they will take care of the rest of the functionality and the rest of the tasks. For instance, if the cluster topology, the size of the cluster is going to be changed if you're going to add new cluster nodes or you move cluster nodes, the cluster that already exists is going to update this information internally. It will never ever communicate to Kubernetes. The cluster will communicate to the Kubernetes only at the time when a new node joins the new cluster. So, and also once we have this cluster, all the nodes, at least the nodes in Apache Ignite database, will be able to open peer-to-peer connection whenever it's needed, like when you want to execute a new SQL query or you are sending some computation to your cluster node, one node will be able to open a direct connection to the other. So here is again, we don't need to know, we don't need to talk to Kubernetes environment. And today, and now let's dive into the first paragraph into the cluster discovery because this is actually the integration point between the distributed database such as Apache Ignite and Kubernetes environment because the rest is usually handled by a database vendor. So, what are the specificities of the Kubernetes deployment or Ignite deployment in the Kubernetes? So first, how we solve this issue? How we provided the IP finder implementation for Apache Ignite? We all know that in Kubernetes we have a concept of services. And we just decided to reuse this concept for the nodes auto-discovery inside of the Kubernetes environment. Basically, if you take a look at this diagram, here is I'm trying to explain the process when a new node shown over here is trying to join a cluster of machines. These machines are already here, they're communicating, they can accept and they might accept your queries, a process workloads coming from your application but this is the new one. And when this node is launched, we can call it Ignite part in terms of Kubernetes. It doesn't know IP addresses of any of these nodes but it will be using a special IP finder representation. That IP finder will connect to a previously started Ignite Kubernetes service and that Ignite Kubernetes service is keeping a list of all the IP addresses of all the Ignite parts that are already deployed in your Kubernetes environment. And this node will just, will do the simplest operation possible. It will open a socket connection to the service, it will retrieve the IP addresses of all the Ignite parts, deploy it in the Kubernetes and will connect to the cluster via one of them, randomly using one of them and that's it. It's that simple. So this lookup service actually works and looks exactly this way. So this is the only configuration you need to use to start Ignite service in your Kubernetes environment. So basically the only one mandatory option is that you're encouraged to specify the name of your Ignite cluster because every Ignite part that is about to be started in Kubernetes will be labeled using some name and here is a new username Ignite to specify that this Ignite service should track IP addresses of the parts that are labeled with this name. And then we're just going to use well-known commands to start this service. What goes next? Once our service in Kubernetes is up and running, we are ready to start, we are ready to deploy our distributor database because now we know that all the database nodes will be able to look up each other by connecting to the service that is already up and running. Unfortunately, the quality is poor, but anyway, I'll show this to you during the demo section. Here is what I am doing. Again, I just specified that the name of this part will be equal to Ignite. And then here is I'm providing an Ignite configuration. I'll show this configuration in a minute and basically in time of this configuration that's Apache Ignite configuration that is used by Apache Ignite node. And inside of this configuration, the nodes use Kubernetes API Finder that connects to the server, gets all the IP addresses from the server, service, sorry. And this actually allows to all the nodes to interconnect with each other. And finally, so that's it. So actually, that's a reality. That's how it's simple to deploy a distributor database in the cluster. If you just, basically you just need to use a special networking component that will support your database nodes out of discovery. And you just need to provide the configuration for it. And then next, many databases provide its own facilities when just to handle the situations when you scale out, scale down, or provision more machines to your cluster. But actually, in my opinion, Kubernetes has already built a pretty advanced and major abstraction in its own framework. For instance, when you use Apache Ignite deployment, you can use the same Kubernetes APIs if you want to scale out your cluster, or if you want to shrink the size of your cluster, depending on your workloads and depending on the memory consumption and other characteristics. So for instance, in a couple of minutes, we are going to start our first Apache Ignite cluster in Kubernetes using MiniCube. That cluster will consist just of two cluster nodes. But then, if we use, we can use this well-known kubectl scale command to scale out our cluster. And you don't need to know anything about Ignite internals. You don't need to know, don't need to use any management facilities provided by Ignite. If your goal is just to scale out the cluster, you can use all the knowledge about Kubernetes you already have. So that's all about theoretical part. So now let me quickly show you how we can deploy our cluster. Okay, here is my window. I've started the MiniCube environment. And first I want to start, as we already know, now we need to start Apache Ignite service, right? Kubernetes service that is going to provide us all the IP addresses. So presently, we don't have the service deployed, but I have a configuration of the service. You have already seen it on the previous slides, but let me show it to you one more time. Again, so it's just simple Kubernetes service. And the essential thing about it is this service again is going to track IP addresses of Ignite parts only. And here is, we just need to provide this label to this service. So let's quickly start it. Okay, this service is up and running, which is good. So then the next step is to deploy our first cluster in Kubernetes. For this purpose, we prepared deployment configuration. We are going to start two cluster nodes, it's enough. At least for my local laptop. And then I'm going to say that all the parts will be labeled with Ignite name, so that they're somehow related to that Ignite service. I'm going to use the latest version of Apache Ignite, Docker image, and here is interesting thing, that's Ignite configuration. So basically here is this configuration will be passed to Apache Ignite process when it's about to start. And inside of this configuration, we have one interesting thing that is related to our conversation. Here is that configuration, it's just available in GitHub. It contains nothing except for this Kubernetes API finder. So that's the only thing we need to provide in the configuration of our database nodes if you want to run them in Kubernetes cluster. And that's it. Then when we are going to start two first, when Kubernetes will be starting two first nodes using our deployment configuration, the nodes will use this API finder. This API finder will connect to our Ignite service that is already deployed in Kubernetes. And the service will be aware about the IP addresses that are assigned to these nodes and they will be able to interconnect and form a single cluster. So let's do it. So we are starting our first cluster. So now let's double check that we have, so we have Ignite cluster deployment over here. And let me check that the nodes, the paths are up and running. Okay, here is we have two Ignite cluster nodes or two Kubernetes paths. Let's connect, let's see the locks from one of them. I just want to be sure that they are actually belong to the same cluster. Okay, that's kind of Apache Ignite locks. We see that the node is started. And this topology snapshot says that we have two cluster machines and they kind of can use two gigabyte of Java heap and much more memory for the rest of the data. But the cluster is empty, so pretty simple. That's it. This is how you just can deploy your first distributed database by just providing the way of for auto discovery of your cluster machines. And now when you want to change the cluster size, again, you can use some facilities provided by a database vendor or you can use the functionality available in Kubernetes. And let me just quickly go to the slide and copy and paste this command. Here is I'm just going to scale out my cluster to five nodes just by using this command. Cubesetail, scale and number of replicas. Again, we are going to use the same deployment. And now if we check the number of ports, now we have five cluster nodes running in Kubernetes. And let's check the log files probably of the previous machine. It should be updated here. We connected to the log file of the previous machine and now we can see that there are five nodes running in our cluster. So what's the upshot of this presentation? So basically the deployment and maintenance of distributed databases is not that different from regular databases. You as an application developer or developer just need to provide a valid configuration for your distributed database. But the rest has to be supported by database vendor. Today I just explained you what we did specifically at the Apache Ignite community. We had our so-called pluggable and expandable networking component that allowed us just to provide the simplest implementation of Kubernetes IP flag are possible. And now kind of Apache Ignite users and customers can easily deploy Ignite cluster without limitation. And the same technique usually applied for other distributed databases. So I know that pretty the same techniques I used for Cassandra, for MongoDB, for Radis, so with no any difference. And then today we're not covering the applications. So with this type of deployment if you use when all the nodes are deployed inside of your Kubernetes environment, this type of IP flag implies that your applications will be deployed in Kubernetes too so that they can connect to Kubernetes to Ignite parts to the cluster using internal IP addresses. But anyway, so if you want to deploy your applications outside of the Kubernetes, there is also different tips and tricks on how you can do this with distributed databases with Ignite. You just need to use a bit different version of the IP finder or you just need to assign Ignite service for every Ignite part you have in a cluster so that every individual Ignite cluster node can be visible outside of your Kubernetes environment. So that's all and we have five minutes for your questions guys. Thanks. Any questions? So the question is, is there any volume used in this presentation? Today I just showed how to deploy Apache Ignite with a memory storage only. But if you want to enable the persistence, right, so you just need to provide volumes configuration. It's not that different. And but the specificity of distributed databases deployment is that usually you want to assign a specific volume to a specific cluster node so that if this node is restarted, it will own the same volume. This is pretty, it just requires you to provide a bit more configuration in your Ignite deployment file. It's also possible, it's just, you know, this is how I just decided to show and how to explain this to you using the simplest way possible to show you how we actually made how, what you as a kind of what a distributed database vendor has to do and the simplest thing just implement and provide some functionality for the networking component. But anyway, yes, you can rely on the stateful set to achieve the same if it suits more your needs. Yeah, yeah, I see. So the question is, so the question is basically what's the reason of running several cluster nodes on a single machine, right? So it usually kind of, I would say that in 90% of the deployments, at least Apache Ignite users dedicate an individual physical machine or VM machine that is in the cloud to Apache Ignite node process. But sometimes machines, I know that there are some of the deployments when there are, you know, dozens of different CPUs and they are running compute intensive computations and companies might run several Ignite nodes on the same hardware just to be able to utilize all the resources. At least this, that was true a couple of years ago. But nowadays, speaking about Apache Ignite, all the data, all the indexes are stored in the manageable memory region, so which is not visible to Java heap. So we will not get any stop the world poses. And actually the platform itself is tries to utilize all the resources you have. And basically all the time to talk about present days, I see, I couldn't say that I talk to any user customer who tries to launch several Ignite nodes on the single machine. But usually it's good for the development. Like I, as a developer, I just start my cluster on locally and I do it. And it's good for quality assurance because you can start, you can have a single Java process and you can start several Apache Ignite nodes in the same Java process. And this truly simplifies the testing cycles of your functionality. For instance, in the Apache Ignite community, we have thousands of different tests. And probably the majority of these tests start the cluster in a single JVM process just to be able to check some functionality, that the queries return consistent result, that the computations are executed in the same way. And because if we were doing it in a different way, when we were dedicating, let's say, if we would dedicate a separated machine for every node process, the testing cycles would be really, really long. I guess so, if you still have any questions, you can catch me over here. And again, guys, thanks for coming. Thanks for choosing this talk. Enjoy the rest of the day. Thank you.


What unites us is not some liberal order What unites us should unite us not does unite us, but should unite us a three ideas that came out of the Enlightenment three ideas that they're essential Essentially our Western civilization three ideas that are necessary necessary Maybe even sufficient to fight Islamism to fight Putin mystical Christianity to fight China and To fight our mystics at home our Christians at home reason individualism and political liberty in That order because reason everything flows from it reason individualism political liberty Those are the ideas that should unite us in the great civilization or struggle that we are facing and To the extent that we reject them as sadly iron her see early just did To the extent that the West says no no no my faith is better than your faith How do I know free speech is good? Well because it's a tradition


So here I want to show a little bit behind the scenes and Just show a little bit of how I make these films or how I edit them I should say and so I skipped through the editing itself because actually I don't do much editing at all I just put it into this iMovie thing and put kind of this soundtrack At the bottom and as you can see I just added this outro here, which is my usual outro And that's pretty much it. I do very little if any editing of the video itself Just maybe because I'm lazy anyway, and then I export it And Yeah, I export it from iMovie So I can then upload it up to YouTube as far as I know I can't do it directly from my movie although I haven't even checked. I'm really like low-key about this. I don't know much about it I haven't done any research or studies about this, but but yeah, and then so anyway Here's how I upload it to these are videos I recorded during my day in the life actually but I Figured I had some commentary now about it and just to kind of show you What I do and how I do it so as you can see I add a date in I And for some reason when I put at 4 a.m. It seems to work well I don't know why and then this is my standard description. I keep changing it, but this is the description that Appears automatically every time I have a new video and I can add on it But I keep changing the one that comes up automatically as well because I don't know why just to change it around I should be more consistent, I guess and here I have different tags that I can add and these tags They say you should you know do the maximum number of tags like 500 characters, but I rarely do that many I just you know type in stuff that comes into mind. I'll put in the title once and other tags that I think are relevant and I mean that's pretty much it. That's um, you know how I upload my video and So as you can see here you have July 4th holidays is from my video for July 3rd Which I did right before July 4th about working during the holidays And so I just apply a bunch of different tags that I think are applicable Here you can see I'm doing the date I usually do the date of it being uploaded because It's supposed to be better in terms of algorithms and stuff It shows that the video is from that day, you know, you know I'll do the video a day or two ahead of time. So usually when I upload and I'll be waiting I'll let myself explain to do Well, I try to schedule it for the right day and this is obviously July 3rd And oh, yeah, then I had it to a playlist. So this would follow under I guess business of translation Yeah, let's make it there and then Yeah, that seems you know, I find whatever fits best, I guess and then I try to add a sort of description I I always change if I do it on top. Sometimes I do it here or here in between the two stars thing I never know where it's best So anyway here, what do I want to say about this happy July 3rd? Just a video about What? Free Should be How free Should Should treat the holidays, I guess I don't really think just a video about how free that is to treat the holidays At least in my opinion Or I'll probably work a bit more on it later anyway, and then I just click publish that's pretty much it Oh, I add tags if I want to I kind of have fun with them sometimes I know something like how to get more client and stern holidays Weird tag that I'm using for no reason I Shouldn't do that, but I can't think of any tags right now I think I'm a bit self-conscious because I'm recording this anyway, and I usually come up with a better thumbnail than that you can usually pick one of these But let's say this one or else I just try to find one. Oh, there's a good website. I use actually called pixabay Where you can get some good images, so here if I put I don't know July 4th, maybe there's something There we go Except I'm putting this for July 3rd. I doubt that'll pop anything up though. You never know No, so stick to July 4th. Maybe I'll find something decent here I kind of just scroll through it see if anything like inspires me or catches my eye and can't really say this much here Though And they're all the standard 4th of July things I want something a bit, you know more different So there's another website that I like no pexels See if that one has anything worth it July 4th, so that's even less Those are sponsored so spacey besties. I'll have anything for July 3rd. I'm sure let's see maybe here celebration holiday or something, you know, I I really don't know if this sort of inspires me. I'll think about that one anyway So we go back here, and then I mean that's pretty much it I feel like I should write a bit more. Okay, just a video after that should holidays at least in my opinion All the days anywhere else you might be doing business I mean this video is similar to other ones. I've done in the past for other holidays But it's something that I think needs to be stressed here. I'll put July 4th. I might have put that or oh, yeah I did put that already. Okay, never mind And that's pretty much it publish this on July 3rd. Oh, I really don't know wait. I did find a different one Didn't I yeah here I use that where was I there we go Custom from now There we go and that's pretty much ready to publish now and that's pretty much what I go So I do 4 a.m. I'm not sure why it just seems I feel like I get quite a few views between four I guess there are people in Europe or Asia or something. I wonder where most of my viewers are I really don't check analytics nearly enough. But anyway, there you go. Oh saving draft. Okay. Once it's done saving There we go. Now I can publish there we go Done and done


Thanks for checking out this movie review video. So this is for the 2019 film blood quantum And I actually just hit shutter when I'm posting this review. It is the day. It's surprise hit shutter They didn't announce when it was gonna come out They had said in an email that they sent out saying surprise this film is up on shutter right now That they were planning on releasing it sometime in the summer But then they decided you know what we should just put it out right now as a quick surprise because It's very topical for kind of what's going on right now and based on that you would assume Oh, it's a zombie film because it's about infection and people being afraid of who's infected and all that type of stuff So very very topical for what's going on right now and there are a lot of things when you watch this where you're just like Yeah It's there's some kind of parallels right now unfortunately One of the funniest things in my opinion is the fact that there's a character in here Who's one of the people killing zombies whose name is Lysol? Lysol killing the virus infected zombies. I was just like that is perfect for what's going on right now, so But anyway, no spoilers on this one because you know, it's brand new it just hit shutter It's a shutter original and I encourage you to watch it because it is good. I did enjoy it One thing I do have to say though. I I don't think I would have it I enjoyed it as much as I could have just because I'm not huge on zombie films anymore There was a time period where I was good with zombies, but there have been so many zombie films so many zombie shows all that stuff I have been zombie to death years ago. So when zombie stuff comes out I typically don't want to watch it or I don't end up watching it But if I were into zombies, I would like this film even more than I think I do But that said I'm still gonna be very fair in my rating in this film and my you know breakdown of it So anyway, like I said, it's a shutter original written and directed by Jeff Barnaby Who did if the only other film he wrote and directed was rhymes for young ghouls So I don't know what you know what that was. This is a First Nations horror film Now if people don't know what First Nations stands for it's basically the equivalent of Native American in the United States It's indigenous peoples from Canada I'm familiar with that just because I've listened to a bunch of Canadian podcasts that kind of touch on the topics of First Nations life in Canada and how First Nations are very much at odds with police the with the the justice system and police force up there because of how life goes with reservations and kind of that you know racial divide basically and Some of those themes do show up in this film like definitely And there's kind of like this underlying tone of the issues of colonialism and what that sets you up for and trying to overcome that and There's a lot of like cultural tie-ins with the film that I think we're smartly done and I enjoyed that about the film So it's very cool that this was I think the first First Nations horror film or at least that I know of There's a second runner-up for the People's Choice at the Toronto International Film Festival last year when it was out there So plenty people are enjoying it There's text in the beginning of this that is actually really hard to read This is one of my small Problems with the film. It's one of those things where it's a black screen and then it has a bunch of text But the text is in dark red. I'm talking really dark red So I literally had to get up off my couch and get very very close to the screen in order to read it So they should have made that a lot lighter, but once again, that's kind of a small It's a small issue, but it's an issue There's a nice subtle signaling of things to come in the beginning of this, you know a lot of times there's this kind of foreshadowing of someone getting the idea that here comes a zombie issue and What form does that come in and a lot of times it's straight up somebody becomes a zombie this doesn't Doesn't do that. It's a way more subtle way of showing it But people who know it's a zombie film, which you will know going into it because the build is that You'll know that that's the indicator that here comes a problem And I enjoyed that it was a softer more subtle way of showing it. It was creative It was interesting and it was cool and I liked that about it quite a bit First thing that hit me with this film actually is that the well after the title the the issue of the black screen with a really dark lettering It looks really good. This film looks very slick. The directing is really good The cinematography looks really great. It looks really good in addition to that It has a really gritty feel to it has a really gritty look to it It's it's weird because because the cinematography and directing is so good and it looks so crisp and clean But it looks so gritty at the same time and that's obviously intentional because of the world They're trying to create with this kind of zombie issue Looks awesome. I yes, I really like it Jeff Barnaby as a director nice It was a pretty leisurely pace early on in the film Which honestly, I didn't mind because that had a lot of it looked really good So there was a lot to kind of look at you get your bearing for what the environments like that they're trying to set up So that's nice that said there are some times later in the film that are slow And you kind of wish they would have either edited some of that down or picked up the pace a little bit And then one of my biggest issues is in the very very end of the film I felt they really stretched the very very end-out way too long They should have cut that back quite a bit and actually I would argue that they should have cut The very last thing that happens in the film I think they should just cut that out entirely and had the thing that happens the act that happens before that Be the actual ending because I felt like he had even more of an impact So it was kind of like big impact thing and then another in big in big impact thing But that last big impact thing had less of a big impact than the one prior to it So I thought that that one would have been better to stop on as opposed to the other one because I just didn't think you needed it But people may feel differently about that. I'm sure either way. It's still good They paint a picture of people barely getting by Not just with a zombie situation prior to anyone knowing that there's a problem So this kind of gives a glimpse of the world they're creating on a reservation which this film was actually shot on two different reservations in the Quebec area, I believe and Yeah, so there's a pretty big focus on substance abuse in this actually and I didn't expect it to be as big of an issue because they start with substance abuse but the substance abuse actually carries throughout it, which I think is kind of a commentary of a cultural issue with substance abuse in particular within the context of this film But honestly every culture has substance abuse issues So, you know, it becomes pretty universal and you can accept it that way for sure because I mean a lot of people know people who have substance abuse issues in their life and They incorporate it in an interesting way within the film. So One of the people early on in this film This is not really a spoiler at all but one of the people early in the film is in a jail and how they got there is An interesting story and I like that they do a flashback to kind of show you that and it's funny And that's one of the other things I want to point out is there are some comedic moments in this that hit Like they they're comedic. They're supposed to be funny and they actually are funny and That is a big thumbs up for me But they don't go too over the top with comedy because it's not it feels like it's definitely not supposed to be fully comedy so it's the kind of Good writing where they can kind of pepper in some comedic moments throughout but you don't consider it a horror comedy and Those comedic moments don't detract from the overall feel of it and the seriousness of what's going on So good writing. There's some really good kill scenes in this some really good kill scenes And one of the things I appreciate a lot about it is when they have gore. They have gore blood Sprays there's lots of it. They're just pumping it out and those are the types of kills especially in Zombie movies that I do appreciate So I think their level of gore that they use in the practical effects really help with making it Feel fun at the same time as it feels impactful and scary and bleak and all of those things So it just becomes so much kind of rolled into one with this film There's a time-jump forward in this film that I actually did not see coming They tell you when that happens and you know comes up with a little title that says six months later So I didn't see it coming I like the fact that they did that because they were able to create a more interesting setting in a more interesting world at that point This it hit me as being very very inspired by the walking dead and one of the big reasons being How the walking dead kind of changed how we view horror movies in general going so deep And it becomes way more about the people and a lot less about the zombies because when the walking dead hit Everyone had this feeling of oh my gosh, you know the walking dead isn't even like having anything to do with zombies Really you could edit the zombies out and the drama and everything that drives the the comic book and then the show It's all still there and this film kind of feels like that in a sense It's like there's a zombie situation going on, but that's not what it's ultimately about So very walking dead-ish There's some dark comedy elements. I already talked about that There's a big focus on worrying about your offspring their health and future But also how you have impacted and shaped them good and bad and I'm not a father You know, I don't have any children. I don't plan on ever having any children. That's by choice but I Understand that that's something that really resonates with people especially when it's in film and I could see with the way That it's executed in this film that people were really It could really resonate with people who are parents So, you know, you can comment down there and let me know if you are a parent and you've seen this and it does resonate with you Because I can't speak to that just because I'm not a parent and I'm not gonna be one There are a few interesting scenes using animation Which I was very caught off guard when they first did that I was like oh, okay But it looks really cool like it looks awesome and understand Why they do it? It's kind of it's kind of weird that it's done very sparingly But once again when it's done, it just looks so good that you're just kind of like, okay You know, we just got this nice looking animation moment. It works. It makes me feel more artsy It's appropriately gritty like I was saying it's got this kind of like gritty looking feel to it It's very appropriate for what's going on with the story. It matches that There's a strong symbolic act at the very end. So I was talking about where I thought they should have ended it And at that moment you cannot help but find it moving to some degree I certainly did and that was a nice surprise a lot of horror films don't Impact me that way and this one really did. I really felt kind of moved by it You know, I didn't cry or anything like that But if I felt very moved by it and I thought that was really a nice touch it would that speaks to very good writing and very good Filmmaking and some good acting actually for the most part the acting with it is It's okay for an independent film But some of the acting really does hit at times and I kind of actually feel like as the film went on It like the acting got better and better and better. So by the end you were like, yeah There are some parts that are slow. Oh, yeah, I already talked about that that there are some parts that are slow And you really wanted them edited down The timing of this is definitely appropriate once you get to the end you will look back and just be like Yeah, I could see where some people are feeling like this at the moment, but let's not get out of control This plays a lot on the uncertainty of a future of the future. That's another thing that kind of you know ties in at the moment But it also kind of speaks to the issues of trying to get people on the same page Trying to come up with plans and get people to cooperate And it's like you see the people who are doing are not doing what they're supposed to be doing And you're like, why are you messing this up for the rest of us?  So yeah Since this is a First Nations film it comes from a perspective of having to worry about invasion of homeland Again, and that's one of the interesting things to think about when you watch this film and it really occurred to me I thought they conveyed it pretty well within the film of It's not from the typical Caucasian perspective of you know, here's a straightforward zombie film. We're just defending ourselves. We're holed up here You know, we're trying to stay alive There's an extra layer to it because it is kind of like another Invasion of your homeland being taken it again because it's already happened to these people. They have a history Rooted in having their land taken and and a zombie invasion is a second coming of that basically So it really works with that. So anyway, this isn't a perfect film You can tell it's definitely an independent film, but like I said, it there's a lot of pluses to it a few minuses but a lot of pluses overall with Potential five stars with half stars play with this. I'm gonna give it a solid three star rating I would recommend it. It is a good film if I was huge into zombie movies I don't know. Maybe I would have bumped it up to a three and a half I thought about going between three and three and a half. I was between those two ultimately. I went with the three But if I did quarters, I do the three point two five But anyway, everyone out there, please definitely check it out Put some comments down here when you have seen it or if you've already seen it Let's talk about it where your thoughts are on it and everything Do me a quick favor and hit that subscribe because that's your way to repay me if you like anything that I do With this channel. I'm not making money or anything and it literally takes you a second Do me that solid and then if you've already subscribed just hit that thumbs up to let me know you're still watching But regardless, thank you for taking your time and checking this out and until next time keep it brutal