Yeah, this YouTube team keep it clean. What's going on is engraving here with another video and another episode of NFL Question from subs and another special episode featuring our guy Ken aka Film study Raven's y'all check him out on Twitter y'all check out his website y'all follow his podcast Do all that good stuff show love for Ken because he shows a lot of love to the flocking You already know this dude. He's been putting on for a long time a long time So he's been bringing that information that super detailed information He is great with the analytics with the numbers all that stuff He'll break down stuff that you ain't even know could be broken down but anyway This episode of NFL question from subs features him and of course what question from subs This is a series where you can ask me any NFL question and we answered in a video just like this And if you want to be part of it Send me an email to team keep it clean at gmail.com or for the patrons you can send it directly on Patreon you want to become a team keep it clean patron go to patreon.com slash engraving vids, but without further ado Let's go ahead and get into the second edition of question from subs featuring film study Raven's and Sticking with the offensive line next question came from my guy Brian Williams. He said was having Raven been a while Hope all is well with you and the fam My question is do you envision a signing by Baltimore and know he wasn't talking about Jalen Smith or Stefan Gilmore from yesterday He said I'm thinking for the offensive line We're gonna get Stanley and Phillips back at some point this season and right now we're kind of plugging playing in people I know the Ravens love versatility in their players, but you always Say this phrase play them to their strengths or the play I'm suggesting is Rick Wagner He knows the Ravens organization and how they operate and knows what it means to play like a Raven and most importantly He's a natural right tackle to be honest. I like McCarrey and Alejandro, but I don't see them in Baltimore beyond this season What are your thoughts also? Hope we can do business in the future. You and the fam stay safe appreciated Brian um Rick Wagner, I would I would be a little worried and maybe this is me looking too much into it, but I know that he was Considering retirement So I know and I've seen a lot of players a lot of football players say it when you start considering retirement You're still thinking about it. Oh, it's gonna happen sooner or later. Like that's why I don't expect Jimmy Smith after this Yeah, I don't expect him to be back. I think he's gonna go ahead and hang it up But with Rick Wagner know I've heard about Rick Wagner read about people saying Mitchell Schwartz, too But I just with Mitchell Schwartz I'm not sure if he's fully healthy right now But with Rick Wagner, I would just be worried that he Maybe he might not be in the best of shape if he was considering retirement because if you're considering like hanging it up You might be relaxed and you might be chilling like, okay, well, I ain't got to work out today I'm gonna take today off. I'm gonna take it easy But Rick Wagner, I would just I'll be worried about that. How would you feel about Rick Wagner Ken? Especially with him having been here before Yeah, I I loved Rick Tackle as I loved Rick Wagner as a right tackle in Baltimore And you know if it really is a case of it has he kept the weight on in a lot of ways a lot of offensive linemen They immediately lose weight as soon as you retire, you know, we say Marshall Yanda biking doesn't even look like the same guy I mean, that's that's not a guy who's ever coming back Mitchell Schwartz is another guy who's lost a ton of weight And so I don't I don't think he's a guy who's who's gonna be coming back or if he does it would take time Part of the problem with the whole NFL this year is that just re-assimilating Players to your own building takes time with the COVID protocols And so you can't have an immediate answer and then you're asking yourself Wait a minute is Ronnie Stanley may be gonna be back in three weeks And then I only have this guy for one and so does this seem reasonable and you know people I think a lot of GM's are balking at that the Ravens are good They have four offensive tackles on the practice squad They got to find two of those actually that work and try and play them. I honestly I don't believe Andre Smith is the answer But you know, maybe it's maybe it's another guy in the practice squad that that can really help them Like David Sharp, maybe what is the other guy is not Not odd and Ely was his name Adrian Adrian Ely He's he's still on the practice squad, right? He's still there. So on the practice squad And he's a developmental player a right tackle who's got some real You know good ability to push what we've seen from him in the preseason Highly you got to consider context because he's only played about the last 15 20 snaps of some games And he looked great then but you know, I think I think you need to consider context with him and He'll he'll I don't nobody's taken him so far, which is a little surprising to me But then again when you take somebody from another team's practice squad now you have to elevate them And also you have to process them. So yeah The next question on this episode of questions from subscribers came from my guy Brandon J He said ain't gravy. There's no over here with two questions I saw last time my questions were too wordy. So I'll keep these two shorter. It's all good Brandon No worries number one Obviously, we have williams and some running backs off of yesteryear on harasta My question may be premature, but next year we get back gust edwards. We get back jk Dobbins and we get back justice hill Real quick before we get into this question question that I have for you because it was something that I was confused on With justice hill, they did the uh the waived injured reserve to justice hill How does that work? You know, I'm not the person to ask that question to but if justice If justice hill went only to injured reserve meaning he stayed on the roster and he went to injured reserve Then he's still under contract for his fourth year I didn't I I guess I'm not exactly familiar that they did a waived injured reserve Which might mean that they terminated his contract put him on injured reserve And then I don't know what his status is for for 2022 Yeah, I have to look that up because I was I was super confused on that Um, yeah, it's just weird And he said do you think that any of these current running backs as far as gust jk and justice hill? Do you think that any of these current running backs will remain with us? next year Oh, and okay, I think he's he means the uh the guys like levy on bill the elder statesmen. Yeah So from what I've seen so far I think Latavius Murray is is probably a low percentage chance to be around next year You know power back, but I think he does a lot of things that the other backs do in particular that that Guess I guess edwards does but I don't see any hope for freeman I think he's he looks like he's done to me bell looked surprisingly good in that second app Both as a blocker and as a runner So I'm interested to see what he still has left left in the tank and I'm shocked that they Sat down tyson for a week. Obviously they're concerned about the fumbles, but You know the raven's offense needs a speed back in order to really have the full playbook open And if you're not going to have williams by the way, I think you really got to use use Duvernay as a running back or as a as a jet motion option Uh, because I think otherwise you really don't have the full set of threatening the field. I apologize for the dog barking here No, that's fine. That's fine. Um, and yeah, uh that them sitting tyson Williams last week I was really confused about that because I was for sure since we all knew levy on bell. He was he when he got activated We knew he was going to play but I was 1 000 percent sure. I'm like, okay It's going to be levy on bell It's going to be letavious murray because he's been getting a lot of action too And it's going to be tyson williams and divante freeman He's going to be the one that they sit because they're not going to have four running backs active And they got to sit somebody so it's going to be freeman. Why not? But when they Had tyson williams uh inactive I was like, oh, okay that I didn't see that coming I didn't agree with it either. I didn't see it coming because he Yeah, those guys they don't have that burst like tyson williams and like you mentioned. Yeah, the fumbles have been a concern um, but still I just I I didn't see that coming at all. Uh, and as far as next year, I um Levy so much depends obviously on how the rest of the season goes, but yeah freeman. I don't see him coming back uh, letavious murray I Just I don't see it because I don't think especially at this point in his career. Um I don't think that he'll want to take Third place as a running back as just a reserve option because You get you're getting gusts and jk back and and of course you hope that would just gusts and jk that when they do Come back that there are no setbacks. You got to see how they uh, their body responds to the injuries and how they can bounce back and whatnot. Um, but Yeah, I just I really don't see them as of right now. I don't see any of them coming back But again, everything depends on how this season goes and how they respond to the injury Now the second part of his question. He said i'm not gonna lie I've been impressed with greg roman's play calling this year, but I do see one issue We have major issues on third down I would love to hear your thoughts on this and can it be changed with coaching? Getting back players that were on injuries or or is it a mental thing? Keep up the good work and hopefully you and the family doing well and as always Keep it clean Now there was a stat. I don't know if you know the stat off the top of your head But there was a stat that they kept showing during the broncos. Yep But the ravens were like Some crate like two for 19 or something crazy. I forget what it was On Yeah, it's like third down and six or seven or more and they were they were I think starting the game. They were one of 17 one of 18 something like that and then they they might have converted one during the game Um, that's really a reflection of the offensive tackles more than anything It's not Lamar's having a great year throwing the ball. Um on first and second down their play action is all available to Lamar and he's been very effective with that Um on third down when the when the other teams are pinning their ears back that exposes the ravens tackle problems to the greatest possible degree And you know, it makes it makes it more difficult and teams have been willing Uh to take more chances rushing the ravens specifically the broncos. That was the most extreme Rush game Jackson's ever faced but not only that I think maybe any raven is ever faced Even flacco was you know, a guy who wanted to stay in the pocket didn't really like to be moved He was never rushed at a 70 rate in one game 70 five plus From the Denver Broncos in this game just really unusual I'm going to say one more thing. It was disturbing That when you look at the yards per play, it got worse with every additional rusher But I'll tell you it's it's off the top I had when they rushed four he threw for 9.8 yards per play when he rushed five he threw for 8.5 yards per play All both good when they rushed six and they did that a lot He rushed for 6.1. Sorry through for 6.1 yards per play And when they rushed seven he threw for 3.0 yards per play on five Five five plays five seven man rushes in a game, you know, right there. That's telling you they're keying in on something They like about that Hmm. That's well those those some powerful numbers. I'm scary numbers, too And um, it almost makes you think like Because you know if You have access to those numbers, you know the coaching staff has access. Oh, yeah And future coaching staffs will have access to those numbers as well um Because yeah, it's a copycat league and if something works against the ravens and other teams are going to do it And I don't know if uh, the broncos they watched that lions game and they were like, oh, you know what? this is how you stop their running game because Lions did overall. I know the ravens still ran for over 130 yards I forget the exact number that they ran for in the lions game, but Even with that it was still uh, not one of their better russian performances against the lions And then the broncos it it came down to that final play for them to even get over 100 yards So with that, um, you almost wonder if the coats are like, okay So this is how you stop that ravens running game But let's do it. Now, of course, you still got the passing game now, too Um, but you almost wonder if the coats are looking at what Denver did With russian six and russian seven and russian more To sort of mess with the ravens passing game, which has been really successful over the past overall Has been really successful over the past couple of weeks Yeah, I mean, I think that's a real possibility and and the coats if you go back to the jamal luis era The coats were one of the teams that knew they were small upfront So what they did is they did a lot of run blitzing and so denver effectively by playing These extremely tight Set piece formations, which means they're their front seven guys are all very tight to the line of scrimmage It they yeah, they had some eight man box too and that helped to get justin simmons in there and making some plays But the the thing that really I really noticed about it is it was like watching super bowl five again In terms of having those linebackers so close to the line of scrimmage play after play after play And when they're willing to do that and and shoot gaps with it directly That creates this very high risk high reward structure on every play that flakko has to throw I sorry flakko jackson has to throw to beat it But but he had but he uh, also is taking chances to do so And so what what I think they're going to really need to do to make sure other teams Don't do the same thing that the broncos did is really have good check plays for lemar at the line of scrimmage So if he sees blitz he can check to a very quick slant pass or other pass that will get the ball out of his hands quickly And then they're they're also going to have to have More help and more inline blocking Even than they've had so far so they're going to have to be willing to have some two man and three man patterns Which normally I don't think that you want to limit the number of those that you have in a game very Very strictly to essentially a two man Two men kept in is what you would call max protect And you don't want to have Eight of those in a game if you have three if you have four that's okay But but you really want to limit the total number you have


