Hi, my name is Daniel Connell. I've been running a project developing things you can make yourself from recycled materials Which using basic tools with the idea that they be makeable by anyone anywhere under any circumstances wind turbines hydro turbines cook stoves Just basic basic human needs kind of stuff and then documenting it doing full construction tutorials on how to make it and Use it and replicate it. It's all open source. So welcome any feedback Especially if you do end up making this Please let us know we've got links to the Facebook group and my email in the description. Please post photos and all that sort of stuff Today, we're going to be making one of these which is a rocket stove optimized for cooking It's just made of food cans and some insulation. We use in this case perlite a little bit of twisting wire And that's it all the materials involved here are about two dollars Basically just got food cans three large to medium Three small these don't have to be like specifically this exact size like as long as they're generally about right and then the other materials twisting wire Perlite, this is the only stuff that you're likely to end up paying for but it's real cheap. It's about $2 worth here if you can't get this for some reason. I've also used pumice, which works really well It's just like the small grain stuff vermiculite which is Similar to this the tools will be using a pretty basic just a pair of tin snips just scissors for metal Pair of pliers snubbed nose is better than needle nose for when we'll be using these twist wire A stick for poking Pen magic like a permanent marker for stirring lines and a can opener for opening the cans I prefer this kind like the Jaggy tooth kind it's Better for a process which I'll explain when we get to that bit. So in terms of safety It's quite easy to cut your hands a bit of sharp bits of sharp metal. So if you're worried about that wear some kind of work gloves and Other than that it's pretty safe We'll be going through like fire safety and all that sort of stuff how to use the stove itself at the later in the tutorial Uh, other than that it's yeah, it's not too Dangerous a process you'll probably live first take one of your medium cans take the paper off and then we're going to be just like opening this Three quarters of the way around so not taking the fourth thing out So that you have like a flap like that And then you want to draw a line which basically Starts from one end comes around to the other end and you want that to come out by about 30 degrees It just eyeball that like it doesn't need to be precise push that out of the way a little bit and you want to cut Lines at about like a quarter of a way around Between the rim and that line you just drew fold that bottom One in being really this is Kind of the point where like you want to start thinking about not cutting your hands So just be careful like take everything slowly don't rush and then probably using your pliers Just to really crimp that metal Bend those corner flaps down sort of they Lock So then take one of your large cans and you're just going to trace an oval On that which this can is then going to poke out through at a at its 30 degree angle and then just mark the center and then draw So half that and then quarter it and then third those quarters So you end up with 12 segments And then you can use a drill for this next bit, but you can also just use your can opener just punch a hole In the center there Very roughly Large enough that you can then get your tin snips and cut out Those sections this doesn't need to be precise. I mean very little of this needs to be precise Really This can be a bit fiddly For the first couple of cuts if the metal just goes sideways on you rather than cutting Then just sort of try to bend it back flat so you can get like a proper Slice into it and again be real careful with your hands here because if you're going to cut yourself This is when you're going to do it So that you end up with that which is super rough, but that's fine doesn't need to not be And then just bend these tabs out So just reach in with your pliers to the base of the triangle and Then just check that that goes through there Basically at the 30 degree angle that it's going to be on We're now going to do basically the same except in here to accommodate one of your small cans Which will also be on that same 30 degree angle. So take one of your small cans Remove the top and the bottom This is the bit that's going to be facing like downwards And your chimney is going to be on the top so Draw an oval in that part of the face there And this this bit just sort of eyeball it and then kind of just eyeball So using the same width but just make it longer So it's in an oval And I mean if it turns out too small you just cut it larger and if it turns out too large we'll be Wiring it back shut so And then do the same thing of marking 12 sections And then punching a hole and then cutting it out in the same way Like so make sure that that goes nicely in there And then we're just going to put a loop of Wire around there and then twist that off so the trick of twisting wire Is to sort of grab as far down as you can with your pliers on the twist You don't want to keep twisting from the top or you're basically like if you're like using the wire to twist itself If that makes sense, then you're basically going to break it You want to always be getting down to the base of things So something like that essentially And then just to stop that from wandering off. I usually just bend a few of these tabs down So that's the back half of the burn tube and the first sort of third of the riser So your wood is going to be in here your secondary combustion is going to be in here We're going to just like make the other half of the burn tube So take your can opener you want to cut around two thirds And then leave about a centimeter each side of like connected metal And then cut out the rest. So you have two cuts a large cut and a small cut and then it's going to reach through carefully and bend that top flap out and down And that basically is now like a little shelf For setting your wood and gives you a little bit of extra length that it's going to like be held up gives you like a little raised lip which kind of like grabs onto the wood so I can't slide out as easily And lifts the wood up off the bottom of the tube So it can be surrounded by flame and air and burn a lot more effectively And this cut is to feed oxygen feed air into the coals Which are going to collect in the bottom of the tube now to connect this into here in a sort of strong nice way This is going to be on the bottom on that bottom side Just make little one centimeter or so like really not very not very deep cut And then just crush that in with some force and then Just compiling all of these together take your inner bit here Chuck that so that it's poking out through the hole there Taking this bit here And then just forcing that into there very carefully because if you slip you're going to touch the metal This can take a little bit of force like that And then twist this front can so that your shelf is horizontal So you can see this is starting to take shape now You've got the burn tube where your wood's going to go here And this is going to be your your chimney sort of with the double wall So we're just going to top and bottom Your remaining two small cans And your large cans and then we'll just Then we'll just be stacking those together So you've got those two and then just going to be Snipping these again like little snips on the edge to lock those together So just keeping in mind that you want if you've got like an inward facing Sort of like into the can that's going to be your outer Whereas if you've got like the bits that are sort of like pokey outy They can be either inners or out is it doesn't really matter and then without dislodging things too much Just jam that in there And so this is the chimney It's not so vitally important that these connection points be super strong Because this is going to be like surrounded and like packed in in your installation Anyway, it is important that The the connection between the two burn tube like medium cans is strong And when these ones go on These ones go on here. Um, you want this to be strong downwards Because if you've got like a pot of water or something heavy on there You want that like downward force to be to be quite strong And then so we're just going to do similar With your large cans or cut off the top and bottom Then on either side of these you want to just make four Really little cuts just like a centimeter evenly spaced And then you're going to have basically two tabs That go outside So you just want to bend Those out a little bit and to the go Inside for like two opposite ones sort of go out a bit the other two go in a bit And then you're just going to drop that over here that Essentially and then same with this one And I actually don't really love this connection method It's good and strong for downwards force, but it's a bit sort of gappy and like you can get like pearlite Spilling out of there because the outer wall shouldn't really get that hot because like you've got so much insulation in between You can put some tape like some gaffer tape or something around there just to seal it in but it seems a bit Inelegant so if anybody has a better idea of how to do this Then let me know there's this is all a open source project Um like everything that I design So like you can hit me up in the comments or send me an email My email address is in the link in the description Also, we have like a facebook group, which is like the discussion forum for all this And you can ask questions there, but also like please post results like if you do make this Please let us know and so then that's quite strong downwards But not necessarily strong upwards So if you've picked this up, especially when it's like got the insulin in there and is Full weight that can then separate out Sort of why I don't love this connection method, but it is sort of good and strong That way, especially when this is fully packed. So just a loop of twisting wire or some kind of fencing wire or whatever you're using Around the base there just to lock it off And then just make sure that that's chimney centered one of the last steps we're going to do is we're just going to basically Fill this with pearlite It can be handy to use like one of the lids that you cut off here Just as a sort of like shields that you don't end up Pouring pearlite into your chimney there So just make sure that everything's sort of like basically closed off. There's only huge gaps And it's going to like piss out and do like it's quite fine grain stuff So it can find its way into your burn tube here And if it's like the occasional bit here and there like that's fine But if you've got like a serious hole then it's just going to like pour in there So that's what the twisting wire was for basically And so that's just a matter of pouring that in there Get things nice and centered and then taking your stick just Making that nice and compact So you just want to fill that up pretty much to the level of the inner tube so that you end up with that kind of situation so On this one like the the tube is that the burn tube is not really kept at 30 degrees like it's sort of I'll sort of let that sort of get a little bit flat, but it'll still do the job Just remains to make four cuts evenly spaced And then it's bending out from those lines triangles So bending like sort of just bending the the corners in essentially And that's to give like a gap for the fire to get out And so you've got like a pot on here like that's like a space for the flame to get out Otherwise it'll it won't draw it won't won't flow but it also Makes these points just stronger Because if you just like cut down and sort of bent a tab in or whatever like these would be quite floppy But having those corners sort of like bent over makes them a lot more stable so that they'll take like heavier heavier loads and then one last step Just to sort of make the thing a bit sort of safer and nicer these um these tabs here uh, just sort of give them Just like bend them back on themselves Basically, let's curl them And it's basically it it's important when you light is the first time That you do so in a ventilated area because there's sort of plastics and metals in here Which will burn off with that first burn when it gets up to full temperature And then after that they won't be present anymore But just that first time just give it like you know five ten minutes like kind of empty space don't breathe it basically and uh after that it should be good for indoor indoor use if necessary So this is about the size of wood that you want about a centimeter or two square and Yay long just enough that it can reach the back of the uh of the burn tube and be resting on the On the shelf here It's important that you have the wood in air as much as possible Which is the reason of this little shelf here because then like you get air all around it you get fire all around it You get coals underneath it And it burns a lot more effectively you don't want to overstock this you don't overfeed it You want to have About like when it's running optimally and up to up to temperature you'll have like about a quarter Full of coals A quarter full of wood and then half full of air and that's about optimal the more flame you can get from your wood The more volume of flame and if you can fill like your riser with fire Then it bumps up the temperature you get a more complete burn It's a lot more efficient and it dumps all of the energy Out of your out of your fuel Into what you're cooking like very very quickly and you'll have to keep like you know keep an eye on it It'll go out after like five or ten minutes because it was burned through the fuel But if you're cooking on it anyway, you're going to be here It's not like a sort of set and forget heating kind of stove. It's a cooking stove So it's something that you're going to have your eye on so the limitations of the stove are Mostly the materials that it's um there's food tin so it's thin mild steel So this won't last forever. This isn't meant to be this isn't meant to last forever This isn't something you'd build into your house and like you know have for for decades and pass on to your Jordan This is meant to be rapidly makeable rapidly deployable and do a good job It's for low resource environment global southern countries disaster relief refugee camps Camping preparer situation survivalist situation homesteading like anywhere that you need to be able to cook food Heat water very quickly and easily with like basically nothing in materials This is a very cheap easy and effective design So lighting it is just a process of putting some some paper some kindling In the bottom of the tube not too much just enough to hold a flame A couple of little wood chips some surface area and then a couple of Long bits especially if you've got something which is a bit sort of feathered Just to take that initial flame and I find the easiest way is just to light it in the uh the oxygen gap Once it's going You'll know because we'll stop smoking wood will start burning away into coals Once you get the coals in the bottom of your tube then Anything you put in there just gonna burst into flame essentially So that's that that's how you make it. That's how you use it Like I say if you make one of your own, uh, please let us know post in the comments from the facebook group Uh, I just wanted to add that this uses about 80% less firewood than equivalent open fire So in a lot of parts of the world that means people have to spend less time gathering firewood less deforestation less soil erosion and less um Less smoke means less smoke inhalation less respiratory disease which kills more people per year than malaria Um, and it's lightweight. It's portable. It's easy. It's safe and it's good. So Yeah, that's it. Thanks for thanks for watching like and subscribe, etc


