from the Wynn Resort in Las Vegas. It's theCUBE, covering .NEXT Conference 2016. Brought to you by Nutanix. Now here are your hosts, Dave Vellante and Stu Miniman. We're back, this is theCUBE, SiliconANGLE Media's flagship production. We're here covering .NEXT. This is our second day of wall-to-wall production. Bob DeSauce here, he's the director of IT and Info, heads the Info Security Office at Hallmark Business Connections HBC. Bob, welcome back to theCUBE. Thanks, glad to be here. So, HBC, give us the update, tell us about what you guys do. Yeah, so we are the B2B arm of Hallmark cards that everyone knows and loves. Our focus is really around relationships and incentives. So we play in a couple different markets. There's a customer incentive program, there's an employee incentive program, there's wellness engagement programs, and what we do is we help clients who wish to execute against those things, those values, we help them put together programs. We do that through the use of traditional greeting cards, we do that through the use of gift cards, we have 350 merchant partners that we work with, and really it's pretty straightforward. It's, you want to incense some sort of behavior, we help you build that program and we help you execute against that. How long do the typical programs last, Bob?  It's the average program is three to five years, and it depends on the segment. The customer mass engagement ones can be single engagements or they could be multi-year engagements, but the wellness engagement and the employee recognition engagement, those tend to be longer relationships. Is that like as a service engagement or is it more of like a project with a beginning and an end? Is it? A little of both. You tend to see the waterfall approach used a great deal when it comes to implementing these projects, while the software platform that supports that is definitely developed in an agile methodology, the implementation of the programs tends to be elongated. They're somewhat complex. And in the business model, is it a ratable revenue, a subscription revenue, or is it? It's not, we're kind of looking at that as an option. Today it's a fixed fee. Right, okay. Typically we also claim a service fee if there's a transaction with a merchant. So that's interesting and that has implications. That investigation of a subscription-based model, you're talking about waterfall versus agile, has it real? The business model has implications as to how you develop, doesn't it? It absolutely does. And I think we're finally starting to have those conversations at the leadership level at HBC. We've got a relatively new president in place. We've got a new CIO in place. We're relatively new CFO in place and we're starting to get some traction around those conversations. We're starting to talk about doing business as a cloud provider. So we'll talk a little bit about the waterfall versus the agile and scrum methodology. I mean, this sort of hits the hot topic these days. People talk about DevOps and obviously, everybody wants the new shiny toy, but there's certainly places for waterfall with existing apps, existing processes. The tools work. You can't just jam scrum into that process, can you? Right, no, and we've actually tried that on a number of occasions. We've got a project management office that believes wholeheartedly in the agile development methodology. However, for example, our ERP implementation, they've been trying to turn that into an agile project for two years now and we continue to lose ground on that. So those kinds of projects tend to lend themselves well to waterfall. Again, those customer implementations I talk about where there's a lot of moving parts, there's complexity in how you configure each of those programs. That takes a lot of requirement gathering, a lot of VA and customer interaction. That lends itself well to waterfall. In contrast, when we develop the software products that we use to engage our customers, product we call Iris, that really is an iterative kind of thing. It was a, I guess it was a monolithic application for a long time, but with the new tools, with the new mindset around DevOps, they've started to build microservices. They've started to extract or abstract some of the front ends from the back ends. And so the logic is now abstracted from the presentation and those kinds of things, those definitely lend themselves well to iterative. Fail often, fail fast, those kinds of things. And we've learned a great deal doing that. And one of the reasons I was brought into HBC three years ago was that I do have experience both in infrastructure and software development. And we were doing what's popularly called DevOps long before it had a name. And it was really just a practical issue at that point. It was, how do you remove the constraints in the software development lifecycle value stream? And the number one constraint when the software development teams went agile was their inability to make an agile infrastructure. So I've got all this great code and I've got all this wonderful set of features and I want to put them out, but you can't give me a server. Well, we had to fix that. And so that was why I was brought in. And we started looking at ways to change the conversation between Dev and Ops. We brought in a couple of folks that were generalists and turned them loose with some of the new methodologies, tools. And we started having that conversation. And now we're starting to implement tools that are much more DevOps friendly, open source friendly. We're going to use a Git server for our file repository or source repository. We're going to be using Octopus for deployments. We're going to be using Puppet for orchestration. These are things that we weren't even talking about six months ago. So it's pretty exciting. So Bob, can you explain to us a little bit the interaction between kind of that DevOps tooling and the infrastructure you have? Because you talk at this show, Nutanix is more than VDI, but most of the applications that are deployed are, the same stuff that was sitting on your VMware sand, we just kind of move that over. So maybe if you can walk us through some of that. Sure. Well, originally when we brought Nutanix in, it was for a point solution. It was really about business analytics, business intelligence. And what we saw when we implemented that was that we had an opportunity to increase performance of a lot of our workloads. And we felt very confident in the infrastructure. And so we began the process of getting that vetted as our next generation data center. And so we've actually moved all of our customer facing critical workloads to Nutanix. We're not running that on any of the legacy infrastructure anymore. We're running some of the backend systems and things of that nature. I think though that one of the critical components, you mentioned we simply moved the workloads. And that's true in one sense, but it's also not true in the sense that while this was occurring in the infrastructure, we had software development occurring on the software. And we started to get these microservices. So these small micro apps that handle things like ordering of awards and redeeming awards. They now have their own micro app. While we still have the legacy backend systems, we now have a front end system that's much more agile and can play in that environment a little bit more. And so now the discussion has really turned around and we started to talk more about automation, orchestration and doing things through code. Which is, that's our next step. So the micro apps communicate to the backend through a distraction layer. That's right. The API that you guys developed. That's correct. The APIs are all developed in-house. That's awesome. Now when you describe the situation where the developers are running into a bottleneck because I need server, I need compute and I can't get it. How did you specifically solve that problem from an infrastructure perspective? Well I'm not sure that we've totally solved that problem. It's a process. I can tell you that when we deploy a server today, the process is more streamlined and we're less worried about capacity constraints than we were and so we have a better understanding about how to do it and we can do it in days rather than weeks. But so can you unpack that a little bit? Why, I mean, so how are you solving that problem? You're in the midst of solving it, but it's, everybody talks about infrastructure as code, but is it the developers who are provisioning now their own compute or is it still, I got to put in a request and the ops guys are much more agile? Yeah, I think it's the latter right now. We'd like to get to the point where we could do self-service. It's not realistic today, both in terms of a security and compliance standpoint as well as a capacity standpoint. We want to make sure we're managing the workflows. And again, I mentioned compliance. We have to have a segregation of duties. We've got sensitive data in those systems and so developers don't have access to those prod environments today. But what we have done is, I created this group. There's really just two people in it today that are focused on that DevOps value chain. Not to say they're DevOps people, it's just that they're focused on those ideals and they're integrated with our development team, even though they're on the operations team. And so they're bringing a better understanding about both sides' needs and so the dialogue is occurring and I think if nothing else, it's the dialogue and the collaboration that's driven the efficiencies that we're seeing. Now I think the next step in the evolution is going to be the automation through code. Infrastructure as code is something we're talking about a lot now. We're looking at Puppet to start kickstarting us in that direction. I'm not sure we know what to do with it yet, so we're still trying to figure that out, but we're bringing the tools in, we're having the discussions and we've got people focused on it, so we're going to figure it out. So what I'm trying to get to is Stu, you can help me with this, so you've seen the ads, right? We've seen them, it says you need VMware, you want Amazon, and then the answer is Nutanix, right? So we've been talking all week about mimicking cloud-like function and is it possible with this platform? I think it is. I'm not sure that I need a whole AWS platform in my house, but there are aspects of it that are important to us, and I think overall the idea is very exciting. Particularly for someone like me, I'm asked at the leadership level, why shouldn't we go to an AWS, right? It's OpEx, it's predictable, it's scalable, then I put my information security hat on, and I'm like, but I don't want that out there in the cloud, I want that in my data center where I can protect it. And so Nutanix offers us a balance there. It allows us to do a lot of the same things in the cloud way, and eventually we'll get to do more and more of those as the software kind of falls in line with this idea of the infrastructure. Well, it's interesting, I've looked back a few years ago, we go to Amazon re-invent, it's all developers that were there, and they're starting to do more to the enterprise and talk to more. I mean this show, you're the first conversation I've had on kind of the developer stuff in the week so far, not to say that there's not others doing it, I know you had a panel you were on, but you talk about that Amazon experience being ready for that modernization. The developers, how much do they know about it, care about it, does it just make the infrastructure invisible so that they don't need to worry about it? I think there's two camps. I think at HBC, there are the junior developers who kind of want to focus on just writing the code, and then there are those that are true software engineers, those have been doing this for a while, they're hungry for that knowledge. We've got a couple of architects that are very, very eager to learn more about the infrastructure, and so that's why we put these two folks from the operations group with them so that they can grow together, and so you've got the two folks in operations learning a bit more about development, and you've got the two architects in development learning a lot more about infrastructure, and they're picking the tool set together, they're building the processes together, and we're kind of vetting it as an enterprise architecture group, but the reality is the practitioners are developing what we're going to be doing in the coming years. Okay, so you've also got security under your peer view. I do. Part of the discussion about DevOps, and you'll be doing continuous integration, continuous deployment, in theory there should be a match because security, one of the worst things you can have is have old code in there and there's all sorts of vulnerabilities, so can you walk us through how DevOps is impacting security and what is the Nutanix angle there? Yeah, so there's this new term I've been seeing lately, DevSecOps, and I kind of like it. That's new to me, but. Well, I have been reading it in some of the blogs lately and I've kind of co-opted it, and the idea is that security can be treated exactly the same as any other type of infrastructure or code. We're using a tool called FXCOP to do static code analysis, part of its job is to look for security vulnerabilities, to check to make sure style guides are being followed and those kinds of things, and if you automate that along with your regression tests and your integration tests, and eventually you automate that into your builds, then you should have a certain amount of reassurance that what you're deploying is safe. Now I'm not sure we're there yet, but conceptually I think it's there. I think where Nutanix is going to help us there is through partnerships they have with companies like Alumeo and V-Armor that are going to help us remove some of the physical security appliances that we currently have and turn them into virtual rule sets, for example, and as long as you can script within those rule sets, those policies that you build, I think you're going to be reassured that what you deploy is going to be secure, it's going to be safe, and it's going to be effective for the customer. Bob, can you clarify your comments on the public cloud, you know, Amazon, and you said you thought about putting your security hat on, and I'm inferring that you're saying, well, I can control security in my four walls, and I'm nervous, but I want to understand your perspective. Yeah, I'm not entirely sure that I can control it, control is just an illusion. I actually think that Amazon and Microsoft do a wonderful job of securing those platforms. You know, it's really more about the trust conversation I have with clients and partners. They just feel more safe and secure knowing that their data is in our data center and it's well known where it is and how it's classified. When you put something in a public cloud infrastructure, you're not always sure exactly where it physically lives, and that's a problem for some of those folks. So you're saying your organization, you can deal with the sales objection more easily. I think that's right. And that's a business decision that you're making. It really is. All right, we'll give you the final word, Bob. Dot next, 2016, what are some of the takeaways, some of the things that you've learned when you go back and talk to your colleagues? Yeah, so I mean, it's always about the people for me, right, you get to meet lots of great people here. I'm learning about the great partnerships that Nutanix have cultivated over the last couple of years since we've been customers. I'm particularly interested in where security's going with this type of platform. And I'm loving what I'm hearing in terms of really creating that full featured platform that the folks at Nutanix were promising when I first signed up. It's happening, I'm excited about it and I can't wait to get back to using it. That's great. Well, Bob, thanks very much for coming on theCUBE. Thanks for having me. I'm Bob Lovops in Infrastructure, where this really appreciate it. All right. All right, keep it right there, everybody will be back with our next guest right after. This is theCUBE, we're live from the win in Las Vegas, right back.


