3 Minutes with Kent

3 Minutes with Kent

By Kent C. DoddsTechnology
Download on the App Store

All 3 Minutes with Kent episodes

  • Productivity through Live Streaming

    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 myself on task
    because I can get,Distracted pretty easily. And so by live streaming if I
    get distracted by Twitter or something, I have to acknowledge what I'm
    doing to anybody who's watching.

    And not always are people watching sometimes nobody tunes into livestream,

    which is fine. And this is why I don't actually look and see whether
    anybody's watching. So, I don't like I don't always sorry about that. I
    don't always interact with the people that are watching the livestream. I
    do have a chat.

    And so sometimes I'll chat but I I don't ever see how many people are

    watching live because it doesn't matter. What I'm doing is I'm trying to be
    productive and so just the thought that somebody could be watching and and
    it's actually recorded so people could be watching the future.

    And that just keeps me on task and I get so much done when I'm live

    streaming. So that's something that I would suggest and you don't need a
    bunch of complicated software or anything. I I've used OBS and you get a
    higher quality experience there. I have a green screen and everything.

    But I found that it's just a little more work to set up when like my

    purpose isn't the the content or anything. So what I do now is instead is I
    just use zoom and zoom has the ability to live stream and I don't know
    whether that's a paid thing or not.

    So you may have to look at that, but it doesn't have to be really

    complicated. You can get software to do it. The the whole purpose is just
    let's make myself believe that people are watching so that I can be really
    productive and it works really well.So, I'd give that a I recommend that
    give that a shot and see how you feel about live streaming your stuff.

    You can't always do it, but when you can it's cool. See ya.

    3 min
  • Concerning Libraries and Frameworks: Build or Install

    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 abstractions for everything. And the difference

    between your framework and one of the more popular andTry to true
    frameworks is your framework is used by only you and it is not battle
    tested. It is also maybe not even tested. It hasn't gone through the rigor
    of being deployed to production by lots of other people and so there are a
    lot of bugs that you just don't know about.

    And so I would really strongly advise against building your own framework

    unless you have just some very particular needs that none of the other
    frameworks can satisfy. And I would suggest that 99.9% of applications
    the,That you would build for the web there's a framework that is well
    suited for the task And in fact most frameworks can cover 90% of the needs
    of most web applications today.

    I'm sure. So even deciding between which framework is less of an important

    point at this point, they can all pretty much do what you want them to do.
    And so as far as like libraries when should it just bring in libraries? I
    mean, there's always the risk of you know, some security vulnerability.

    There's there's this article a while ago about somebody who's been stealing

    credit card credentials because they published something to.NPM which of
    course that was not true they'd hadn't actually done that but they were
    saying this is a thing that I could have done and it absolutely is and it's
    terrifying but do you want to build a product or do you want to build a
    bunch of libraries.

    Because ultimately if you don't use libraries to do things you're going to

    build your own and there's nothing wrong with that. You can like copy some
    code and and put it into your vendor directory or something like that. Like
    there's nothing wrong with that. You can totally do that.

    But it is a trade-off and you just need to acknowledge that fact. So, I

    can't give you a solid answer on that but hopefully that was at least
    thought provoking for you. Have a nice day.

    3 min
  • Why I Have 0 Followees

    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'm
    quote unquote following and I I like it way better and Twitter's.

    Them is not impacting me at all And so that's the that is literally the

    only reason why I unfollowed everybody it's not some sort of like I don't
    need to follow anybody. I'm so awesome. That's stupid. Anybody who would do
    that? I think is is that's not a good luck or anything but for me.

    I it's not some sort of flex or power statement or anything like that. It's

    100% just because I didn't like the way that Twitter's algorithm worked
    with the the people that I was following. So, I just don't followed
    everybody in and switched to using lessons data and it works out great.

    And that's literally all that it is So, I don't know. I'm just gonna make a

    short URL for this and I'll reply. So if you got here because you made some
    sort of comment and I gave you a short URL. Sorry that I didn't answer you
    specifically but I this is what I do when I answer the same question over
    and over again because I make I answer it once and then I send it links to
    people instead of having to answer them or having to just ignore them,
    which is what I often do.

    So anyway, I hope you're having a stellar day and we'll see you around.

    3 min
  • Use ASTExplorer.net to deepen your understanding of JavaScript

    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 expect or something like that. Anytime you
    see something syntax? I want you to copy that code.

    Into a tool called AST Explorer dot net. It's AST is an acronym for

    abstract syntax trees, which does sound pretty complicated but I promise
    you that it's nothing magic. It's something that you can learn but go to
    AST explorer.net paste in the code on the editor on the left and on the
    right side, you're going to see a representation of that code in what's
    called an abstract syntax tree.

    You can represent it as like an JSON object or something. And each element

    of syntax.Has a particular node name and a type and as you click around you
    should be able to see the name of the AST node for the part of the code
    that you're looking at.

    And so AST Explorer can be a really great way for you to get an

    understanding of what the different parts of the code represent for the
    computer and it can also help you get an idea of like, oh this is called an
    import specifier, but then when I do this with an object that's called an
    object pattern.

    So, maybe those two things like the structuring and imports are not the

    same.Thing which they aren't So you can go ahead and try some of that. And
    you'll get a little deeper understanding. The other nice thing about this
    is that it makes those things Googleable. So instead of saying, hey what's
    that thing at the import statement or whatever.

    You can say I want to learn about import specifiers and then you can Google

    around about that. So, hopefully that's helpful to use kind of interesting
    to play around with AST explorer.net. I wish you the best of luck and I
    hope you have a stellar day and we'll see you in the future.

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

    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 components, you know that it's
    just really hard.

    It's a disaster. So anyway, I was,Doing this and I developed this opinion

    where I'd say, you know, what I think that it's better. And I actually
    ended up giving up on the HOC. It didn't really add a whole lot of value
    anyway. But I developed this opinion where I think that it's better when
    you're just barely adopting a typed language or you know, something like
    that.

    Yeah, basically when you're adopting TypeScript, it's you're you're better

    off focusing on getting like not focusing on getting everything perfect.
    So, you don't want to enable strict.Type checking right from the get-go
    You're really bad at TypeScript when you're just barely getting started.
    And so it's way better if you just embrace that fact and say I'm going to
    use any or I'm going to use unknown as my argument type here.

    And I'm joined I'm going to cast all the types all over the place and

    whatever. And maybe you're not getting all the value out of the type system
    that you can you you aren't when you do that. But you're not going to be
    spending so much time trying to make the types perfect with your imperfect
    knowledge of TypeScript that

    3 min
  • Default to "Yes"

    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 know the you're not all parents and stuff um, but

    because I feel like this is like parenting is a really great example or am
    an what's the word I can't think of the word I'm looking for but like it it
    relates very closely to relationships in general and um as much as we like
    to pretend it's not software is a lot about relationships, especially when
    you're working at a company and so if you're a team.

    Lead or you're managing a team of engineers or something like that you want

    to default to guess and so rather than just kind of seeing these people
    that you're you've got a relationship with as you know, it's somebody that
    you have to endure or appease or whatever you should be trying to see how
    like how you can help them be happy and satisfied with the relationship and
    that I I think defaulting to yes, most of the time is a good practice and
    so,For a lot of the time I default to know with my kids if they want to ask
    me something I'm automatically thinking okay, how can I say no but I'm I
    think that it is better to switch that up and instead think how can I say
    yes and focus more on finding reasons to say yes and there should be more
    weight on the yes than on the no so anyway hope that's kind of useful to
    you in whatever you're doing relationships are awesome and have a wonderful
    day.

    3 min
  • Real World Debounce

    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's very fast, but because people,Can't move that fast or
    rather they're like putting the barcode up to the scanner.

    So quickly in it can get those values in so quickly we don't want to

    actually scan it all the time. So what we're going to do and this is
    actually a reverse debounce. Normally you do it in the other direction, but
    what we do is as soon as we call that function or whatever to actually do
    the scan, we're not going to call that function again until a given amount
    of time after that first call.

    And that's why it's a reverse debounce because a regular deep.Bounce is

    going to say once it's going to be called actually wait for a second to see
    if we want to to be called again thereafter. So another use case for this
    sort of thing would be if I'm typing in an input to do some sort of search
    or filter and that process is really expensive or something like that.

    Then we're going to wait 200 milliseconds before actually executing the

    async call to go get the data response or something like that. And so we're
    going to wait until the user stops typing. And so yeah, anyway, that was
    just kind of an interesting thought that I had of like a real world.

    Physical experience of you know, scanning things in with a scanner. It's a

    reverse debounce so we go ahead and scan it right away and then wait for a
    certain amount of time with the input like a search input. We're going to
    wait 200 milliseconds first or 300 milliseconds or whatever before we
    actually execute the the function.

    So interesting concept debounce. It's actually a fun thing to implement on

    your own the simple case is pretty easy to do. So go ahead and give that a
    shot today. See ya.

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

    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, it says, hey, I realized that this event is on an HTML input
    element.

    But I don't know what event.Target is going to be so you're going to have

    to do some sort of casting or something like that. And that always bothered
    me for a long time. Well during the live stream somebody mentioned that I
    could use current target instead and that would always be the input element
    and and so I tried it and of course it worked and and then it it dawned on
    me the implications of how these things work and and using TypeScript in
    general and so now I pretty much just use current target pretty much all
    the time.

    So I've switched from default to target and use current target when I need

    to I've,Switched that now I default to current target So let me just
    describe that really quick A target is the element that triggered the
    event. So let's say you have a button and inside of that button you have a
    span that says like a side one and then another span that says side two and
    then you click on the side one.

    Target is going to be the span inside of the button, but if you put the

    event handler on the button itself and then current target is going to be
    the button itself. So the current target is going to be where the event was
    bound and target is going to be where the event happened.

    Well most of the time in react you're going to like that value is going to

    be the same either way like especially when we're talking about inputs and
    and buttons and stuff most of the time what you really want is the button
    itself or or the input is what we're typically looking for or the form.

    And so only if you're doing like your own version of event delegation, do

    you want to use target? So that's something that I learned yesterday kind
    of interesting. Use event dot current target instead of event dot target by
    default. Hope that's helpful. Have an awesome day. We'll chat with you
    later.

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

    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, I mean feel free to do whatever you want and you can sell content
    maybe make.A couple backs but if you want to be successful at this you need
    to find a way to get the trust of the people that you're trying to reach.

    And the best way that I found to do this is to create a silly amount of

    free content. And because people, you know, this is their hard-earned money
    and they want to know for sure that this is going to be worth their time.
    It's not just their money. You can offer like a 30-day money-back
    guarantee, which I do.

    But still people are like, it's not like everybody takes it to to see if

    it's gonna work out for them because it'sIt's not just money It's time It's
    the amount of time that it takes people to go through the material to see
    if it's worthwhile for them. And so what I would suggest is you spend a lot
    of time creating free content and this takes a lot of time.

    If you're like if you've been working on this for a couple months and

    you're frustrated because you only have a 300 followers or something keep
    at it, it takes a multiple years really to build up a following but it's if
    this is what you want to do, then it's worth your while I think.

    So yeah, we're work on creating.Really good high quality free stuff as much

    as you are able and then you'll gain the trust of some people develop some
    sort of tribe. I actually there's there's this book that's like tribes why
    we need you to need to follow you or something like that that I would
    recommend but yeah get a base of people who trust you and share your
    material and then once you have that base then you can go and start asking
    for money from people and they'll trust you they'll know you that your call
    your content is good.

    So, I hope that's helpful. Good luck. See ya.

    3 min
  • Productivity and Relationships

    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 always would have recorded that
    so that I could increase the impact of the value that I was creating.

    And I think there's something to be said for that but there's the reason

    that I bring it up today is because I think there's something to be said
    for just having genuine experiences between you know, just a handful of
    people. So, you don't have to maximize the the impact of the value that
    you're creating all of the time.

    I think that it's really valuable to to do so and maybe have some sort of

    deliverable out of things like you can take notes or something. But,And
    yeah it was just it occurred to me that I just really enjoyed spending that
    time talking with them, you know, and they're going through my material and
    everything and so we're all kind of in the same context of what we're
    talking about.

    So anyway, I guess the the takeaway for today is yes be productive yes

    increase the impact of the value that you're creating but don't forget to
    be a human to and just have enjoyable relationship building experiences
    with other people because there's a lot to be said for that sort of.

    Experience too. So, I hope that you're having a stellar day and I'll chat

    with you tomorrow.

    3 min