What is going on guys welcome back to the channel and I appreciate you being here today I bring you another Destiny 2 video and in this video I'd like to talk about the current meta versus a new meta coming with the Forsaken DLC. We saw many many changes to the way weapons perform in the recent combat reveal stream by Bungie so I thought I'd take this moment to talk about how the current meta being a Graviton Lance and a Vigilance Wing will work and perform within the Forsaken meta not many people have been speaking about this so I thought I'll take this little time to do a quick video on it. Will these weapons be just as monstrous if not even better that we will discuss today people but before we get into that guys if you would like to show your support to me in the channel hit that like button really does help me out and I do appreciate that support also if you are new around here and enjoy daily Destiny videos be sure to subscribe and stay tuned to the end guys to find out about my monthly controller giveaway okay so during the combat reveal stream a few days back we saw Bungie confirm many changes to PvP in terms of how weapons were performed with this new weapon law that system being able to run three shotguns was obviously going to be a problem for the game in terms of making many other weapon archetypes pretty pointless to use because let's face it if you can run around three shotguns or capable of basically one hitting you in a certain range no one how quick people can learn these maps having three shotguns which make you invincible to an extent anyway so to combat this Bungie have implemented a new system in place which basically increases precision damage across the board for all weapons so if you are using let's say an auto rifle and someone comes charging towards you with a shotgun in their hand aiming for the head is going to drastically kill them wake we can develop would before this system also allows for hand cannons to through tap and push rifles even a fastest of fire rate ones to almost two bursts in the head which when you think about it is pretty damn crazy now if we look and compare the current stat values we actually see the percentage both these weapons get from precision shots when they demonstrate their 390 rounds per minute push rifles weapons are such in game now is like the autumn win they do on seven and a few of us we see it does exactly the same to the body but games more precision damage by seven per shot so from 24 as it is in game now to 31 when a forsaken releases on extra 21 damage per burst which doesn't make a true difference if you think about it to burst you get almost 45 extra damage the 600 rounds per minute auto rifles my personal favorite in the game now in the current meta we see it is exactly the same to the body but to the head it would do for more damage per shot when you take this to account along with a fire rate this is actually a major change for this weapon when you take these calculations into account it equals out in these weapons doing between 1 6th and 1 8th extra damage depending on fire rate and archetype this is a big difference in a game where things are getting quicker and quicker but you did make it clear for us to compete against those who will know that abuse three shotguns that will be coming and it probably will be the new meta who have to aim for the head in order to be able to compete making us work hard on our diet but it's a change I do welcome my question is though as they didn't actually mention anything about it and that is the impact of weapons such as the gravity of lands and the vigilance wing what we saw after 390 rounds per minute push rifle demonstrated by budget and the changes in damage this weapon will possess within the forsaken basically takes up to the standard of the gravity of lands and vigilance wing as they are in game now meaning it within the forsaken will close quick or if not faster than the gravity does now so how would a gravity and vigilance wing perform within the forsaken will this precision buff also apply to these weapons which are not that the best in the game now if it does and the same rules apply in terms of precision buffs the gravity of lands will almost become a two burst the vigilance wing as it stands now is basically a two burst unless against no resilience titans or a buff adding one six to one eighth damage buff means it will kill anything in under two bursts which is absolutely crazy a burst and a half I predict you can miss half of the first burst and maybe even half of the second burst and still land the kill I mean I understand when you need a system in place to counter through shotgun loadouts and this one does seem like it could work and be fun at the same time but the overall time to kill we saw when they demonstrated PVP within the forsaken look great super fast and there was hardly any difference in terms of weapon balancing for what you'd expect from certain weapons hand cannons with a crispy three taps to a certain extent three burst pulse rifles and auto rifles which seem to be on point but this isn't with the inclusion of the gravity and the vigilance they mentioned nothing of this they mentioned nothing about these weapons so because nothing was mentioned about them we can conclude that this damage buff will also be applied to these weapons I mean these early days and bungee can adjust damage outputs we know they can do individual weapons now without affecting the entire class or archetype and I'm hoping that is what's going to be the case I mean the way PVP is at the moment I wouldn't say a damage nerf is needed to either these exotics in fact it's quite the opposite bring everything else up to that standard and that is the right way to go about it within the forsaken review and it seemed as though that is what they showcased everything's been brought up to that standard and can kill just as quick as a gravity and vigilance we can now but if these weapons are a part of that damage buff we will be in the exact same boat we are now with these two exotics being the daddy of weapons for PVP which is a place I don't think any of us will be happy with within forsaken I truly hope the damage buff they called across the board isn't to every single weapon in the game and certain weapons are looked at in extra detail and change to met current standards it's something I haven't seen many people talk about so I thought I'd basically start the discussion let me know your thoughts on this down below in that comment section I mean I know there are many fans out there of these two weapons the gravity and that's and the vigilance ring I myself am a major fan of the vigilance ring I love that weapon it's my go to weapon in PVP when I'm getting old but even you guys because I understand PVP can't carry on being based around two weapons a variety of weapons of equal power would surely be the more fun place to participate in that's what I believe anyway let me know your opinion on this down below in that comment section guys and I know I am out but before we do that every month people I give away a fully customizable controller for either Xbox or PlayStation sent anyway in the world to be with the chance of when it simply drop a like on this video leave a comment down below making sure you are subscribed to the channel then follow the gleam link at the top of the video description it's fast simple and legit guys but on that note I am out thanks as always for stopping by and hopefully I will see you on that next one