Welcome to another episode in the 23 Michael Jordan videos in 23 days over the course of December I hope you guys have been enjoying the videos thus far today We are looking at Vernon Maxwell mad Max as they used to call him and Michael Jordan and the stories that happened when they played against each Other plenty of fights plenty of trash talk and he also asked for his autograph after the game Which is one of the funniest stories, which is in this video So I hope you guys enjoy the video the one thing that I would love as these videos take a long long long time to edit is that if you Could please hit that like button let's aim for 5,000 likes for the next episode tomorrow Be sure to hit that subscribe button and hit that notification button so you are notified when a new episode releases There's also a playlist on the top right of your screen and in the description box down below and all footage credits are on the Screen right now and also in the description if you want to watch them in their entirety I don't want to keep you guys waiting. So welcome to the video I've heard that You you've you've got a few stories about Jordan being on the court with him did Did you go at him harder than other players? Who's it like when it gets MJ man? What's the hard bar for you? Oh man easy my Mike by far Man, it was just relentless man. Did he elevate your game at all? I mean being on the court with him Probably on the defensive end.  What was going through your head when you saw MJ coming up on the schedule?  It's sleepless nights, man.  I don't know how to stop coming at you. Just keep calm Keep that damn foot on your throat man, and he just keep coming. I mean so we had a lot of trash talk It was epic man. I mean we had some great plat. I like to think that when you went Great teams like that and you play other good great players helps you. Oh, definitely You're not so and two for the star struck part of it You know you just said when you play Mike, you can't sleep the next night You're still looking forward to playing whoever you're playing against but that you know that I don't want to call it nervous But could you ready that nervousness before tonight kind of subside when we want a seven-game losing streak? We were a seven-game losing streak and Rudy T comes into the locker room And we have this team meeting and he and he's starting to meet but he's on me for the first half an hour He's not saying anybody else is playing poorly and Vernon gets something else.  I was like that guy has my back His personality was so different off the court sometime that it was on the court And he was the only guy when we played Chicago We have success actually against the Bulls in the regular season. We only played in regular season But we have some success because he tried to fight Michael Jordan every time a player is talented as he was unpredictable Who is Bruno Maxwell? They called me Mad Max He'd take a challenge he was by my credit and we were playing Chicago for the first time and I've never heard two guys Call someone a black MF as much as very Lock room for the game.  You got to be a little different.    I ain't laid off the ball. Now one goddamn time.    You really need to watch MJ and Vernon. They didn't mess with Vernon They would they would attempt to mess with Vernon. However, Vernon would follow through on the act So a Vernon said I'm going to hit you.   What was you doing?   Here's Jordan against Maxwell to the rack Come on Oh, I should try to run by my head there everybody.  They come up behind you. You know, Michael He's some fun.   He's got Zips and Zags and fires it up there Michael Jordan starting to come to life Offensively he's got 28 Michael Jordan Bails him out with the outside jumper He's got 32 and every game he tried to fight Michael and Michael, you know It's tough monitor is it really didn't get under until one day after every fight He would bring his son in afterwards to get his autograph So Michael says something wrong with this guy. Can you like he fights me every day and then fight out They brings a son in we're an air old your air Jordan He's not right I think with me and Mike when we used to play against each other He used to like he's supposed to me up all the time because I'm six four and Shit, and I was like have as I ever been in my life.    He's a dog. He was that's what it was gill. He was just a dog man I mean everybody thank Michael man that he was a dog man. I'm Nasty as hell. There are a lot of dudes who are really good players, right?  Yeah, they test you early And if you don't put if you don't stand up to that shit, it's a wrap.  Yeah, I'm bad boy.  Oh my goodness. They just leave long like Jesus. I knew it was gonna be a task and It was gonna be tough But Mike is Mike man the best player ever man. I haven't played because I never I Never thought I'd see nothing like that And I hope you guys enjoyed the video if you did please help me out by hitting that like button Let's aim for 5000 likes for the next episode here are two Michael Jordan videos I think you will also enjoy and I will catch you guys tomorrow. Take care


