bit guys I just need to enlarge one or two more windows so I can see what you were saying if you were to be a youtuber any youtuber who would you be that is a very difficult question I've got a lot of respect for a lot of different youtubers one of my favorites is a little known guy called gopher who makes Skyrim LPs, Fallout LPs basically anything Bethesda he makes LPs on and he does them all in character so it's pretty cool stuff wow there's a lot of buildings around there I'm probably gonna get murdered in the face very quickly hey dear okay this is quite terrifying at night I've not played at night before hello sorry I can't hear you sir let me just turn my bonnet voice oh thank you buddy that was very nice of you well what an introduction first day on the game and I just get shot in the face let me turn my bonnet in case more people start talking to me listen volume let's put it to 90th minute we'll do that and see what works and there's something see I want you there we go resume hey buddy I'm friendly do not hurt me no leave me alone so this game appears to be full of assholes big big buttholes okay I think they left me alone oh that's a zombie okay so zombies exist and they're scary hello William hello mr. Row alley I don't know how to pronounce your name I apologize okay let's get out before we get murdered again because I'm not being murdered there is so many bases around this area so many little bases so yeah as I say if any of you guys want to come play with me feel free to I don't know how the hell I'll find you in game because I don't know the map yet I've only just started playing is there a home there is a map it doesn't show where I am so not very helpful hello simple hello the fighter gamer how are you guys I just to give you a bit of background on who I am because I suppose that makes sense to do I am Stefan I've been with freedom about eight months I was with any TV in the early days when it first started and I primarily work on dashboard stuff though we all wear many many hats in this company and perform many many different roles so if you've got any general questions feel free to ask them and I will try to answer them if I see them well this is a big mountain that where am I if you we are favorite food and you had no food would you eat yourself if I was my favorite food and I had no food then I don't know that's a very difficult question oh rabbit meat I would take you that's a very difficult question I might nibble on myself for a while before like fully engulfing myself but yeah probably would especially if I was like what is my favorite food like pizzas pretty high up there steaks super high up there I don't know what my favorite food is honestly I like so many foods Korean foods are really nice I don't know I don't know what about you guys if you were your favorite food and you had no food would you eat yourself let me know and PS also tell me if my audio is very bad so I can fix it hello mr. sniper we are waiting on at the moment new equipment to get here and then things will get even better not me I would go find all the rest of my favorite foods then eat them that makes sense hello big red rebel how are you sir well there's a lot of people saying no they would rather starve than eat themselves I suppose I'll make sense that's what does our sign post say oh don't go that way or you will be murdered to death I will pay attention to the sign can I do something with the old sticks I'm assuming sticks are useful they seem like they would be my share in my channel now I'm partnered with freedom and I need help please I would shout your channel out but I've never seen your channel at channel before so it wouldn't be fair because I don't know whether your content's good but I will say hello and good morning at Bolts games and if people would like to check you out they should do hello Ramega is it Ramega I'm not sure hello same as how are you today good sir so I'm only gonna be streaming for about an hour or so today because I've been invited for food and I very much like food one of my friends is cooking for me for Chinese New Year so that will be very awesome yes it's a little bit eerie it's not so pleasant hello then how are you today good sir I thought I was a big oh is that airplane it's this way somewhere I could tell by my directional sound but I don't see it oh there is airplane maybe he will save me from the apocalypse hello Croyot Croyot how are you sir um there's gaming on freedom channel because we still like to do community stuff on the freedom channel basically like we like to hang out and chat live to you guys so I can hang out chat live answer questions all that good stuff well I enjoy myself playing a bit h1z one where would I like to travel the most hmm Japan's always been a place I really wanted to go I would love to go see some of the places in Japan and like sleep in one of the little pod hotels that they've got and that sort of thing but Australia is pretty high up there as well I guess because I've got family that lives there and with me being in the Philippines I'm very very close to Australia so that's pretty cool no this isn't for the MGM channel this is basically it's not so much about the game that's why I'm not talking about the game that much the game is just something for me to entertain myself with while I chat to you guys basically the streams just a random sort of thing so I can chat to you guys I can answer any questions you might have regarding most things anything that I work on I can probably answer questions about but yeah it's just random random stream pretty much because Chinese new year I cannot agree to that mr. tick I cannot agree to that I don't add oh I do have a Twitter account I was gonna say I don't actually have a Twitter account but that would be lying I do I just very rarely use it I would tweet something on my Twitter because I've only got like five people following me over there so that'd be fine I haven't got black ops 3 I was tempted to pick it up in the sale but I haven't done as of yet I might pick it up at some point that's awesome remember thank you very much can you dab what do you mean can you dab that sounds like something that's very dirty what does dabbing what is dabbing so I've been well let me start from the beginning of my tail so I was with freedom at the very beginning back when we was any TV and helped build the company for six or seven months I had to leave shortly after that because well basically I found another job that I've wanted to try my hand out which was a games design so I worked as a games designer for a while and eventually I came back to freedom about eight months ago and now I'm living in the Philippines with George and all the freedom staff and I'm currently primarily working on dashboard so my role in dashboard is to design new tooling and run a team of 16 developers for not quite 16 now but around 16 developers I would do facecam but George stole my webcam George loves to steal webcams like my facecam would be where I've got your your guys chat window but George stole my webcam so every time you see George on a video be like sup why you steal Stefan Anthony's webcams your webcam hoarder I will try and pick up a new webcam at some point soon so I can do facecam stuff for you guys if you go back and look at the fallout for stream we did when that released that's got my facecam in Anthony was involved in that as well so we both were on camera so there is images of me around I just haven't got a webcam at the minute because George is a thief and he stole my webcam I don't actually know what I'm doing in this game I'm just sort of yeah I know I've got some stuff in my inventory like premium items that I didn't purchase they were just there so I might actually try using some of them what have we got I've got keys and crates got mercenary crate key and a be of vigilante so I can open this thing I assume can I maybe oh open crate oh so this is what I've got a chance of getting I'm guessing okay let's unlock it see what we get camo what boonie hat we have received a skin camo boonie hat um I can't today but something I would like to do in the future is I haven't got a key for that apparently I've got a key for that one nope yeah something I would like to do in the future is set up like a team speak channel or something and pull one or two guys in at a time and talk to them let's say that I would work on freedom how would I do so there's a few different ways to try and join freedom that is application form in the dashboard to try and join freedom if you talk in more about like hosting your own network or something like that if you google freedom how do I create a network then the application forms will come up for that there's a few ways yeah yeah living that basically when I'm doing freedom I moved over to the Philippines and I've absolutely loved it over here it's one of the best countries I've ever been to honestly yeah I don't mind checking out channels at some point but I'm not sure when because like as soon as I finished here I'm going to go and eat my friend's food that they're cooking just wanted to drop by and say bring back impulse disectra thank you for that disectra we realized people have got strong opinions about the impulse that's nothing to do with me I'm afraid I just work on the dashboard so I can't do anything about that but we like to hear people voice their opinions so keep shouting it maybe something will happen I'm partnered with freedom how would I promote my channel other than advertising by creating videos on my own channel is there a way I can advertise on the freedom website so if you go to dashboard at the minute there's two new tabs one is called that's another airplane there is let me see if it drops close so yeah what one of the tabs is called your YouTube story and the other tab is called partners games so if you look at them there's things you can fill in to basically get to share your story with other channels I think the best person to talk to about that for a croaty sorry I still don't know how to pronounce your name is probably Anthony Smith he's not around today but I'll have a word with him when I see him when I can't really comment on pay and things like that that wouldn't be fair to the company but we're very comfortable I'll say that hello bro that's the one share your YouTube story thank you for arming there you didn't miss a lot max mowing I am just sort of answering questions I just got this game today so I'm just sort of running around whilst I am doing that so if you have any questions feel free to fire them at me sir oh I said it right I can't remember what I said I apologize well I have a lot of sticks and I don't know what to do with them so the bases in this look really cool I'm quite impressed Minecraft or call of duty world at war hmm in in what sense if I could only play one game or in what sense if I could only play one game then I will choose Minecraft because of the amount of mods available for it however if it was just like which one would you prefer playing at the minute probably call of duty world at war where could you find Anthony Smith he posts regularly on the freedom channel oh there's a person hey buddy you scared the shit out of me man oh my bad dude not a lot I just got the game today so I'm just sort of running running around and exploring pretty much me myself I'm playing on my brother's account so I got you I expected you to just turn around and bash me in the face that's what I've experienced today oh there's a guy over there he's just gone to that base there you go can you see him he's just running across yes he's probably gonna shoot us in the face yeah maybe I'm gonna go say hello to him and see what happens I'm sincere here watch all right buddy I'm making friends hey buddy how are you I'm Steph it's very nice to meet you don't hurt me don't hurt me Tom Tom you scared them I don't know I don't want to swear but you scared me Tom Tom well the underwear the underwear isn't scary it's attractive man I appreciate a nice pink serve on the way oh how do I do a moose I expected there to be loads of kill onsite here with all these bases I'm very surprised I haven't been shot in the face yet okay I might go there and try and make friends then I'll catch you guys later nice to meet you we made friends guys if you can only play the original game no mods then it would probably be cool do you what's my favorite game my favorite game of all time is dragon age number one that is the RPG I fell in love with essentially talking about early early games like if you go back to when was it probably when I was 10 or 11 years old which was a long time ago now there was an RTS called Empire Earth and that is the thing that got me into PC gaming oh there's a flare can I pick you up no people are so friendly in this world I didn't get shot in the face oh go away zombie go away you're not my friend if you are in a desert island and you have a chance to get something what will it be water lots and lots of water that just makes sense to me not very creative I know but it makes sense who is he I assume you were talking about me let me do this who am I I'm Steph one of the product owners for dashboard within freedom sorry you guys accepted my partnership but it's in bad standing so I connected my second channel with the same email but I never got the partnership out my dashboard on the second channel that is most likely because your channel is still in the review queue before we invite any channels now we manually review them and we've got a team of people that are in charge of that so hold tight and it will happen soon and you've been watching Steph dashboard product owner for freedom I really wish I had facecam now so I could do the George thing it would make me feel so much better where are the people I want to find more friends there was a guy in a bush that's a zombie up there if you're talking about him can't believe Tom nearly shot me Tom I just went up snuck up behind him said hey buddy and he tried to shoot me what's all about him a nice person I have no weapons all I can do is punch people in the face yeah yeah oh you got the email saying congratulations you've been accepted that I can't help with that you would have to contact support oh there's people hi guys why trying to hurt each other that's not very nice no stay away from me don't try and hurt me haha I am ninja you can catch me everybody don't shoot me I'm a good boy I have more experience in editing my new channel than my old channel can I get a little advice from you on my channel one night I will try and do some channel views or something like that but today I just sort of want to chill out a little bit play my game talk to you guys make new friends that don't try and shoot me with bows like that a-hole hey buddy okay there was nobody there I was just checking mail that's a lot of mailboxes what is my best tip for everybody huh that's a tough question I mean the biggest thing for me within YouTube is good up good audio make sure your audio is really good I don't want to swear because I'm on the freedom central channel and George will tell me off it'd be like step I'm very disappointed in you what have you done and I have to be like I'm sorry George I don't want to go through that again it breaks my heart I don't want George disappointed in me oh food I picked up too many sticks but yeah my biggest thing on YouTube is audio quality you've got to have good audio quality and I know mine isn't great at the minute but new equipment will be coming in the next couple of days and I will be streaming with it after I get back from England and you'll see a massive improvement like quality of content is the most important thing and projecting your own personality guys I can't check out everybody's channel I'm afraid no I'm on Windows 8 on this PC do I have a ps4 no I don't know I nearly bought one and I bought an Xbox one instead because I got a really good deal on the Halo collectors edition Xbox one that's all fancy pain and does noises when you turn it off and on it's really cool hello flight aqua hello the tipsy sniper hello blaze comedy blaster how are you guys hello Lord sorry I missed you I hope you're all having a good time hello Herobrine you are a scary dude oh I nearly swore then and then George would have had to give me the talk blaze comedy blaster how was that sir hello nitro plays how are you today sir so yeah just to up you guys up to that my words my words are not working just to let you guys know they've just got here what's going on pretty much I'm just exploring this brand new world in H1Z1 well I talked to you guys and the reason we're doing this is because it's Chinese new year I want to take a little bit of a break I just bought this game and want to explore and for what better way to do it than to explore and answer some of your guys questions and chat to you hey buddy how are you I'm not gonna hurt you you don't need to run I'm not gonna hurt you I promise I am a good person I have morals well that's the airdrop I've never seen an airdrop so that's cool I've seen the plane a few times but never seen an airdrop I don't know what it is in US dollars is on the steam lunar sale so I got it for like 300 Filipino pesos Daisy or H1Z1 I haven't played enough of H1Z1 to make that call yet Daisy it was my favorite game for a lot of time in armor to anyway standalone not so much I've got probably 500 hours in armor to Daisy hey buddy how are you I'm staying hello buddy well you jump high have you found anything cool this is my first day playing so I'm looking for cool things oh there's another dude up there hey buddy I can't jump over this thing I want to say hello to the guy whoa somebody is shooting arrows that's not nice why you so mean you can't catch me hello hello I think I said hello to everybody else except dick sir how are you today sir no no you missed keep wasting arrows I love them it's not necessarily a problem mist is if you're not comfortable speaking English then it's fine are they still coming at me come at me bros I can still see you they're really bad with that bow saying saying that I don't know how difficult is to fire a bow because I have never got a bow you are from Ecuador wow that's cool dude your English looks fine from here can I tell you how much the game was I don't know in USD it was 300 and something Filipino pesos because my steam's in peso now because that is the currency of the Philippines you missed why you gotta be so cruel can you say the following words in the most British accent you can do British as in upper-class British or lower-class British low-class British it would be water cattle bush dog stop random all tears stop if it was upper-class English one would say water cattle bush dog stop random or tears stop there you go sir I said it hello sale how are you today sir so we've been attacked by three people one murders at murderers and we made three friends so it's even at the minute hello Cal Calista dood Calista dood hello I am 26 I am a very old man oh there's a buddy down there let's go say hey buddy hey buddy how are you I like your pants have a good day see we're making friends everywhere see this is what the freedom family does we come out and we don't kill the noobs we make friends with the noobs there's an airplane and an airdrop is there any buddies here hey buddies that looks like whiskey why can I not take the whiskey what time is it oh it is 602 so I will have to leave in about 30 oh that was a gunshot the mill on buddy I'm not hurting anybody buddy and we will not murder each other as a family is that guy got no head oh they this is on me that hadn't rendered improperly and we will survive the apocalypse as a family the freedom family who am I I'm Stefan dashboard product owner something like that does that make sense to you do you think that's how George would do it do you think George would cry hey buddy every time you see someone in game jouston I have no idea what that means sir there are so many bases on this map that is a big base our creepy music I don't like I do not need your creepy music game where's everybody I need to make more friends hello blaze comedy Anthony come in we're making friends and people that aren't trying to murder me just kick the door shut properly goodbye Max this is a mr.  Anthony Smith any questions before you go or do you want me to keep impersonating George in the apocalypse no that's not buddy that's a little bit how do you think George would sound in a survival situation in the apocalypse Anthony how would George sound yes who am I I am the last surviving I think it'd be who am I I'm George and I'm going to save humanity actually join the freedom he hasn't done that in a long time I know it's disappointing I know it's very disappointing but yeah we've literally just been running around talking to buddies we're making buddies buddies buddies not bodies we don't hurt people Anthony you've tried and hurt us and we run away then how many times have you died with the strategy once we've met about 10 people three of them have been aggressive and everybody else wants to be my buddy because they want to be part of the freedom family because you know why they want to be a part of them do I have a channel blaze comedy blast that I do but it's a terrible channel it's just somewhere I upload test footage so it's not worth checking out go ahead ask me I was actually gonna say if you want to check out a channel you can't touch Anthony Smith anyway hello Kelly ox 954 how are you today hello Japanese Japanese are you French hello Sam Jew Sam Janna how are you today could I have made that sound any creepier how are you today possibly yes we're literally just been exploring them up yeah I don't speak Portuguese but Portuguese would rather burn to death or slowly drown to death mmm can I slowly burn it well he didn't get an option for slow burning which software am I using at the moment for live streaming I'm using X split for recording I usually use shadow play after effects and premier pro and occasionally or does he what's the after effects for the effects stuff I do what effect stuff you haven't seen it yeah I have seen many videos you've done but I've never seen actually any actual gameplay with effects no no because the stuff I do with effects is more like guide content and like I did a new show for a while again comparison thing for a while I've been I believe it is that's just me personally and I and but I will say this if you don't participate in the community if you don't do what you're supposed to if you don't take the advice you're given or use the tools you're given you're gonna have bad time I can't attack people with sticks I'm very disappointed oh I can now I have a weapon we don't have to make buddies anymore we can beat them with sticks now you go find people you made buddies with and beat them with sticks if you had to eat ten sticks of dynamite said save your family from death would you take the chance oh this is on me that's a bad mr. zombie bad bad zombie now you're infected now we're going mano mano but I want to punch him in the head yeah how do you like me now how do you like me now yeah how did he slide through your feet magic I should bandage beat buddies with sticks yes that is what we're gonna do now we're gonna find buddies and we are going to beat them with sticks my old channel is Steph man at one two three one is very old though and not really worth checking out honestly was that a you who outside that one here I think that was out there okay well I think they're actually putting together news like you know the chocolate tree yeah it's just step man one two three one my channel what is it yeah like I say it's not really worth checking out but you should probably check it out subscribe and like if you want it's not a big deal actually if you if you do go to that channel if you find that channel you'll find a lot of like early freedom stuff oh yeah there's some like freedom stuff from two and a half years ago yeah three years ago like from the any TV days before freedom even launched which would be better to eat in a survival situation would bark or your own legs would yeah they are definitely would bark that's a silly question how dare you ask a silly question bolt you've been quite informative up to now and now you're getting silly silly sausage I'm gonna run downstairs give me two minutes because I have got to end the stream now because John's cooking for me soon John John QA job it is I'm trying to close the stream whenever they go out the people are waiting copyright infringement copyright infringement copyright infringement that's what they shout the song is whole is is older than Hitler oh no wait I just mentioned Hitler and livestream oh my god it's all good it's all over and that was the last time Anthony was ever heard from again to be continued okay guys I am gonna have to get out here I'll type it in chat for you in a second blaze give me a minute let me put up the ending screen to make sure all the footage was captured don't you steal my things fine till next time don't you like subscribe do all those things and make a flower job also be awesome to yourself amazing to each other that was my own this is my show I will wrap the show up on me how dare you not actually wrapping it up my office and you just try to take over my show how dare you oh come on now this guy over here this guy over here thinks that I'm trying to take all this stuff right why is it not letting me type in the chat box that is not help because you were clicking in the checkbox okay if you click in the proper chat box it'll let you do something there you go blaze comedy that is a link to my channel and I'm afraid I'm gonna have to end it now I will be streaming again in the future but I have got to go back to England for two weeks on Thursday so it'll probably not be till I get back from England thank you guys very much for joining me it has been great fun and I will be back again very soon to find more buddies with you take it easy guys bye bye don't you steal my things oh you have to do say that for me bye bye love you bye