Here is what we're after in building the feet We're going to have two pieces of just rectangular on the very bottom or the fifth layer then there's a Rectangular board that's 18 inches long That is lined up or these two are lined up on the edge of that. That's the fourth layer for the other three layers as You're going to see we put them together by assembling four pieces for each one and Those four pieces put in a pattern After they're cut the size is supposed to be create a nice mortise and then the Tenon of the feet is going to go into that mortise. So this is what the foot looks like it's five layers Just too little on it ends. We're going to we're going to concave these to give a little form here So we're just going to use a sander or some method of taking off this edge and concaving these and Then rectangular piece three more layers And that forms our foot We will finish it off when everything is assembled or before we do the final assembly by rounding over this edge and Rounding over this edge and sanding everything up nicely And we're going to polyurethane it when it's all been assembled and actually this will look pretty cool When it gets all polyurethane and that'll be a nice heavy steady Foot and we're going to have obviously four of those. So that's our foot build Okay The job in front of us at this point is to round off the ends of our feet just so that they look attractive I don't like nice blocky thing like this. I want to more round it off So there's two ways you can do it a couple ways you can well the many ways you could do it What I've done is I've set my saw stop saw and hopefully yours will Do this as well so that you can use your table saw for this function If it's the first time you set it at 45 degrees make sure you make see if it's clears your plate Because maybe if you're off alignment, and then you go 45 degrees something's actually Gonna catch so always check your blade by Rotating it making sure that there's no encumbers. Okay in marking up your pieces here We need a round over now you can decide and maybe it's a good idea to learn how to use a Compass if you don't remember it from seventh grade and get yourself a cheap compass off of Amazon or somewhere else And the beauty there is you can set it for any radius That you want and the way you would get a certain radius So let's say you bought a set of plans and they called for you to do a round over of a certain type First of all normally you can do round over or whatever Whatever radius you walk to or maybe not even worry about what the radius is or maybe you don't know what the radius is But anyway the way that you could do it with a compass is if you said hey I want to lay things out with a One and a half inch radius then set your compass to one and a half inches Go out and mark or you could just use a straight edge easier mark one and a half inches from from one end Then I'm going to show you how I don't even bother with this I just do a radius of my own choice put on my glasses and a half inches Then go down here this nice two-sided ruler mark myself one and a half inches Then I would put the compass on that one and a half inch point right on the edge With the point and make a little arc and then put it on the other one and a half and make a little arc and Where those two arcs meet? Then put your point on that arc and draw Your circle quarter of a circle and that's how you'd get a certain size round over Using the compass so again come out whatever the distance is go down Whatever the distance is then do an arc from there and an arc from there And then put the point on the arc and do your circle when you drag a compass kind of lean it and drag it All right, but that's a big hassle. You probably won't know where you put your compass. So here's another way It's called the polyurethane way So what I've done is taken a can of polyurethane now you notice my cans a little damaged Like everything in my shop I crowd too many things on my store shelf And then they eventually drop off when I'm reaching something else But anyway, I got a good circle for a quarter of this So I've kind of marked off up here at 12 o'clock and then over here at 9 o'clock so I got 90 degrees between here. That's gonna be a good part of my circle take my Workpiece where I want to round off here and get those two marks The night the 12 noon and the 90 degree where they're flush on the end of the board take your Pencil I love these click gear 1000s particularly the 9 millimeter that don't break on me and Although I can't use my millimeter from it use my ink remarking devices They'll take your pencil and do that round over That is called a polyurethane round over or whatever can This is a polyurethane. They're all the same size you probably 12 of them on your shelf You always know where they are All right, then what you want to do is Take your compass Forgot what it called doesn't matter. You know what it is And now we're gonna for once in your life. We're gonna use this 45 degree angle here So take that 45 degree angle figure out which way you'd have to go so you're going across the angle This is wrong obviously, so let me flip it over and there we go and then with that With that handle on the edge Slide it forward toward your circle until you just touch the tip of your circle Now you can draw a 45 degree is across your workpiece and that will show you What we're after here is we're after Rounding this off To make it easy on ourselves. I don't want to do all that sanding all the way down There I don't want to sand that much So I'm going to cut it off at 45 degrees and then I'll have very little round over to do to finish it off So that's what we're doing now.  I line that up With this right hand side of the slot Which is the right edge of the blade and I do my 45. Well, then if I tried to slide it down here The blades go in the wrong way so what I need to do is mark this side over here and Then flip it and over and No, don't flip it this way. That won't do it. It could work. We're already gonna have cut that side So mark it on this side flip it and over and and Mark it on this side So get my polyurethane To my high noon dot and my nine o'clock dot both lined up on the edge It doesn't matter what radius this is The only thing that matters is are your items consistent from item to item so that you got a nice symmetrical look So there's my polyurethane arc take my 90 degree or 45 degree Ruler set up here go across that line and then When I Do one cut Keep keep your table saw clear at least this side of the fence Lot of noise now here we go So here's a triangle that I cut off So that's perfect There's my cut You can see how I've Cut and got right to the tip or the apex of that curve And now all I got to do is sand down these little edges here to get down to my line So there we go I was gonna be off on here because I went to shut down the camera realized I've never turned this one camera on which is kind of critical for this sequence Anyway, I'm reshooting and I'm gonna bother to turn on the close-up camera so we cut off the 45 degree on the table saw and That gives us the ability to get mostly where we want to be in order to round off So you can now round off by sand hand by saying hand by hand Using probably 60 grit a little device here that instead of sandpaper uses a little wire mesh Roughness and that's 60 grit. So you can spend a lot of time doing that Hopefully if you have orbital sander that'll help you get through the process again using 60 grit or maybe you've got a Belt sander either a handheld or a bench top model like this. This is not very expensive I would certainly Recommend you add it to your workshop as soon as you can if you don't have one already It'll save a lot of labor now. It kicks out a lot of dust and so you do want to have your dust collection system on there and That's about all I say and we're just now trying to clean up our feet and get these rounded over Uniformly and you can just do that by kind of holding it on here and rotating it and rotating it I guess that belt no magic and It's gonna look really cool When you get done because all those layers of that Russian birch or that Baltic birch When you polyurethane that over and you got it nice and sanded Actually ends up looking really really attractive. So here we are with a plywood piece But we're gonna have some nice look to it All right for the dust collection on And I'll just do one since I forgot to capture it earlier. Let me move this over This is a big old rubber eraser You want to get that to clean the grit on your sandpaper and buy yourself some spare belts So you can put them on from time to time I see mine's getting a little thin here, but it still works awfully awfully. Well So and don't burn out your machine by pressing down too hard. Just a light path underneath your Workpiece is all this needed. So let's get her. Let's get her going Well, as you can see it didn't take much to get that rounded over doing that by hand would be laborious I'm gonna go back and figure out if I want to do more of it on there Or if I want to kind of finish it off by hand looking for any little left over rough spots So anyway, no magic to that just sand it round and You'll like the way it looks when it gets polyurethane. So this is kind of what we're after I'm ahead of myself here, but I'm gonna concave this out and I've figured out yet I'm gonna cut a triangle first maybe again on my table saw and then Concave it by using sanding and Get a little profile down here if you want to leave it square. You don't want it to go to the effort. This this looks okay We'll do one and compare it and see what looks better and to see this side how much effort you want to go to All right, so we'll see you on the next section because you've got five different layers that you're gluing together You're gonna end up with a ragged edge I mean probably your pieces are cut a little bit different sizes They may have slipped around during the glue up They might have gotten glued up and you get all sorts of ragged edges I know I did yours is probably better than mine was. So what are you gonna do about it?  What I'm gonna do even though what this is too tall For my saw blade to get all the way through it can't reach that high. I got about a little over three inch height so just take your miter slag get up along the edge and you know cut it on one part and then just flip it over and Line it up as best you can and cut the other part and then if you need to flip it over and do it again Just go ahead and do it again. And when you're done, you should be able to get a pretty darn smooth Clean cut on the right-hand side. The total depth doesn't really matter You're not gonna take off that much and trying to achieve that and you might leave a little bit of rag ragged edge Even after that process in which case you're just going to take it and sand it off All right, so so that that's the way to get those edges level without Wearing out your arm sanding