It's LinkedIn Learning author Monica Wahee with today's data science makeover. Watch while Monica Wahee demonstrates making a dumbbell plot in R. Hi everyone! In today's data science makeover we are going to make a dumbbell plot and we are going to do it for a specific purpose and that is comparing ranks on various dimensions between two experimental units. I was writing this book chapter with my forever intern Natasha when I wanted to compare two items on multiple dimensions. I really didn't know how to show it and that's when I found this dumbbell plot. So to give you an easy to grasp example I went to ratemyprofessors.com and I found that they had rated colleges on several dimensions. I took the ratings for Harvard and the ratings for my alma mater the University of Minnesota and put them here on my blog post about this topic. See these different dimensions the schools are rated on, location, reputation, internet, food, but which school is better. In other words how do you visualize this in a way to make it easier for you to make a decision about which one to choose when you have so many dimensions. That's what I'm going to show you how to do with this dumbbell plot in R. So before we make a plot out of these values it's best if we make a data frame. It's so easy to assemble data frames in R and you can do it many different ways. It's kind of like building with Legos. When I have data like we do today where the entity and attributes are obvious, two colleges and then all these attributes, I like to make a bunch of vectors, one to represent each column in my data frame and then I use the C bind command to column bind them together. I'll show you. See these vectors I'm making? The first is called order and just has a sequence in it. You will see it is ordered from 12 down to 1. I use that column to order the dumbbells in my plot. So I admit this was added later after I fussed with the plot, but then I can show you how I used it in my code. The second vector is called car for characteristic and has a characteristic label, quality, reputation, etc. Only there were mysteriously two quality metrics for some reason. There was a quality metric on the landing page for the college and then a different one with a different value that you could find actually reading the different attributes on the page. Weird, huh? They must be calculating each one differently so I just solved it by including both. Then the next two vectors are U of M scores for University of Minnesota scores and HVD scores for Harvard scores. The important thing about my trick to making a data frame is that all the vectors have to be the same length. Okay, here is the line where I use the as data frame command with C bind to bind order, car, U of M scores and HVD scores into one data frame called web page scores. Let's highlight and run this code to make our data frame. Okay, but one problem with my way of making a data frame is that I don't take the time to tell our what class I want each of the variables. We are going to be using a dumbbell plot of U of M scores and HVD scores, so they better be numeric, but are they? Probably not the way I made my data frame. Let's run this class statement on the U of M scores to C. C character. So let's convert these to numeric. This is where recovered SAS users like myself rejoice. It is so, so, so easy to convert a variable from character to numeric in R. See this? I just decided to convert all my numeric variables into variables with the same name just followed by underscore N. And all I have to do on the right side of the equation is use the as numeric command. It works like a dream. Now, if I had a real character in there like the letter A or more appropriately the letter R, it wouldn't be so happy about the conversion. But if it can convert everything, it does so without complaining. Let's run this conversion code. Okay, now we have to designate our colors, which was a problem because the U of M has golden maroon. And since gold doesn't show up very well, I wanted to use maroon. But Harvard uses so-called crimson, which looks like maroon. So I ended up making the U of M blue, so you'd remember it since Minnesota is cold and blue. Cold air, warm hearts. Here's another thing for you recovering SAS users. The color library in R is as big as the hexadecimal color library. Some of you R users might be used to seeing actual color names in here, like pink and gold as I demonstrated in my box plot video. But you can use hexadecimal colors. If you take these color codes out on the internet to a hexadecimal color picker, it will decode them to some sort of blue for the U of M and I guess crimson for Harvard. And see how I just set a variable to the color name? I called the variables U of M N underscore call and HVD underscore call. That's a good thing to do, because then you just call the variable in your plot. And if you don't like the colors, you can fuss around with the colors up here where you set the variables to get what you want. All right, let's make these variables. Okay, now we are getting ready to make the actual plot. Here are the libraries you need, ggplot2, ggalt, and tidyverse. ggalt was new to me. So I want to give a shout out to Conor Rothschild's blog post on how to create dumbbell plots for a different purpose, visualizing group differences that helped me develop my use case. Please visit his blog post. I'll put a link to it in the description. Let's run these libraries to load them. Okay, the first thing I have to admit to you is that I clued the legend. I made it by hand, and that's not the first time I have done this with ggplot2 code, because that's basically what we are doing here, ggplot2. I'm a practical data scientist. If I fight with the plot long enough, I get tired of fighting and just clued it. It's a plot. It's a display. It's not like I'm making fake data. So that's my defense. But if anyone out there can get the legend to automatically show up the way I clued it, please put it in the comments. If I see any good ones, I'll make a follow-up video and show you an example of how to do it right. Is it a deal? But first, let me walk you through the ggplot2 code. We start by just declaring ggplot2 on the first line and not giving it any arguments. Then, as you can see by my nicely formatted code, we form basically two things, geome underscore segments and geome underscore dumbbells.  Those are the dumbbell shapes that appear across the finished plot. So what is this geome underscore segment? Well, that's actually the key to making this plot look good. Let me just run the ggplot and geome underscore segment code before the plus and show you what it's doing. See, we have a blank plot. On the y-axis, we have the different attributes of the school. Remember that order variable I made? That's how I got these to be in the same order as the original display I showed you on my block. You'll also see the Likert scale they use across the bottom. The labels don't look good, but there's still more work to be done on this plot. But that geome underscore segment is really necessary to lay down before you put the dumbbells down so that they look right. Let's go back to our code. See this geome underscore segment code? You'll see the main arguments are y, yend, meaning yend, and then also x and zend, meaning xend. I like to pronounce them yend and zend, but for you I will call them yend and xend. And you'll see I hard-coded x and xend, and I use that order variable, well, technically the converted order underscore n variable, to keep the y entries in order. Now let's make our dumbbells. Okay, and here you again see me using the order underscore n variable to reorder everything, but this time I'm working with x and xend only.  You'll see I set the color of the dumbbell to black, but at the end of the code we have color underscore x set to the u of m color, and color underscore xend set to the Harvard color. You'll see I use the British spelling of color because I copied Connor's code and he used the British spelling. R seems to support many different Englishes, I've noticed. Okay, then the last thing we do in the upper part of this DG plot code is add a y label and an x label. Let's run this dumbbell plot without the legend code at the bottom and take a look at it. I'm remembering the reason I did not start the x-axis at one was because I had trouble seeing the difference in some of the dots, so I started it at two instead. Still, you will see by this plot that the schools are rated very similarly. Now, this comparison was for a reason. If you have residency in Minnesota, you can pay $10,000 per year for full-time tuition at the University of Minnesota. I don't know how much Harvard costs, but I've been told it's like at least $50,000 per year. And remember, I was trained at the University of Minnesota and a lot of disgraced people in politics are trained at Harvard. And look, almost all the blue Minnesota dots are to the right of the Harvard dots. Really, from the set of ratings from students, it looks like Minnesota is a better deal. And I pretty much agree with the ratings, although I disagree with this food rating. The Indian food here in Boston is terrible. I can't take my dad anywhere to eat. The Indian food in Minnesota, awesome. And the Bun Moc duck to die for. Try Bonaventamese over in Stadium Village. You'll love it. Okay, so I didn't solve my lack of legend problem in a conventional manner. Let's look at what I did. So here, this is the same GG plot 2 code with just a comment separating it here. You will see I just drew a geom underscore rect for a rectangle, and then I used annotate to write in all the points and texts I wanted. You can make fun of me all you want, but I really love these artistic tools that GG plot 2 gives you to annotate your plot. And I really hate fighting with some sort of automated engine, trying to feed it the right code just to get it to make a rectangle, some texts and some dots. So now I'm going to highlight all the GG plot 2 code and run it and you'll see my Cluj's legend appear. Voila! See how this cute little legend is up in the left corner? It looks nice. No problems. No worries. Cute little thing. Oh, and one more thing. Here's a bonus for you. I started doing GG save at the end of my GG plot code where I want to export the plot automatically into pre-specified dimensions. You will see here that I can designate the name, tell it I want to talk in inches, and then tell it the width, height and dpi. It's great for exporting plots of a certain format. Thank you for watching this data science makeover with LinkedIn Learning author Monica Wahee. Remember to check out Monica's data science courses on LinkedIn Learning. Click on the link in the description. Thank you for watching this video. If you liked it, please hit the like button. Also, I invite you to look around my channel and if you like what you see, subscribe. I hope you are enjoying your data science journey. Peace.


