3 Minutes With Kent

  • Autor: Vários
  • Narrador: Vários
  • Editora: Podcast
  • Duração: 10:53:05
  • Mais informações

Informações:

Sinopse

Hi there! I'm Kent (https://twitter.com/kentcdodds) and on this podcast I share a thought or two of things that I've found to be useful in my journey as a web developer. You can subscribe on iTunes here: http://kcd.im/3-mins-itunes and on RSS here: http://kcd.im/3-mins-rss

Episódios

  • Join the KCD Discord and request podcast topics

    03/02/2021 Duração: 02min

    https://kentcdodds.com/discord Hey there friends I want to make an invitation to you So yeah you're not gonna learn a whole lot in this one. Feel free to skip if you want but my invitation is I opened a well reopened channel on my discord you can find it at Kensie dots.com slash discord and that channel is three minutes with Kent and so that's a place for you to discuss the episodes but more importantly in the reason I'm bringing it up is it's a place for you to ask for particular episodes so you can ask questions or you can say hey, what do you think about this or whatever you want to andHopefully my answer can be within three minutes if it can't then or you have like, hey I have a block of code that I want you to review or something like that. If that's a case then you can actually come to my office hours which you'll find at Kensington / office hyphen hours. In any case, yeah, I just invite you to come to my discord. It's a fun community, we're awesome. It's a great. I prefer hanging out on Discord way mor

  • Write it both ways

    02/02/2021 Duração: 02min

    Hello friends, so today I'm driving so that's the background noise you're hearing but I wanted to talk about how I make a decision about which direction to go when I'm talking about like writing code in multiple ways so like when the writing code there's like infinite ways to do things and you really can just slice this in any direction that you choose and lots of those decisions are pretty arbitrary and,Yeah just like it's not so cut and dry it's subjective and so the best method that I've found now sometimes you can't really do this, but if it's for like a you know, utility function or a handful of utility functions or something like that the best method that I've found for fixing or determining the best approach is to just take both approaches and so this may take a little bit of time depending upbeat how big the thing is, but you just build it one way and now you have a good idea of what the requirements are for. That method of madness and then you build it in the other way and you get an idea of what tha

  • Tell the boss how great you and your co-workers are

    02/02/2021 Duração: 02min

    Hey friends so today I wanted to talk about how important it is to communicate and in particular I want to highlight the importance of communicating what you and your team have done to your higher-ups. So anytime that you or your member of your team does something spectacular you should send an email to your boss or to your teammates bought. So there's nothing wrong with saying hey boss, I did this thing and it was really difficult and I really glad that it worked out and I just wanted to let you know kind of celebratory whatever.Theres there's a way to do this that isn't cocky um and the way that you do that is most of the time you don't accomplish this without the assistance of anyone else. And so you can say, hey I boss like I had this problem and I worked with these other people and we figured it out and we just did an awesome job and I just wanted to let you know that your team is awesome. I love working here. A Boston lab stitch here emails like that. You can also do this if it wasn't your accomplishmen

  • How to test Redux

    30/01/2021 Duração: 02min

    Hello everyone. So today I want to talk about testing redux. So I know that I don't really use redox like a lot of people know that I am not a huge fan of redux any redex project. I worked in would just became very difficult to work in. But I know that a lot of people are using redux and especially if you are probably using redux tool kit, which is great. So anyway, as far as testing redex goes. You shouldn't actually ever be testing redex. You pretty much always want to test the components that are using redux.And only sometimes when you have maybe something that's really complicated and redex or something you should probably extract that complicated logic into its own pure function and test that by itself. But most of the time you don't need to bother most the time just rest the components that use redex you wrap your component inside of the the redex store provider and everything and and and then just test it as if it's not using redex and the benefit to this is if you decide that oh this state doesn't nee

  • TypeScript: Don't type array method callbacks

    30/01/2021 Duração: 02min

    Hello friends, this is a little bit later than usual but I just wanted to get this in because I want to do this every weekday. So today I want to talk about TypeScript and in particular map. So I wrote a blog post recently that talked about converting typescript or fetch a fetch implemented or calling fetch in a function over to TypeScript because when you call fetch the return value from the dot JSON on that response is going to be any and so you have to explicitly. Give that a type annotation. And anyway, one of the as I was migrating this code one of the things that I pointed out was that like we were iterating over some of the values that came back from that response.json call. And in the process of migrating the code if you just go about it in a certain way before you add the type annotation, you'll find that iterating over it requires that you type that map. Callback function. And so in our example, we had an array of errors that could come back from this API call and we're going to iterate over those a

  • Where do unit tests fit?

    28/01/2021 Duração: 02min

    Today I was in a piano discussion for test JS Summit and a question was asked about like what's the use case for unit tests if we focus on integration and component level tests. And I talked about this and and it was kind of more about like what what's the shape of our testing trophy or testing pyramid or whatever like where do we focus our tests? And I talk about how I recommend that you focus on integration and component-type tests and try to mock as little as possible. I typically don't mock modules all that often and most often will just.Mock HTTP requests unless we're doing end tests in which case you mock nothing. And the the way that I think about it is like if you just have 100% unit tests and that's all that you're writing and you get a hundred percent code coverage with that you're still very likely to have lots of bugs creep up as integrations between different pieces of these units change. And that can be very difficult to track when you are just mocking all the modules and just unit unit testing

  • Creating Content: My Secret to Learning

    27/01/2021 Duração: 02min

    Hey there friends So none of you are content creators none of you aspire to that or anything but I kind of want to change your mind on that a little bit. Creating content isn't just for the people who are out there creating content and getting paid for it like me or whatever I didn't start getting paid with the concept that I create and much the content. I create is actually not paid. My but like I often actually get asked about like, how do you learn stuff and and how do you like know the stuff that you know. And and my answer is that I kind of cheat and I say, hey, I want to learn about. How to use Angular with React and so I'm going to make a conference talk proposal that is that. So, I know it's possible. I just I've never done it before maybe but I know that it's possible. So I'm going to make a conference talk proposal. It gets accepted and so now I have like, I'm forced to go and learn this thing. And in the process of creating that content, I'm learning a lot about both of these frameworks. So creatin

  • Automation with Cypress: Renaming GitHub Repo Default Branches

    26/01/2021 Duração: 02min

    https://github.com/kentcdodds/rename-gh-to-main Hello there friends. So today I'm going to talk about what I did yesterday and that is I spent just like an hour to renaming all of the default branches on my GitHub repos from Master to Maine. Now, I'm not going to really explain directly why I actually have a article that you can go read but Git and and GitHub are moving the default branch from master to main fork historical reasons and you know references to slavery and that sort of thing. And so I decided I wanted to support that and I wanted to.Get everything consistent but I have over almost 300 repositories where it's the source repository not a fork I have. Yeah, just a lot of repositories. I didn't want to spend all the time. And as far as I know there's no GitHub API for for updating the default branch from Master to Maine. And so I needed to use the UI. So what I did yesterday is I actually livestream this and you can go watch it, but I used Cyprus to automate navigating to every one of these repos. I

  • How to approach writing tests

    25/01/2021 Duração: 02min

    Hey there friends. So today I'm going to talk about testing and the users of your code and how you should think about like how what do I test? So pretty common question. And the answer is basically you take a unit of code that you want to have tested that could be a single function or it could be an entire application. It really just comes down to what you want to get confidence in. Most of us are probably in the camp of like I just want my to be sure that my entire application works and that's great. And that'sTypically where where I'm thinking and in my own mindset sometimes though, it's hard to accomplish the thing that you're trying to test from a whole application perspective and that's when you go to lower level forms of testing but that's not what I'm going to talk about today. So once you've identified the unit of code that you want to have tested the next thing you need to do is think about who the users of that code are. So if we're talking about a react component, for example, then you're going to

  • Don't Side-step TypeScript

    23/01/2021 Duração: 02min

    Hello everyone So today I'm going to talk about TypeScript and tricking type script versus fixing your code So, you know, the the null non-null assertion thing where you put the exclamation point at the end of something to say, hey type script this isn't going to be no or whatever. I don't really use that. There's actually two reasons. One of them is because it looks like when you're looking at the code that looks like that's a feature of JavaScript, but it's not and so I don't really like using things that look like they could be a feature of JavaScript but aren't I don't know maybe that's just weird of me. But the the biggest reason is that most often if TypeScript thinks that this can be null it's most likely that it actually can be no and and you could put that bang there or you can do type assertions or casting and whatever but it's I I don't like telling TypeScript that no this like this won't be this value when it actually could be that value. So I'm thinking about a specific example that my friend Pet

  • Productivity through Live Streaming

    22/01/2021 Duração: 02min

    Hey friends so I've been thinking a lot about productivity this year because that has been my theme for the year has been planning and I want to be really productive because with the covet situation in my family, I have the I spend the morning with my kids and then I work in the afternoon so I actually only work half days which is awesome, but it also means that I don't have much time to get stuff done and so I am I just try to be super productive at the time that I have. And so, I've learned a couple of things about that and one thing that I want to talk.About specifically is the productivity of like the time you're actually at work working and something that helped me a lot even before all of this was live streaming. So I've been live streaming my work for a long time and from the very beginning the the kind of motivation behind my live streaming wasn't to create content at all. If that had been the motivation then the content that I created would be of higher quality. But the actual motivation was to keep

  • Concerning Libraries and Frameworks: Build or Install

    21/01/2021 Duração: 02min

    Hi there so today I wanted to talk about the merits of a framework I get this question quite often like when do I decide to bring in a framework or even just bringing in libraries versus just build it yourself. And so first on like the framework side of things if you're building something that's like basically a HTML page or you're doing some surveyor server template thing and you just need to enhance your app a little bit with some JavaScript so therefore it's more of a website than an app. Then yeah, you probably don't need a framework the browser differences are pretty.Smooth to over by now and yeah you may not need a framework in that case, but like my audience of the the people that I'm working with mostly are very primarily focused on building web applications and for that if you don't want to build or use a framework and and they're legitimate reasons to not want to use a framework, but if you don't what is going to happen is you're going to build a framework for yourself. Eventually, you'll build abst

  • Why I Have 0 Followees

    20/01/2021 Duração: 02min

    Hey folks so I guess I need to do this because people keep on bringing it up and so I'm just gonna mention it. If you aren't aware a month or two ago, I unfollowed everybody on Twitter and now I follow zero people on Twitter and I changed to lists and so the reason that I mentioned this is because a lot of people see this as some sort of power move or some nefarious purpose. I've done this. I don't know. I don't understand why people have yeah and I know that not everybody has but several people have assigned some now intent to the fact that I don't follow anybody on.Twitter I use lists and so it's not like I don't keep track of what people are doing or whatever I just found the the reason that I did this was because the Twitter algorithm just messes up my list or my my home feed really bad. I just didn't like what the Twitter algorithm was doing and so I said, hey, well, I'll just unfollow everybody and I'll use a list instead and it's been great. I use tweet deck and it I'm able to segment the people that I

  • Use ASTExplorer.net to deepen your understanding of JavaScript

    19/01/2021 Duração: 02min

    Hi there friends So today, I wanted to talk about understanding the syntax of JavaScript. Now, I most of us when we're learning JavaScript, we are introduced to each part of syntax and some of its capabilities and we just kind of learn about that syntax through experience of working with it and there's nothing wrong with that approach that's pretty like the the best way to learn anything is really just practical application. But there are often things that you skip over when you just focus on practical application ofThe of knowledge And especially if JavaScript is the first language that you learn maybe because it does borrow syntax from other languages. Maybe there are things that you just don't know are possible or don't really have a good good grasp on because you don't understand the fundamentals of that syntax in particular. So what I'm going to suggest to you is that anytime you see some syntax that you're not super familiar with or you think it's one way but things aren't working the way that you expec

  • Use TypeScript any/unknown/casting when you're getting started

    18/01/2021 Duração: 02min

    Hey there friends. So today I wanted to talk about TypeScript again, and I want to talk about adopting TypeScript. So when I first started into TypeScript I was working. I I'd been doing flow for a long time and then I switched over to TypeScript. This is at PayPal. And one of the first projects that I used TypeScript in was this project called PP React, which is short for PayPal React. It was a component library. And I I was working with a lot of abstractions as my first and my first foray.Into TypeScript and when you work with abstractions sometimes you the typings for those things can be a little bit more complicated than when you're just like doing everyday consuming of abstractions or calling functions or making reactant components or whatever. And so it was a little bit more challenging but then I made it even more challenging because I tried to make an abstraction for some of the the components that I was using that was a higher order component and if you have experience with types and higher order com

  • Default to "Yes"

    16/01/2021 Duração: 02min

    Hello everyone, so today I want to talk about saying yes more so and maybe yes is a default. So yesterday I was talking with my sister and I was just over at her house and and her son came over and asked if he could have a soda and she said yes and I we continue talking and I said, oh man, it just feels so nice to be able to say yes to your kids right and she said yes, or I really nice and and she said I tried to say yes as much as I can and yeah the way that I feel about it. Is like my kids will sometimes ask me why I say no all the time and I say no you got this backwards you just ask me questions that I'll say no to all the time that's the problem and and so anyway, I've just been thinking about this and I feel like more of my default should be to say yes as a default so I I should be like the burden of proof should be on the no answer so it should be more of like why should you why would you say no rather than trying to justify the yes and the reason that I'm sharing this with? You all is not because I kn

  • Real World Debounce

    15/01/2021 Duração: 02min

    Hey there friends I've been making notes of different things that I do or like see in the real world that is like a good analogy for programming concepts and one that I thought about recently was the programming programming concept of a deep bounce and scanners at the grocery store. So, I don't know about you but I I haven't used an actual like person skinning in my groceries for years. I use the self checkout now. I like that a lot better and even though maybe it's not as fast. I don't know. I just like doing it myself.And one thing that you notice when you scan something in is that you can scan it and then it will wait like let's say that you have you bought like two pieces of chapstick and so you're gonna scan it in and you can scan the same piece and so if you you scan it and then you have to wait for a second before you can scan it again because they've implemented a debounce and so basically the use case for a defense is like well this scanner can scan probably once every millisecond or something is it'

  • Use event.currentTarget rather than event.target most of the time

    14/01/2021 Duração: 02min

    Hey there friends so I've been doing some live streaming through discord a live stream at actually I'm on zoom and then I live stream it to YouTube and then we chat on Discord. It's a fun time if you haven't joined us then you should because it's a good time. So anyway yesterday I was live streaming and I made a discovery thanks to some of the folks who were hanging out with us in the live stream. So when you respond to a change event or on submit event for a form or something we're talking about react here or just vanilla JavaScript Dom APIs when youYour event handler that gets called is going to get called with an event object and that object is going to have a target and it's also going to have a current target. Well, I always thought that Target is pretty much what you want all the time and I just realized because I was moving some stuff over to TypeScript and that's what I've been live streaming is moving my epic react workshops to TypeScript. And I realized that when you do event.Target with TypeScript,

  • Work on that following first, then sell the courses and books

    13/01/2021 Duração: 02min

    Hey folks I was just thinking about something that yeah, I get questions about how do I break into the content creation world and stuff like that pretty regularly and something just occurred to me that I thought was kind of interesting and that is that I occasionally will see people with a handful of followers on Twitter and and like no sense of a newsletter of any kind or anything publishing books and making courses, you know, paid courses and things like that. And I think that I mean, I'm I'm not sure maybe that is working out okay for them, but IThink that's a little bit backwards You need to be able to earn the trust of the people that you're asking money from before you start asking money from them. And it's indicative to me that they haven't actually done that if you don't have any sense of a following of people or some sort of newsletter or some sort of tribe I guess of people who are committed to you and your content. And so what I'd recommend for people is before you start going out selling content,

  • Productivity and Relationships

    12/01/2021 Duração: 02min

    Hey there friends. So today I wanted to talk about something that was just on my mind yesterday. I was meeting with one of my learning clubs friends who were going through Epic React.dev and it was just so fun to talk with them and things and they asked me about how I'm productive and and get a lot of things done. And I mentioned that I I pretty much like over the last several years have just made sure that everything that I do is has a I increase the value of the impact and I've got a blog post.About this on my blog. It's how I am so predictive and it's interesting read you should go take a look at it but one thing that I thought was interesting is as I was talking with them. I realized that maybe like three years ago or something. I would never have agreed to do a like a small group chat without recording that chat and putting it on YouTube. This was like, I don't know there was seven or eight people in this chat and it was just us talking it up and I I would have agreed to it as fine years ago, but IAlways

página 5 de 12