Hello, yeah. This is a sort of state of play of a project I'm working on for building my own electric motorcycle because I've built various other motorcycles and now moved on to something electric. It's using the methods and systems that an online group called Open Inverser Dodge and their forum have been generated which takes a slightly different approach to hacking the components of electric vehicles and hybrid parts. I almost called this talk how I'm building a monstrous electric vehicle from hacked scrapping electric vehicle parts but my project was on motorcycle so that's what I chose as the as the topic. And with things like this is why as the the guy just said I built a diesel motorcycle in fact I built several diesel motorcycles four in total. One of them had a Volkswagen TDI Golf engine in it which was a turbo diesel bike and that worked really well and now I'm looking at moving on to something a bit more up to speed with current technology. I've also worked on many self-built electric vehicles. I used to work part-time or help a guy that sort of built and mended and converted cars and kick cars but that was I know whole numbers about 10 years ago and it was all lead acid batteries big DC motors and similar so it's very different to what's available now. I remember when I was doing that the very new cars on the on the game were the Prius and the Leaf and they're now very established vehicles. I also enjoy technical challenge I quite like that sort of thing the novelty the novelty of doing my own one. I put a question mark there because electric vehicles are no longer novel and I got cheap because it's cheaper than buying new again that's a relative thing because you've got your time and of course as I'll mention later on the batteries are there's no cheap way around that and economy of use and then right at the bottom the time is right and this is because electric vehicles and hybrids especially are being around long enough that they're now in the breakers they're being broken there's nothing special about the parts which makes them cheap and especially the Prius which is why I'm going to focus on you can pick up parts of those that the prices are just not special at all it's it's quite good so the time is right for that and I'll go over briefly in this presentation about the main components being the motor the battery briefly about battery management I'm not going to go into that in detail the inverter or the power controller used for controlling the motor charging and then I was gonna have a section on chassis and wheels but decided I couldn't really get into half an hour and besides the project really hasn't got that far so that the rest of the presentation is mostly going to be on how I'm going to do it rather than my previous presentations which would blow by blow stage of assembly to get over mechanical issues so I'll start with things in a different order than my list so I'll start with a battery so looking at existing electric vehicles I've just picked two at random being the zero which is a sports bike and the Harley Davidson live wire which is more of a cruiser just from ballpark look at how far you go and the one has a 14.4 kilowatt hour battery in it and the other one has a 15.5 kilowatt hour battery in it and the one has a range depending on how fast you go which is wind resistance and the start of riding is between 112 and 156 so these are the sales quotes and the Harley of 110 to 146 so you know you've got about between a hundred and about 150 miles out of those two which gives you an idea of how many watts or what hours in energy per mile they're doing and from that you can back calculate and say well I'm building a similar vehicle with similar aerodynamics and a similar size with you know it's a similar chassis arrangement compared to a car so I'm going to get a similar power requirement than these which helps it's very difficult to work these things out in advance with any great technical accuracy you can buy new batteries but what I'm looking at is what's in the breakers what can you buy and as I've mentioned the hybrids and the electric vehicles in the breakers and unless you know what you're doing these these are quite weird things there's a lot of places that still terribly frightened they're terrified of being electrocuted which is a potential problem but most of the batteries is when you cut the main 12 volt supply to it because all electric vehicles and hybrids have a 12 volt battery for running the lights and the radio and all the other systems as a conventional car with the same voltage range of a 12 volt battery once you cut that internally to the large traction battery there's contactors which isolate it so unless those isolators have malfunctioned you take the 12 volt battery off an electric car and the battery is safe to handle as a battery I mean when you take the lid off that's that's a different matter the technology of batteries is is as we all know it's all lithium a majority prismatic or rectangular cells in the electric cars I believe there's only one manufacturer I can think of that still uses cylindrical cells that's you know a choice I don't know why everyone uses rectangular cells and then and then another another company still is round ones I've I've not looked into the technical details enough to know why that's chosen but when looking at buying batteries it's it's a risky market because you don't know if you're buying a dead one or a good one or you know you take the case out and it's full of bricks it's it's it's you've got to do a bit of homework and trust the person you're buying it from or turn up with multi meters and tools you can't just put a multi meter on an electric vehicle battery you have to take the lid off and measure the cells there's a variant on that but I'll come to that later on so so the cost of the batteries I I spent a lot of time surfing eBay and online suppliers for for a second-hand battery and it was very difficult to say is it a good deal is it not until I realized that if you look at the cost of the stored energy rather than the absolute cost of a battery pack so gone into there we go gone into screen save mode let's come back so if you look at the battery of kilowatt hours is the actual energy storage divided by the cost of the actual battery and end up with kilowatt hours sorry price per kilowatt hour and a low good price is is 120 pounds per kilowatt hour if you just generally go looking and they go up and up and up to 300 pounds kilowatt hour even more so some people ask ridiculous prices because they still think that electric vehicle parts are really special and people still pay the money and the other thing is when looking for batteries is the known brands are always the favourites when people say all let's buy a let's buy an attraction battery from electric vehicle for running a project whether it be motorcycle or hacky racer or something they go oh yes lose the leaf we've heard of the leaf and someone else says no let's use the Tesla battery because they've heard of the Tesla and they've seen the the media propaganda that says they're the best in the world and then they ignore the fact that there's there's now dozens of electric vehicles and hybrids and these stop-start cars have nice 48 volt batteries lithium batteries that are quite high discharge rate the price of those hasn't dropped yet so you could kind of think out the box a bit and just look at them as as cells rather than branded parts so what I chose was a BMW i3 battery and there it is outside of its enclosure each one of those eight modules weighs I think it's 20 kilos which is quite high but not ridiculous compared to the the big turbo diesel motorcycle I bought when you think about the whole weight of the vehicle and for scale there's a pair of gloves and the actual motor there will all laid out as it was beginning of the or this was about a month before the pandemic hit and and I was all keen to work on it and then the pandemic hit and and I had all the time in the world but very limited income so basically the project has been on hold until this spring again because I couldn't afford to invest in it anymore but anyway it's a 96 cell battery 94 amp hours it's 33 kilowatt hours of of power and it's in 12 so eight 12 cell modules which module is is 20 48 volts and the other interesting thing whether I cover it now or later on is each of those modules has its own battery management system attached to it and then they're daisy chained around the the pack and then when I come on to talk about battery management in a moment people have reverse engineered the protocols so you don't have to put your own battery management system on it you can use the existing one and then use the hack to know now not open source but reverse engineered codes for for for then integrating that into your own system that one of the common things people say when I say I'm thinking about building an electric vehicle they say oh no they say the battery life what are you going to do when the battery runs out but there's been laboratory tests on on these particular cells and and those tests have either been published or found and put up and these cells are rated at 4,600 cycles in average usage but but 100 depth of discharge which is the worst case it puts the most stress on the cells going from completely fully charged to completely empty so that's 600 cycles until it's 80% depleted in usefulness at which point it's considered end of life even though it still would have a huge life after that and the i3 that the battery came from could do a quoted 125 miles per full charge and if you multiply those together you get an expected life of 575,000 miles which is way in excess of the average life of most vehicles these days within the original battery pack there was a very simple heating to prevent frost and and then there was quite a complex HVAC air conditioning type chiller in there to stop the batteries from getting too hot this is incredibly difficult to reproduce especially on a small vehicle like a motorcycle so I'm going down the path saying the UK is not an extreme climate we're not a desert we're not the Arctic it's kind of damp and horrible the whole time especially today and I'm not really expecting the the very narrow operating zone to be exceeded in normal use and if it does I can just avoid the the extreme power that they can't supply and I'll avoid rapid charging in those conditions which shouldn't be too too difficult to do and too much of a hindrance the I say the project is largely uncomplete but these are the batteries stacked up and I've got six in two rows of three with the other two on top which forms like a low rectangular format so I'm going to be building a battery box around those and then building a girder frame around around the battery box just behind it you can see the motor and then I've got a wheel on there pretending to be a seat just trying to lay things out I've covered this one I was looking at the battery so most battery packs have the built-in battery management systems it's been hacked the other interesting thing is quite recently there's a company called Zephyr is an Australian company and they've been making battery management systems for large electric vehicles which is quite special you can't use the sort of thing you'd use on a model the radio controlled model because you're talking voltages three four hundred volts as nominal and it has to be isolated and everything else and and this company made battery management systems for kit builders and they've been doing it for 14 years I think they're quite respected and the reason I mentioned them here is they went out of business last autumn which is not the sort of thing you want to announce but they've kept their website open they put a little bit of blurb in there and they've kept their catalogue and everything open but instead of clicking on the the byte now cart it links to a zip file and in the zip file you get circuit diagrams girber source code the hex file to upload straight to the the the micro and they even got stl's for 3d printing your own cases and enclosures which I thought was an amazing gesture from a company who decided not to operate anymore and the motor again there's many motors available I've chosen a Mitsubishi Outlander motor which is the one pictured but there's there's other ones like Leafs Prius the Lexus rear motor which is a transacres like this the Outlander which Outlander which is this which is a is a motor gearbox I don't know if you can see on there you got the motor on one side and then the gearbox and then and then there's the two ports you can't see because they're side on that the axles will go straight out to the wheels so you know if you were converting a car you'd put one of these where the engine was connect your shafts up and and that that would be your drive system it's very simple and and of course everyone loves a Tesla so I put those in there as well and basically any EV or hybrid has the motor in it they're all much the same they're all embedded permanent magnet motors I'll just have a quick picture of that in a minute and the commutation is determined by something called a resolver at the end of the motor that measures the absolute shaft position for generating the rotating magnetic field for things like field oriented control motor control for those that don't know what an embedded permanent magnet motor is is on the left you've got a conventional motor with the magnets around the outside of it and then on an embedded permanent magnet motor the magnets are embedded within the iron core obviously a laminated core and that I think allows it to spin a lot faster because they're locked within a steel in clay steel cage and it also allows the motor to act as a permanent magnet motor as well as a certain motors as a various induction motor as well the the resolver so I don't want to go over time is looks complex it's this weird looking thing on the left and what that is is a inductively coupled position sensor and in the middle there's three coils what you energize one coil and then as the magnets the not the magnets of the motor but a second pickup magnet or is it core iron core sorry it's an iron core so inductively coupled as that rotates you get different peaks that are 90 degrees out of phase on the other two coils and and when you resolve those two add them up you get the shaft position and that's an instantaneous non-contact very durable device it's it's made of coils of bar and bits of steel that's not going to go wrong you hope and again the reason I mentioned that is almost every electric vehicle has one in as part of the motor and normally there would be a very expensive dedicated chip that performs this this function of energizing the coil and then getting the shaft position out but the guys in the open inverter forum have worked out that you can energize it with the output from a microprocessor such as an stm32 which is their choice with an op amp buffer and then you can read the inputs with an analog input and do the job in software so you know that costs a couple of pounds worth of components and is easy the the the motor I've chosen again is the outlander motor it's a 70 kilowatt maximum peak it's got 195 newton meters of torque which is monstrous and it weighs 40 kilos which is chunky but not out of this world and you can get them in scrap price two to four hundred pounds relatively regularly obviously there's idiots out there who want ten times that much but you know if you if you get a real breaker who's got actual stock turnover they're selling them a lot lower and there's people at record you can get you know sort of 50 percent more on top of those figures for very short durations so that's that should be quite exciting how I solve my transmission problems is is on on the left hand side is the motor on the right hand side there is is the is the gearbox I've chosen and I've chosen the BMW motorbike gearbox because it fits the format of what I'm doing and I've made a coupling using the insides of two clutches one clutch from the original gearbox and the other clutch plate was found by by members of the opening inverter community who found a clutch that fitted the spline output of the motor because if you've ever walked into an engineering workshop and so I want a coupler made with a couple of slides on it splines on it it gets quite expensive and then when you say it's automotive they get disinterested and go oh no there's another loon coming to our workshop but I made this up for the cost of two clutch plates a lump of aluminium and an evening on a lathe building up a central buster bolt the two halves to and then I simply cut off the outside with a with a grinder I then made two flange plates with some cardboard aided design which is about the level I work out I should learn some proper CAD but I'd never get around to it but I like this method anyway and that's my transmission unit assembled and and ready to go which I think is quite neat the thing I had to do that was quite technical is get the two shafts aligned because if they're out of alignment you get a lot of wear on on the clutch blinds which I've seen as I mentioned in the previous life when I was helping a guy mend and repair a homegrown conversion so so that was that was it but the thing that the whole presentation kind of hinges round is the inverter and there's many choices because many electric vehicles have inverters I've got a list there of some I've chosen the price for various reasons partly because they're very cheap the scrap price is about 200 pounds the is it or is there there's the other hybrid that that toyota do that's less less sort of us so you can get an almost identical inverter for about 100 pounds and the approach the open inverter for me using is is they've realized that the inverters are in three distinct layers you've got the power components these are the high voltage high current transistors the power components the iGBTs and they'll be smoothing capacity as well then there's the middle layer which is the power power components control which has very fast switching edges to get very very little losses in in your iGBTs the overload protection so it doesn't explode you got shoot through protection because I'll explain that on the next slide the it has to have you know it has to be controlled from low voltage which is you should we say the car side controlled in the high voltage side and you need good isolation from that because you can't have 400 volts flows floating around a vehicle and then on the top I've referred this to as the brain bits and that's there to communicate with the rest of the vehicle it's there for reading the motor resolver for the shaft position which is is important functional part and it's for producing the switching sequences on the output that result in the rotating magnetic field and motor spin um to speed up a bit the so so this is a schematic of the the should we say the power side it's it's very simplified but you can see there's two the two grain gray modules are two three phase power stages for in the price it has a two motors it has a motor g motor generator one and a motor generator two and they spin in opposition to generate all the motor forward and reverse um movement that's that's a subject in itself but you get those and then on on the the left in the yellow part you've got a a boost buck controller and that converts the battery voltage into the high voltage bus uh so so that can so the battery is about normally 250 volts the bus voltage can go up to over 600 volts not that ever goes there much but we've got this device within it and if you flip take it apart and flip it over you you've presented with this the big shiny thing on the right hand side of the the right photo is the inductor for that power converter and on the left hand side is the um 12 volt or 14 volt uh DC to DC converter for running the rest of the vehicle the lights the heat of the radio heated seats and and you know you know all the other stuff like that um and and that's quite capable that's that's like 120 amps of 14 volts uh so it's a very useful bit of kit but when I joined the open inverter forum everyone was saying oh no they're saying if I connect this to my diy battery um it doesn't work because it's not within the price battery range of 80 to 235 volts therefore we can't use it and and there was all manner of talk about that so what I did and and this is my input to the open source world in in here and I'm it's all rather proud of it is I reverse engineered the input stage of this DC to DC converter and um worked out you could change the feedback resistors um and then you could get it to cut out at the voltage you wanted it to and I also looked at the spec of the components of that that part and realize that that the input to that can go as high as the high voltage bus so you can you can connect it to your four whole 400 volt battery and that's fine um and the actual hack is how how do we make it work for us uh we've got all these protocols going on and all these electric cars and and uh to reverse engineer that is it's both tedious and difficult and it's proprietary knowledge so you won't ever know if you've got it right so the open inverter approach is to remove the brain part that I just spoke about is to just take that out to say right we're not going to use that we're going to use our own one and pour our own one in and within the prius converter because that particular one has got the distinct layers that are in distinct circuit boards is you can pull one out and put your own one in and on the right hand side that is a a board that's produced by one of the guys on on the open inverter form you can get all the firmware for it and design files but he also sells them as well so you can buy that as a as a as an off the shelf thing take your prius converter apart unplug a circuit board plug that one back in put the lid on and it's yours you you connect to your battery management system uh control signals your your throttle your brake pedal um and and a few other things and and off it will go it's also wi-fi enabled so you configure it via a web page on on your laptop um it's briefly cover charging so I'm running out of time um I want an option on charging uh the ones available are ac charging which is type two or the socket in your house ccs dc charging or she demo dc charging which is falling out of favor one way is to use a pre-built module out of a leaf or an outlander and I believe the controller those the control codes for those the canvas signals are known so you can make those work yourself um but going back to that that schematic I just put up if you look at this buck boost converter in itself that can have 250 volts on one end and 600 volts on the other so there is the the potential to use that to charge your battery straight off the mains um obviously it's a non-isolated charger so you have to be careful with your insulation which you should be being careful with um yourself and commercial views uh sorry the the other one is to use the motor as an inductor in a voltage converter using the the main car inverter which is something the the zoe uses I think which is why when you hear a zoe when it or see see a zoe parked up and charging it's quite noisy because it's using the motor as a uh an inductor and and and and that's obviously uh producing some sound uh the again coming back to the opening inverter forum is the other way of doing it is to use an existing module to use an existing module and and and they've they've picked for various reasons the bmw lim module which is a local integration module and and that controls the protocol to the ccs charger which is a roadside charger and um and the the lim module takes very simple or comparatively simple can bus signals from the main car controller and then this lim module converts it into the incredibly complicated multi-layered multi-layered of abstraction into the ccs charger and we can control that um I I was going to talk about steering but I've I've run out of time um smaller things I was chatting chatting to the hacky versus hacky racers earlier so I put some smaller converters up so I got honda rime converter bmw i3 i3 um charger inverter because the i3 has a range extender engine in it and and then I've put up a kia 10 kilowatt motor alternator which is again it's not an alternator as you'd imagine it it's a three-phase motor with a resolver on it and and then the power control is done by an inverter which is the one on the extreme right my closing notes are I shouldn't have to say this but because there's been a vocalization of this on the upper inverter forum is the developers are not your your support line don't contact them well not don't contact them their inboxes are full they're fed up so they would rather and they voice this themselves which is why I'm repeating it they'd rather he went on the forums because the forums are very active I mean this is not a drop-in solution so there's work it works but it's a working process and lastly there should be a page of resources so if you want to follow any of this up you can so that concludes my presentation I've got some stickers I want to give out afterwards I'll be outside for but thank you very much