Hey there folks, Rob here. Welcome back to the show. In the last episode I was showing off Polymer starter kit to one of our new Polymer CLI generators. Today, I thought it would be really cool to demonstrate how you can actually build your own generator for Polymer CLI. So follow me over here to my laptop and where we want to start is over here on the Yeoman website. A Polymer CLI generator under the hood is really just a Yeoman generator. And if you haven't heard of Yeoman before, it's a little utility for scaffolding out projects for you. So it'll stamp out your files. It'll do a little bit of variable substitution and renaming for you. And it's generally a very useful tool for just kind of like getting up and running with a nice boilerplate. So the first thing we're going to do is we're going to go over to our terminal and we're going to run npm. I'll bump this up a little bit so you can see it. npm install-g. So we're going to globally install Yo. Which is the command for Yeoman. And this thing called generator-generator. And that's actually a Yeoman generator that will generate Yeoman generators for you. So you can run that command. It'll take a second to install and then I'm going to go over to my desktop and I'm going to make a new directory and every Polymer CLI generator needs to start with the prefix generator-polymer-init. And then you can give it whatever name you want for your own generator. So I'm going to call this template seed. So it's a bit of a long name there, but that prefix is really important because that prefix gets picked up by Polymer CLI after you've installed the generator and and that's how it actually can tell you, hey, this is the thing that we want to init. So I'm going to make that directory I'm going to cd into generator-polymer-init template seed. Now I'm going to run Yo. And it'll give me a few options for things that I can generate. I've got a few other generators already installed, but the one I want is this one. That's just called generator. So I'll do that and it's going to ask me some questions. I'm just going to fly through here and just take all the defaults, right? Skip all that stuff and it'll take a second. It's going to stamp out a bunch of files for me. And it's also going to npm install all of the dependencies to make Yeoman run. So wait a moment for that to do its thing. npm install takes a very long time. All right. So we're done. We've installed all of our dependencies. And I'm going to open this up in my code editor. So over here in our code editor, I will I'm going to embiggen things a little bit so you can see it created a number of files for me. Package JSON, read me, bunch of stuff. The one that I really care about is this generators directory inside of here. It's got an app directory. It's got a templates directory, which right now contains this one file called dummy file.text. And then it's got this index.js file. So let's open that up. We'll look at the index.js file. There's a lot of JavaScript here, but most of this is stuff that you don't really need to worry too much about. Basically, there is a little section here at the top in this prompting function where it will sort of speak to the user in their terminal, ask them questions about the project that they are setting up. This is a good place for you to create variables that you can then use elsewhere in your templates. So for instance, right now, it's just got this default example prompt here. It's a confirm style prompt. So yes or no prompt. And it's going to ask you, you know, would you like to enable this option? Just sort of like made something up. In our case, what I want to do in our generator is I want to have like a kind of a default element that the user uses as sort of like the root of their application. So we'll change this to an input prompt. We're going to change the name of the variable to element name. The question is going to be, what would you like your root element to be called? And we're going to give it a default value of my dash element. So now we've got this element name property that's just available to us throughout the rest of our template. Now there's also this writing section. This is where it's going to copy all the files from this templates directory onto the user's computer. So in this case, you can see that it's copying that dummy text file from the template path and it's dumping it to the destination path, which is basically whichever directory the user is currently in. So what I want to do now is actually instead of just using this one dummy file, I want to have a few real project files. And I'm going to go over to Polymer Starter Kit and just steal a few things from here. So we know we want to Bower JSON. So I will open this file up. I'm going to grab its contents. And because this is like a pretty simplified generator, I'm just going to really slim this down. So I'll say the name of my project is just going to be, you know, my dash project. You know, authors are whoever. The dependencies, I'll just say right now that the only dependency is Polymer itself. Maybe this is like a really tiny generator to get people up and running really fast. So this is like the world's smallest Bower JSON file that we could have. So we've got that. Now let's also create an index HTML file. I always want to have one of those. Again, we'll go over to Polymer Starter Kit and maybe just steal the one that is over here. So we'll say, all right, give me the index file. Okay, dump that in here. I can actually remove some of these things that I don't care about as much. So I'm not, for instance, going to, maybe I'm not going to import a bunch of elements or anything like that. So let's see, we'll get rid of these critical styles. Maybe you don't care about those. The element name, we're actually going to ask for that name from the user. So instead of just having a hard-coded element name right here, we're going to use some of Yeoman's templating syntax. So it actually uses the sort of, the syntax kind of looks like this, where if you want to expand a variable, you say bracket percent sign equals, and then variable name, you know, whatever that is. And then you say percent sign, and then you close the bracket, right? So this is how you do variable expansion in Yeoman. What I'm going to do is dump that into this tag here. So I'll say, all right, I want this to be that element name that I'm going to prompt the user for, and then we're just going to close it and also say, hey, that should also be the element name. And we want to steal this and also use it for our import up here. So source directory, we're going to have whatever element name they want in there. Let's see, what else do we have here? We've got this little bit of JavaScript that is going to lazy load the Web Components polyfills, that's good. Normally we would be, you know, if you want to build a progress web app, you might ship a service worker to keep things really simple. I'm actually going to remove this little chunk right here. So we won't worry about service workers right now. We're just going to have like a super bare bones polymer app. Otherwise, I think we can leave pretty much everything in this file. We can get rid of this dummy file, don't need that. Get rid of that. The last thing we want to do is we want to create a source directory.  And the reason why I'm doing this is because remember, the element name is something that the user is going to pass into us as one of their prompts. And so we don't want to hard code a file name for that element. Instead, we're going to also take that file name and generate it based on the prompt that the user, the answer that the user provides to the prompt. So the contents of this element are going to be super simple. We're actually just going to grab some boilerplate code here and dump that in. And what we're doing is we're importing our components. We've got our element name, element name for the is property, element name for the value down here. So this is just sort of like a really, really basic polymer element. It doesn't really do anything. It just sort of like says the value of one property inside of an H2. The cool thing that we're going to do though is we're going to go back to that index.js file. Remember, this is the one where we prompt the user for the element name and we have this little writing block here. And I'm going to replace that writing function with a custom one that I created earlier. And I'll walk you through what's happening here. So inside of this writing function, we are taking the element name, which we got from our prompts. This is stored inside of this props variable here. So we're creating a reference to that. And then we're saying that we want to copy our template files over to the user's machine. We're using a regular expression here though to say, hey, anything that starts with an underscore, like that element HTML file that we just created, hold off, don't copy that just yet. Instead, just copy everything that doesn't have an underscore over to the user's computer. That's stuff that we're not going to worry about templating or anything like that. And then we're going to specifically tell it to copy that element HTML file from the template path and then to the destination, we're going to use an ES template literal string to actually generate that file name based on the element name property that the user passed in. So I think we've got pretty much everything we have or everything we need to test our generator. The next thing that we want to do is actually kind of like hook it up. Normally what you do is you would publish this generator to npm, a user would globally install it and then they could start using it using Polymer CLI. But before you do that, you probably want to test that the thing actually works, right? And so to do this, we can use a handy little npm command called npm link. So when I run this command, it's actually going to create a symbolic link on my system for this generator. It's as if I globally installed it, but really it's just linking to this directory on my file. So this is really, really useful anytime you're testing any npm library that you're working on. You can kind of pretend like you've got it installed on your computer, make local changes, and it will just update automatically. So now it's as if we globally installed it. So I can go over to my desktop now and bump this up a little bit. I'll make a new directory. I'll call it polyfoo, something like that. Just cd in here. And now I'm going to run polymer init. And we should now have this option down here for this template seed thing. Because remember it's taking that prefix, generator, polymer init. It's chopping that part off and it's just using the last part of our module name, which is template seed. Run this puppy. It's going to ask us some questions. Hey, what would you like your root element to be called? By default, it says my element.  Then it's going to copy that file over. It's going to run bower install and install polymer for us and our weapon opponents polyfills. So as that's running, see it looks like it's finished. Now we could open up this project and we can see over in our code editor that we have our index HTML file. We bump this up a little bit so you can see it. You can see that it is pulling in our my widget element. We've got my widget down here in index HTML. We've got my widget in the source directory. So the last thing really is just to run Polymer serve. We're going to cross our fingers and we're going to go over to localhost 8080 and we should see right there, boom. Hello, my widget, just as we were expecting it. That about covers it for today. I would encourage all of you, if you want to go start creating your own generators, put them up on GitHub, put them up on NPM, ping me, let me know when you create them. I definitely want to share them out to the world and get as many people building these cool CLI templates as possible. If you have any questions for me, as always, you can leave them down in the comments or ping me on a social network of your choosing at hashtag as Polymer. As always, thank you so much for watching. I'll see you next time.