It's completely insensitive to the changing will of the people I assume that was that was like laughing in a home in a horror movie, right? So I could translate the previous one to be typical atypical atypical typical. Yeah If it's a quick question Yeah, yeah, just so So gerrymandering can occur even in the absence of oddly shaped districts Okay, so What about these startling results? So let's dig in a little bit more to this example this funny one the shocking Wikipedia example What I've done here is I've ordered the districts from most Republican To most Democrat in the percentages of votes Democratic votes they got So there are two that have 10% Republican Democrats and Three that have just enough Democrats to get over the 50% so that's how you do it. You pack the Republicans Oops, sorry. Am I doing it most red to most blue? Something switched. No, that's right So you pack all the Democrat all the Republicans in the far two districts the most Republican districts and you spread pretty evenly the remaining Democrats the blues across the others and that's how you create so it's cracking and packing. This is an example So what if we look at this vector and we try to understand the structure of that? so Let's put the other maps up there Here's some other vectors and now what we're gonna do is we're gonna look at each column We're gonna look at the column the most Republican the most red district and the most blue district and ask how typical go back to that question How what should the most blue district look like and what should the most red district look like there's no assumptions of symmetry here? It just may be that we live in an asymmetric world because of the structures of our states and our Interests in having geographically localized representation that tilts the balance in certain directions So if we do that We can make a box plot All right, what is a box plot? So box plot is a stat is a classical way to summarize statistics the far left is that most Republican district this is for North Carolina in the 2012 and 2016 elections This far left box plot is for North for the most Republican district in each of our maps So what the center line is is the median? The box holds 50% of the maps The whiskers or some idea of outliers and the very tips are the max and the min So you start to see kind of what typically should happen as some nice progression as it goes up It has a nice spread and these two look rather similar just one has been shifted down because the election was more Republican Let's take some maps that we think maybe are not so biased the judges maps from the beyond gerrymandering project the two Don partisan maps that were created on the 538 blog and let's put them on our graph Here they are They kind of follow pretty much down the middle not perfectly the yellow line down the middle is the median Connecting the medians. They're kind of tight But let's compare that so here they are I make a histogram. I measure the square deviation from the medians That's a number. We call it the gerrymandering index All right, and here the judges one are pretty nice in the distribution the other two are a little bit farther down But they're still kind of in the meat in the distribution. Let's go to the two that were used in the legislative elections Here they are. You see that huge jump That's the jump that causes this insensitivity to actual elections in a way That's what I think gerrymandering is it's that jump on this graph and there they are in the same histogram way out in the outliers Right and this is what Kagan so Eric Lander who was the head of the Broad Institute and a mathematician I Almost said originally, but one is never not a mathematician he's still a mathematician And he wrote an amicus brief that was based heavily on our work and Joey Chen's work and and Kagan Chief Justice cake not Justice Kagan. Well, that was a wishful thing Justice Kagan Brought up that brief in in court and and she discussed this idea of outlier analysis and now that's become a term Outlier analysis in the legal world people talk about it now Here's two other maps from 538 The one of them is tried to make it as most Republican as they possibly could and the other one They tried to make it as most Democrat as they possibly could there. They are see they both have jumps the jump is just in a different place That that loveliness and this large jump. So that's really kind of the trap the thing and here Okay, actually, so this is the plot.  So I'm really a big believer in the way you convince people things with mathematics is you don't snow them You don't say here's a number. It's a p-value. It's bigger than this and trust me. I know what I'm talking about It's it's an outlier. It's bad. I Think that's not how you should do it what you need to do is you need to make the story Understandable so they can draw their own conclusions and they could see the difference in these lines Right, they could see that there was this huge jump and what's the industry with that jump meant? That was it. This was the actual slide that we showed in North Carolina and I showed this I gave this a PowerPoint presentation in court and We labeled the actual districts in North Carolina And that's important because one of the things that the recent ruling in the Supreme Court came down on and said you need to actual show geographically localized harm and so here we actually listed what North Carolina districts were harmed and there was a plaintiff from each of those districts in this lawsuit so Some people believe that we actually have satisfied probably the objections in Gill and the North Carolina court case will Move forward. We'll see we're waiting So we identified the cracked in the PAC districts these ones way up at the top are the PAC districts Where more Democrats were in than supposed to and these ones that were suppressed lower are the crack districts where they've been spread out evenly All right So this is the signature of gerrymandering. So here's Wisconsin So, how am I doing? I'm all right. Not great, but all right. So here's the act 2043 map That's the maps that were used in the general assembly election. So now we're switching to the state legislature in Wisconsin This is Gill versus Whitford. This is the main Supreme Court case These were the let the map that was used with a small caveat which I can it's a it's I'm being judicious and lying ever So slightly to you and you see here's three elections 2016 2014 2012 well two out of three elections. It hits it straight on the nose The other one does a particularly bad job right at the top one, but the other two straight on the nose Okay, two out of three. We're done. Let's go home. No problem, Wisconsin You have to dig in a little bit more if you go back and make that histogram like that set of Histograms like I did before again, they're right in the meat of things over all these elections But you notice all these elections are pretty Republican what have we thrown some more Democratic collections? So what happens is there's a firewall the minute you get to the point where you might lose the majority this map is designed either through intuition or through experimentation to Not let you shift Not pick up seats and it's exactly the same thing. It's the same thing that happened here See the reason this doesn't move is because whenever that line that 50% line if a dots above 50% It goes Democrat if it's below it goes Republican if you're one of the if you're the purple or the orange curve see Shifting the global election is just shifting this graph up or down You see how many percentage points you can shift the election and never move a dot over the 50% line a Huge window and that's what's happening in Wisconsin. It's basically designed that when you get there I'll show that to you in a second you have this Actually, so I won't show it I took it out for the for the interest of time But you can read on our blog we have a discussion of the firewall phenomena and that somehow comes back to this jump We also looked at Maryland. This is more preliminary results. We did this a couple years ago with some old code But now with some new code we just hop off the presses So it's not as shifted so these are the maps that were used the 2011 one is the one that's under question and you see it doesn't do a great job But not as bad as in North Carolina, but you see the same kind of jump You see that the far word now This is supposed to be gerrymandered in favor of the Democrats So we're looking at the far left this side instead of this side and you notice these dots of the far one are much depressed So in some of these elections it would have been reasonable that two Republicans would have been elected But the map is set up to only allow one to be elected So there's also gerrymandering in Maryland in the other direction. All right One interesting thing you if you've if you're at all reading the press about gerrymandering you hear people talk about the effect of cities versus rural effect because Democrats pack themselves in cities. That's the whole reason this is happening. What's nice is you can look at the two different effects and separate them So we can ask the following question in a given map How much would I have to shift the global election percentages so that it went 50-50? So in Wisconsin, there are 100 seats 99 actually in the state legislature How much would I have to shift the percentage to get so it was a 50-50 split in the? 2012 election that's the histogram for over our 24,000 maps of how much you'd have to split You would actually have to shift it to about 49 percent. So there is a bias to the Republican Party But notice where wi is You have to shift it all the way down there to make a difference So in the Republic in the 2016 or the 2014 election the structure the spatial structure the election actually meant that you You could only you could get the majority with around the equal partition with around 47 percent That's this one so you can see there is a bias based on where the Democrats live But this map you would only need 44 percent so you can separate the two effects Yes, there is something due to the geography, but this map went way beyond that Okay, so now I want to just say a little so you know this is a lecture that kind of gets a little bit more technical as I go So I want to but but at the moment I'm about to both become more technical and at the same time become current events like really current events so After Gill which was the decision that was handed down two weeks ago The ruling basically said that Wisconsin that Whitford had no standing because of there was no localization There was no geographic localization So as it happened we were already doing geographic analysis of these maps because we were interested Because that's what happens sometimes, you know you ask the right questions because you're scientifically interested and you end up with something that's relevant So we're gonna talk about something we're gonna do something a little different now. What we're gonna say is Instead of asking about the global precincts. We're gonna say I'm sitting in my district This is like kind of a Local model every time I'm sitting in my I'm sorry. I misspoke start reset your brain I'm sitting in a precinct and That precinct is sitting in a district in every map Right where it is exactly changes But every time I can ask what's the makeup of my district in this election? What percentage went Democrat for instance in that election and so I can kind of ask What's my typical environment that I'm in am I typically in a Democratic district? Am I typically in a Republican district? Am I sometimes in one sometimes in the other? What's the fraction? That's this histogram? percentage Republican vote in the district that my precinct is in Here's a map of it in North Carolina for the 2016 voting data the 2012 voting data You see that it and then what the coloring is is you take the log So it's a log likelihood and you plot it over the space So if it's more blue that meant that this district was bluer than I usually saw myself in and This precinct was in a district more blue in this one and if it's red, it's more red. It's more Republican So the Democratic districts have a much more Democratic than usual In both cases and there's a little bit of red The red it gets a little whiter here and a little bit redder in fact in some of these areas And those are ones where they took away some of the Democrat Republicans to fill Took away some of the Democrats to pack them in these other districts so you can see that effect But then you can sum up this log likelihood You can look at the spatially average log likelihood and you and here I have it plotted with a different color scheme Which I actually like better like I said, this is fresh off the press and here I have another histogram. So my fancy Collaborate if you make fancy pictures This is Jonathan in Jupiter to your left. So you get the ugly pictures now So here's that histogram again and the judges are right in the middle of the meat They have a very low log likelihood. So the log like is just the log of this probability It's a way of measuring if it's big Right because if you take the log of a number between zero and one After you center it one half if it's big if it's away from the median It's it becomes a big number if it's near the median it becomes a small number We've centered around the medians and these two maps are unusual so what we're starting to see is a way of of of measuring localness local harm another way you can measure local harm saying is how often are Their districts which are really outliers which they're in a district which looks completely different than what they usually see themselves in So we counted the number of 95% outliers and the judges map has very typical number if we average over our ensemble That's what this blue is and notice the two maps that were used in the legislature in our elections We're very unusual and if you look at the districts that were outliers They pretty much correspond in some ways to the Democratic ones But there's also some noise which is something we have to explain to the courts because when they look at this They want there to be no outliers Right, but we know that doesn't happen right there's a famous probably hypocritical story That's often told to me in that I've heard more than once which is that there was some study in New Jersey And they found us a mile of road that had a huge number of accidents and they were commissioned a huge study of why that happened But of course if you think about it, how many miles of road are there in New Jersey of Interstate and what's the chance that there's one mile that has an unusual number of accidents It would be actually very unlikely that there was no unusual mile So it's much more likely that there was nothing wrong with that mile of road It was just that that was the one that it happened it So you have to have you have to always benchmark things and think about it. Okay, so Let me end with some open math questions This didn't seem like a math talk, but maybe hidden in it is there was so Oops no math questions again. Here we go.  That's even you know what a Taurus is you have no idea what asteroid is asteroids. Anyway, it's video game modes You run off one side of the screen you come back on the other Then let's make up a random a random political distribution of a party Sometimes we've done this two different ways. I have a student a high school student who's dropping random spheres With some drop off from them This one here is actually a random for a series. Sorry. I didn't do that for you, but it just so happened I mean what else would I do right and then you want to do divide this into nine districts? Well, guess what the isoparametric division of a Taurus is into nine districts that and there's a number of them, right? Because you can just shift it That's why I picked a Taurus because now there's no problem to enumerate them. By the way the best enumeration algorithms died around 30 40 precincts So we can't just count them all But maybe somebody can figure out a better way and we can count them or a smart pruning algorithm So if you're discreet inclined, I have a collaborator chapel who's thinking about that So let's run over all these districts. Let's see what the elections are and we get look at that We get a box ball that looks just like what we saw So then the question is can we understand what the properties of this field are that if it's a generic realization of This field so that we get this box plot and what sets the scale if you were to just pick each precinct Randomly from a distribution the scale is much more collapsed. What sets this effective length? That's a math question Another math question is why is this ridiculously stable? So I've been showing you these box plots that all the information comes from here's a case where I Shifted all my weights up or down I think it was 20% I Changed some of the population energy is to slightly different definitions Qualitatively the outcome looks the same. It's not surprising. I mean some huge dimensional space and I'm projecting it down to 13 marginals Maybe there's some concentration measure phenomena going on here, you know, what's the lips just constant on my maps? I'm not sure actually I thought a little bit. I have some ideas They're stupid, but maybe there's a better one. Can we can we do something here? even more is This a replica symmetry is this or you know one RSB phenomena where I have lots of different identically almost identically looking minima Which have different properties and it kind of doesn't matter where I end up Because they all look kind of similar and they're just shifting around so maybe that's what's going on I don't know. There's some reasons to think that's true. It happens in related pots models Yeah, here it was can you pot can you plot the energy landscape that this energy functional gives you? Can you give me some understanding of that? I Have a weird surface energy. I have a weird bulk energy. I have some global constraints Can you show me some evidence of a shattering? transition it's a little technical but in any case On the numerical level, how do you get better samples? We're not thrilled with the samples we used in court. They're okay We're working at better ones. We're trying to use techniques borrowed from computational molecular dynamics to do a better job of this and We're trying to understand how to speed those algorithms up and so I did not do all this work This is a team effort So it started with myself and Christie Graves now Christie Vaughn. I'm sorry Christie Graves now was Christie Vaughn Got it backwards. Sorry. She's now at Princeton then the next summer There was an undergraduate team that Christie was part of was Sachet Sophie and Bridget and that was a program We called data plus in 2015 and Christie's thesis was the year before in 2014 And then the following year Justin Lu and Hong Song Han And by the way a lot of these people are actually North Carolinians or people from the southeast So they were politically invested in these questions And now there's a group of a graduate student Robert Revere He just graduated actually Greg Herschelog was a postdoc and now it's kind of a senior researcher And the reason there's a red box around him is that he's really been yet my real collaborator really doing consistently over the last couple years lifting and getting things done Mike Bell is a Geometer who's interested in this and then there's a new undergraduate research team of Lisa's a master student and Sam Lisa and Raoul and they're part of this data plus 2018 undergraduate research project. So all most of this work the original code was all written by undergraduates The latest version Greg wrote but you know, there's there's a lot of work and next year We're actually running a course on this at Duke So I have another group of undergraduates 18 of them taking this course a research course a research independence study and working on this So we'll be interested to see what happens and these are all the people who gave me money You notice none of them are yes, somebody quickly notice what is not on the list these are all private entities and more or less and There is a website Google Quantifying gerrymandering at Duke and you should find it rather quickly And if you have more questions, I'd be glad to talk about it And there is a summary slide, but it's kind of boring. So instead let's see if I Go out of here, and I go to not that to this There we go And now yes, I haven't backed up. I've been here. Thank you very much. Okay. We'll just leave this running. Well, I'm happy to take any questions. Oh Interesting, right That da da da da da da da da da pause Okay, one second. How do I do that? one second I Have to let's just mirror displays Now you'll see momentarily my whole life and let's Go over to here and now let's make this bigger Is that how does that look? Play go there we go finds the conflicted edges picks one out flips across it goes goes goes It's checking to make sure the past stay contiguous So if you're wondering why it never breaks because it's rejecting moves to do that And so this is a little app in Java you can load in From my website and look at if you want to and I'd be happy to take any questions if you happen. Thanks a lot Thanks, Jonathan Before we before we take questions, I have to observe that you know you have 1800 unanswered emails I'm looked at emails which explains quite a lot about why you never read my emails, but Okay, so questions, please Well Better I mean, I think they think they did a very good job. I mean, I think they're very happy with the map They chose right? I mean when they wrote what no, let me let me explain to you why the North Carolina case is such a clean case There's no question of intent. They actually wrote a document The state legislature did which was directions to the subcommittee and the map maker here The things you should follow this this this and you should end up with a map They gave the same political outcome as our previous map, which was which was for 9 or no no is that at that by that time it was already 10 3 10 3 and somebody asked them on the floor in the official record. Why do we use 10 3? And he said because I tried to do 11 to and I couldn't and that's on the record of the state legislature, right? And and and he got up the mat maker said let me be very clear Since you ruled our previous map an illegal racial gerrymander. We are and this hasn't we did not use race at all This was strictly a political gerrymander. That's what they said So I think they think they did a very good job. So I think the difference in the maps was simply Intent and what they wanted But they were optimizing to be at the worst right they were very close to the map Almost said, you know, not identical spatially but outcome wise to the map that 538 gave as their attempt to optimize To make the most Republican map possible Okay question back there Flesh or question out not likely I mean not likely that kind of depends on who was in charge Well, but see that's not about a state of them. That's not a I see you're saying of a certain redistricting Yeah, right. Okay, so so right so that's a really good null hypothesis question to ask the right, right? I mean so It's actually rather labor-intensive to get this up and running on a state We did do some with a preliminary piece of code. We did some work. We looked at Iowa Which has a there are a couple states that have a different method Iowa, Arizona and California have either non-partisan or bipartisan redistricting commissions Iowa's do not seem so bad. Now. You could also attribute that to the fact that Iowa is a square state with four districts Anyone want to guess how they did it? And and by square I mean rectangular because I'm that kind of mathematician, right? There are three kinds of mathematicians those that can count and those that can't So what do you mean by dynamic flush out the word dynamic? I mean, I think you need to you need in some way take into account the effect over a number of different elections You can't fix one election unless you look at this fine-gain structure, right? It may not affect a particular election you're looking at but it could affect other reasonable elections That's one to I think that things like partisan symmetry or the efficiency gap Which try to which they themselves postulate certain things that they value But they don't be explicit about it always and they're not they never take into account the geometry at the state And by and I mean geopolitical geometry like who lives where the structure the population densities They don't take that into account. I think that doesn't make sense I think you have to have some way of taking on your account And I think the only realistic way to do that is some type of controlled sampling where your Where your assumptions are very explicit, right? I was very explicit about what my ensemble cared about these things only right, yeah, I mean Right, I mean, it's just gradient descent with a smart stochastic gradient method You just do exactly what I did. I gave you the energy optional. You just flip some signs Yeah, sure, right, right. So that mean and that's in some sense what they do Maybe I don't know how much I know a friend of mine wanted said like maybe we should just get out of this And we should write a you know a plug-in to the mapitude which is the software they use and you know Jeremy and or my state, you know Have a big red button I mean, but you could seriously do that. You could say relax this locally, right? It's just a variational calculus problem Relax locally this to gerrymandered as much you want, right? So I of course Sutlana they can do that and that's part of what's going on in it and using local knowledge and in some sense Hand manual gradient descent, right? Let's change this. Oh, that helped. Oh, what if we do this too? Oh, that helps Oh, yeah, yeah, right. That's what they're doing They I don't know how automated they were Well, they did hire professionals, right all the maps in in they hired a there was one map maker that was hired by the National Republican Party to do the local state maps and was hired out to states all over the country in the 2010 and That accounts for some things that happen so partially so, you know, I Don't know people who are explicitly doing that now. I mean, I think you could easily I have the code to do it I could do it but They in some sense, they didn't need to they had enough local knowledge that they could get in a neighborhood of a good solution and Then by local tweaking they could end up with one, right? They didn't need to be quite so they weren't writing a paper They didn't have to be quite so systematic They needed one example and they could do it by hand and they they read they admit that they made tons of maps Wisconsin, I think admitted that they made lots of maps Back there, but I'll just say that's kind of why we have to do this, right? We have to come up with a way to inform the government to to be able to clip out the outliers So that we can identify them and clip them out exactly because it's easy to do. Sorry You caught me. Yeah. I mean, I think this is all math Okay, so I'd say that say a lot of things How long do I have rave? All right So first thing is I think most people when you ask them what the math is they'd ask you to balance their checkbook Or figure out the tip. Okay, so I would say that's actually not math What math is is kind of a systematic conceptual framework that's that's built thinking carefully And I think that this is very much math what I'm doing, right? So I think this is math and what I meant by where's the math? I really should have maybe said where is the Mathematization of what I had previously said because that's what I really started to give you at that moment, right? Just one second. So so that's one thing to I think that You know what I'm the chair of my math department And so I talk a lot about what math is and I think that there are that that that you know mathematics in the past had made some errors about in in in In crusades of purity throwing certain people out of the tent and that was bad. I think the real question was you know just Step up to the plane figure out how to make it all work as one family and how to live with the continuum And also I will say that in my I think of the mathematicians inside my department and the mathematicians outside of my department There are plenty mathematicians at my university who are not in the mathematics department and who are essentially part of the time or all the time Cartel mathematicians right and so I think that that there's a huge spectrum of what mathematics does Okay, that's part of it And I also but I also think that it is important for mathematicians to periodically step out and find new problems of Societal interest or of scientific interest and bring them back to the math community, right? There have been moments of explosions like that, you know physics that led to calculus That was one where there are all these questions that we that people need to figure out There are other moments like that, you know, maybe large data is another moment like that, right? So more