Back in action today, we're talking about Rainimator, that's right guys, he's part of the Freedom Talent Agency and he's an amazing YouTuber. He makes original Minecraft animations, usually to some sort of original music, often one of his friends or somebody he works with, and he does awesome stuff. He's got almost 2 million subscribers and he's got 436 million views on YouTube. If you go to his social blade, you'll see it right there. 436 million views, it's crazy. He's gotten 31 million views in the last 30 days and you know he's gone up 20,000 subs in the last month as well.  Why am I telling you that? Because maybe this is something you are considering. You want to join up with us, maybe we can help you out too. You know, we have a community of creators, a huge community of creators, and if you want to join up, the link is in the description below. Why would you want to join up? Lots of reasons. I mean, half a million songs you get access to right off the bat. You get, you know, early payments. If you're thinking about, you know, instead of waiting up to 60 days, it can take up to 60 days for YouTube to pay for a video you make, why not get paid in a week, right? Like, you know, maybe rather than waiting that two months or a month or whatever it is, get paid early by that game that you want to play or the mic you want to use. I mean, there's a million different reasons, guys, but at the end of the day, Rainymators with us, he's been with us for a long time since March 7th of last year. And since he signed up with us, he's gone up 140,000 subscribers in that time, plus another 20,000 this month. And yeah, he's just, he's just crushing it, right? And we would love to have you guys join with us. So I'm going to have the rest of a video of his play behind me at the end of this, guys, if you want to sign up and you want to get involved, message me directly. I'll put my information in the description below or go to freedom.tm, click the buttons, sign up, get the ball rolling, and we'll reach out to you and we'll have a chat. And if it makes sense, let's do it. All right, guys, thanks for watching. Ton more stuff coming up. Stay tuned. Big C out.


Welcome back to Sport 3, to our movie reaction to Kabi Ha, Ben? Kabi Na. Kabi Na. If you're seeing this on YouTube, you're going to see a very cut up version, just like the other parts. If you haven't seen part one, part two, please go watch those parts. If you'd like to see the full uncut version of each part, though, you can head over to Patreon, Apple, English, Google, and pencom. And at the end, we'll talk about this movie and how much we loved it or hated it. Steph has yet to hate a Shahrukh Khan movie, I believe? Yeah, no. How many times in Hindi movies do they have Kabi Kabi? One. One of my favorite words Indians say. Yeah. Every single time I hear it, I'm like, Kabi Na. Indians are like, something? Really? Something? That's what you like? No, I like when you say Kabi Kabi. Thank you so much. So her boyfriend just accepted the marriage? I don't know, babe. I mean, it seemed like it. Alright, I guess. It's a harmonica. A giant one. Alright. Why did you do this? Why? Huh? Tell me. One tear, Shahrukh Khan.  Now, that's it.    You fatless one. You fatless one. You're going to get into a dirty mess. Oh, no.   You lied to everyone. You should never keep a grudge in this house. You're dead for me. Be quiet. Whoa. What's the need for all this nonsense? There's a need, Prabha. A little extreme. Friends. Whatever we said about Sunil, everything is wrong. He gave me happiness. I am proud of him. No. Our blessings are with him. Everything is wrong. I am ashamed of him. Oh my gosh. Wow, bro. This is class 101 on how to not be a father. Good lord. You can be upset without saying, I'm ashamed of being your father. It's true. I don't know anything about that. The only courage of the world is that in front of so many people, he accepted his mistake. It's not normal to confess your mistake in front of everyone, Vinayak. Vinayak, you're proud of such a son. Yeah. Vinayak. That's your son. And so Shah Rakan walks away sad because his dad said he hates him. This would be me in India if I had to go to school in India. Seer gets it. Why can't you? Right now, dad. But what? They'll get your presents. Share this moment. Didn't disown our son. Yes. Oh, the dawn is here. I knew you loved Chris a lot. You still love him. But son, Sunil is such a good boy. He loves you so much. Right? Yes, son. He will keep you very happy. Son, have you ever thought about getting married? Which marriage, dad?  You're joking, aren't you? I never thought about getting married. What do you think about Anna? Okay. Anna. Anna? Well... Well... Our Anna? Which other Anna? I like Anna a lot. Yes. That's what you mean, Anna. Sunil. But does Anna like you at all? We're talking about your and Anna's marriage. You go to Anna's house now. Ask for her parents' permission. Like in their society. I mean, Christian people. That means, dad, I have to go today? Yes. Not today? Right now? Hey, sit down. Yes. Now tell me. Yes, tell me. I keep buying book hails like that. Tell me. And Mrs. Gonzalez. Yes, tell me, son. Mr. and Mrs. Gonzalez. All I want to say to you is that in the whole world, the most precious and most beautiful thing is your daughter, Anna. And I... Uncle, are you willing to get married? Of course, of course, my son. Of course, I'm willing. I'm very happy. Hey, what do you see in me? My face is sweet. All of it. All of it. Yes. Sunil. Oh, my God. It's such a good day today. I think a very important person is missing. Sunil, son. We are going to church. Father Brigenda has an important discussion. Tell me that guy is coming back. Bye. Bye. Anna. She's run away. Anna. Hi, Sunil. Never mind. Hi, Anna. I'll always keep you happy, Anna. I'll never, ever, ever trouble you, Anna. That's it. I want you to love me so much. I love you so much. I don't think she gave you an answer. Did she? She didn't say anything. Yeah. But will you never forgive me because of this one mistake? Okay. I forgive you. But there's no point in talking about it now. You know how much I love you. But still, you talk to me like this. The rock-on's going to have to give her up. Anna. Anna, I gave you everything. Poor love. I can't break Sunil's heart in any way. I love you. I love you so much. So, there's no point in loving me in your life. There's nothing. It's too late, Chris. I'm getting married to Sunil. Don't worry, Father. Sunil will be back soon. He can't wait any longer. He'll have to start right away. I'm back, Father. Sunil. Hi. Hello. You didn't come for a second. I'll get married. How can you do that? How can you get married without Sunil? How can you do that? Excuse me. Can you tell me the address? Please. I'll leave you. Anyway, I'm going there. Thank you. Thank you so much. Come. Thank you. Is this all yours? That... I took all the stuff. Please, give me that bag. No, no, no. Don't worry. I'm used to it now. They say, if you ask for anything after seeing the stars in the sky, you'll get it. You guys were scared, weren't you? What about your Sunil? Police? We'll meet again. Bye. A star will come from there and disappear from here. You look here. Look here. Wow. Hey! That fourth wall break there at the end. I was not expecting a fourth wall break. Don't worry about our guy. Don't worry about him. Don't worry about him. He got a girl. He's a strong guy. He was sad, but now he has another girl. Hopefully, she doesn't have a boyfriend already. Who knows? I'm usually not happy if Shogokan doesn't get the girl. Right. But in this case... In this case... I agree. His character did not deserve to get that girl. I agree. I do like that they... Especially since she showed no interest in him, really. Outside of a friend. True. True. I do like though that they reformed him even though he didn't get the girl. I like that. Such a sweet Don. So sweet.  So yeah, the Don was amazing. I like the Don. I love him. I like the Don. The... Chris. The guy that she did marry. He reminds me, like his face looks like a younger Shane from The Walking Dead. Who? Oh. Okay. You know who I'm talking about? Yeah. Who I'm talking about? Yeah, I do. I feel like they have similar face structure. I recognize him. I'm just trying to... I'm just trying to figure out... I don't recognize him. This one. He was in Cabina. Wow. Yeah. I feel like I'd seen him before. That's him, right? He's just older now. Deepak. Tree. Tree. I just feel like I'd recognize him but I don't recognize anything on his IMDb. Yeah. Interesting. And I thought overalls was nice. It was nice. It was different than what I was expecting. Yes. It was... Because I was expecting romance again, romance Shahrukh Khan. And it was more kind of leftovers of Dar. Yeah. Essence of Dar a little bit. And then he reformed and now he's going to go into his love era. Maybe. Because this was... I think it was Buzzy. I can't say the name of it but it's another one where he kind of plays a villainous role. We haven't seen it yet. It's one of his iconic villain roles at the beginning of his career because he did that all the time. I want to pull it up here though so we can... Okay, so... Yeah. So 93 was Buzzygar. It's like an iconic one. So that was before Dar? Yes. Oh wow. Same year technically. He did... His first was 92 and then this is 93. But this was 94, sorry. But he did Buzzygar, Dar, then Khabiha, Khamidna. And then he gets into romance. Full swing. So it was just... I still like the entire... Because it's happened many times and we just watched Raz. And her husband got a redemption arc for some reason. Yeah. And so I was just expecting it. And that's in 2002 of Bollywood. And so this is 93 or 94. And so I was expecting it. I was like, oh okay. So I guess he just went away and didn't fight at all. And that was it. And this is how... And she's like, okay I guess even though she showed no interest basically. Yeah. She just saw him as a friend, purely friendship. So I'm actually glad that they did that because it would have felt weird. Yeah, I agree. Even though it doesn't normally feel weird for Shahrukh Khan to get the girl. Normally it feels right. I feel like in this case though it wouldn't have been right. And I think that him stepping aside and being like, no Mary the person you love is him coming full circle. He's being reformed. He wants a better relationship with his friends, his parents. He doesn't want to lie. He just wants to be a good guy who loves his people. Yeah. He was saying in the beginning it was like he's not a good guy. He deceives people. It's just hard not to love him. Yeah, it is. It's true.  So sad. And then you just want to love him and hold him. But he was a bad guy. He was manipulative. Very manipulative.  And his dad wishes he was never his father. Oh my gosh, that guy. I wonder where Sunil gets it. Clearly his father. The apple doesn't fall far. It's true. It's true. But I thought it was nice. Just not what I was expecting at all. You thought he was... I thought it was... Because I thought I didn't know a ton about the movie. Outside of what I just read. We had seen songs. Also, I thought this was the one that had, I'm the best, I'm the best. Yes, you are the best. I think I'm going to go with Sunil. Yes. And I also thought it was the one where he had to trumpet in the water. But maybe that's Buzzy Guy. Maybe. Because the one we recreated in the... I forget what video it was. One of the celebration videos where I came out of the water with a trumpet. Sorry, he had a trumpet the entire time. So I was clearly one of these songs. He's coming out of the water with a trumpet. But maybe it's Buzzy Guy. I don't know. Yeah, it was interesting. It was a lot of very early 90s Bollywood acting and dubbing. All that kind of stuff. A lot of times that's like endearing in terms of like, that's just how they did things then, man. Yeah. Just extremely over the top. Also, it doesn't help that everything's dubbed in, not the best dubbed of audio that they put over them sometimes. But I thought it was nice. I enjoyed it. The show kind of did well. If I had to choose, I'd pick him in Dar, though. I actually agree with you. Because he's a cynical nature too. I mean, like a murderous nature to him. I like it.  You just can't. Did they? What did they do to them? No, he died. He died. I couldn't remember. On the boat. On the boat, right? Yeah. There's just no way you could reform that character. He was too far gone. He was just not coming back. But even though he had those, it was still over the top and all this kind of stuff, but it was like extremely weird and violent and crazy. I like seeing Sherlock Kong go crazy. I like the Don a lot, though. I do, yeah. Nassir was going around all crazy. I know. It's hard to make Nassir like an overactor, but man, did they try? They tried-ness. They did try. And the terrible beard.  And they want to share this with the whole town and everything. They also want to share of their anger and hatred. It's all out in the public. And everybody weigh in on your opinion. And now- And everybody's like, I don't think you're supposed to say, I wish you weren't my son to your son. Yeah. No matter really what they do. Yeah. It's kind of the job. The job is you're always there. But good thing you got a good pastor in your town who can reconcile the family on the spot. I feel like he's a moocher and like uses people and like guilt them. So I feel like nobody in this town is actually good. Like at all. All cats lead to God. I feel like even her, there's no way she didn't know he was in love with her. And she was kind of just- Oh yeah. Carrying him along. You know, it's awful, but people do that a lot. In real life. That's what you did to me, am I right? Yeah, still doing it. Friend zone. Three kids later, still happening. Friend zone with benefits. Totally. But yeah, people do that all the time. It's awful. Yeah, I thought those songs were nice. I recognized a few of them. But I thought they were nice. I do miss romance, shower con though. Yeah. Like, if I can't have the Dar version of shower con or another villain. Then you want him to win. I want him in the full on DDLJ, kujo kujo dai. Well, the second half, kujo kujo dai. First half is crazy. Ah. Happy 25 years, by the way. You're crazy.  It is. It is. But man, are they crazy in the first half? Especially Kajal. She's going all kinds of crazy in the first half. I love her and her decision. Me too, me too. I'm trying to think of anything else. Do you have a dream thought? I'm just trying to think of anything else that I didn't talk about. I thought it was nice. I enjoyed it. For being an early 90s. Very early in his career, by the way. I actually don't recognize anything else in front of a bazigar. Like Maya, 93. Uncle, King Uncle. Rajabad Jaya. I recognize the name gentlemen. So have we rec... So from that. Dilashana Hai. Shamaktaar Kar. Dihwana. Dihwana. Dihwana. Maybe I recognize that. And he did a short call. Mahankars. Have you seen that? Probably not. But the first like, he really like starting in 93, he just gets into just iconic ones. All after that. Bazigar is a big one we need to see, because it's a more villainous role of his. But this is another, the one I was talking about, Karan Arjun. Where their brothers, Salman and SRK brothers, Kajol and Mamata, Jenny Lever's in it. She plays it their mother, Riki Golzar. Any relation to the actual Golzar? That's a very iconic one. It's also directed by the same director as Queenie Jaila with Jadu. Jadu. He was in this movie a lot. He was. They all said that, because he... But the sister said that he cast spells on people. Jadu? No. Shahrukh Khan's character. That's why you heard Jadu. Spells of love. Yeah, but same director as that, but also Rithik Roshan's father. Ah. He's the director. Nice. Rakesh Roshan. Anyways, hope you enjoyed our watch along of Kabiha. Kabiha. If you obviously saw this on YouTube, obviously you saw a very cut up version. If you'd like to see the full uncut version, once again, you can head over to Patreon. I'll put the link in the description below and the pinned comment. Let us know what our next watch along should be. Whether it should be Shahrukh Khan. Steph will be here if it's Shahrukh Khan. And what should that be? If not, what other movies should we get to? Let us know down below. On the next watch along!