Hello and welcome to daily debrief brought to you by People's Dispatch. I'm Pragya. Today we discuss the first China Arab Summit which is ongoing in Saudi Arabia. China and the Gulf Cooperation Council are also meeting. We'll bring you the relevant aspects of these discussions on this show. Next we've had enough that's the message from primary healthcare doctors in Madrid, Spain and finally the International Olympics Committee has said it won't lift sanctions on Russian and Belarusian athletes. High-level discussions are on between visiting Chinese President Xi Jinping and leaders of the GCC in Riyadh, Saudi Arabia.  Xi's overtures to the Arab world are being seen as a significant intervention in shaping the region's orientation in the coming days. We'll go straight over to Abdul from People's Dispatch who's here with us to discuss what's happening there. So, Abdul, what are the main points of this discussion? Well, there are many things. First, the meeting, three days meeting, two and a half days meeting is divided into two basic parts. One is a bilateral emphasis on bilateral relations between Saudi Arabia and China and they have already signed various deals worth around 30 billion dollars which basically expands from Belt and Road Initiative to the technology to cooperation in the fields of infrastructure, development and so on and so forth. It is a fact that the Saudi Arabia is trying to diversify its economy and investing away from the oil and gas fields which is basically the traditional dominant economic areas in Saudi Arabia and they are looking towards China to basically invest and provide other kind of support there. So, that is one part of this particular visit in the Arab world. The other is a very significant move of two different summits. One, specifically with Gulf Cooperation Council, the members of the Gulf Cooperation Council as a whole, they create the largest trading block with China. GCC and China are basically already involved in a huge bilateral trade but there is an attempt made to make it even bigger while there are discussions on creating a free trade agreement between the GCC and China. So, that is one part. Apart from that, there is an attempt by China to create a strategic relationship between GCC as a whole and China. So, that is one. As far as the summit between the Arab countries and China is concerned, they are primarily looking towards expanding the existing cooperation in areas such as built-in root cooperation, sorry, initiative, global development initiative, global security initiative. These are the different terms used by Chinese. These are the different kinds of large scale programs devised by the Chinese to create a global cooperation network with the developing countries all across the world. As for the Chinese perspective, Arab world is a very significant area where there is a huge prospect of creating strong and deeper roots of bilateral and multilateral relationships. Right. So, such a big diplomatic initiative. What would be the significance beyond the trade ties that they are trying to talk about? Well, there are many geo-strategic and geopolitical aspects of these different summits which are ongoing there. Particularly given the fact that in the last few months or maybe years, we have seen a realignment in the region when it comes to the global politics. Earlier this year, when Biden visited Saudi Arabia, there was an objective of kind of reducing, preventing OPEC to not reduce the overall oil production. We noticed that the Saudis did not give much importance to what the US was willing to. I was asking to. Given then there are other indications in which it is quite visible that the overall Arab countries are not very happy with the US attempts to constantly intervene. The US is involved in wars in Syria, US is involved in war in Yemen. It was involved in the war in Iraq. It has military presence and there is a constant talk about how US has used its influence, economic power and military power in the region to create conflicts, to kind of add to prolong the conflicts and has not been able to achieve any development when it comes to the core areas of conflict in Palestine and in other areas. So given the larger and also economically the investment which the Arab countries have been looking for from US and its European allies has not materialized. In that particular context, given the fact that China is an economic emerging power and it is emerging as the second largest economy and it is much more willing to invest in developing countries, there is some kind of vibe to shift towards orientation shift towards look east policies. So most of the Arab countries are trying to diversify their sources of investment and reduce their dependence on the United States and China, they see China as an alternative. So in that particular context, this summit is very significant and it may have, we are not sure about it but it may have a larger impact on the regional reorientation and the change in the global dynamics as well. Right, Abdul. Thanks a lot for joining us with that update. Thousands of health workers have been protesting in Madrid since November 21. Doctors working in primary healthcare have joined these protesters. They say longer working hours in public health translate into poor quality of healthcare. They say Madrid spends much less on health services than the rest of Spain. The strikers say it is not just about wages but recruitment across levels. They're warning that private healthcare cannot substitute underfunded public healthcare and they say that working conditions are at their worst state today, worse than even during the COVID-19 pandemic. Anna from People's Dismatch has been following the strike and she's here to tell us what the problems and demands are. Anna, thank you so much for joining us. Anna, what seems to be happening in Madrid seems to be a very, very important strike. The doctors have joined the healthcare workers in their protest. Can you just give us the reasons for the protest and also some of the reactions? What have been the responses? So, yes, you're quite right. This is something that actually has been building up for a couple of months now. We can say one of the major events that happened was on November 15 when thousands of people in Madrid protested against a reform of emergency services and in protection of universal and public healthcare. And so one week after that, so on November 21, doctors in primary healthcare, so family physicians and pediatricians in particular, launched a strike, an open-ended strike in order to warn about the worsening working conditions that they were facing because of lack of investment in this part of healthcare and also to advocate for improvements to be made to the system. So this is a strike that's now finishing its third week. There are no signs that it's going to end, so it's something that's really, you know, the doctors are quite stubborn and they're quite decisive in the actions that they're doing. So it's something that will be interesting to follow in the weeks to follow as well. And so as I said, the reasons behind both the protests and the strike are quite interesting because if we look at the healthcare system in Spain, Madrid is one of the richest regions in the country, yet it's one that invests less in healthcare than any other part of the country. And this is particularly true for primary healthcare, which we know is very important because, you know, it's the first point of contact that people have with the healthcare system. And according to the doctors who are on strike, Madrid only invests in the primary healthcare system a bit more than 10% of the overall health budget, which is very, very low. It's low even in comparison to other regions in Spain, where that mean is closer to 14%. And 14% is in itself not too much. And the 14% has been raised as an issue during a campaign on International Health Day or People's Health Day just this year. So activists and health workers have advocated for municipalities and regions to raise the investment in primary healthcare at least to 25%. So Anna, what's actually very curious about this is that when there is a region which already is spending the least compared to other the mean of the other regions, then why is it seems that, in fact, the funding is also the sticking point in the negotiations. And the other thing that we noticed was that the protesters are saying that, look, this is not just about wages. We want more recruitment. Can you just explain some of these aspects? Yes. So again, you're absolutely correct, you know, and it's something that we have seen in strikes by health workers, not only in Spain, but in other parts of the world. So one key issue that health workers are stressing when they go on strike is that they're striking not for themselves, they're striking for their patients, they're striking for public health systems, which can cope with the needs of people who are coming there. And so this is one of the spins that the governments who are not pro worker oriented usually do is that they say that the workers are only only interested in their own interests and that by striking, they actually are putting their patients patients in danger. So it's according to the reports, according to the impressions by the workers in Madrid now, this might not have been so much the case in this instance. But it is true that the government, the regional government in Madrid, which is right wing and which has been in power for several years now, has tried to spin the story about the strike in another direction. So it's saying that, you know, while they don't want to actually negotiate about the funds that the primary health care system needs, they're saying that it's a political strike, that it's a strike which was orchestrated to damage them before the local election comes next year. So this is something that they're also seeing on the ground. And which is of course also a depiction of how the local government feels about health care. It's a political decision, of course, not to invest in health. It's something that, you know, it damages the public health system. And it prioritizes, it gives us a lot of space to private to the private sector. And this is something that we know it's true in Madrid, where the regional president Isabel Diaz, so she has made several statements, and she has actually made several steps which essentially put the private sector over the public. It's not a surprise. Therefore, that the local government doesn't actually want to do much. At least they don't want to take any concrete steps in this negotiations. And so the negotiations at the moment are quite stalled. It's not quite certain what's going to happen in the next days. There have been reports that the government has offered the physicians some things. So for example, one of their grievances is about the number of people they see each day. Because it's a very high number, they're not able to dedicate more than a couple of minutes to each patient. And so allegedly, the government is saying, okay, so we'll cap the number.  But at the same time, they're not making sure to explain what's going to happen to the other people, because it's not that, you know, the people just go to the doctor because they want to have fun. They actually need the doctor. So if you cap the number, where are the rest of people going to go? And that's something that the physicians also want to, you know, for the government to address. It's not only about making empty promises. It's also about showing that there's a material base for implementing the things that they're saying they want to do. Right, Anna. Thanks a lot for that update. Thanks. International Olympics Committee Chief Thomas Bach has said it will stick to excluding Russia and Belarus. The IOC's ban had kicked in after the Russia-Ukrainian War began in February. Does it mean these countries are excluded from the qualifying process for the 2024 Paris Olympics? But Bach has also said that the IOC will try to find ways to fulfill what he called the unifying mission of sports. What could this mean? We asked Siddhan Dane. All right, Siddhan, thanks for joining us. Siddhan, what has the IOC actually said? There's a statement which according to the IOC Chief, the teams should be banned, but the players should be included. Is this actually something feasible? Yeah, so there is a precedent to it, Pragya, at the Olympics for sure. For example, it happened in the case of Indian athletes as well, when the Indian Olympic Association was actually banned because of misgovernance issues or interference, third-party interference. So at the Winter Olympics, where Shiva Keshavan, who was a multiple-time Olympian, was participating, in fact, the Indian flag was not on Florida or hoisted at the Games Village until they were midway through the event itself, when the ban was kind of rescinded and then that whole ceremony took place and then they were allowed to compete under the national flag. So there is a precedent in the Olympics for athletes whose Olympic associations are banned to compete at the Games under the flag of just the Olympic flag. So the credit for their medals, etc., etc., doesn't go to the country, but the athletes themselves are allowed to compete. But the issue here is far bigger than that because the sanctions on Russian as well as Belarusian athletes extend much further than just the Olympic Committee. So according to the IOC and the instructions that it has given to the various international sports federations, athletes from Russia and Belarus will not be allowed to participate in events at all, which means their qualification for the Olympics itself is in jeopardy or is in doubt at the very least. There are, of course, there's over a year left for the Paris Olympic Games, but this is the year, it'll be a crucial year, 2013, 2023, sorry, when a lot of qualifying events will take place for, there are 32 different sports that are going to be held in Paris, over 10,000 athletes will compete, 50% men, 50% women. So over the next year, we'll know exactly who is competing and who is not. And as of now, the IOC had its executive board meeting yesterday was, I think, the last day at Lausanne, where it said quarters are in Switzerland. And as of now, they said they had extremely deep and detailed discussions on the subject, but they unanimously feel that this is not the time to be lifting the sanctions that have been imposed on both these countries. Actually, this has been a subject of much debate even earlier. And I think there's been some kind of a sanction imposed, a sort of penalty imposed on one of the boards or associations which tried to ban Russian and Belarusian authorities. Yeah, it's a bit confusing actually what's going on in various different sports. Tennis, for example, has taken a stand where individual athletes from these two nations were not allowed to participate. Now, while the Olympic Olympic Association itself has imposed these sanctions on Russia and Belarus, at the same time, they have come out against the tennis tours or Wimbledon in particular, saying, you know, there's no reason or it's not fair for you to have excluded these athletes from participating. So I think it's a question of who is actually in charge in terms of running or who are the powerful parties that are running each of these federations. And I think we can see where the strengths lie more with Western Europe and those parts of the world. In those cases, the voices or the vocalizing of this Russia ban cause has been the loudest. Sebastian Koh, for example, the British athlete who heads World Athletics at the moment, he simplified the situation by saying, you know, it's quite simple, get out of Ukraine and you get to play. Unfortunately, I think the scenario on the ground in Ukraine is far more complex than just that. And while the Olympics might be a major factor in the world, I don't know how much it will determine the wider decision making process with regards to Russia's operations in Ukraine and of course, how the wider political scenario unfolds as well. That means how long the war continues and what the IOC decides next. The IOC also has made it clear that at this point they do not want to make any kind of firm comment on Russia or Belarus's participation at the Olympics itself, because there is still a lot of time and like the spokesperson has said, the situation is changing sometimes on a daily basis. So they will, you know, they'll give it some time, see how things go and then probably come to a decision much closer to the date. Right, Sadan, thanks a lot for joining us. Many thanks. And that's all we have for you today. Thank you for watching Daily Debrief. We look forward to seeing you again tomorrow. You will find more set stories on our website peoplesdispatch.org and you can find us on Facebook, Twitter and Instagram.


