But what about workouts? What about lifting weights and training? What are the best ways to work out when you're trying to bulk versus when you're trying to cut? That's what we're going to talk about in today's episode. We're going to give you the answers by the time it's done. Let's talk about lifting. I'm excited for this episode because, one, this is a bit nuanced. Two, we always get asked this question. Always. What program should I follow if I'm cutting? And it's not as simple as follow this program for a cut, follow this program for a bulk. And so hopefully we do a really good job of answering that question for all the listeners so we can refer to this episode going forward. What's interesting is the information we're going to present is going to be counter to what I think a lot of people believe to be true. So let's start with the common understanding of a cutting workout versus a bulking workout. Cutting workouts tend to be calorie burners, right? I tend to want to say where you hear high reps, super sets, giant sets, strip sets, short rest periods, like that's the kind of workout you do when you cut. And then bulking is typically low reps, long rest periods, straight sets, right? You don't want a super set. You don't want to do too many exercises in a row. The goal is basically to have a slow workout. And the theory is, well, the first option just burns more calories makes you sweat. You know, you're trying to, I guess, conserve calories and push muscle growth as much as possible. So that is largely a myth. All that is largely a myth. Now, the truth is when we get to rep ranges and we'll talk more about this is that between one to like 25, so like between one rep to 25 rep or so, they all build muscle. So they're all going to build muscle. One doesn't necessarily build better than the other. There's a lot of factors you have to take into account before you determine which one works best for building muscle. But the biggest one has to be novelty, I think. Well, I think there's still this common thought that when you decide to go into cut, let's say you want to maximize your efforts 100% by burning as many calories as possible on top of that. And so you end up picking a lot of these type of workouts that are just basically like super intense, lots of reps, like just out to sweat. Because the thought process is I'm going to probably burn more fat by doing it this way. When in fact nobody brings up the conversation of how can we preserve as much muscle as possible. This also highlights the importance of following a structured program because when you start getting into all the nuances of like how to maximize a bulk or how to maximize a cut. And if you're just kind of like throwing exercises and rep ranges and there's no rhyme or reason, this is really tough to do. This is really tough to go, okay, well, what would be considered a novel stimulus or what is different now that I'm in this cut or this bulk than how I kind of always follow routine. And so this is where there's lots of value to, okay, I've been trained a very specific way with everything from rest periods to rep ranges to the type of movements I'm doing. And then now I'm transitioning into this cut or bulk and now I'm doing this. Yeah, so let me set that up a little bit, right? So first let's address the like I need to burn as many calories as possible if I'm trying to lose weight. And I, by the way, this makes sense on the surface, right? If you want to lose weight or cut, you have to burn more calories than you take in or taking less calories than you burn. So it makes sense. So then I should move more, right? But here's the problem when we know this now. Aside from the health benefits of appropriate movement, trying to simply burn more calories is a losing strategy and the data is pretty clear on this. It's a very ineffective way of getting lean. Now you'll get an initial effect, probably the first three to five weeks. You'll see some positive effects from trying to burn more calories, but very quickly the body adapts and it either slows its metabolism down through paring muscle down or this is an interesting one. Subconsciously, and they now contract this, your body limits your movement the rest of the day. So actually find that when people burn more calories in the workouts, they burn less calories throughout the day. Is that true? I didn't know that. Yeah, and it's really weird.  Do you think that just because of the pure exhaustion and fatigue from the workout, you think that's the idea? That's part of it, but then when they'll control for like, okay, it's appropriate. Literally, the body is making you move less to try to conserve energy. Interesting. You know, it's, I don't know if I've ever talked about this on the podcast. If I have, it's been a long time. My experience with CrossFit, one of the things that, and I'm talking to early days is way before it was popular. It was just in Santa Cruz. Yeah, exactly. It was just in Santa Cruz. The boxes weren't popped. In fact, I remember we didn't even know what it was and you had to go online and you had to look up the workouts and stuff. And I had a couple of trainers that were doing it and it was starting to make its way around the fitness community. And of course I did some of it. And one of the things when I was doing these workouts was, man, for the next like, I had to lay down in my office floor for like two hours afterwards. And then the rest of the day, like I was so gasped and spit. Yeah, I didn't want, I didn't move. I wasn't my animated self. I wasn't going, walking around the pit. I wasn't going out on the floor. I was just like, I just, it felt like I needed to recover all day long.  I didn't know there was any research. Yeah. There's a lot of data around that now. Oh, interesting. Yeah, really interesting because that, that's an extreme example. Yeah, of course. But even more subtly, your body will just make you move less. And then of course, the, the, the metabolism is right. Very complex. And your body can become more or less efficient with calorie burn. Thus making up the difference. And there's lots of studies that, that show this that, that the whole movement is good for health, but trying to move to lose weight without looking at diet and a lot of other stuff is, is a, is a total losing battle. Well, I know we've pieced together in the past. Like why I used to give the cue to my client that, hey, when we leave the workout, you want to feel you have more energy than you have, which is really counter to how we started the first decade of our career. Right. Like it was crush your client. They were wobbling out. They were exhausted versus now what I was looking for my client would be done and be like, yeah, I feel really good. I feel like I could do more. Okay, cool. Perfect. Let's save that. Yeah. So looking back now, I think you, it is, you, you started to piece together a one when you hit that sweet spot, you weren't overtrained to them to where they were just trying to recover from how, how sore they were. And then two, they probably left the day and did more activity and stuff in turn helping their weight loss. Right. Now here's the interesting thing is that you would think that cutting and bulking are on opposite ends of the spectrum. There's a spectrum of goals. It would be bulking on one end cutting on the other end, but that's not really a good representation because here's the deal. The goal of bulking, the real goal of bulking is to gain as much lean body mass as possible. I don't know too many people that bulk trying to gain body fat. I mean, maybe that's someone's goal. But generally speaking, when someone's trying to bulk what they're talking about is I want to gain muscle, not trying to gain body fat and trying to gain muscle. So as much lean muscle as possible. So cutting is trying to lose as much body fat as possible while maintaining or keeping muscle. I don't know very many people who want to cut to try to intentionally lose muscle. So the truth is cutting and bulking have one thing very strongly in common. They have one thing in common. They both prioritize muscle. So the goal of cutting and bulking is actually very similar. They're both trying to prioritize muscle. One is just trying to pack on as much as possible. They're always trying to keep it through this fat loss process. All right, everybody. Today's program giveaway is Maps Antibolic, the original Maps programs. Here's how you can win that. Leave a comment below this video in the first 24 hours that we drop it. Subscribe to this channel. You gonna do that right now? Here, take this step so I can do this, okay? You ready? Okay. You ready? Yeah. All right, here we go. All right, everybody. Today's program giveaway is Maps Antibolic. This is the original Maps program. You can win it by doing this. Leave a comment below this video in the first 24 hours that we drop it. Subscribe to this channel. Turn on notifications. If you win, we'll let you know in the comment section.  Everything's on sale. It's crazy. This only happens once a year. If you want to take advantage, you got to click on the link at the top of the description below. All right, back to the show. You know, that's part of the problem though, Sal, is that that is the way it's supposed to be, but it hasn't been delivered that way. Right.  Okay, now let's cut. And so it's like, cut the calories, do the cardio, do the high intensity workouts to try and slim down, not realizing that you aren't trying to prioritize muscle, and yet you should be because you're in a calorie deficit. That's right. Because it's about the scale at that point, right? What does the scale say? Now we've, you know, we've talked about this numerous times on the show, and I think that the average consumer is starting to become hip to this, and that body composition is more important, right? Weight on the scale only tells you total mass.   They look radically different. I mean, dramatically different. The 200 pound 10% body fat male has a much smaller waist, much tighter physique. You know, obviously good shape, good definition. Whereas a 20%, it's going to have a belly. Is it going to look the same? Is it going to perform the same? The same is true for women. You could have a 100 and, you know, 40 pound female at 20% body fat or a 140 pound female at 30% body fat. Both of them, let's say five, six. And they look radically different because it's about body composition. Not to mention, of course, more muscle is healthier. It's functional, meaning you, you, you need it to move. So you move better. It's a storage vessel for sugar in the form of glycogen. So it helps with insulin sensitivity. It helps balance out hormones, speeds up your metabolism. And then of course it just looks a lot better. So it's really about body composition. So the goal with cutting should be get rid of the body fat, not muscle. You get rid of muscle, you're slowing metabolism down. And oftentimes what happens is you end up the same body fat percentage, just a smaller, weaker version of yourself. Like if you lose 10 pounds, half is muscle, half is fat. You're kind of in the same place you were before. You're just smaller with a slower metabolism. You might actually, in fact, probably in a worse place because you've just got rid of some really good protective tissue. Here's the difference between bulking and cutting. And it's important to understand that this is really the difference. It's about the food intake, right? Bulking, in order to gain as much lean body mass as possible, you want to be in a calorie surplus. You have to have additional calories that your body can use to turn into new muscle tissue. Cutting, you have to be in what's called a calorie deficit.  So that's really the big difference between the two is that one is a bulk with calories surplus. The other, the cut is in a deficit. Other than that, there's no difference. Now we're going to talk about workouts and this is where it's going to get really interesting because then people say, okay, well, then do the workouts matter at all? Yes, they do. But we have to look at the most important factor when we're looking at what's going to build the most muscle and what's going to preserve the most muscle. It's the same answer, by the way. It looks almost identical and I'm glad you specify the difference between the two. It is all nutritionally is what you got to consider the most when approaching it. The training itself, again, is going to look pretty similar when it comes to, because you're trying to build muscle, it's the same process. It's identical. If somebody came to me and they were wanting to go into a bulk, I would ask them what they had been doing currently for their training program and then the programming that I would change for them to put them in a bulk is the same thing. If they came to me, told me about their programming and so they wanted to go into a cut, I would still change. Make the change. Yes, I would still make that change.  In the box of all appropriate workouts for your body, name one factor that will stimulate muscle, which means it'll protect muscle, keep it as well, or build it. One factor that's more important than novelty. These are the newbie games. If you're watching or listening to this and you remember what it was like when you first started working out, you kind of built muscle and strength no matter what you did. Your workout probably wasn't even that good, but I remember what this was like as a kid. Every time I went back to workout, I could add a rep or two reps to every exercise every single time. Those are the newbie gains, but novelty will induce that as well. So changing the workout into something different, you get a nice little boost of muscle-building stimulus. And then I have experienced this so many times throughout my lifting career, from low volume to high volume to low volume to high rep to low rep to new exercises, each time switching, each time noticing new gains, and of course, each time falling for the trap of thinking, this is the way I should trade all the time. Well, we'll get into the difference of like, in terms of when you have more calories versus when you are restricting calories, like energy balance there, like what types of workouts might be a little more suited in those different pursuits. Definitely that novelty factor is a big factor. So whatever you haven't really done in a bit to kind of switch over, it's usually a good time to introduce that. So that way gives you that sort of opportunity for your muscles to respond. Well, and novel can be a bit nuanced too, right? Because there's a lot of things that you can do within the workout that make it somewhat novel, right? So just by switching from a machine to free weights, could do that, or from a front squat to a back squat. Personally, when I switch a client into a bulk or cut, I want to evaluate their training modality, the lifts they primarily do, the rep ranges that they're currently at. And I actually want to look at the other end of the spectrum, like something that's really unique compared to that. I like to go totally novel, right? Because one might go like, oh, well, I've been doing, you know, the barbell back squat. I'm doing rope press downs, not going to do straight bar press downs. Yeah, right. And so they'll do something that is really in the same vein and or they might even keep the same rep ranges that they're currently in. Like I want to shake it up completely. And I'll use maps as an example, since most people in here understand map programs. But if I had someone who's falling like a maps anabolic program, then taking them to something like a performance or like a map strong or a map OCR or something that's a really- Power lift, the symmetry. Right, right, yeah.  So you follow that protocol. So then yeah, taking to a symmetry or a map split type of a program, it's so different. The exercise selection is different. The way the muscles are being organized and hit are different. Like everything about it, there's enough to be like tons of novel stimulus. In addition to this new diet that we're about to go on is either one going to preserve as much muscle as we possibly can because you're sending a signal to build more muscle. Or if you're in a bulk, it's going to add more muscle because it's a new stimulus. That's right. By the way, with the diet, I mean, I know we've talked about this before. You still want to, you want to hear your protein targets with both options. So one is low calorie, one is high calorie. Hit your target body weight and protein with both of them. That's a constant. Would you make an argument that it's more crucial on one than the other? Cutting, yeah.  In the studies on this, so here's what's interesting. Studies on bulking, if the calories are the same, one is like you hit your body weight and protein. The other one is less than that. Maybe not too much less, but less than that. The difference in muscle growth, really isn't that big of a difference. There's somewhat of a difference you can argue, maybe, but it's not a huge difference. Cutting, big difference. You get two same calorie diets, both a deficit. One is high protein. One is not high protein. The high protein loses more body fat and keeps more muscle. It's significant. So with the cut, in fact, with cutting, I know this is in a diet episode, but with cutting, I would make my clients try to hit more than their target body weight and protein because I knew they would miss some times. That's right. And they were more likely to hit those numbers. Just average it out.  I actually didn't even have to track in a bulk because I was so over consistently. Oh, I see. So when I was bulking, when you're eating 4,500-plus calories, I mean... You're gonna hit 200-something grams. That's right. I hit 200 by almost default, right? Especially since I was doing most of that in really clean, whole foods, right? So I'm definitely hitting my protein intake. When I was cutting, yeah, especially as... I mean, you take a guy, so at the peak bulk, I would be eating 5,000 calories. The lowest of low cuts, I was hitting 2,200 or so calories. It's a big drop. So as I started to get lower and lower in those calories, I really had to prioritize protein. So it became important that I tracked everything because I was like, oh, I could easily with only eating 2,000, 2,200 calories could miss. And I think that's what it is. I think what people go, oh, I eat enough protein because every meal has it and they're used to being in a surplus. Then they go to a cut and it's like you're cutting your calories back and if you're not really focusing on hitting that target real easily, can you start to miss that and then you're already in a catabolic state? That's right. And then, you know, back to the workout, what you want to do with both, remember, both of them have this in common, prioritizing muscle. You want to use the very powerful novelty signal to induce that change, which means the workout is going to be different. I remember some of the biggest ones for me when I first started working out where I noticed this were, I went from a typical bodybuilding style workout. So I first started working out when I was a kid, so it was high volume, tons of sets per body part, got great gains in the beginning, of course, plateaued real hard. Then I went to this like go to failure, one or two sets per body part, super less volume, lower volume, and my body just responded. I had another experience like that later when I was reading Flex Magazine. There was a bodybuilder in there. He talked about how he always did 15 to 20 reps. And at the time, it was said that low reps is what built the most muscle. So I was always six reps, six, eight reps. Well, this bodybuilder looked impressive, so of course I did what he said. And I got these great gains right out the gates. I mean, it was incredible. And then, of course, that plateaued. And that's a lesson that I had to keep learning. But each time, it was about that novel stimulus. So whatever you're doing now, you want to go and do something different when you switch gears to maximize that novelty effect. Now that being said, okay. There are strategies here. With all things being equal, low reps and high reps do work better for one of those goals. In other words, cutting and bulking, low reps and high reps tends to work better for one or the other. And it's not what you think. A lot of people think it's the high reps with cutting because it burns more calories. And low reps with bulking because you're lifting heavier and you're stronger. Now I get that psychologically. So psychologically, I don't want to discount this. Mentally speaking, it is hard to go low reps when you're cutting because you're going to see yourself get weaker.  It could mess with your head. So if you can't get around that, then forget what I'm about to say. It's an ego check. But if you can get around that and you can organize your workouts so that the novelty, you can make the workout novel and you can choose one or the other, low reps are better for cutting, high reps are better for bulking. So I experienced both of these during the time that I was competing. And I played with both. And I actually would say that when I was competing and I was measuring and tracking and every calorie, and even calorie burn, I was tracking steps, everything like an extra 20 calories or 30 calories that I could burn would help me in my pursuit because I was tracking everything. So I felt that the, in the competitive world, it was equal to me as far as what I thought was better. In the real world, where I'm not measuring and tracking every burn, I find this strategy that you find to be way more successful. So when you're as meticulous as I was for competing, I could go either way on this. Pick up the difference. That's right. So I could go either way. But in the real world where I'm like, I'm not tracking pain attention to it. I find it easier to just focus on lifting heavy and low reps, mainly because when you're in like a phase, phase three of maps aesthetic and you've been in a caloric deficit for three, four weeks, it is tough to be super setting and short rest periods and that much volume. It's exhausting. And so one of the perks of lift doing like a maps anabolic, say phase one in a cut is yeah, okay, I'm not going to be as strong.  The nice part is I get long rest periods. Get long rest periods. And then even when I have to go, I only got to go for five to six reps. I found that much easier to like get up for those five to six reps. And then I get to relax and give myself that breather in between. I found it easier on a cut to maintain the muscle than I did on the super set. Less calories literally means less energy and that also means less resources for recovery. High reps, high rep workouts when you're looking at 15 reps or 20 reps even or higher volume. Now people don't understand this because they'll say, well, I'm doing the same amount of sets. Well, look, three sets of five reps with 200 pounds is lower volume than three sets of 15 reps with 100 pounds or 150. Even though it's less weight because you're doing so many reps the volume is much higher and it's harder to recover from. It's a fact. Go do one set of two reps in a squat then go do one set of 40 reps in a squat tell me which one is harder to recover from. So when your calories are low the consideration that I found to be best was my calories are low. I'm more likely to over train more likely to not have enough energy more likely to get sick all that stuff. I'm going to drop the volume I'm going to drop the reps and that's going to allow my body to recover better feel better and deal with the lower calories and in fact this was totally true. The leanest that I could ever get when I was doing this right man my reps were like three to five and I felt amazing. In the past I always thought it was high rep supersets for cutting and when I would do that I would find myself just burnt out or I'd get sick and it just didn't work. No I think it's important for the audience to understand that there is a order of operation here or what is takes a higher priority meaning if you just came out of a low rep phase and then you're deciding to go in a cut a novel stimulus will trump what we're saying right now. I'm saying if you could plan it out. That's why you got to know that because what some people will take is like oh wow I'm about to start a cut which is the guys think I should do low rep but if you've been doing low rep say for the last four, five, six weeks it's not that novel. Exactly. Then going to higher rep being a novel stimulus trumps what we're saying right now so in a perfect world if you want to test that out then you stay in a calorie maintenance or surplus while you're doing higher rep and then you transition into the cut and then you also transition into the low rep but if you've already been there again the transitioning to the other rep range because it's more of a novel stimulus will trump what we're saying right now. Same thing with total volume in terms of sets and frequency like when you're adding more workload to your body and think about this it makes sense I know that people again they think they're stuck on the calorie burn model here but let's just forget that for a second and remember that that's actually a waste of time to try and even do that calorie burn let's forget that for a second consider that the amount of energy you have to perform a workout the amount of energy that you have to recover from and adapt to a workout is higher when your calories are higher what does that mean that means I can get away with more okay in extreme cases when you look at like high high level athletes who train ridiculous amounts of time sports where perfect technique and form are crucial like swimming at the Olympic level if you look at like competitive swimmers swimming is so technical like one slight deviation in technique will make you lose because you're in the water right so there's a lot of things working against your body look at Michael Phelps for example he was training for hours and hours and hours a day the guy was eating so many calories all day long so that he could perform you're working out that much and you cut your calories you're dead right so bulking just the essence of bulking is extra nutrients extra calories extra carbs fats you know more energy this is when higher volume higher frequency harder workouts make sense not when you're cutting when you're cutting you're already putting yourself at a stress you're already less not only are you low nutrients in terms of macro nutrients so that's a stress but now you're also trying to work out and what a lot of people do is work out harder when they're trying to cut because they think to themselves I'm burning calories it's no wonder people get ill often when they're doing a cut and they're working out this way or they burn themselves out so again you know I'm glad you made that point Adam novelty trumps everything that we're talking about but if you could plan it out to where you're like okay I'm gonna cut in the summer we're in the winter now plan it out so that the novel stimulus by the time you're ready to cut is a low rep low volume style of training and your cut will be so much more successful same thing with the bulk plan the novel bulk workout to be the one that's the hardest with the most volume because you have the most nutrients you know that the saying that I hate right there's no such thing as over training just under eating the reason why I hate it so much is because it's false but also because there's a kernel of truth in it you are more likely to over train your calories and you are less likely to over train when your calories are high so that's why it's the opposite so taking it back to like maps anabolic or I mean maps programming in general I would love to see someone bulk and I've done this and I think it's great is to bulk in like a maps aesthetic phase 3 yeah and then transition to a maps anabolic phase 1 in the cut I think that right here's what's beautiful about these about our maps program so if you follow our maps programs we lay them out in a particular order but here's a little secret the order in some of them doesn't matter necessarily some of them does some of them does it the original like if you go like maps anabolic maps aesthetic split I think is like this you can switch the order so in other words if it's novel for you to go high you know high rep short rest periods start maps anabolic phase 3 go to phase 2 and then phase 1 I only the off the only off top of my head I would say performance and power left or the two more linear right yes or like the only two that would like would probably be disrupted if you went reverse in it yeah it did give it a totally different experience I know like strong we sort of flipped it on its head a bit and start out with like high volume and yeah but even that you could go the other opposite direction flip that yeah and it'd be okay I can only imagine for sure power lift you don't want to do reverse because you scale very pragmatic and specific so the power lift you wouldn't want to jump around for sure maps anabolic for sure you can flip yeah and aesthetic you could easily do aesthetic that way I would make the case for split that way most of programs you could run you can run I've recommended that way I've recommended to people in fact after Katrina's pregnancy when she first did starter when I took her to anabolic I actually started her in phase three oh well and the logic behind that was she only did like I don't remember like four to six weeks of starter after back prison she started to feel really good and then what I wanted her when she wanted to get back into anabolic it's okay you can run anabolic but I don't want you to phase one because I don't want you to risk pushing the weight too much so putting her in a phase three force her higher reps so she wouldn't be loading the bar that much I just wanted her core to get all of her strength back before she risked a heavy weight like that so I've definitely even recommended going in you know depending on the situation of running that program backwards special consideration is your the psychological aspect of workouts the hardest thing for people when they're cutting for example is to watch the weight on the bar go down yeah so this is a case for going higher reps because when you're higher reps short rest periods you're gonna go lighter anyway no matter what you're gonna go much lower already reducing so if that's you if you're that guy or girl where you're like oh you know I want to do the low reps but I want 15 pounds down and that's gonna cause you to do stupid stuff yeah then maybe you know the psychology always trumps all the other stuff by the way that the mental that you know what works for you mentally is what's gonna work for your period end of story so that's one thing to pay attention to is is this going to mess with my head it used to mess with my head I've been doing this so long now I'm okay with going lighter on heavy days and all that stuff but when I was a kid if I saw the weight go down when it got out of the cut is what I would do that's why I used to do like unilateral training and I know we've actually like talked to some collars that called in to do the same as an opportunity for you to kind of do something you'd never do otherwise and in that situation you're gonna be moving lighter weight anyway so and you'll be focused on building muscle but just in a unilateral fashion so there's there's ways that you can kind of deal with that fact that like if your ego is kind of getting in the way of it we can kind of figure out a different plan well now you guys are highlighting why we've never answered this question that's right because we've now said two things both novelty and it's contradicting and that yeah right and the psychology trumps what we're saying as well as rep ranges volume and so without and that's true and so therefore there's always an exception to the rule to literally everything we're saying right now because the most ideal plan in my mind might be oh we're gonna bulk in phase three of maps aesthetic and then we're gonna go to a cut and maps and a blog phase one but if one you weren't you were doing the opposite of that heading into that that wouldn't be true because it would no longer be novel and I wouldn't want you doing the same thing when I transition or two if that psychologically fucks with you so much it discourages you that you don't want to do the workout or follow the diet because you're getting weaker then now as a coach and a trainer I adjust that this is why we never have specifically said and this is also why if you ever get marketed to that this programs for cutting and this programs it's bullshit because it's not taking it's not taking into account the individual on what are they currently doing right now because that matters more and then to psychologically how does that way of training affect that person positively or negatively because as a coach and a trainer I'm actually gonna factor those two things in first and then from there I'm gonna adjust the other well I think the most important thing to take away is is the following strength training is always about building muscle always whether you're trying to lose weight trying to gain weight get strong whatever strength training is about building muscle why because if you're trying to bulk obviously you want to gain muscle if you're trying to cut you want to keep muscle and what keeps the muscle is what's going to build it so the goal should be to do the workout that's the best muscle building workout whether you're cutting or bulking look if you like to show head over to mindpumpfree.com and check out some of our free fitness guides we have quite a few of them there and they can help you with almost any help health or fitness goal you can also find all of us on instagram Justin I'm at Mind Pump to Stefano and Adam is at Mind Pump Adam