Dylan Schumacher, Citadel Defense. I'm out here in the range today and I'm gonna try the Valoridge pistol standards. These are the rifle standards. Let me see if I have a pistol standards around here somewhere. So just to give a little bit of context here. The Valoridge pistol standards, which are from Valoridge, which is Reed Hendricks down in Tennessee, are an excellent pistol standard. I watched a video of his a couple of years ago that where he did the pistol standards and they're also in his book on pistol crafts. I will either put those standards in the description here or put a link to them so that you can find them and kind of follow along. But this is me shooting the standards. All the body hits need to be in that eight inch circle in the body and all the head hits need to be above the lip and between the ears, ideally in that triangle. So that's how the match or the standard gets scored. You're allowed one miss per stage and then in order to pass the standards, you have to pass 11 out of 13 of the stages. So I hope that's clear, hope that makes sense. If you go over time, you fail the standard or the section. The stage, there we go. If you go over time, you fail the stage and then like I said, you're allowed one miss per stage. So this is me shooting them. This is really me shooting them. Like you're gonna see my real shooting and not just like a perfect run because I actually am a human being who misses sometimes. So this is my shot of them. If you haven't shot them, you should definitely take a swing at it. Mind shooting improved markedly when I started to master these standards because I couldn't do them the first time I shot them and it took me probably overall about a year, which I think I mentioned in the video. But without further ado, enjoy the Valley Ridge Pistol Standards. Okay, we're back. I found the pistol standards for real this time. Not sure if that's in focus or not. Hopefully it is. But anyways, that's what we're rolling with today. So I have a target here that I've shot up a little bit but I don't have any misses on it as of yet. As you can see, everything is in the, oh my gosh. There we go. Everything's in the circle and everything is in the triangle. So we should be good to go and we will see how this goes. We're at five yards. We got one round of the body in two seconds and we're gonna do that three times. One, five, seven. One, five, one. One, four, nine. Also, don't know if you can see this or not but I'm doing this from ALS Holster today. So, you know, just so you know, just to be honest here, not doing it from concealment today. Okay, that stage has passed. All hit so far. One shot to the head, two and a half seconds and I'm gonna do it two times. 2.1, I missed the triangle just above the lip though so I'm still good. One, seven, five. That one was also just above the lip so I'm good. Five yards, two to the body, one to the head. I have three seconds. Squib load. Fix the squib load. Now we're back to two to the body, one to the head. Three seconds. Two, three, four. Time is good and my hits are good. Weapon hand only, three to the body, three seconds. Two, four, nine. Time is good. Support hand only. Three to the body, three seconds. Two, two, one. Time is good, hits are good. We're gonna do a target check here just so you know I'm not cheating. There's my target. We're still looking good. We're going back to seven yards, four to the body in three seconds. Two, three, one. Time is good, hits are good. I think I have one miss. I'm not sure when that came in. I'll have to check the video, but I got one miss. I'm gonna go mark it. Okay, you're allowed to miss per stage so I'm still okay. All right, past all the stages so far. We're at seven yards, one to the head, three seconds. Right between the eyes, one, eight, three. I'm good on that. Okay, so this is one and then slide lock and then three more to the body. Let me get an empty mag. And I get five and a half seconds here. 4.19, time is good, hits are good. We're gonna go back to 10 yards and it's five rounds to the body in five seconds and then 10 rounds to the body in 10 seconds. I'm gonna let you see the target here. Here's my one miss. I don't know where that's snuck in, but other than that, we're all good. Five rounds to the body, five seconds. 3.19, time is good, hits are good. 10 rounds to the body, 10 seconds. I felt that one miss. I pushed that out. Time is good at six and a half and I definitely threw one. I felt myself shove that way down. That was embarrassing. You probably saw that on the camera. It's right here. I felt myself just shove that sucker down. All right, we're still good. Coming back to 15 yards. Three to the body in five seconds. 3.55, time is good, hits look good. All right, we're going back to 25 yards for five rounds in unlimited time. So at this point, I have passed the standard even if I fail the last two. You need to get 11 out of the 13 stages, so I passed them. So hopefully I can have a strong finish here and see how it goes. So I'm going to get a new mag and then I will be back. Five rounds, no time limit. I might have missed one. Let's go check. Yeah, I threw one over the shoulder, but I think that's it. So I think I still passed that stage. Let's take a look here. Okay, right there. There's my one miss at 25. This was at 10. Okay, so now I need one round at 50 yards. So I will just see if I miss it and we'll see how it goes. If I come back and I can't find it, I'm going to count it. So let's hope that system works out. It always looks better on camera than it is, but 50 yards is a win. I get 10 seconds. Ah, nah, that was a miss. That was a pretty bad miss actually. Looks like I clipped him in the arm here. It's right here on the line. So that's it. That's the Valor Ridge Pistol Standards I passed today, but obviously 50 yards is where I need to work, right? And that's pretty bad actually.  I don't know if I've missed that bad in a while, but that's bad. And I'm actually really happy with the 25. The 25 stage is usually the stage that I struggle with the most. So the fact that I was able to get four out of five in there today, that's a big win. I'm super happy about that. No idea where this miss came in. I wish I knew when I saw that. I might catch it when I go back and watch the footage. It might've been from one of my support hand shooting, either my weapon hand or support hand shooting. But other than that, this is probably one of the better runs I've ever done. I've shot this drill a lot. It took me probably a year of intentionally working at it in order to be able to pass these standards. And now it's a lot easier than it used to be. So this is it. This is me doing the Valorage Pistol Standards, a great standard to shoot. And I would highly recommend you try it if you haven't already. So then, do brave deeds and endure.