Can you tell me your funniest moment for making the movie? Oh, there's so many. God, we had a lot of fun making this film. Yeah, yeah, yeah. We really did. Yeah, they were mostly at my expense. Yes. But, you know, a moment I do like that is rooted in truth is where Shalto goes to inject me with a microchip. And I have a fear of needles. And so the screaming you hear is probably real. Embarrassing. Embarrassing. And comes from a real place. Did you have to redo the squeal in different ways, different squeals, each time? We actually did, which was awful because Nash kept on saying, no, actually jab it into his. I was like, Nash, no. So yes, we did it more times than I was comfortable with. I will give you that. It's a bit of physical violence to make it a real. I was subjected to so much physical violence between rolling around in cars being injected by, you know, being punched, gun whipped. Oh, it's exhausting just thinking about it. I don't want to give anything away, but I get some interesting mail. We shot a scene where I get some interesting mail that might contain a body part in it. And I was super impressed by, for a second I thought that it was an actual body part. Yeah, and I definitely had a couple of reactions where Nash was like, that's too big. Have you seen this thing? Have you seen it? You need to take a look at this. I'm worried. So I've got to ask, you say some quite sexually explicit stuff. Did you stay in character for that? I had a rough time. Like, I mean, the first three days were hard for me. I found myself just, you know, profusely apologizing consistently to everybody around me and then crying my sleep, myself to sleep at night. I mean, there's some really despicable, this woman has a real bad case of verbal diarrhea and ignorance and narcissism. And then I finally, and then I just went, this is fun. Yeah, there came a point where she was just enjoying herself. Well, I realized that it was really good for the film when we kind of went to that extreme place, especially for your character to kind of see what the stakes, what you were up against. Big time, yeah, there were moments in the film where, again, you know, what I was getting, that sort of look of complete shock, that was based on what you were giving me. It's funny, you still have that look, though. Every time I went with you. It was a hard film to shoot and we did quite a lot of night stuff. And one morning at like 3.30 in the morning, we were chasing, it's kind of a scene with my character and David's character towards the end of the film. It's a critical scene in the film and we're really struggling with it. Like, we were just trying to get it right. We just kept playing with different ideas and found a really fun, kind of changed the whole shape of the scene. And it's probably one of my favorite scenes in the film. It's kind of David gets on his knees and starts a praying and asking God to help him and some crazy stuff that just wasn't planned in the script. And so that's one that really sticks with me. Like, there's nothing better than a feeling to be struggling and then land a beautiful moment like that. There's so many moments with David playing Harold, you know, doing his Nigerian prayer or being afraid of needles. Getting to watch Shaly's and my brother be despicable together was really fun. So you were both involved a bit with shootout scenes. Was there anything that kind of went wrong there? Was everything perfect as it should be? No, those things jam up. It's always, you know, it's amazing we even get those things done. They're long, very long and flipping cars and that's, you know... No, nothing goes as smooth as you think it does. But, you know, we just keep, get through it, you know? I had a couple of days to shoot that. When I'm, you know, doing any kind of action for a film, I usually go in and rehearse it with the stunt team and shoot it on a video camera and plan it out. And I want to know where it's going to go and what moments I want to cover. So, yeah, I have some semblance of planning and then other ideas happen on the day and so I kind of, you know, build it that way. And do the guns always, like, work properly? Like, shooting blanks? No, all kinds of things don't work when you're making a movie. You know, you're, you know, sometimes the guns work, sometimes they don't, sometimes the cars work, sometimes they don't. You know, I think just the nature of filmmaking is always, you know, accidents that happen. You know, sometimes they're happy accidents that turn the story a certain way that you weren't planning. Big carflip. How long did that take for you to, like, how many times did you retake that? We did it a couple of times. You know, we had an idea of how I wanted to do it and we tested it. And then, you know, the first time I think I said it didn't work the first time and then it did the second time.