Oh, who's Able, by the way? Oh, hi. Okay, I've got 20 minutes, right? Like all my talks, I upload them to talks.webconverter.com. So if you're feeling like really weird, you could go to an old talk of mine. Introduce yourself, Henry. Oh, my name's Kai Hendry. So I've been using Golang for a couple of years, but I guess it's only in the last year, oh, sorry, that's my umbrella. It's only in the last year that my current employees have had given me the opportunity or let me run wild with Golang because we usually have been using JavaScript at the workplace.  I mean, I think I'm quite comfortable around promise chains, but like when I was working with newbies, sort of like when you explain callbacks to newbies, they sometimes suffer. When you explain promises to people, oh, God, it can be difficult. So what do I do at work? At work, at my sort of nine to five job Monday to Thursday, I work for a company called Spool. We do video stuff, and we're like, everything's in AWS. So, you know, the minute one of our content creators uploads a video, it's like on S3, and then we're processing it using AWS Batch, and then we're slicing and dicing it and putting it up on CloudFront. And I think we're not terribly unusual. I think most, I mean, how many people are using AWS at their workplace? Okay, some people. What else is there, actually? Google? Please. Okay, well, so my talk is about Golang and AWS, because like when you bring both of those things together, I think you can do some cool-ass things. The Golang, sorry, the AWS DK is actually one of the most popular packages on Godoc.org. I don't know if it's actually accurate, but I was impressed to see this thing.  Sounds crap, but never mind that one. But the AWS SDK is one of the most popular ones. But if anyone, who's actually used the AWS SDK? What, two people? What are you guys doing? Do you actually work?  That'd be nice. Okay, sorry. Other languages exist, like Python. If you use AWS CLI, it is actually quite good. But then you might want to sort of automate it and put it in a Lambda function, make sure it runs every day or something like this. You'll just hit problem after problem and use the CLI, I feel. I mean, who uses the CLI? It only gets you so far. You've got to trust me with this. I'm sure you've seen it. And as you all know, Golang, when you implement stuff in Golang, and importantly, when you write some like underscore test.go with it, it becomes so much more confidently stable and a way of handling complexity. I think, I mean, a lot of smarter people have said this. The minute you start having your tests for managing your processes, the minute you can sort of like offload this complexity. Previously, when I came back to some shell scripts, I kind of had to remember how these things work all the time. I didn't really have confidence that this thing was working. But when I CD into my Golang project and I just go go test, and I'm testing something end to end, I have perfect confidence that it works. And most of the time, that's true. We were using, as I mentioned, JavaScript. But yeah, it's a bit painful. It's a bit painful. We still use serverless framework for a lot of stuff. But it's very hard to manage the asynchronous synchrony of JavaScript. And Golang makes it easier because it blocks by default. That's so nice. So I think the results have been quite amazing, actually, at my workplace. We've been able to not run EC2 instances. We've been able to not run Docker instances. And we've been able to automate things in a very sort of confident way. And basically save money and save time and all that sort of jazz. So at work in the last year and a half, I've done the website. The website is statically built.  But that's not me. I did the static thing. Golang is a pretty awesome HTML template thing. It's pretty fast, too. The playlist generation. So those M3 rate, those dash XMLs, that's using a Lambda function. It scales. I think we were previously running it on a Rails backend. And now it's like an Apex up function that costs us like $0.20 a month or something. It's just, well, it's hard. You get a million requests for something free anyway. It's cheap. This new catch-up TV stuff, that's done with a whole bunch of Lambda functions. The stats pipeline, Kinesis makes it really easy to handle streams of data. And you can just write a Golang Lambda function which computes something. It's pretty nice. How does Kinesis do non-AWS uses? Kinesis is like vomit. A steady stream of vomit dribbling down your shirt. Is it Kafka? I don't really know. It's a way of handling streams, I think. And I've written lots of internal tools with Golang. One thing I did in Golang, which you couldn't probably do in Shell very easily, you probably could do with image magic. For example, I had to figure out whether some of our test feeds were going blank. So I wrote just with some sample code from the image library, which is quite nice, to detect it when segments are blank. And I don't think you can do that. Well, you could probably do it with FNPEG and image magic, but I did it a lot faster. Well, I did it a lot slower, but it's faster now. So the way I deploy Lambda functions is with this thing called Apex by T.J. He used to be a big guy in JavaScript community, but then he saw the light and joined the Golang developers, I think. Actually, is this a big mistake? Has Golang actually worked out for you guys? I don't know. So Apex is for handling the Landers, and Apex Up is for handling the Lambda and API Gateway. As a rule, I try to keep my functions outside Lambda, so I go test everything, and my Lambda functions are just like the function call that's all tested somewhere else. I don't put much complexity inside my Lambda as if possible. And then I use SNS for communication, I guess. Here's the typical sort of things I use. The cool thing about Apex is that it makes it easy on your CLI to filter out all the errors. It makes it easy to debug invocations all from the CLI, which is pretty nice. I like. So the V1 SDK, if anyone used it, I've got some links there. It's a bit weird when you start using it. There's all these pointers. And when I first saw references, what is the correct term? Pointers, references? I think I call them pointers. There are all these pointers everywhere, and the code looks really ugly. I should have put a code snippet here, but it feels a bit strange. Does anyone use the AWS SDK? It feels a bit weird. And I notice also it doesn't support AWS profiles, so every time I had to switch between accounts, I don't know about you guys, but I try to keep doing stuff in separate accounts. And it's really painful switching between things with the V1.  Or I don't know, it's just a bit weird. But now there's a V2. I was very excited when I learned about this at VEvent. But the bad news is that it is pretty unstable. You've got to start using DEP and stuff like that. Who uses DEP? I tried being with it. I'm not sure I like DEP. It's a bit slow, isn't it? No, because it's for vendor. Okay. And then sometimes I have problems with importing stuff from different... I get these vendor errors when I'm doing some cross accounts. Anyway, so the bad news is that it is a bit unstable. It's a preview. This is actually kind of like work in development. And we actually... I know you don't want to hear this, but they need people to use it so that they can shake out the bugs and get it right, I think. So I think... I mean, I'm one of those guys who like to use new stuff. But to be honest, it can be painful at times. And there's a link to GitHub Search. I actually did a GitHub Search and there was only like one other guy, Raven, in Singapore, who was using the V2 DynamoDB stuff. One other guy in the planet. What do you say about Singapore? Which I thought was quite cool, but at the same time really, really sad. And one of the things I don't like about the new V2, but hopefully we'll bring it back, is that there's this option called chain verbose errors. I don't know how you guys work, but when I work with Golang SDK, I don't declare the permissions. I run my program and then I see what permissions it needs. And when you run verbose errors, it tells you what permissions it needs. It's not easy to make a policy at a later date. Or you could just put AWS, I don't know, full privileges and get your Lambda running that way. That also works. So the good news is that the new V2 has AWS profile things, so you can switch between accounts, really nice. The good news is that it is being designed, it's being worked on. And I'm no expert with SDKs and stuff like that. But I do enjoy learning about APIs because I think everyone should know a little bit about APIs. It's just like a fundamental thing, isn't it? Like, for example, does anyone use AWS JavaScript SDK? I thought it was very interesting that AWS has this DynamoDB interface, but they also invented this other thing called DocClient, which made it a lot easier to work with JSON and JavaScript. So it's not like other languages have solved this problem. This is an ongoing problem with all languages, having a good API to a third party like AWS. And the other good news is that the developers are quite nice.  So here's an example of what the SDK kind of looks like. What do you call those? Ampersand things? I'm not too sure what they mean. I add them to the things to make things work. Same goes for this thing, whatever that means. That's an address of reference too. But the reason why they have these convergent stuff is that evidently the way Golang works, excuse me, I'm not an expert, you guys can probably fill in the blanks here, is that if you declare a struct or something, if you declare like an int, the SDK doesn't know if you meant zero or if you meant it was unset. This is the big problem with Golang. So hopefully that was a good explanation. So this is why they have all these weird conversion stuff. But with V2, they make an exception to maps and slices because that maps to AWS stuff because the empty slices and empty maps, what have you, they also don't exist in AWS. So they previously, what do you call this, converted everything in V1, V2, less things need converting. So the code is slightly more readable. One way of not doing all these, what do you call these conversions is to use setters, but it was decided in a GitHub issue that this is not idiomatic. Does anyone have strong opinions about setters? Well, they've decided to drop them. It's just very Java like that's all. There's no setters, there's no setters anymore, guys, sorry. Another thing with V2 is that they've designed the API so that there's less methods to every call. And I guess, I don't know where this request stuff comes from. I guess HTTP request has something like this, but I don't know about you guys, I use HTTP.get and HTTP.post. But anyway, they've made changes in that regard.  It's much easier to basically build something with Visual Studio Code or VIMGO. Who uses VIMGO here? Power, power to the people. And then, yeah, they're basically adopting some idiomatic styles like buff.io, but to be honest, I don't even use buff.io. Who uses buff.io? I use read all and be done with it. Moving on. Good thing about the V2 is that the configuration is much easier. There was like a couple of weird ways of doing it with sessions, I believe, in V1. Now, it's a lot more simple. And it even can handle, like, better caching states. It can even handle MFA. Who uses MFA here? I don't know what that is. It means mother, father. It means a multi-factor authentication. I use Authy because Google Authenticator burnt me.  I hate it. Banks use it. Well, banks use it badly with SMSs. V2 should be also more performant. I'm not too sure what reflection is. I think it's when you look at a mirror and you get a reflection back at you. But evidently, with the V2, they're using marshals instead of reflection. I know reflection is like the last chapter in the GoPL book. Has anyone read that book? It's the very last chapter. I never read the last chapter. It's too difficult. But anyway, this thing, there's always these links to the issue. And with this thing merged, it should be faster. I mean, it's claimed. I haven't actually noticed the difference. To be honest, GoLang is pretty crazy fast to begin with, I mean. Oh, and the discoverability, like with the V2 thing, I noticed that these very handy things. Who uses DynamoDB here?  What are you guys doing with your lives? You need a data store. You need to use something like DynamoDB. AWS fanboy. AWS fanboy. You could also use JSON on S3. I use that a lot because it's so much cheaper and easier. Anyway, DynamoDB is sometimes what you need to use. And I actually discovered these very handy things like Marshall Map and Expression Builder. Because if you work with DynamoDB, you usually have to do these very strange hash equals expressions to build up stuff. And basically, there's easier ways. And V2 exposes them nicely. So, yeah, cranky. So I wanted to make this repeat. How do you make it repeat? So, guys, when you're using V1, think about adding a dash V2, and then you're using V2. Isn't that extraordinary? It's so easy to switch. But, yeah, that's basically, I think that's basically all I had to say. Just before coming here, I thought it'd be funny to show you a blank video. What do you do? Oh, I thought it'd be funny to take a V1 thing, GH poles, which is by TGA Hollywoodchuck, and see how long I could quickly change it to V2. It took me about seven minutes, which was quite long, I thought. But I thought we could just run this on the background while I take questions. So you can see the kind of changes that I had to make, like copy, paste, and change things from pointers to whatever, normal stuff, references? Oh, okay, yeah. And also, you can be enabbed by this thing called VIMGO. It's a lot faster than Visual Studio. Visual Studio is like molasses. This thing's pretty fast. I'm actually going a little bit slowly because my son was hanging on my leg. But this is the way I work, Control-F, VIMGO. And yeah, any questions about V2? Hopefully something. For people who don't use AWS, we're lacking a bit of context.  Do you know what AWS is? It's a toilet system, the best toilet system in town. No, AWS is basically a hosting service, right? No, I'm not asking what AWS is. Do you have an example of the kinds of... What do you use it for? Yeah, what do you use it for? You use it for everything. No, not AWS. I mean the SDK. Oh, the SDK? Well, this one, this little thing here is... Do you run it at the end? What? Do you run it at the end of this video? I do a Go test and everything passes. Pretty close. Same as being run. Yeah, this is the way I work. I should have bound Go test to some sort of key, but I just do things, say, for Go test. What do you use it for? Yeah, AWS uses it for computing. I don't know. Storing files, manipulating files, doing pipelines. I don't know, when you have a Golang program, you need to host it somewhere, and AWS is the place to host it. Obviously, you don't need to use the SDK for some sort of random number generator or something like that, but the minute you want to store files, this is using DynamoD. The minute you want to use some sort of query engine, the minute you want to manipulate thing, I don't know, manipulate AWS resources, create SDK. Trust me, you're going to have to touch this bad boy. So it's all in your best interests to have a look at the API to be familiar with it. And yeah, I think at my workplace, I dare say using AWS, I am a total fanboy, but it has saved so much time and money, and I know things work so much more robustly and reliably now that, yeah, I think I would go far to say that I'm going to resign from my job and go into consulting so that I can help other businesses use this stuff. This stuff called Go, have you heard of it? It's okay. It's not bad. Yeah, GoTests and AWS. I don't know if Google and Azure have an SDK of their own. It'd be interesting to compare, actually. I'm comparing the JavaScript one and this one, and I think I prefer the Go one. Walk through a real use case. A file pops up on S3.  A file pops up on S3. Someone uploaded a file on S3. Yeah, it triggers an Apex. Yeah, it can trigger what you call this, an event. Yeah. And then you attach a Golang function. The Golang function is attached to your Apex? Yeah. Your Apex is just a way of uploading it. Yeah. So your Golang Lambda function would take the event and do something like send you an email that something was uploaded. Like a little DB field, for example. Exactly. I don't know. That sounds boring. Okay. E-mailing or perhaps transforming the image or something like that. All right. I'm going into a thumbnail. Yeah, sorry. I should have come up with some more use cases. I was actually, you know, I was too tired to come up with more examples. This is enough, guys. This was hard enough. Seven minutes of concentration. I didn't use Facebook once, as you will see. But yeah, it's, yeah. Anyone, I'll be happy to learn about other APIs and SDKs. Whatever's best is my motto. Yeah. Any questions? I have a question. Okay.  Oh, God. What are you doing here? Okay. Sorry. What was it? In your experience, what was it like, in programming or in your book? Well, I mean, I have limited experience with Python. I've never deployed a Python Lambda function. I have used AWS CLI. I don't know if that counts as Python. But when I was using Python before, I wasn't testing maybe. What is the testing framework in Python? I don't even know. You didn't test it. And then I guess Python also isn't strongly typed. Is that true? I don't know. It's not strongly typed.  I just do something quite end-to-end. But from Python to Golang, I think Golang is faster. Never mind the faster. It's just way more robust and reliable. Like seriously. It is like, I know it's going to work. I don't know. With Python 2 and 3, with the bytecode and all that jazz, who knows what's going to happen. But yeah, it's just giving me, it gives a, yeah, I can safely offload complexity with the stack, I feel. Any other questions? So the SDK cover all the APIs? Yeah. 100%. I haven't noticed anything missing. Well, it's interesting because like the AmazonJS SDK doc client is like a weird API of its own. And obviously those, their APIs aren't mapped to, I mean, how to explain this? I mean these APIs are, some of them do a lot for you, some of them don't do so much. But you can do everything with Golang SDKs. It's not like you're limited. But some I would say are easier to work with maybe. Let's be honest, working with Jason and Golang is, it's a little painful, but you get used to it after a while. Any other questions? Using the need to go on and on those things still? I haven't actually, I haven't. I'm using Apex's JavaScript shim. But I have been following the bugs and people say that they haven't even noticed any real change. I mean, I think it is folly, I hope you all agree with me to focus on speed because speed is not the important thing. It's having something robust and works and deals with complexity. Any other questions? Yeah. Thanks for sharing.