Okay, so today I want to talk about refactoring legacy code, and this whole talk is based on a code Cata, which is like a code exercise that you do to practice your skills, called the Gilded Rose Cata. Sandy Mets has been doing a talk this year based on this Cata. She goes a different direction than I do. There's a whole bunch of Catas on a site, CMU, something Todd Sedano, who's down here, maintains that site, and there's a lot of really cool exercises. Anyway, this is a cool Cata, and you should actually try it out sometime, but I'd actually ask that you wait until after my talk to pull it down. Alright, so we are starting a new job today. We're working at the Gilded Rose Inn, which in addition to being an inn, sells a bunch of interesting items, and they have an inventory management system, and the previous developer left, and they need us to come in and take over the system. The system runs as a nightly process, and updates how many days we have left to sell the item, and what the quality of the item is. So as items age, they degrade in quality, and different kinds of items have different rules. It's pretty straightforward. There is a spec. We have no idea if we can trust it. Like most legacy codes, specs are out of date, they lie, they're wrong. We don't need to spend a lot of time on this. We'll come back to it later, but we don't know if we can trust the spec. There is a constraint. This heme does not practice collective code ownership, and there's a very grumpy guy in the corner that maintains the item class and does not let anybody else touch it. Now, this is our first day at work, so we're not going to kind of come in and rock the boat and try to solve this team issue. We're going to hold off a little bit, and so we're going to respect this constraint for today. Our task is to add support for a new kind of item called a conjured item, and a conjured item is just like a normal item, except it degrades in quality twice as fast. That seems pretty straightforward. Let's take a look at the code. There's the forbidden item class that we're not allowed to touch, and we're only going to look at it to notice there's nothing weird here. There's no weird side effects. It's just straight accessors, getters and setters, no magic, no weird side effects, and that's important when you're dealing with legacy code, because you need some firm ground to stand on while you reason about the code you're trying to clean up. So that's all I'll say about the item class, but that's a very important point. This is our database. That's a fairly interesting database. Notice at the bottom there, there is a conjured item in the database already. It probably is not being handled correctly. We don't know that yet, and then there's this update quality method, and I mean we have a task to do. We have to support these new items. That looks like maybe where we want to look, so let's look at that code. Okay, it's been a while since lunch, been a while since snack, so hopefully it's okay to look at this right now. That's nasty, but wait, there's more. Okay, let's look at the tests. Tests should be better, right? There are no tests, none, not one. Public service announcement. Please write tests for your code. All right, so what are we going to do about this? There are lots of techniques for dealing with legacy code. In fact, we could probably write a book with all the tech sneaks in it. Unfortunately, we don't have to, because Michael Feathers already did. If you work with legacy code at all, you need this book. It is awesome. Second thing, we need some safety. We need tests, and so I'm not going to talk about writing tests for legacy code. That's a different talk, but when I was working through this for this talk, I wrote what Michael Feathers calls characterization tests, because what I want to do is preserve the existing behavior of the code. Whether it's right or wrong, I want to make sure that I don't change that behavior while I'm doing my work, and so I wrote characterization tests. I use simple code to make sure I got 100% coverage, and everything I show you in this talk, with one exception that I'll point out, kept the test green the whole time. Okay, and that's important. I made sure I didn't change the visible behavior of this code when I was refactoring. So we're not going to trust the spec, like I said, and we are going to fight the urge to rewrite. When we don't know if we can trust the spec, we don't know if we can safely rewrite. I mean, everybody I've seen do this coda takes the spec and looks at the code and says, I'm throwing that out, I'm going to rewrite it. We're not going to do that. Rewriting is often very expensive and very error prone, and you can't always do it. So we need to have some techniques in our tool bag for when we can't rewrite. What do we do instead? We're going to follow the Boy Scout rule. We're not just going to hack in our change and perpetuate the evil that's in that code. We're going to leave the campground cleaner than we found it. So we're going to try to improve the code in the area where we're working. So we're going to take a lot of baby steps, very tiny refactorings that add up to big changes, but we're not going to boil the ocean. We're going to stay focused on our task. So we're only going to be really messing with the code that we have to touch to implement this new feature. It would be tempting to go rewrite the whole thing, but that's not what we're doing here. All right, and Kent Beck has this great advice for each decided change, make the change easy, which may be hard, and then make the easy change, and we're going to do that. All right, so we have to stay focused on our tasks. Are we there yet? Can we see an easy way to implement support for conjured items? Not one that leaves the campground clean. So let's see what we can do about this code. We're going to start this is the time when we know the least about this code. And so we just want to start getting our hands on it a little bit. And we're just going to do some really simple mechanical changes to try to improve things. I used Ruby Mind for this talk, and it's got some great refactoring tools. And I use those a lot in here. So a lot of these refactoring I'm talking about can be automated in something like Ruby Mind. So the first thing we're going to do, I found this quote when I was preparing the talk, and I had to put it in there. When you start a new programming job, you have to walk right up to the biggest function in the yard and refactor it in front of everyone. So here we go. So the first thing we're going to do is we're going to get rid of some noise so we can start to see the structure of this code a little bit. The first noise I see is this at items I everywhere. There's actually 34 instances of it in this code, the two pages. So let's extract that to a temporary variable. Martin Fowler calls it extract temporary or extract variable. I forget the exact name. So we pull that out. We have this variable at the top, and that's a little bit less noise. Let's zoom in on that a little bit. So we've got this loop and assignment, and then we've got 40 plus lines of code that all refer to item. That method's doing two things. It's looping and it's messing with items. Let's extract those 40 plus lines of code into their own method. That's better. And that loop is kind of weird for Ruby. It is using a Ruby range, which is kind of neat. This code was actually ported from C Sharps. That's why you see some of this stuff. But there's a much more idiomatic Ruby way to say that. And I'll zoom in a little bit. An idiomatic code is more readable. And so we're going to try to make the code a little more idiomatic so that you can see at a glance what it's doing. You don't have to study it. It's like, oh, okay, that's just looping through all the items. So we can use an each here. And that's a little better. Now this method is pretty clean. And it's kind of an island of sanity in this sea of chaos. We have a place to stand while we work. Okay, back to the update method. There's still some noise in here. Notice all the conditionals are wrapped in parentheses. I assume that's a holdover from the C Sharps. Ruby doesn't need those. Get rid of them. There's a semicolon near the bottom. Ruby doesn't need it. Get rid of it. Getting rid of noise. Alright, there's actually two more parentheses I could get rid of. Yes, I know Ryan, but I'm not getting rid of them anyway. So we have this item quality equals item quality minus one or plus one. Ruby has the minus equals and plus equals operator. And again, that gets rid of a little bit of noise. A little more idiomatic, a little bit cleaner. Alright, are we there yet? Can we do conjured items yet? No, I don't think so. So the next thing is there's a code smell on this code known as feature NV. So let's get rid of the feature NV. So what feature NV is, is when you've got a method that is way too interested in the internals of another object. You see all those item dots in there? That's a clear sign of the feature NV smell. There's all this stuff. We're doing two items rather than asking items to do that for us. So we'd like to extract the body of this update method over to the item class, except that we have this constraint. We're not allowed to touch item. So we have to come up with a different strategy here. We've only been working here for a few minutes and so we're not really ready to address the grumpy guy in the corner. So we need to do something else. So what we're going to do is we're going to wrap the items in another class and then we can move some behavior onto the wrapper. And to do that we can use something from the Ruby Standard Library called Simple Delegator. So I've implemented a class called item wrapper that inherits some Simple Delegator. What Simple Delegator does is you construct it on an object and any message you send to the Delegator that it doesn't understand, it forwards onto the original object. So this little refactoring right here where I introduced this class did not change any behavior because all the messages we're sending to item get sent to the wrapper which forwards it onto the item that we're wrapping. But now this gives us a place to move some behavior to. So now we can take the whole body of the update method and move it to a method on item wrapper. There are some tools that can actually do this refactoring automatically. VisualWorks Smalltalk has a refactoring called extract method to component that does this for you. RubyMind does not, so we're going to do it in a few steps by hand. So first of all we're going to copy and paste that whole body of the update method, move it to a method on item wrapper. And because I don't want to change those 43 lines yet, I introduced a temporary variable called item which is the same name that the parameter had, and just assign self to it so that I'm actually talking to the object but I'm doing it through a temporary variable just so I don't have to change those 43 lines of code yet. Now that update method at the bottom really isn't carrying its own weight so we can go ahead and inline that, it's called inline method refactoring, and you can see there item wrapper dot new on item dot update. All right, and now we can go look at that the item wrappers update method and we can inline that temporary variable now, which is actually worse, but now almost all of those self dots are completely unnecessary because when you're calling a getter on self you don't need self dot. When you're calling a setter you need it so we have to keep some of them. That's starting to look a little bit more readable. Are we there yet? Can we do conjured items yet? No, still not. I'm not seeing it anyway. The code is better. We've left it better but it's not a great thing. Now I see some duplication. So let's get rid of the duplication. First of all, duplication is a place for bugs to live because you fix n minus one of the places where the code is duplicated but you miss the other one and you get in trouble. And the other thing that removing duplication does is it allows you to give things names that can help the code communicate better. So the first duplication I see is this little phrase if quality is less than 50 self dot quality plus equals one. Let's extract that to a method called increase quality like so. Now there's one more case that looks like we could extract it but not quite because there's a nested if inside of it. So let's dive in and look at that a little bit. What I'd like to do is pull that inner if out a level but in order to do that I have to make sure that it's safe to do that. So this is the first refactoring we're doing we actually have to think a little bit about the code. Everything else up to this point has been very mechanical. This one we have to think about. So what's it doing inside that inner if? While we're comparing against name we're comparing against sell-in we already saw that name and sell-in are just simple getters there's no magic there. And then there's two calls to increase quality. Those calls both are protected by an if quality is less than 50 down at the bottom. So we can safely pull that if statement out a level like so and now we've got exactly duplicated code and we can replace that with a call to increase quality. All right there's another instance of duplication in this code and that's this phrase now this looks like it might want to be a decrease quality method but there's this extra comparison against name in there that really doesn't belong in decrease quality so again we have to reason about this a little bit and what we see is we've got these two nested if statements there's no else clauses to worry about and the two conditions are completely independent it's not like we're checking for nil and then sending a message to the object that we're sure is not nil these are completely independent so we can just reverse them. Okay again we had to think about that a little bit but not too bad all right and now we can extract a decrease quality method and that's better okay are we there yet can we do conjure items yet I'm really not seeing it but what I am seeing is that there's kind of three main sections to this method the top section is all about updating the quality and there's this little tiny middle section that's about updating a cell end date or cell in days and then the bottom section which is also about adjusting the quality so what I'd like to do is I'd like to group similar tasks so what I want to do is I want to move that cell in clause in the middle either up to the top or down to the bottom so zoom in on that a little bit if we move it to the top what our method looks like is we're adjusting the cell and date of the item and then we're adjusting the quality based on that new cell and date that seems to make logical sense to me that seems to read very well so I'd like to move it up to the top but if I do that cell in is going to be one less than it used to be and so I have to adjust those other two if statements that talk about selling in there so I'm going to do that again we had to think about this a little bit still not too complex reasoning but we do have to think and we have the characterization test to protect us if it goes wrong so now we've moved that up to the top and we'll zoom back out and see the whole method again now we've got this method that does two distinct tasks so let's extract those and give those names so we're going to first extract the top part and call it age and then we'll extract the bottom part and call it update quality okay so now update is a very nice clean method it says exactly what it does actually follow something Kent Beck calls the composed method pattern which I'm not going to go into here but it's a very nice clean method and that's actually our top level entry point in the item wrapper class if you remember so you look at the item wrapper and say oh to update an item I age it and I update its quality I understand that that makes sense now can we do concert items we made it better right no it's still pretty nasty so I think we finally got to the point where all we can really do is tackle these nasty conditionals so it's time to simplify those so this is where things get ugly but now we've got our hands on the code a little bit we've kind of got the feel of it we're starting to get a sense of it and now we're feeling a little more confident in our ability to tackle this code and that's a good thing so the first thing I see is that all of these conditions are negative not equal to not equal to not equal to and negative conditions are generally harder to reason about than positive conditions so I'd like to reverse those now there's the inner ones where a name not equal to Sulfurus there is no else there those ones are harder to negate so we'll ignore that but let's zoom in down at the bottom on just the backstage passes check and I'd like to negate that and make it an equals equals rather than a not equals and to do that you just have to swap those in and the else parts okay just reverse those so that looks like this okay so now it's a positive check not a negative check and we can zoom out one level and do the same thing with aged brie and then we can go look at the top condition now and I like to do that here but this is a compound condition it's a little more complex to negate that condition we still swap those in and the else that's fine but that condition is harder to reverse and thankfully Ryan already taught you about the Morgan's law I'm going to teach you about it again using Ruby this time instead of circuits or gates so if you want to negate A and B so A and B is false if either A is false or B is false and that's basically what De Morgan says and then there's a version for switching ors to ants so let's apply that to our code so there's our condition we want to negate it and then we apply De Morgan's law which looks really ugly and then we simplify those all those knots okay so four quick steps there and now we have the inverted condition and now we can apply that back to our code swap the then and the else parts like we did before and that looks like that okay next let's look at the overall skeleton of this of this method just the ifs and the else's notice this pattern where there's an else with a nested if and else with nested if Ruby has an else if keyword that allows us to get rid of a lot of that nesting so that looks a little better and we can look at that in full context here the next thing I want to do is I want to look at this a little bit at the bottom of both of these if clauses there's an else if name not equal to Sulfurus and then we do nothing so let's zoom in on that a little bit if name is Sulfurus this whole method does absolutely nothing we skip everything and so what I want to do is I want to take these two duplicate conditions and extract them up and make them a guard clause in the method so that we just return if it's Sulfurus and forget about them for the rest of the method okay so that looks like that and then we zoom out a level notice that age does almost exactly the same thing and we can quickly invert that condition make it a guard clause and make it exactly the same now we've got two methods that have the exact same guard clause at the top and they're both called from a higher level method and that's the only place they're called from because we just extracted those two methods we know that so we can move that guard clause up a level and Kent Beck just wrote a blog post a couple weeks ago about something called call graph refactorings and this is kind of a call graph refactoring I actually exchanged some emails with them on the topic to make sure I understood it and I'm not sure I do yet but I want to appreciate I appreciate him taking the time to answer me so we'll do that refactoring right there all right now we can go back and look at update quality again that compound conditionals bothering me especially when we're checking backstage passes almost twice right in a row so what I'd like to do is split that compound conditional and kind of merge the backstage passes cases and to do that we have to duplicate that one increase quality line and that looks like that okay notices are all really tiny baby step refactorings all along the way now if you look at the top if statement and then the if statements that's nested in the if sell in less than zero at the bottom those if statements have the exact same structure and switching on the name of the item seems to be an important concept in this code remember kind of our system description talked about you know different kinds of items have different rules I want to kind of unify those those if statements together and to do that we kind of have to distribute that sell in less than zero check to all the conditions so I'm going to first merge the bottom else clauses that looks like that so we decrease quality and then if sell in less than zero we decrease quality again repeat that for backstage passes and repeat that for aged B and now we have this method with a top level switching on the name and then logic for each of the cases okay are we there yet can we do conjured items yet this is the first time I feel like I can confidently support conjured items and actually have it work and have the code not be significantly worse than it is now so let's go ahead and give it a shot now we're going to make the easy change we spent all this time making the change easy now let's make the easy change so there's our code and remember conjured items degrading quality twice as fast as normal items so we just add a new clause for conjured items we're comparing against the name just like the other guys do now notice we have to call decrease quality twice I really wanted to write this code but that fails the tests and the reason is the decrease quality does a check to make sure the quality never goes below zero so we have to stick with this for now okay so at this point we've actually implemented our new feature this is where I had to change the test because conjured items actually have different rules and I needed to make the test reflect that but I didn't change the test for any of the other kinds of items and our tests are green again we could stop here but we still have some time left so let's see if we can make the code just a little bit better you know we still have some time left for this feature so we want to express some important ideas in the code and the first idea comes in these two methods to decrease and increase quality they're expressing an idea from the spec which is that the quality of an item is never negative and the quality of an item is never more than 50 but the problem is they don't express it at the lowest possible level there's other ways we can set the quality that don't go through these checks and that's why we had to call decrease quality twice so I want to push those down a level so what we can do is we can introduce a quality equals method here now remember we're an item wrapper which is a simple delegator so by calling super we're calling simple delegators version of quality equals which it doesn't understand so it forwards it onto the original item again this is really a no up with an extra method in there but it gives us a place to move some behavior so we can take that quality greater than zero check from decrease quality and push that down to the quality equals method we have to recast it a little bit because it's a new context but it's basically the same check so we just say if quality is less new quality is less than zero then make it zero and we can do the same thing with the quality less than 50 check and that's a little bit cleaner there's more you can do to refactor that there's actually a proposal for Ruby to add a method called clamp to numeric types that does this for you you just say new quality dot clamp zero 50 and that would work but that hasn't been implemented yet now decrease quality and increase quality really aren't pulling their own weight anymore so I'm going to go ahead and inline those so we extracted them because they were duplication but now we simplified them enough that we're going to inline them back it feels like we're waffling a little bit but we're really not we kind of learned some things by extracting them and now we can put them back in so inline decrease quality inline increase quality and now we have those duplicate quality minus equals one lines that we can finally merge together and get the code we wanted in the first place so that's better there's another idea that's not being expressed in this code everywhere where we touch quality we're adjusting it by some amount and so there's this concept of a quality adjustment that seems like it might be important now I did this refactoring in probably six or seven steps which I don't have time to run through so I'm just going to show you the final product so update quality now just says self dot quality plus equals quality adjustment and then quality adjustment goes through all the cases and computes what the quality adjustment should be okay and now what we can do with that let me just double check if I know where I am yes all right so there's another refactoring I want to do here we have this big long conditional and all those cases are independent and there's a refactoring called replace conditional with polymorphism so we're going to do that next so we have our item wrappers and what we want to do is we're going to make subclasses of item wrapper and push behavior down to those subclasses so the HB will go to an HB subclass and so on in order to do that we need to create the right kind of subclass off of an item so we're going to introduce something called the factory method to item wrapper and I'm just going to call it wrap notice it's self-taught wrap it's a class method and all it does right now is delegate to new again we're introducing a place that we can move some behavior to step at a time very small steps every time okay and we're calling wrap instead of new down below and now we can look at the aged breed case now we can introduce an aged breed subclass so the factory now says oh if item name is aged breed then make an aged breed otherwise make a regular item aged breed itself just inherits from item wrapper does nothing special but now we can take the aged breed case of quality adjustment and push that down okay and now we can we can do that again for backstage passes and for conjured monocakes and now our quality adjustment method is pretty clean and all of the checks against name are up in that factory method there's no checks for name anywhere else with one exception we still have that sulfurous check down an update so let's make a subclass for those look at the spec it says sulfurous being a legendary item never has to be sold or decreases in quality so we're going to make a legendary item subclass and add that to the factory and then we can push down the sulfurous behavior of update down to that subclass well what happens in update if the name is sulfurous absolutely nothing we need an empty update method when I have one of those I tend to put a little comment in there just so the next guy coming along next person coming along doesn't think I forgot to put code in there I want to make it clear all right so now our factory is the only place where we do name checks we can look at that a little bit closer there's one more little simplification we can do here and we can use a case statement that makes it read just a little bit better all right so now we want to express some domain concepts we have a few minutes left to do that and I have to go through this pretty quick but let's look at our spec so once the sell by date has passed quality degrades twice as fast does this code say that kind of implicit it sort of does but not really so this is about oh cool this is about five or six little baby step refactorings to get to here so quality adjustment now says if sell ends less than zero then use a past date adjustment otherwise a normal adjustment normal adjustment is minus one past date adjustment is two times normal adjustment so now that's saying quality degrades twice as fast that's better next line in the spec age spree actually increases in quality older it gets that doesn't really say that again five or six steps and we can get to here now this is a little bit weird normal items adjustment is minus one age spree increases instead of decreases so we just negate the super superclass implementation that might be a little too coupled I may not actually do that for real I did it here because to me it expresses the idea that it increases instead of decreases it's the opposite of what the base class does conjured items degrading quality twice as fast as normal items that doesn't really say that that does again five or six steps to get there and finally backstage passes first one of the things that says is the quality drops to zero after the concert so we can use this past date adjustment that we have in the base class and just override it and return minus quality doesn't quite say it drops to zero unfortunately doesn't read quite that cleanly I might do a little more work on that but it's not bad and then we can look at normal adjustment we can clean it up just a little bit again this is a few steps that reads pretty good now let's look at the rest of the spec for backstage passes quality increases by two when there are ten days or less and by three when there are five days or less does this say that pretty close but the spec says five days or less and ten days or less this code says less than five less than ten that's a mismatch is that a bug we don't know maybe the spec is out of date maybe the code is wrong we are not going to blindly fix that bug because there might be people relying on that behavior or other systems downstream a lot of times in legacy code one bug masks another bug so when you're working legacy code you really have to be careful to preserve behavior until you can find out more information and decide if that's really a bug and whether you should really fix it right now so we are not going to do that so let's quickly review the final code remember where we started and virtualize if this bothered you before I actually ran FLOG thank you Ryan for that tool this is where we started the total was 179.5 and that one update quality method was 155.1 so 80 this was actually 80 steps later there's our database quote unquote there's the new update quality method just loops through the items wraps them and updates them there's our factory that we built there's update and age there's how we update quality and there's the subclasses now our total is 67.1 down from 179.5 the worst method is now gilded road initialize which we didn't touch that method that was out of scope for the change we were trying to make so the worst method is one we didn't touch the worst method that we touched was actually the factory method which was a 9.5 so our worst method went from a 155.1 down to a 9.5 of the code we touched that's a pretty good improvement I would argue so what do we learn slow and steady wins the race we didn't rewrite this thing we just very tiny steps very tiny safe steps there's a few places where we had to think a little bit but mostly this was mechanical changes following standard refactorings out of Martin Fowler's book if you haven't read that book you need to read that one too refactoring but just very tiny steps we made the change easy then we made the easy change we made simple mechanical changes first so we could get our hands on the code and start to get a sense of it we reduced noise we removed duplication and we made sure we expressed important ideas and we expressed domain concepts in the code so that the next person that comes along will have an easier time with the code and that's probably gonna be us like Blythe said if you don't have empathy for other people at least have empathy for yourself and we didn't mindlessly fix the bugs there is a GitHub repo that has every single tiny refactoring that I did including one more I didn't talk about so there's actually 81 in there so if you want to go see all the micro steps I did they're there I'll thank my company for sending me Zeal is a local consulting company where I live that they let me come in and do this as a tech talk for them giving lots of great feedback and Kent Beck exchanged some email with me there's some references the slides will be up on speaker deck I don't have time for questions unfortunately I apologize for that any feedback on the talk would be great and the slides will be on speaker deck actually I think they're up already so if you want to see them great and thank you very much awesome thanks very much Randy