I should thank the jury again to award us the winner for the best media agency of the year, best media agency network of the year and all the awards which has been given to from Rising Star to Content Specialist to even the agency head of the year. This is truly a fabulous day for us and we are humbled that the jury and everybody recognizes that there is a lot of effort being put to get the best out for clients and partners. We will be at it and we are obviously always motivated which is a recognition and it's a it's a big moment for all the people in group M all the people in mind share I mean all the winners so once again thanks to everyone thank you


Thank you for making it to the end of the day. It's been a long day already, but a lot of fun. Hopefully, those of you who use Amazon will enjoy this talk. So a little bit about myself is just how my background is in computational chemistry and kinematics, which probably doesn't resonate with any of you. And nor should it. It's very specialist. There's a lot of fun using chemistry to help design new drugs is the main part. I've been using Django for nearly five years now, which is slightly scary. But I picked up a few tips along the way and most recently, how to apply them on Amazon. So you've heard about my employer, OpenEye. But you probably have no idea what we do. We do molecular modeling and kinematics. Just more of the jargon words to keep throwing at you. But two interesting or important things are is after attending a talk from Russell at the previous Django con, OpenEye is now a Django software foundation corporate member. We're very proud to sponsor the Django foundation. And in keeping, we also are a technology partner with Amazon. So what does this OpenEye thing do? So here's one of our pieces of software. It's a 3D visualizer. That pretty picture in the middle shows you a protein and a drug and how they bind together. I'm not going to go into how we do all that, but that's the science that we look at doing OpenEye. So this is more the molecular modeling. And then we can use kinematics to take the information, which is notionally 3D. And we project it onto 2D images. So the image on the lower right is how we show a protein binding site in a flat way with a key and a legend and then the drug. If you want to talk about the science, grab me afterwards at the receptions or any time during the conference, I happily go through that with you. But I'm going to stick more to the IT for the rest of the talk. My previous employee before OpenEye was a pharmaceutical company known as AstraZeneca. Some of you may take some of the medications. If you ever doubt Django is used to enterprise, don't worry. AstraZeneca have revenues of $20 billion a year, and they use Django for some of their discovery projects. So you can rest assured it's been using for really good stuff. So on the left, you can see some of the chemists that work. This is from AstraZeneca's own library of images. It's not entirely true. Maybe you can read a real-life chemist, but it's not far off. And although this talk is about the cloud, more traditional enterprises prefer their own hardware. So the big box on the right is an IBM Blade Center. And that's one of the pieces of hardware that we actually deployed Django on when I was at AstraZeneca. So who here is a user or knows about AWS? Pretty much at least half of you have used it, I'd say. So it's something that keeps coming up time and time again. Clouds, one of those big buzzwords, can't avoid it. So OpenEye, we've really embraced Amazon. And one of the reasons is it's crazy, crazy size. So this was a quote from a year ago from the head of AWS. It's probably still true, to be honest. The amount capacity they have is five times more than all 14 major competitors, which we think about as just a huge amount of resource. And when you look at what Amazon has been doing for the last six years, I've pinched one of their corporate slides, but you can see this is a number of features released every year.  And the last column is this year. So we're not even halfway through the year and already they will mismatch the number of releases for last year. So how would you keep up with 280 release updates a year? That is a lot of changes to their services. And each of the bold services is a brand new product. So they introduced a lot of seven new products last year. It's a very rapid pace. So I'm gonna just highlight some of the most useful products from their range. Some of them you may have heard of, some of them you won't. Apologies if that's all that you already know. But thinking specifically about making a website, the first thing is how'd you get there? You need a DNS entry. You need someone to register your domain name. Route 53 is their service for this. Traditionally just DNS, but since of last month, you can now register your domains with Amazon as well. Technically it's not Amazon doing it. They've got a contract with another company. But this way you can have your DNS and registry in one place so you can see when it expires. You don't lose your domain, which would be quite embarrassing I feel. And the DNS is incredibly handy because you control it through the API. Which when you're deploying new software, it's really handy to change things over programmatically. Already you've heard about Redis and Memcache and other talks of the useful tools for deploying your website. One click of Amazon, you can have a Redis server. Another click of Memcache server. Then maybe not that hard to install, but you don't have to maintain another server in addition to your web servers and your location servers, your databases. Elastocache is the Amazon product that gives you easy access to these very popular technologies. Maybe you fancy a bit of NoSQL. Amazon offer a service called DynamoDB. So this isn't NoSQL in the same way, like it's MongoDB, it's slightly different. But it's very powerful and incredibly fast. And if you want to use it with Python, you definitely want to check out one of my co-workers' libraries, which is PynomoDB, for a really easy way to access it, both in Python and using Django. Databases, talk of the day. Django 17 is now out.  So why I'm sure the four database servers there, you all have your own personal preferences. I'm pretty sure no one wants to actually install a database service, no matter which one you pick, they're not easy. All of these, again, one click, running. So maybe you prefer to develop on MySQL, but your client has to run Oracle. We don't have the licenses. Amazon gives you a really nice way just to go and fire up an Oracle database, test it, when you're done with it, close it down. Nice and easy. So I'm gonna take a quick tangent away from the services after talking to people at lunch about TLS. So you want to be having your communication securely between the different services you use within Amazon. RDS just comes as default, actually, now. I think I remember doing a few weeks ago. Once you've fired up your Postgres database, let's say, everything can be done through SSL, TLS communications. You just need to make a small change to your settings.py and do the options section to tell it, to do a full verification of the SSL certificate on the path and provide a location to the certificate that Amazon provide. This is the public key that you can easily download. You can then also use TLS on ELBs, their load balancers. It comes from CloudFront as S3 and on every endpoint. So it's really easy to ensure you're sending encrypted communications without having to go off your way. So perhaps the most well-known service Amazon has is S3, the simple storage service, where storage really is unlimited.  It also has 11 nines of durability. So once it's in there, it's pretty much staying. This is a great place for your static assets. You've already heard from other talks today if people like to use S3 to throw in there. The assets there, it works ever so well. And it works even better if you couple it with CloudFront, which essentially gives you your own CDN. So Netflix pay crazy amounts of money, I'm sure, and so do Yahoo and everyone else. But you can get your own CDN for a really very small amount. You can use edge locations provided for you. So when your customers go to your website, they get the assets from the closest to your graphical location. And as I alluded to, TLS is available by default. The first time we were testing TLS for our own websites, we found the bar was not green, it was still yellow. It's like, well, why is it still yellow? It turns out the images weren't coming from an SSL source, which is why you don't get the green. You have to have everything from a TLS provider. So one change to CloudFront, and that's done. Email, or SCS, the simple email service. As the name says, Amazon send out email for you, very easy, and it's even easier with the Django SCS module, one line in your Python settings, well, two lines, install the app, add one line in the settings, and voila, your emails from Django being sent through Amazon's email provider. And the last one is VPCs, Virtual Private Clouds. This is part of EC2, so EC2 being the computer component. Virtual Private Clouds lets you carve out part of Amazon's network to enable you to have much more fine-grained control, which is great, it's also much more secure by default. There's no public-facing IPs standard. However, it is finishly complicated. I recommend you read the docs, you read the white papers, read them again, and again, and then you might understand what's going on. The part of the reason it's so complicated is because it can integrate with your on-premise computers. So we have an VPN connection from our OpenEye offices directly into Amazon. This is really handy, but it's not easy to set up. So you might need to find your network administrator to give you a hand with that. But once it's up and running, it's so, so much better. And it's something that Enterprise really, really likes. They're like carrying their data, their machines, things carved away in a safe, secure place. So that's just a highlight of some of the services, but how do you get access to them? I'm sure you've all heard of Boto. Boto itself had a big announcement a few weeks ago that they're now moving on to Python 3 support, which is great. That was one of the sort of the top 10 blockers of biggest powerful packages that didn't have Python 3 support. It also supports East2Rolls, which I'll cover in a few slides. The other thing Amazon has leased, I think the late last year, was the AWS CLI. So just a command line interface to access Amazon, which is great when you don't need an API. What you may not realize is it's also written in Python. So once again, Python is being key to Amazon's deliverables and two easy pip install commands in HeyPresto. You've got it. So if we think about Django website, we need a database, we need some application servers, low balance, cloud front, all sorts of things. So it might look something like this. These are little pieces which I borrowed from Amazon to put together a well-performing website that's scalable through scaling groups, has low balances, a fail-over database. So how long do you think that takes to set up? You have to install all these pieces by hand. So a lot of work, a lot of effort, there's maintain all of it. Amazon have some quick easy ways to serve this whole stack for you, as they call it. But it's a lot of work. So maybe you're more developer inclined than you are DevOps inclined. In which case, there is another product from Amazon called Elastic Beanstalk, which might be very handy for you. So this is sort of comparable to Heroku. If any of you have used that, it's much more about taking an app and deploying it. And you can do it in literally three easy steps. So step one, go to the page, press launch. It's not too hard. Wait for five minutes. And this page will load up, show you a running instance. So you get a temporary sort of URI, it's the one at the top right, it's a little bit small.  You've not asked for any of these things, it's done all of it for you. And you can click through and you will see a nice sample project they've given you. And if you wanna put your own Django application on there, it is as easy as just clicking in the middle where you have running version, upload and deploy. Upload your own files and the way it goes. It redeploys and just throws your code out. And there's a small extension you can add like a git push as well to it. So when you push on your code, it sends a copy to Amazon, they put it in S3, surprise, surprise, and then upload it and redeploy. So we looked at this, it's very handy for small applications. But it's only sort of one particular way of doing it. You have to have RDS, you have to have this and that. There's no way to do Reds easily and things like that. So if you need the rest of Amazon services and you probably need to use CloudFormation, well you have to write a JSON template to say I want an EC2 instance, I want a database of Oracle, I want ElastiCache, I want this, all these things. But how many of you write JSON by hand? It's not much fun. I had a quick look, we have one of them which is 2,000 lines long. I am so glad we did not have to write this. There's another Python package called TropusFair which lets you write Python and it will output the JSON for you which is hugely, hugely preferable since it is just so awful. So I want the reasons you want to do this because here is another architecture that Amazon talk about. This uses a few of our services such as Hadoop and DynamoDB, this one's for sort of online gaming and CloudFormation can be used very easily, far of all these different pieces in minutes opposed to you having to say install one machine, install the software, fire up another machine, install the software again. Makes it really powerful. If you got it wrong, it doesn't matter, just destroy it and start again. So I'm going to shift gears a little bit to security. So Amazon have a shared model so they will look after everything for under the hardware. Make sure it's secure, attackers can't get in, everything's patched. But once you're on the machine, specifically EC2, it's your responsibility. If you open every port on the firewall and wonder why you're being attacked, you know, tough, it's your fault. You've got to be careful and make unconscious and correct decisions. Likewise, they have another product which is called IAM, which is Identity and Access Management. And there's an excellent slide show they gave last year at their conference that covers the top 10 things you should really do with IAM. I'm going to run through them very quickly. A lot of them you're going to think this is so obvious because it really is that easy and it makes your life much easier as well. We didn't do them all at first, but I soon came around and have activated all 10 of these much easier to use hints. So the first one is just making users. So if you use Amazon, you know you get an API key, a user ID and a key essentially, but you can have more than one per account. By account, I mean something with a credit card attached to it. So open IAM, we have one account, one credit card, but like 30 users. Everyone has their own credentials. Everyone can see different permissions and they don't overlap. So that makes it far easier than having 30 bills appeared in the end of the month. Everyone belongs to a group. This way, once you've got your permissions right, you can make sure everyone gets them and everyone has the same one. We had a few cases where users had sort of custom permissions over some they could or couldn't do things and it wasn't clear why they couldn't do this. So just get rid of those, get everything to a group. Amazon follow the least privilege rule in terms of security. So if you don't need access to it, you don't get it. A lot of their templates are quite restrictive as well in terms of security and that really does work far better. No one's ever come to me and said, oh Craig, you give me too much permission. Please, can you revoke it? I mean, it's always that we're around. I'm not sure if they ask for extra access. Then I give up an accident and they inadvertently delete every website that we have running because I'm not gonna be happy and nor will they. So you do get passwords as well and you can set a really strong password policy, a symbol with length, things like that. But you don't actually need a password for the API. The password is purely for the management console. So if your users aren't allowed on the console, then don't give them a password. The best security policy is where there is nothing to break. MFA, multi-factor authentication, it's being around the news of ways of even MFA's can be broken around. But you definitely want to try and use MFA. So the root account is the account that you get when you first create Amazon an account with AWS that's one of the credit card on. That has to have an MFA, a real MFA. That's the best policy that you can possibly think of. And then after that, power users, those that can do a lot of your count. So for example, myself, I can do anything more or less than my count. So I have an MFA as well, but I choose my phone. So it's much easier than having a physical token. And if other users we decide or deem them as being power users, we make sure they have MFA as well. Roles is something which attaches to EC2. So once your code starts to run, using Botel or Django, you need your credentials to do anything. So all of a sudden you put Amazon credentials into your code on GitHub plain text. This does not sound good. Not to mention you need to change it as often anyway. So how do you go about doing that? But a role is basically injects a credential onto the instance locally. So you never need to actually type any passwords in. When you boot up the instance, you tell it has a role. That role has certain permissions. It can then access S3 or do whatever it needs to do. And Amazon automatically rotate them three times a day. So this is really a really good way to ensure your keys are public and they get changed all the time. Sharing is a great technique to share credentials between accounts. So if you have two accounts, let's say the business group and your marketing group, and you just want to share access to S3 with the developers to marketing, you can do so using roles as well. Rotating keys is really important. So the roles is automatic. But with users, whatever policy you have for changing passwords, you should also do for API keys. So for every software you should go through and reassign your user's new API access keys. You can have multiple ones at once. So there's like a nice seamless transition. You can add conditions to your permissions as well. So there's a really sense to things like terminate EC2 instances. You might want to say you can only do that if your username is Craig and you have an MFA and you're using a security LS API point and you're on particular IP address. For example, your office IP. So you can do quite granular restrictions as well. And the root account, the first one you get, the general rule is just don't use it. It's too dangerous. So by default, Amazon now don't give you API keys with it, they've taken them away because it's such a security risk. You can look in the news, people have had their root credentials hacked and all of a sudden they're held up for ransom because you can do anything for those credentials. You can delete the data, you can terminate instances. It's just too bad. Just don't have them, then you can't lose them. Definitely have the physical MFA as well. So AWS support is a paid extra. Something that gives you email in 24 hours, although I find it's normally a lot less and you can access to telephone and chat which is pretty much instant. It's been really useful for us. Amazon released a lot of new features and very often they update the API and the website. But as I've talked about using CloudFormation, they don't add CloudFormation always straight on to a new feature. So an example is the ELBs have a timeout which you can now configure but only manually. So I wrote in as an email and said, you know, this is super but we really need it as CloudFormation as a feature request. And Amazon were really customer driven. So you do have to be very proactive when you're saying, you know, this is important to us and they do get around to slowly changing it. If you are serious about using Amazon, I'd recommend joining the partner network as well. It costs $2,000 a year, but they give you $2,000 credit. So it works out, you know, an easy win. Get access to some training and things like that too. And if you're really serious, get an account manager. They've been hiring like crazy. Get an NDA signed and then they'll tell you things down the road map as well as well as getting access to private beaters. So some of the products you see today we had access to early, which is really good to test them out, good feedback and finding about road map features is very handy because it can go wrong where you might make a larger order of new network hardware and then find out the next day that that feature is now part of Amazon and your life was hard way to deal with. So it's good to be in the know. So as I said, I'm keeping up is a tough part, but there's quite a few ways that I found that seems to be relatively successful. So there's the main Amazon blog as we're following. They have a few other blogs as well, which are like Pacific on topics like security, Java, big data. There's a mailing list. Once you've joined, they'll soon find you. So they'll start mailing you anyway. Their Twitter account is very useful. And like the blog, there's some sub accounts for IMA for their top tips. They do summits around the world. It's like one day conferences in Tokyo, Singapore, London, San Francisco, places like that. And then reinvent is the annual customer conference. So that's also worth going out for three day, much like DjangoCon. It's a lot of information thrown at you. So when was the last new feature for Amazon? Well, this morning, obviously. So I checked on Twitter this morning, Jeff Barr, their senior evangelist, who's blogged about and shared a quick tweet about a slight change to the interface for EC2 and how you can filter instances. There's only a small incremental change, but one day you might come in and find the feature you've been waiting for for months is now there. So just to conclude, Amazon is really easy to prototype with. The services, they're not exactly for you. Maybe you want Postgres in a slightly different flavor than they offer. But just to get going with it, it's so easy just to fire it up and use it. And then when you're ready to roll your own, if that's suitable for our PC2 and whatever you like. Get your IAM settings right from day one. It's really easy. There's top 10 tips you can do in an afternoon, and you will, grateful. Things do change. So what, 280 changes last year? We're already well on the way to taking that over already this year. So you're going to have to keep up. And just as they release new features, there's also price drops. So there's been over 45 price drops so far. So you'll get new features, and your bill overall is always going down. So it really is worthwhile. And if you're new to Amazon, there's a free tier, which lasts for a year, includes lots of storage and all sorts of things. So it's worth trying that too. So just before I finish up, I'm going to do a shameless tag for a never open night presentation tomorrow. One of my co-workers is talking about OAuth 2. I think we've found it very important for us to open night. I'm going to thank you for your attention at the end of the day. If you've got any questions, feel free to ping me on Twitter. If not, I'll be reached at 10 now.