As you may have, in the title of this video is the mochangene, 100 milligrams. This video has been like such a long time coming, I don't actually know why I haven't. I started taking the mochangene in June I think, I actually stopped taking it in all of us because I'll decide what, which is what I'm gonna get into today. So if you haven't seen my first video on this, this is where I first started taking it on 25 to 50 milligrams. That video we linked in the description down below and also up on the icard over there. The highest dose actually got to was 100 and that I didn't last very long on. The mochangene made me quite ill and I'm not gonna say it's some really bad medication because it helps so many people. This night I reacted horribly to it and I had no alternative but to come off this medication. I was on 100 milligrams for around three weeks and by the end of that I had to come off it. I just couldn't function. And my psychiatrist actually stopped the prescription. So I want to talk a bit about the side effect that really drove home for me. So with that I had the issue that the mochangene, the first issue I had was a rash and it scared me. I had to stop taking it for a week to take allergy tablet. Then I started back on it and started going up again and when I got to 100 milligrams I noticed that my memory was actually horrific. And I couldn't remember the most basic of things, let alone anything more complicated. It made me really sluggish, made me tired. I couldn't, I don't know if I could do anything I wanted to do because I was so weighed down. I want to talk about the memory loss because people don't actually talk a lot very much and the only reason that I know is the side effects because I sat and read the psychiatric drug prescription guidelines manual to learn more about the mochangene. It actually does cause my real loss. It's a very common side effect and had I been told that before I started taking it I wouldn't have started it because my memory on its own is already really bad. But then the mochangene I started taking it and things just got worse. And my memory was at a point where I literally couldn't remember what I said two seconds later with everything. It was so hard and my memory is already really bad because of the two dissociative disorders that I'm diagnosed with. Starting the mochangene and having that side effect really really impacted me brown me out because no matter what I did I just couldn't remember things. And as soon as I raised it with my psychiatrist it got stopped. Memory loss is actually a really bad side effect. You know I just haven't seen anything on talk about it or something I wanted to do there. It really made me forget everything. The whole switching from quit IOP to the mochangene while lowering the quit IOP and increasing the mochangene at the same time. Coming down on the quit IOP really really impacted me because I was really tired but I couldn't switch off which anyone doesn't know. I take a fair amount of meds and they're all prescribed two of them are two separate beta blockers and the beta blockers are notoriously known for the fact that really hard to sleep on them. I had to take them but because of cardiac issues I was prescribed them while under cardiology. I was forgetting to do the most basic things and it just overall wasn't really a good situation at all. It was pretty horrific actually not being able to remember just like simple things like I changed my facebook password and I couldn't remember what it was. Remember if I'd eaten that day I couldn't remember like what I'd done I couldn't remember if I went out I couldn't remember if I'd been in bed or day and I couldn't remember if I had my meds or not and a side effect that I had to so when I spoke to my psychiatrist I actually did get stopped and I'm currently not taking the mochangene. I am quit IOP still and I think they function quite well on quit IOP and at night it says I take it I'm pretty much asleep. Well in the morning I don't take quit IOP in the morning anymore and I feel like I can function pretty well during the day and for me that's the important thing because obviously I'm going back to uni I have things that I have to do I have appointments to go to and different things I have to do and if I was still on the mochagene I'm not actually convinced I would have been able to return to uni because of how bad it was affecting me. The thing is with these videos the reason I talk about medications my experience and everything like that the reason I talk about all of that still is very simply because I know there are so many people that are starting on new meds that won't know what happens when you take meds and all the people seem to post on social media is psych meds are evil don't take psych meds. I am a huge advocate for treatment and recovery I am someone who is medicated I am medicated 24-7 if I'm not on my meds I can't and it's very obvious to tell when I have meds and when I have them but I have them I can't sit in these things I can't I literally cannot murder you I can pretty much sit and do anything and not really have too many emotions toward things which some people might be like um don't you want to be able to feel is it isn't able to feel emotions good my answer is no not when you are feeling low it's the worst I'd rather feel nothing than everything and I think medication is such an important part of recovery and wellness something people have to use and I don't think anyone should be shamed for taking medication some people are therapy all the way and then you get the ignorant people who don't take meds meds are bad meds are just pharmaceutical companies blah blah blah I want to say this as someone who's in the UK especially um pharmaceutical companies do not get money out of individuals they get money medications are paid for through the NHS and we pay a prescription chart I personally have got a prepayment card because I'm exempt and I have 12 prescriptions a week but I don't agree with people being like anti psych med trying to encourage other people not to take their med medications exist for a reason and that reason is not money this is something a lot of people will talk about and they're like oh my god she's just addicted to her meds and I'm really not the main med that I'm on that that is addictive would be clasipam and honestly I could get to take it so I wouldn't exactly say I'm an addict I do also openly accept the fact that some people will get addicted to their meds and that's hard glad to whatever you're going through treatment exists for a reason and recovery is always possible and if that's meant if it's not meds if it's rehab if it's inpatient if it's outpatient it's fucking electrochemical therapy it's a valid real treatment I think anyone who tries to prevent others from taking actions they need to take to get better is genuinely a genuinely horrible evil I get people say to me all the time that oh you look like a drug addict you look like addicted to your meds you know you shouldn't promote using your medications because people get addicted to them and the thing is I am prescribed my medications by a psychiatrist and people are like oh no she used to be private that's why she's got some new meds I was private over a year ago now um briefly at the beginning of this year but I am currently only under the NHL if I could afford to be I would still be in private because I I do genuinely believe private treatment is I do I openly say that but you know I'm under the NHS and yeah they whack a lot of random diagnoses funny enough for me it was kind of backwards made people like oh private psychiatrist you know prescribed low over the diagnosis I actually got diagnosed more under the NHS um I got over the over the nose over medicated by the NHS not through my private psychiatrist my hope psychiatrist actually got me off like five six mad and took away I didn't even know how many diagnoses so for me going back under the NHS is very very much that anxiety provoking because I've been on a lot of meds in my life but I am and sometimes I don't need to keep saying the same thing over and over again but I want to say this now and I mean it treatment is always I'm not going to sit here and slate it because different things with people like they're like everyone says to me like shouldn't you do therapy I have done so much therapy in my life that I could pretty much write a script but like what they were saying situation I've done two different dbt courses an intense dbt course been inpatient I've been outpatient I've been under crisis teams done CBT and CBTE I don't just generalize talking therapies I've had counselling you know I tried to do EMDR therapy earlier I tried to do EMDR therapy last year and triggered me it made me worse so currently I'm under a treat under a under a specific treatment here for trauma the main thing I'm working on and the only thing I'm really working on is trauma trauma is the root cause of majority of my issue and that's the one thing that I have to work on obviously with the whole COVID-19 thing it's been so hard I'll do that treatment but now services are opening back up again it's making things a hell of a lot easier all I want to say is if your psychiatrist recommends medication it's okay to feel anxious about it it's okay to not know all I will say is everything is worth trying because you don't know unless you try just to reiterate again I am not currently taking the much gene that medication got stopped it just wasn't the right medication for me hopefully people respect them and if you I want it or if you've tried it or tried anything else let me know in the comments I'd be interested to learn more about what medications there are what else consider taking that works because the much genes prescribed doesn't move stabilizer I don't I don't think I need mood stabilizer I think for me I need my prototyping changing getting my sleep tablet needs to change my antidepressant got increased because of the stress of everything that's been going on Twitter so I just wanted to say that words have impact and when you type something online you can't just delete it I just want you guys to know that no matter what you are going through you are not alone and also please be kind to each other you don't know what anyone that's sometimes is going through and you certainly don't have a right to comment on their life think before you try honestly and with that I will leave this video here I yeah I just thought I'd update everyone because people have been asking how's the limit being going and well I stopped taking it nearly a month ago like over a month ago and so yeah that's why I'm filming anyway I'm tired I want to go yeah bye guys