Fourth People's Health Assembly is being organised in Dhaka, Bangladesh, in the background of a global health crisis that is characterised by inequities related to a range of social determinants of health and in access to health services within countries and between countries. In large measure, the poor and the vulnerable are being pushed further to the margins due to pitifully inadequate measures to address the social determinants of health. They have also denied access to quality health services as a consequence of unfair economic structures and social conditions that lock people into poverty and ill-health. To four decades of that experience of unleashed capitalism and in particular, more recently the financialised capitalism that has expanded the inequalities that we've seen, there is a growing recognition that the ideology and the policies have failed. In recent years, austerity measures in both the global south and the north have further compromised access, often as a consequence of the dismantling of public services and the increasing reliance on private provision of healthcare. Think of the word social murder, so Engels, when he was looking at the early days of the Industrial Revolution, said the class which at present holds social and political control places hundreds of proletarians in such a position that they inevitably meet a too early and unnatural death. So it seems to me, when you think of that pattern of wealth, when you think of the way corporations work, social murder is happening across the world today. The achievement of universal and secure access to comprehensive healthcare services can be a reality only through the revitalisation of comprehensive primary healthcare as envisioned in the Alma Ata Declaration of 1978. These people arrived malnourished in shock and many with bullet injuries. Majority were women and children and the women had suffered multiple rape. Every woman I spoke to in September 2017, soon after the major exodus or influx from this end, every woman I spoke to spoke of multiple rape, not once, at least twice, some maybe four times, five times. The promises held out by the sustainable development goals needs to be questioned, given that these goals, many of them laudable, are proposed to be attained by the same neoliberal model of development and economic growth that has pushed the globe to the brink of multiple crises, social, political, ecological and economic. Intersectoral action on the social determination of ill health is extremely important in the 10 fast-track countries of which Bangladesh is one in reaching MDG4, over 50% of health improvement comes from actions outside of the health sector. Some analysts have shown that if there is no change in the current economic paradigm, it will take 207 years to achieve the SDGs and we will need 3.4 planet Earths. The Fourth People's Health Assembly will draw on civil society organisations and networks, social movements, academia and other actors from around the globe. Trade unions play a key role in the achievement of the help for all policies because you have to realise that it is the health workers who are providing the services to the population. So if we are going to realise what we call health for all, health workers will be brought on board. Our services must be provided to all people without border and not just certain things are available for certain people who have certain conditions that are of interest to certain donors. Perhaps other people come to the same facility, they come to you for care and they cannot get the care because those things are not available. To enhance the capacity of health civil society activists, to engage with an intervening policy making process, to monitor and drive policy implementation and to ensure accountability in the functioning of health systems. We are still facing inequalities in access to health care and we are trying to make a case in our dialogue with the parliamentarians, with the government officials, to reduce and to mitigate the impact of some of the policies of the government which are eroding the constitutional right to health. PHF4 provides a unique space for strengthening solidarity, sharing experiences, mutual learning and joint strategising for future actions. In PHA, we have raised our awareness on health issues. We have known that health is for all and not only for those who have money.