Good morning. Today I'm going to try and rebuild the TechCrunch website in just 30 minutes. Before I dive into it, this is future me, so I've already dived into it. I've just finished and it went pretty well. These are the things you're going to learn if you watch this video. First up, how to make a sticky navigation the right way, how to create pro post layouts, how to change your global styles, how to understand the new image ratios in WordPress 6.3 and also how to understand when it's okay to put content in your page templates. Right, let's start the clock. Over on the right here, I have the TechCrunch website and over on the left I have a blank website just running WordPress and the 2023 theme. I have added some posts to it, cheated a little bit, but fundamentally we've just got a fresh website just freshly pressed and over on the right we have the TechCrunch website. So I'm going to try and turn this one on the left into something approximating this one over the right. I have a rough idea how I'm going to do this. I'm going to use columns on this front page and then I'm going to use the query loop block to bring in the posts. This is going to be the navigation block over here which you can align vertically and I also, you'll see as I scroll up here, I need to make it sticky. There are a few different layouts over here on the right. You'll see here we've got an excerpt in the middle I think to start with and because of time I'm going to take this one as the one I want to turn replicate over on the left. Right, let's crack on. So I'm going to go over to my site on the left and click on edit site and that will take me straight into the site editor. The first thing I want to do here is I'm going to create a brand new front page page template. So I'm going to go to the plus, click on add new template and you'll see here I can add a new front page template. This is going to be my new front page. I don't want to choose an existing pattern. I'm just going to delete that down and now essentially I have a blank canvas where I can reconstruct the site with. It's pretty straightforward I think. All we've got here is columns. We've got essentially two columns, the left hand column which is there which is basically just going to be my navigation which has to be sticky. I'm going to show you how to do that and then right hand column over here just contains post essentially but format is in quite a complex way. We're going to use the query loop block for that. So let's start just by adding the columns blocks. I'm going forward slash columns. That is a shortcut that you can use to add blocks. Now I can choose the layout I want. I'm going to need to change these proportions because they probably won't be correct right but that's fairly close to the one I want. So I click on that and that's going to set my columns for me. Actually it's not far away. I'm probably going to reduce this one in size which we can do here. If I just show you this you can see you can actually come in here and change the width. So we're probably going to be looking at more sort of 80, sorry 20, 80 I guess. So let's do that now. So I'm going to change that one there. I would recommend as I always do to use the list view a lot when you're editing this stuff and now I can change this one to 80. Again we can finesse these as we go along but that gives me my basic sort of column layout. Then all I've got here is some stuff in my left hand column and some posts in my right hand column. What I want to do to start with though just to show you how to get the sticky bit working because that's quite important. I'm just going to add some content in the left and right column. Just some basic content and then show you how to apply the sticky position to it. All we need in the left to start with is the site logo. I am actually going to add the site logo just so we got it done. So we're going to use the site logo block and then we can upload a logo which I've already got here actually and there's my logo. You can change the size of it by making it big or smaller. It won't go bigger than it actually is but that's probably okay. Then I'm just going to hit return and forward slash navigation. Now I want the navigation block and it's going to bring it in and I'm going to edit this later not now but the one thing I will do now is just change the orientation so we can get that roughly right. Again I'm going to want to add some padding to this. Now over on the right here I'm just going to literally put a whole bunch of text in here and this is just so I can test my stickiness because you see at the moment it's not sticky. It won't stick because I haven't applied the sticky position. Let's go back to the list view and I'm going to show you how you apply a sticky position. So the trick to understanding how to do this is to kind of think that stickiness can only be applied within a container. Something can only stick within the container it's in. So we can't stick this column because it doesn't really it's not within anything. We only want this column this content here to stick so what we have to do is we have to group the content in that column first so I highlighted them both. Click on the three dots and we're going to group it. As soon as you group it you can now make that entire I mean essentially it's the column but we're making the components within the column sticky so just come across here make sure you have groups selected and you'll see this position option here in the customizer and then you can just click sticky and now that will make that content sticky. So you'll see as I scroll that column I mean it looks like the column is sticky but it's actually the content within the column that's sticky but it's had the desired effect. Next up I'm going to move on and add the query loop block over in this right hand column and that's going to bring the posts in. Let me show you again what we're looking at over on the right. Now the one the actual formatting I'm going to try and replicate is this sort of layout here where I've got the post title on the left and the featured image on the right because this is going to show you something really really cool that you can do with the query loop block. Right first up let's get rid of all that content that I've just dumped in those so I can multi-select these paragraphs here and just remove them all in one hit and then I'm going to click on plus and I'm going to search for the query loop block. There it is just another block that comes with a standard with WordPress and then I could start blank but I'm actually going to click choose here because I know that there is a layout that is close to the one I want and let's scroll down and we can probably see it there's a few that are close but that's probably the one I want it's nice and simple but the key bit here is it has my featured image and the post title into separate columns which is really powerful because you can do lots of stuff with this I'm going to add it to my page here it is you see it's not quite right one of the issues we've got is the featured images on the wrong side but let's look at the list view because this is really cool if we come into this you can see and what's what's cool about this is you can actually split your query loop which is the components of your posts basically into different columns so you can see here we've got the main query loop block at the start and then we've got the post template and there's different settings in both I've gone through those on previous videos I won't dive too much into those today this is the bit I really want to show you the fact that you can have a featured image in one column and then your post title in another column but you could put other blocks within those as well if you want to and of course because they're columns if we want to switch them around we can just switch them around like that and of course also because they're columns we can change the proportions of them so we could change this one on the left to let's say 20% and we could change the one on the right to 80% again and again you can play around with these proportions to get the proportions you want the other thing I really want to show you is that now in WordPress 6.3 you can fix the aspect ratio of your featured images in the query loop block this is great because you don't have to worry about resizing your images now when you upload them just come to the featured image come to styles come down to aspect ratio down here it'll probably be set as original but you then you can actually fix the aspect ratio that means when you upload a image regardless of the proportions it's going to fit that size so this is where I'm at I've got the basic structure right I've got the basic functionality right now it's just a question really of finessing things the first thing I want to do is add a little bit of padding around the side here you can see this tech crunch has got quite a lot of padding I probably won't add quite so much but I'm just going to go edit site and then literally all I'm going to do to keep things super quick because I don't have a lot of time today I'm going to select the columns block itself come to styles and I'm going to come down here I'm just going to add a little bit of padding again you can play with the padding settings I'm working very quickly today but you see how easy it is it doesn't take long at all and let's have a quick look and see how that looks and there we go that's a lot more accurate next up I actually want to start to change the size of the font here and bring a few other elements in you can see we've actually got the publish date and we've actually got the author as well the thing I've quickly done is I've changed the height of my featured images but kept the aspect ratio so it's more in keeping with the ones on the tech crunch website right let's just go and change some of this font sizes just click on the font again you can either just click in here or click on the list view to select it but just click on the title let's close that down so you can see it click on the title come to styles now choose the size that you want you can either choose one of these pre-selected sizes here or you can jump in here and choose the actual size yourself with different units available everything you probably expect and then you can also change appearance of it so I've got this appearance setting here and I want mine to be bold so it's more in keeping not exactly right but it's pretty close now I just want to add the author the post author so I select the block itself then click on these three dots and go add after now I just hit forward slash and then type post author and it'll find that block for me it's going to bring the author in you can customize this so I don't want to show the avatar and that's probably okay for now again I can click into styles and I can make this smaller if I want to I can do all the stuff you can normally do in fonts I'm working very quickly though and then after that we probably want a post date so again hit return and we want the post date which is there that'll just automatically bring in the post date then we just want to squeeze these up a bit so I'm actually going to select them both and group them and that will let me easily change the block spacing between them now just go to styles and you can see this block spacing here and you can scrunch those together so they get smaller so I've just finessed mine a little bit so I've made this one super light and this one bold and actually for this text here I have selected a black appearance here you can have extra bold as well and that's kind of more in keeping with the tech crunch website just notice something else I've missed which is this little bit here can you see it's actually got the category of each post above it and it's green so I'm going to just select the title block here and go add before and we're going to see if we can add the categories block just before and see if that's going to work and let's go categories looks like it's going to work yeah it's brought it in so we just need to style this now so I'm going to select it and go to the styles of that one and it's going to be a link so I want to make sure I click on that I'm going to grab the color as close enough grab the color and let's see how that's looking and that looks pretty cool doesn't it I'm pretty happy with that I guess no that's pretty good we've got a little bit too much space between my category and the actual post title so I've grouped them here and then hopefully using the block spacing setting I should be able to bring those much closer there we go that's pretty much that's pretty much perfect though this is where I've got to my site is over on the left it's looking pretty good I need to sort out my navigation but the main functionality in the design is done this is the layout I was trying to do you see these are slightly different some of these because they have essentially that would be the excerpt block so all I would do is add a third column within the query loop block and add my excerpt field into that which I could do I might do that at the end if I have enough time but this is the layout I wanted to do you see it's sticky that's all working great these all link off to the posts themselves which is fantastic they need a little bit of work as well but fundamentally the main structure the website's built let's move on and just build this navigation so there's really only two things we need to do to this is get the structure right as in the order of the menu items and change the design a bit shouldn't take too long let's click on edit site at the top first thing we're going to do is actually just fix up the order of these you'll see also at the top here we have this bit of text I'm going to add that it's just a bit of text that's fairly straightforward so I'm going to click into the block itself and now I can edit this block and that will turn it into essentially an editable navigation block and you'll see all the menu items over on the right here and these are all drag and drop so you can just drag these up and down if you don't want some of these to appear you can just click on them so I've got sample page here so I'm not click on them click on the three dots on the right here and you can remove it so it really doesn't take very long to get the structure right and there's my new structure pretty much right I've missed a few out but it's pretty much there now all we need to do is change the size of them squish them together a little bit and we're going to change the font so it's a bit lighter because it's too heavy on mine at the moment so I'm just going to select the block itself come across to the right here and you'll see we've got our styles as we normally do actually the first thing I'm going to do is just change the scrunchiness of them so I'm going to change the block spacing you can just change them here you can see you can squish them up and down so it might be okay for what you want but you can also jump in here and actually set either pixel or the other units that you might want that's probably enough and then the other thing we're going to do is change the appearance of it we want it light I love light there we go it's light and then we just need to change the size fundamentally and that's probably too big and medium might be too small yeah so it's probably between those so you can actually select one then click in here and it'll give you what you're currently using which is really useful when you're trying to sort of visualize the size of these that might be a little bit small as well let's try 1.65 and that's not too bad at all though I'm pretty much out of time but I'm very happy with how it's gone here's my finished site you can see I've got the sticky working I think the formatting is pretty close it's certainly in terms of the spirit there's a few little differences but fundamentally we've got a tech crunch replica website in about 30 minutes not using any plugins just using core WordPress and core Gutenberg blocks