They are a pin-tweet and they're also available over here. So we are spoiling ourselves with faster websites. What's our generation's perception? If you respond in less than 100 milliseconds, it's considered almost instantaneous. Within one second, it's not bad. If you take roughly 10 seconds, the user's mind starts to wander. And if you're taking more than 10 seconds, you are never ever coming back.  And that is what I'll be talking about, perceived performance. These are the key points. I'll be talking about the Rails performance model. Then I'll be talking about passive events listeners, the new CSS Contain property. And then lastly, I'll be talking about Speed Index. So this is the Rails performance model. It was put forward by the Google developers. It stands for Response, Animation, Idle and Load, R-A-I-L. So it sets guidelines in areas which are important for perceived performance. So here we have the guidelines. I'll be explaining in detail each of these guidelines. No need to get worried about so much text on the screen. So let's start up with response. So response to clicks in less than 100 milliseconds. This can be anything, a response to clicks, toggling form controls, etc. And you can show anything. This can be a simple state change or a color change. If you're taking more than 500 milliseconds, show something. This can be anything like material designs ripple effect. Or you can show intermediate state transitions. Like over here in this example, we have Housing Go's search page. And when the user taps on a property, what happens is that we have some of the details already with us, like the name of the property, the price, etc. So what we do, we show that information up front and make a network request parallely so that when that comes up, we'll show that. So the user does not get a sense of waiting and he can start viewing the data when it comes up. And last option, if you can't show any of that, show a loading spinner. But make sure that it's your last option. Next up, another section in the response category is response to swipes. So now you want 60 FPS. To get 60 FPS, 1,000 divided by 60, you have to respond in less than 16 milliseconds. So how do you get that? Avoid heavy scroll listeners. Or if you can, just don't add them at all. Or you can rate limit your listeners using debounce or throttle. Rebounce is just something like you wait for X milliseconds for your event to stop firing and then you run your function. So in the example, B and C events happened very close to each other, but we waited for some milliseconds to actually run our C function. Similarly, throttle. Throttle is proper rate limiting. Your function is run only once every X milliseconds. Like in this example, X and Y happened immediately after A, but we had already run our function once in that time frame, so we did not run it again. So if you can't do any of these, your last option is passive event listeners. It's a new property which was recently launched. It's available in Chrome and I guess Opera. It's coming soon to Firefox. It's coming this month in Firefox 49. So what are passive event listeners? So when you scroll in onto a div with your mouse, what happens is that if you want to cancel that scroll, what you'll do is that you'll prevent default that event. Now a classic example is when you scroll on Google Maps, what it does, it will prevent default so that it can zoom into the map. Now the browser does not know if your listener is going to prevent default or not. So it has to run your function so that in order to determine whether this function is going to call prevent default or not. So which causes sluggishness? If your function is very slow. So what is the option? I solemnly swear that I won't prevent default in my scroll listeners. So through passive event listeners, you tell the browser that my function will not be doing prevent default or does not need to prevent default and it can go ahead painting the next frame. So here's the syntax. The third parameter is where you used to send your captured true flaws flag. That has now changed to an options object and you can send a passive true parameter key so that to tell the browser that this is a passive listener. Also, if you still want captured true false, you can just add a key captured true false. How to determine if browsers have this feature available? Simply you just add a test listener. You pass in an option object with a getter on the passive key. If it checks for the passive key, you are sure that this browser supports passive event listeners. So here's an example. So over here, I have my timeline enabled from DevTools and what I'll be doing is I'll be scrolling. You can see that the frame rate drops when I'm scrolling. Let me give you an example with prevent default. You see I cannot scroll. Now I add passive event listeners. Frame rate constant 60 FPS. Cool. So your browser renders the next paint before it calls your function. Again, if you call prevent default with passive and listeners, it will fire that, you know, what does it fire? Unable to prevent default inside passive event listener invocation. Cool. So passive and listeners next up or if you want to disable, if you want to prevent default, you can add the touch action none property. And if you have a horizontal carousel where you want to pan on the X, you can pass pan X. Another area where performance of scrolling performance gets degraded is infinite lists. So what you can do is make sure that your DOM elements remain constant and you get smooth scrolling. Over here we are using react virtualized for to, for enabling the infinite list. Okay. So some tips for react users. Sorry again for react. So now you guys know that react is a virtual DOM diffing library. What it does, it keeps the entire virtual DOM in memory. So what happens at the time of patching at that time, what it does, it will have the int first, the original, the old DOM virtual DOM, and then it will generate the new virtual DOM through the new state. And then it will run, it will compare those two virtual DOM. So at the time of diffing, you have twice that amount of virtual DOM in memory. So what happens just after that, after your patching process completed, a huge amount of memory resources get freed up and that might trigger a garbage collection.  So what you can do to avoid creating new objects in your render function, why creating new functions like over here, we are creating a new on click listener, a new function every time. Similarly bind what it does. It creates a new function. You should not be doing this. What you can do is you can bind your listener to your instance in this constructor and so that only one instance of that function remains. Another trick that you can use is you can hoist up your static content, static content which is independent of your props or state and so that only one instance of that particular virtual DOM is generated. But this does reduce readability. You have to scroll up and down. What is my hoisted title variable? Oh, it is my awesome title. So what do I do? No worries. There's a Babel plugin just for you. If you're using React, you must be using Babel to transpile so you can add the transform react constant elements and it will automatically hoist up your constant elements for you. Heck, you can even add the react preset which automatically adds all of these optimization plugins for you. Next up, define should a component update. If you return that you know my component has not changed, it will skip the render process entirely. Next in the real performance model, we have animate. So again, we saw to get 60 FPS, you have only 16 milliseconds per frame. So we saw earlier the render pipeline yesterday. Just a quick recap. If you have JavaScript, your JavaScript will apply your attributes. It will change your styles. Then your style is computed. It takes up your DOM and it takes up your CSS and creates your CSS or some. Then layout happens, which is sort of like wireframing. Your various elements are positioned on the screen and then paint happens, which it paints each of those elements and then composite happens, where it takes up those elements and then it stitches them together. So these are the properties which trigger different parts of the pipeline. The higher up you start, the longer it's going to take. So for example, if you are modifying something like margin and height, it's going to change the position of the elements. So it might change the position of elements that are below it also. So that might cause a re-layout. If you are modifying properties like color, background color, et cetera, you'd only need to paint again. You know that the element is in the same position, so layout might not happen. Next up, if you animate properties like transform and opacity, what happens is that it takes up the already painted layers and just stitches them together in the composite factor. So what you aim is that you start as low as possible so that that particular step happens. So what do you do? Four things a browser can animate cheaply. Transform, translate, scale, rotate, and opacity. You may need to add the translate G0 or the translate 3D 0, 0, 0 to push the elements to a different layer, to pushing the elements into different layers such that they are painted individually so that they can be reused during the composite layers. Also, there is a new translate 3D 0, 0 is a hacky way. What if you want to add a different value to it? So you can use the build change transform. That will also push elements to a different layer, but make sure that you don't push everything to a different layer. It's going to slow down your render pipeline. It will create different small, small GPU renders of all those different elements. To determine which property triggers which process of your render animation type line, you can check out csstriggers.com. It gives you an entire list in which browser in Blink, Gecko, what the float property will trigger, layout operations again, et cetera. All css properties you can check out over here. Next up, let's talk about the new csscontain property. This was introduced in Chrome 52 and Opera 40, and it's coming soon to Firefox. It has huge developer support. So what is? If you define contain layout, you tell the browser that my elements which are inside the elements which are inside my current, any descendants of this element, they do not affect layout. So for example, if a layout of any other elements, so example over here, we have my child live, which whose layout, whose position does not affect my untouched live. So what happens is that layout of the entire document does not need to happen.  So yeah, so this is the highest performance benefit that you get from the csscontain property. Next up, contain paint. So with this, you're telling the browser that no descendant will display outside my contains bounds. So it's sort of like overflow hidden. So if you have position absolute and position fixed elements, they are positioned relative to their first non-static cally position ancestor. If there is a closer contain ancestor with contain paint, they will be positioned relative to that ancestor. So it becomes a containing block. It becomes a new static context as well. So the index works only for elements which are not positioned static. So now if it is contain paint, the index will also work. So we saw earlier that will change pushes elements to a different layer. Similarly, contain paint also pushes things to a different layer. So simply put, contain paint is equivalent to overflow hidden, position non-static. If you've given absolute or fixed, it will take up that. If not, it won't be static. It will change transform to push elements to a different layer. Contain size. So with contain size, you tell the browser that my element size are defined and its size won't change. So any descendant, like if my descendant grows big, it has a lot of text, my element size will not be affected by that. But if you don't define your element size, they will be rendered zero cross zero. So make sure that you know you've defined if you're using contain size. It's not much of a performance, but contain style. So contain style is like, if you're telling that any styles of a descendant will not apply outside that particular descendant. So for CSS, that is cascading style sheet where your styles flow up to down, this actually does not give much of a containment, but it can be helpful for CSS counters where your counter is used in various elements. It is in no way related to the shadow DOM like scope styling. So we have more shorthand as well, like this contain strict which is all four, it is a shorthand of all four. It is useful if the dimensions are set because contain size requires that your dimensions are set. So if you're using contain content, what it does is that it's a shorthand for layout plus style plus paint. So it's all except size. So it doesn't need dimensions. So this is what you should be by default using because it helps you, it's not that restrictive as contain strict but you can easily use it in your application. So here's an example of the performance improvement. Previously when we had the performance improvement, the layout root was the entire document and five nodes needed layout. Now the layout root is div box and only two nodes need layout again. So you saw that the layout process it's time decreased as well. Next up, JavaScript animations. So avoid animating using JS, if you have simple animations in CSS instead. So we saw earlier the render pipeline. Now JS animations will start right up top and on every frame your JS will be it executed, it will compute your styles and if you have optimized layout and paint won't happen, but composite will happen. So using CSS animations, your browser knows that this is my starting point, this is my end point, these are my elements which are animating. This is my duration, so it can optimize the layers accordingly. But JS animations on every frame the browser does not know that it's animating right now. So what might trigger is update layer tree. What's update layer tree? It's where the browser thinks that my current split of DOM elements into layers might not be performing. Let me try again. So it computes the layers again and it can do it on every frame and this process is proportional to your DOM size. Let me take an example over here. So this is a pull request. It's the contents of the pull request are not that important, it's just a really huge component. What I'll do is I'll open my timeline and I'll hit record and I'll scroll. Stop. Oh my god. Okay. Every frame my event is triggered and my update layer tree happens. I'm just taking an example of scroll. This can be an animation as well. Yup. So what over here is happening is this is my stall event. Assume that this is your render animation frame or something like every frame animating something. So what over here GitHub is doing is for that sticky bar that you see it is aligning it to the center and every scroll event what it does it computes the width computes my elements with and then divides it by two subtracts listening to compute this area that you know I need to align it to the center and every on every scroll what it does it sets it's left it's a position fixed element so it's left to some particular value in pixels. So the browser thinks that you know it's his animate he's changed something my layers might not be efficient let me run update layer tree and you see that it took 28.28 milliseconds a lot more than your 16 milliseconds budget. So you saw that my scrolling was actually quite performant it was still smooth because GitHub is using passive events listeners it has started using it and but if this were not passive you could actually could have actually seen this like so a few months ago before passive event listeners was launched GitHub over huge PRs was completely unbearable to use on mac chrome I don't know if this bug exists across other windows chrome as well I'm not so sure so on firefox this is this run smooth but on chrome at this may not be a bug from either side from chrome side or from github side github can say that you know at firefox it runs well why not on chrome chrome can say that hey why are you setting the same value again and again to the style why can't you just see that keep variable that you know the last value was this and this is my new value and check that if it's not different why are you setting it again so either way it clashes that you know which side it's a bug on you can check this out right now with the link is over here so also for JS animations avoid set time out and set interval for callbacks what will happen is that you don't know what frame rate to hit you know your users may be using various devices and you don't know how performing that device is going to be so if you overachieve code for the same frame might run in the same frame and you might drop some frames and if your code if you under under hit and you set your frame rate to be low then you might not be using your users device to the full potential so use request animation frame or which library or a user library which does that for you what it does it gives you a callback on the next animation frame we saw that this earlier also from yesterday's talk okay next up in the real performance model is idle so what is idle idle is the time when after your page has loaded the user is scanning through your page during idle time you need you would want to perform your heavy computations during this time before you know the user is starting has started interacting with your site so make sure that you do this in blanks of 50 milliseconds before the user begins to interact so that you are not wasting your time for some future resource your user is not waiting on some future resource to use your website to use your current page again PRPL PRPL is polymers performance philosophy what it stands for is push your critical resources render your initial route pre-cache your remaining routes and lazy load your remaining routes so what essentially during idle time what you will be doing is you will be doing pre-cache and lazy load there is a new feature which is coming up in Chrome that is request idle callback what it will do it will call you when the browser is free so you don't need to determine how do I determine whether you know how that the user browser is free so this is a new spec which is coming up Facebook and GitHub have started using this it's currently available only in Chrome but it's coming soon to other browsers as well next up load so the guideline set by rail is to load in one second and in India 3G connections that's very difficult for first load so what you need to do is that you need to aim that at least your repeat users should for them the page should load in one second there are a lot of areas where you can optimize your load time explaining each one of them is outside the scope of my talk I'll just I'll just talk on one important metric that is speed index which is important for perceived performance so let's take a look at these two examples over here we have Gmail over there we have Amazon I need to play this so which one is faster obviously Amazon because you know as in when the things were ready with Amazon it started loading it with Gmail what happened was that you know it needed to load everything for your inbox and then it showed it so what is speed index the average time at which visible parts of the page are displayed expressed in milliseconds and dependent on the size of the viewport so what speed index how to measure speed index what is done is that you take a video of during load time and you see which pixels represent their accurate state at the end of the payload frame by frame so what you do is that you plot the visual completeness of the two of the other website on a graph over here on x-axis we have on x-axis we have time on y-axis we have visual completeness so Gmail you saw that you know initially some white space was equivalent to in its final stage so we saw that it was 18% visually complete in less than one second but then it took 11 seconds to reach 90% complete visual complete while Amazon as soon as the initial stuff was ready it showed it and it was 85% in 4.5 seconds and slowly it loaded the remaining so what is speed index speed index is actually the area above the curve and the slower the speed index the better a speed index less than 1000 is what you should aim for but it's okay for repeat users make sure that it's less than 1000 speed index depends on network conditions and screen size so make sure that you are comparing to speed index course that you maintain your test conditions webpage test allows you to do that just a quick example so over here we ran a webpage test for our website and check it out I don't have net again sorry okay so what happens is when you run webpage test on your website it will show speed index a metric and I just wanted to show that I'm at the end of my talk so again the summary response tap to paint in less than 100 milliseconds swipe to paint in less than 16 milliseconds to achieve your 60 fps again animation each frame in 16 milliseconds idle time use your idle time proactively schedule your work make sure that work gets completed in 15 milliseconds of deferred chunks load make sure that it's ready to use in one second at least for repeat users aim for a low speed index and that's it excuse me can you show the slide you are in the first slide okay they are available they are pinned to it on my twitter handle as well as easy as HK 110 if that's simpler to write thank you any questions full bouncer or no questions okay I think so this must be pretty old stuff nice talk you need not be sorry for react it's also JS anyway so my question is have you tried the purple pattern what's your opinion about it come again have you tried the purple pattern what's your opinion about it the PRPL we are using it but we are not using polymer as such so instead on housing or PWA once the page is loaded our service worker prefetches the other pages the components for the other pages as well and for push the P part we are not using HTTP push right now but we are trying for it it's not specific to polymer as such yeah but PRPL we are using PRPL yes thank you yeah you've talked a lot about the technical aspects of creating performance apps what about the psychological aspect have you done any work on like what kinds of animations what kinds of user interactions make the app appear faster as to actually being faster no I have not done so essentially they should look performant at least you should not have as a technical point you should not have jank or sluggishness but like how your motion should be I think so there is google's material design which explains in detail how your animation should be if you are going from one page to another make sure that your animations are fluid and they look as if they are going in that order and you can follow google's material design for that we want to show you an example of contain just give me some time I'll connect to hb what's the password phone what's what so over here we have an unoptimized example let me just open timeline e2 record okay so I am animating over here this is an unoptimized example let's take a look it was not that slow but sorry I can't actually see okay here's the example term reader.github.io css-contain there are two examples an unoptimized example and an optimized example you can run a timeline over both of those examples you will see that the layout process the time taken for layout does not decrease that much if you have a very fast laptop but you can see the number of nodes dropping and you can see the the root layout for layout process it's the on which you have set your contain and the number of nodes that need layout that would drop also so one of the so one of the so one of the reasons for using pure js animation over css is interrupting css animations are not interruptible css animations are not interruptible so that that becomes a use use case for using pure js animations but at the same time we are the use case are not so complex enough that we need a library like react motion so how do you go about interruptibility in js animation I mean performantly doing js animations when you want a interruptive you want them to be interruptible okay I guess you know just remove the element from DOM on the next animation frame add it again with the final state that is one thing that you can use I guess other than that I'm not so sure hi would you comment on would you give a comment on the velocity js if you have ever used for a DOM animations yeah can you tell that hello do you hear me yeah would you give a comment on velocity js for animations so I have not compared javascript libraries but we saw a flash talk yesterday on greensock I really like that library I come from a flash background so I used greensock earlier when I was working with flash and it's very easy to pick up in javascript and for ads what happens is that you have you need to load your ad very fast and what google ads what it does it that it restricts some libraries for you know so that you are using the browser cache for any libraries that you are using in your ad so for google ads for animation it recommends greensock as one of the animation libraries that you can use in your ad would you explain again passive event listeners okay okay so we saw the example earlier yep so this was over here what happens is that we have a scroll listener added and it's a very slow scroll listener so what happens is every time I scroll my framerate drops over there do you see in that so what happens is that on every frame the browser first runs your function and then it paints so that causes you know your framerate to drop so what happens is through passive event listeners you tell the browser that first paint and then run my function so that gives you 60 FPS no it all depends on what you are doing you can do anything if you are modifying some CSS attribute you might cause layout again so we saw github's example we were scrolling on that really huge PR what it was doing it was doing something to compute the that sticky that it has to for that sticky behavior it had added a scroll listener so what github does is that it sticks that thing to the top of the page now it all depends on what your listener does github's listener causes update layer tree if your listener just does something which causes the composite to occur it might be fast as well but through passive event listeners you are telling the browser that you know call my listener later render the frame first yes that's it so suppose there are no more questions then we can get the next speaker on stage thanks a lot Aziz Aziz will be