Yes, Dehaven. Yeah. You know what I'm saying? All in boy. Everybody with the jail set for who? Jay-Z. Jay-Z. Damn. What did you think when you heard him say your name cleverly in that song? Favorite guy. First of all, do you know Jay-Z? We gotta ask you this. Jay-Z put you in a song and he don't make many. Not no more.  What's up with you and Jay-Z man? Nothing man. I don't have nothing against Jay-Z. I've never did. I just saw something. I was listening. I'm listening. You talking to somebody that's from that, I used to hide that. But he's, he's, he was in the streets.  No, that's my partner. But there's some ups and downs about that. I heard that he wasn't in the club. You know, you don't even got songs. The guy you talking about is my partner. I'm calling right now. So you saying- Okay, so he's not like that. Like that. You hear? I mean, I'm not saying- So there's this thing about plies, where plies took on the role of his brother. They all do. It's an avatar. So he took on, but rappers had this thing to say that I'm talking my real life. This is what I, this is what I write. That's what rappers say. That's what they say. So please listen. This is the last time.  Listen to me.   I don't know why I'm- Listen to me. What's up? What was the, in that era, what was the one thing you didn't hear? Well, I'm going to be honest with you. Being one that's a real stumped down street cat that we wouldn't, I wasn't telling nobody. Nobody? No, no, no. My shoe was clean too. Why was clean? I didn't want the same thing twice. And I really didn't care if you knew about it. But I don't even wanted people to know when I went out to the club. But you weren't a rapper. Rappers told- Hey, don't be. Hold on, hold on. Listen to me now. Listen to me now. There are cases that are unsolved and they're always being trying to be solved. True. I'm approving to you right now. These motherfuckers in Atlanta say that we shoot motherfuckers. We is the show cocaine. We're doing a rally. Dust off the files. That's true. We have that guy right here. Who's here? This guy here. Pick all these niggas up. They're telling and everything. Yeah. So he is real. Somebody snitch and got real. You snitch and got real. But that's what I'm saying. These vague dope stories that don't add up. You can listen to Pee how to make crack to this. Say that niggas stole cocaine. It's too precise. It's too- Like this thing you don't need to talk about. Yeah.  Because I never hear the other side of it. Only here I'm buying Benzes. I'm buying Rolexes. I'm buying Jaguars. Maybe he's just smart about it. No. No.  It's the real story. You never tell me about the time you had to fight.  The time you got jacked. Yeah. Yeah. Mm-hmm. Yeah. The time they sold you cupcake. Yeah. No, it's real. They sold you two T.D. Jake books. I know no one do pay 37,000 for two T.D. Jake books. All them stories. They gave it to him on the highway. Because he trusted him. All the stories. He got two books. All them stories. They're real stories. No, I know. I know these cats. STK Kirkland about... What's the nigga name they kidnapped? Has STK been on there? Not yet. But we sold them. I've been going back and forth. I'm going to get him. Ask him what? STK about the niggas. It was a parking lot. They got Aaron. They kidnapped. Mm-hmm. Okay. They kidnapped him. STK about that. So you think Jay was even on the block at all? Watching. Okay. The streets is watching. What did you think? I think personally, you ever heard Dungeons & Dragons? Yeah, yeah. I think he's one of those guys. And apply Dungeons & Dragons to rap. That's what I think. Because when you look at Jay-Z, Jay-Z had a lot of people out there. Around him. Yes! Yes! So he could have been more than anybody else's. Yes. Dehaven. Yeah. You know what I'm saying? All in boy. Everybody with the jail set for who? Jay-Z. Damn. What did you think when you heard him say your name cleverly in this song? I didn't know he was saying my name. I listened to it like three times and he think I'm saying phase on. Somebody said, I was like, oh, I get it. It's like... Honestly, I think he's a class head guy. And I think he was him weakening to me going, I hear you.   Like the ride is over.  I hear you. It really happened. I'm an art dealer now. He love that art. He love it. He love it. This is marvellous.  That art has got that money in it too though. I get it. I'm going to switch to something else real quick.  Thank you. We were on boss talk one on one. One on one.