3 Minutes with Kent

3 Minutes with Kent

By Kent C. DoddsTechnology
Download on the App Store

All 3 Minutes with Kent episodes

  • I use markdown and VSCode for slides

    https://staltz.com/your-ide-as-a-presentation-tool.html

    Hello friends you may have noticed that sometimes I use my editor as my

    slides in lots of the talks that I've given over the last few years and
    that was originally inspired by André Staultz who has the a blog post on
    his website called your IDE as a presentation tool where he kind of
    explains why he has done that and it's a good blog post you can take a look
    at that and even gives tips on how to do this effectively and stuff.

    But I would just thought I'd mention why I like doing this. I actually am

    working on some slides right now for.A talk that I'm giving and I I've gone
    through so many different ways of making slides like I started with you
    know, Google Drive and or PowerPoint and and went on to I actually used
    Prezi for a while which was fun and and slides.com is probably where most
    of my slides are and I really like that one quite a bit.

    I've made things simple. I used MDX deck tried to code my slides. And

    finally, I've kind of landed at using my editor for my,Slides because I
    think that just makes the most sense or it's just the the easiest for the
    types of presentations that I make which involve me moving my cursor around
    the screen highlighting text and maybe even adding text especially if I
    have some code samples or stuff or I want to like demo something.

    It's all just right there in my editor I can type and add things and it

    just makes things a lot a lot easier and I would be lying if I didn't add
    or if I didn't say that there's a piece of me that kind of likes this
    approach because it's just,Way easier to make these kinds of slides.

    And I sometimes see people who make just the most beautiful slides slide

    decks, and and everything is custom often like related to the conference
    specifically and and I am really impressed by that stuff and I think it's
    awesome and if that's something that you want to get into that's super
    great and I'm yeah, I'm impressed by that.

    That making things look good is a real struggle point for me and thinking

    about like animations and stuff like that too.When I did MDX stack I
    struggled a lot with making things responsive so that it would look good
    regardless of the size of my screen and stuff and it was just such a pain.

    So using my editor just gives me a lot of benefits and then I don't have to

    worry about all the extra things that I struggle with. I use markdown for
    pretty much every slide and then sometimes I'll have a gif in there as
    technically a slide. And you can take a look at this blog post that I'll
    add a link to to get a better idea of how I do this.

    Anyway, I just thought I'd share that.Maybe give it a try. See ya.

    3 min
  • Don't set your ref in your component body

    https://epicreact.dev/the-latest-ref-pattern-in-react

    Hey your friends. So I get this question of fair amount and so I thought

    I'd try to answer it and podcast form and the question is why don't why is
    it not a good idea to set a ref during your render function? So there are
    exceptions to this and understanding the reasoning will help you understand
    what those exceptions are.

    But basically, if you read my blog post on the Epic React dot dev slash

    articles, there's a blog post about the latest ref pattern and in that I
    put a use layout effect and,There with ref dot current equals some callback
    or whatever And a lot of people ask me why do you need to put that in a use
    effect?

    Why can't you just put that? You know you're calling it every render anyway

    so you may as well just put it directly in the render function. So the
    reason that you don't want to do this is it actually is mostly just for
    future proofing. So right now that will technically work and it and it
    there shouldn't be any problem with it, but when eventually if the reacting
    does finally release concurrent mode as an official feature of React,Then
    you could wind up in a problem and that problem would be very difficult to
    reproduce and very difficult to debug.

    So in general, this is why the react team is just been so adamant about

    your render methods being item potent, which basically means that it can be
    called as many times as it reacts once to and the same thing will occur
    regardless of how many times this function is called.

    That's like an oversimplification of what that means but anyway, so imagine

    a scenario with a concurrent mode where reacted.The rendering your reactor
    and then a high priority event happens as it's going through rendering and
    so it says okay never mind, let's stop rendering will deal with this high
    priority event and then we'll come back and we'll re-render stuff and so if
    you set it during the render function, you may actually be setting it to a
    value that is never actually used and so potentially if you end up using
    that you're using a value that was created for a render that was never
    actually committed to the DOM.

    It's hard to describe the bugs that you.Could have there but hopefully you

    understand why that could be a problem. And and so it because there's no
    real issue with putting something inside of a user factor used layout
    effect and that's really the only time where you can run code and be
    certain that the render was actually committed to the DOM then you may as
    well just put it there and make sure that you keep your render functions
    side effect free.

    So, hopefully that kind of made sense is interesting and useful. I hope you

    have a fabulous day andTake care.

    3 min
  • Don't bring an old problem's solution to a new tool that eliminates that problem

    Hey friends I had an interesting thought this morning. So a lot of people

    when they start using a new technology like when next was released or when
    you know a new version of Reactor or or any React library or whatever they
    often will say, okay, how do you I use this with an existing technology
    that I already enjoy like, so how do I use next with glamorous?

    That was an early thing. I remember or how do I use? Next with Jest or you

    know, whatever whatever it is. I would encourage you to when you're using
    anNew technology to avoid bringing in your previous and older or like the
    the previous technologies that you were using in conjunction with this new
    thing too early.

    So what I mean by that is often we get really that we're using an existing

    thing and say we're using create react app. And we really like emotion for
    our styling. And so then we decide okay, I'm gonna switch over to a remix
    from Create. React app and I'm gonna say okay now I really like emotion for
    my styling so I'm gonna come in to.

    That and try and figure out how to use emotion with Remix And I would

    discourage you from doing something like that right from the get-go. And
    the reason is that part of why we love our tools so much is because they
    solve problems and and that's that's great and they solve them in a way
    that we really enjoy.

    But if you bring all of your old tools to the new technology or to the new

    framework or to the new other thing, you might find that things don't work
    together quite right and that could give you a bad sense of what is
    possible or whatever like a it might.

    Put a bad taste in your mouth for that new technology When in actuality it

    turns out that you don't need or let me rephrase that you don't have the
    same problems that made you fall in love with this original tool. So remix
    is a great example of this because it just eliminates so many problems and
    so if you try to bring in solutions to problems that don't exist then yeah,
    you're probably going to have a hard time.

    You're going to be like, well, what is what is remakes all about? I'm not

    actually this wasn't triggered by anything specific. I haven't seen anybody
    say wow. I don't like remakes because it's hard to use this tool. It was
    just a thought that I had this morning.And yeah probably would be a bit of
    a pain to to use some tools with remix but just make sure that those tools
    are still awesome when you have a framework that may eliminate that problem
    altogether.

    So when you're learning something new, this is why I do my super simple

    start blog posts just to give you an idea of what this thing has to offer
    all by itself and in particular with remix actually just regular CSS files,
    you'll be blown away how good it works with just that.

    Anyway, I hope that's interesting and applies to more than just Remix have

    a wonderful week.And a wonderful day. Whatever you listen to this have a
    wonderful one.

    3 min
  • Avoid Context Switching: Use ScriptKit.com

    https://www.scriptkit.com/

    https://kentcdodds.com/blog/automation

    Hey friends So you know how sometimes you do things so many times that

    you're like you know what I'm just gonna write a script for this and we'll
    run it and whatever and so I don't have to do this over and over again. And
    like some of those things can be pretty extensive, like there's a lot of
    stuff that you end up doing like you gotta open up this webpage and then
    you gotta click on that and then you gotta go do this, whatever.

    And some of those things can be like really simple. So I just need to open

    this file add a line to this and save it and then close my editor or
    whatever. And you can speed all of those things up using like little CLI
    to.Pull that you make or something and the the value of this isn't
    necessarily in the amount of time that it saves you but in the amount of
    context switching it saves you from.

    So so you don't have to pull up your whole editor, you don't need to pull

    up this tab or whatever it is. I actually have a blog post about like why
    saving time isn't the only reason to automate things which is kind of a
    good blog post. You can go check it out.

    But what I wanted to tell you about today was there's a much better way to

    automate stuff. Especially if you're a Mac user Windows support for this is
    coming.Eventually but what I wanted to tell you about is this tool called
    script kit by John Linquist. So if you haven't heard of script kit, it's
    sort of like a spotlight or Alfred or or what what's the thing on Windows
    that you like you just hit the Windows key and then you can type something.

    But yeah, it's just this little key combination that you can execute

    anywhere and then you type something and you can execute some little script
    that you have. So script kit it's it's really really cool and once you
    start creating these little auto.Mations and there are a lot of cool things
    you can do.

    And it has some really awesome APIs for accepting arguments and and for

    prompting you for additional information, you can drag and drop files all
    sorts of really cool things that I just strongly urge you to take a look at
    and see how it can improve your life. So one thing that I do is I have a
    script that will automatically update dependencies for all of the epic
    reacts workshops, and so yeah.

    I just run this script. It opens up. What is it seven?To terminals for the

    seven repos that epic or maybe eight repost synaptic react has and and it
    updates all of the dependencies and and then pushes that up automatically
    for me. And so that I can keep things fresh and quick and it doesn't take
    any time.

    I've got another one that allows me to quickly open up any project that I

    have in VS Code and it's just it's much quicker than opening up a terminal
    and doing it like executing a script. So take a look at script kit, it's
    super cool. Have a nice.Day.

    3 min
  • Notes Driven Development

    https://youtube.com/c/RyanFlorence

    Hey friends So I was watching a live stream from Ryan Florence last night

    while I was putting my kids to bed They were falling asleep and I was in
    the room to make sure that they didn't go all whacko and stuff while
    they're trying to fall asleep. And so I was just watching Ryan codeps some
    stuff.

    You should check it out. Actually Ryan has gotten some really good live

    streams recently, especially if you're interested in remix and stuff. And
    and actually sometimes I'll just watch it during the day. I'll just have it
    on in a different tab while I'm working and if I hear something that sounds
    interesting I can go over there.

    So, it's kind of fun and interesting.And and yeah it's kind of fun to be on

    this side of the live streaming stuff at home but anyway one thing that I
    noticed that Ryan doesn't and I've seen him do this any time that I've seen
    him code not just in this livestream.

    So he's been doing this for a while as far as I know. But he has this

    document open in his editor that's just like marked down format stuff. That
    outlines exactly what he plans on doing for that coding session, or at
    least he kind of keeps notes of the things that he's still needs to do.

    That's not exactly pseudo code, but like, you know, create a user then save

    that users.Session in the database and then, you know, whatever else. And
    it I I I like this approach for me. I typically just have in my mind this
    idea of what I want to do and then I just go scramble around and and do the
    activities until those things are all finished but it's not as directed and
    I feel like I could definitely improve in this way and and get a little bit
    better at making sure that I'm accomplishing some specific tasks and and it
    also at the end of the day, you feel like you got a lot more done.

    I do have a notepad that I,Where I write down all the things that I'm gonna

    do for the day but normally that includes stuff outside of coding and then
    I've got like work on this work on the website or whatever. And it would be
    cool to get a little more granular especially when you're working on new
    features and and stuff like that.

    So I just thought that would be an interesting tip to share so next time

    you start working on a particular feature go ahead and just open up a text
    file and write out kind of outline the different tasks that you need to get
    accomplished and every couple minutes or so review that.

    And see what you've finished and and what you need to work on next kind of

    help direct your your thought process and and implementation so that you
    get things done. And of course, you can always do it like test-driven
    development style if you want to but some of these things would be a little
    hard to test drive.

    So in those situations having a list can be really helpful. Anyway, I'm

    gonna give this a shot some time and hope you do too and I hope it's
    helpful to you. Have a good day.

    3 min
  • Don't Solve Problems, Eliminate Them

    https://twitter.com/kentcdodds/status/1388561641382420480?s=20

    Hey friends So a few days ago I tweeted something about like don't solve

    problems you should eliminate to problems before you try to solve the
    problem. Something like that. And I've been thinking about this quite a bit
    recently and probably going to write a blog post maybe even make a talk and
    for this concept.

    But I just wanted to share with you all while I'm thinking about it and and

    there there are lots of examples of where eliminating a problem was much
    better than trying to find a solution to the problem. And you can find
    these as.Sorts of examples in real life as well as in programming.

    So like an example in real life and actually I was watching a video about

    this this is what kind of made me start thinking about this was Tesla how
    they eliminated a ton of problems with gas-powered vehicles by making an
    electric vehicle. And so we no longer have I mean and we kind of create new
    categories of problems that we need to solve but by taking a completely
    different approach you can eliminate the existing problems.

    And so, hopefully the new category of problems that you create.Are not as

    bad or easier to solve than the problems that you're eliminating. And
    they've got actually lots of really cool innovations that they've done that
    have eliminated problems like for example, they have this gigapress thing
    that I'm kind of cast a huge part of the the car all at once and so they
    don't need to worry about like the dozens of robots and welding and
    different stuff like that.

    They just eliminated all those problems all together, which I think is

    really pretty cool. And in a program,Ming situation, we've got remix has
    eliminated a lot of problems by just having nested routes and they
    eliminate problems with caching and and a bunch of the the like all of the
    abstractions that we build like react query or formic or different things
    like that, those problems are eliminated by embracing the fundamental
    aspects of the web and just the way that they solve these problems.

    I'll have more time to delve into some of these examples and in a blog post

    might?Talk but remix is another great example of eliminating problems and
    again you do create new problems but hopefully the problems you create are
    not as bad or easier to solve. And then finally react hooks eliminated a
    bunch of problems with classes.

    We have some new problems but they are definitely classes had so many more

    problems than hooks, so I'm really glad of this change too. So anyway, I'm
    trying to think today of like some things that you use or some problems you
    have and see if you can eliminate those and yeah good luck with that.

    See you.

    3 min
  • Write that blog post

    https://kentcdodds.com/blog/solidifying-what-you-learn

    Hello friends So recently somebody asked on the KCD discord whether they

    should bother writing a blog post because the topic had already been
    covered a thousand times by other people who may have more experience in
    whatever. And I shared with them a blog post that I wrote quite a while
    back called solidifying your understanding or something like that.

    And in it I mentioned a an interesting phenomena that I'm sure you've

    noticed sometimes you will be walking down the street and you'll see
    there's a McDonald's I really like a burger or whatever but then right.Next
    to it, you'll see a burger king. And then like we wonder sometimes like why
    would Burger King put a building here if there's a McDonald's right next
    door like they already solved the I need a burger problem why why would
    they bother doing that?

    And the reason is because people's taste are different and people enjoy the

    the burgers, you know, or whatever quizzing you want to use as an analogy
    here. They enjoy that differently and they,And they have a different take
    on that But even if you don't have a different take even if it's exactly
    the same there's still value in that.

    There's a street intersection down in Texas somewhere that has three

    Starbucks on it. So they're missing one Starbucks to get all four corners
    three Starbucks, I think one's in a Barnes & Noble and others in some sort
    of internet cafe or something and then there's an actual Starbucks but you
    you can get Starbucks on any three of those corners and and and it works
    and it's fine and people enjoy it and they you know, clearly there'sThere's
    business for that and in the same way there the internet is so vast and
    your reach is different from my reach is different from his research is
    different from her reach, whatever we're all over in just the way that we
    can reach people, especially if you know a language other than English if
    that's the case then you can reach people.

    I simply can't. So definitely right that blog post to create that video

    make that content because the other side of this is that the,Content
    creation isn't just for the people consuming the content In fact it's often
    especially the beginning it's more for the person who is creating the
    content.

    You learn a great deal by creating content at educational content of some

    kind explaining things. You can teach yourself in the future. You can go
    reference it later, but also the process of creating that content is going
    to make you understand it better. So, yes, I strongly advise that even
    though that everybody's already written about this or whatever go ahead and
    write about it yourself.

    You'll learn more and you'll reach more people thanAre already being

    reached. Hope that's helpful. Have a good day.

    3 min
  • How fast touch typing helps programmers

    https://www.typingtest.com/test.html?minutes=1&textfile=mediumText.txt&mode=sent&result_url=/result.html&bt=0

    Hello friends. So this morning in my discord we had a little bit of a

    conversation about touch typing. One of my friends there asked if they
    should get into Vim and they were thinking that Vim you can move a little
    faster and well I think that's that can be true.

    I think there's a little bit of an illusion to moving quickly just because

    you're using a special text editor or editor or a VIM like key bindings
    thing. I think you can get just as fast without them. And I've been on both
    sides, but yeah, andNow I'm not using them keen bitings But anyway I think,
    we kind of came around to touch typing was the thing that was selling them
    down.

    They could improve their speed if they just were able to type a little

    faster. And so I thought yeah, I just got me thinking this morning about
    how valuable it can be to be able to type very quickly. I think most of us
    have been in a situation where the interface to the computer wasn't fast
    enough for our brain where we knew exactly what we wanted and it was just a
    matter of getting what we wanted into our hands andInto the keyboard and
    into the computer.

    And so in particular, sometimes I say hey if you aren't sure about which

    direction to go with some API or something then focus on building both
    versions and choose which one you dislike the least is kind of my approach
    to things and so what it's it's not without cost to do that like it does
    cost to build it both ways, but if you like have it in your mind of what
    those ways are going to look like and and it's not like a huge.

    Investment of mental energy to do it then the investment just comes down to

    how quickly can you type and you can reduce that investment by learning to
    type quicker. And so if you are not at right now I took a typing test and
    in a kind of real world sort of test.

    I'm at around 88 words per minute and so I'm a pretty fast typer or typist

    however you want to say that. If you're not at around that pace then let me
    just tell you that the human body is capable of really amazing things our
    brains are are capable of amazing things and you can probably work your way
    up.

    To to much quicker than you are And I would encourage you to put some

    intentional practice into that if you want to improve your typing speed.
    Now, there's a lot more to coding than just the typing speed. So don't
    worry about that. I spend way more time thinking than I do typing but I
    know situations where typing is the bottleneck it's really frustrating if
    you're not very fast at it.

    So I'd encourage you to give it some intentional practice. Anyway, I hope

    that's helpful and interesting I will add a link to a the typing test that
    I took so you can take it yourself.Have a good day.

    3 min
  • Watch the Remix Beta Release live stream today

    Live stream link: https://youtu.be/4dOAFJUOi-s

    Hey friends. So today is an important day for a friend of mine. Our friends

    of mine Michael Jackson and Ryan Florence are releasing the beta 1.0
    release of remix. And if you've been watching my Twitter or just kind of me
    in general, I've been really excited about remix. I've been reading writing
    can't seedance.com to remix and it's just been a total joy.

    I am super excited about the potential that remakes has and really excited

    about the approach that they're taking and.From a progressive web app
    standpoint whatever So if you're listening to this on the same day that I'm
    recording it then don't miss their live stream that's happening later today
    because it's going to be great.

    I'm certain of it like they haven't given me a preview or anything but I'm

    sure it's going to be great. And I really encourage you to give some
    serious thought to remix as an option for the apps that you build in the
    future because it's phenomenal. The their approach to focusing on the
    foundations of the web and the and the features like we spend so much time.

    Building JavaScript libraries and and abstractions for what is already

    built into the web platform just because we don't want to use it the way
    that the web platform has it for whatever reason but remix kind of brings
    it all back to those fundamentals and what that means is that the knowledge
    that you gain as you work with Remix is very transferable.

    It's all based on the the platform that we've had for decades and it's much

    more powerful than just our own little abstractions that that we try to
    build.So anyway, it is really incredible. I'm really excited about remix
    and I am yeah don't miss their live stream about it today.

    I will put a link in the transcript here but you can just go on YouTube and

    search for remix JS and you'll find their channel and you can watch the
    live stream today. Yeah. I think that's all that. I I don't want to dive
    too deep into things because I don't have enough time in this three-minute
    podcast, but yeah, I have never felt.

    So excited about a framework before or like a meta framework like remix. It

    is phenomenal. So anyway, I'll stop using all these fluffy words to
    describe it. And you'll see more about remix coming from me, absolutely. So
    look forward to that. Hope you have a great day and I'll see you around.

    3 min
  • I encourage you to get into (burnout free) open source

    Hey friends so I wanted to talk a little bit about open source. I have been

    doing open source for almost as long as I've been doing software
    development. And it has been just an enormous benefit to me. I I can't tell
    you how how much I've learned and how much of what I know I learned through
    open source and so I strongly advise people to get into open source for
    various reasons.

    In particular, like it makes you a better software developer, you write

    higher quality software, you can reuse the software that you create.In a
    other projects and so yeah it's a lot of fun to get involved but a lot of
    people ask me how well there's there's two sides of this how do I get
    started and then how do I make sure I avoid burnout as that is the thing
    that happens for open source developers.

    It's a pretty thankless job in general like that, you don't get financially

    compensated most of the time and stuff. So first of all how to get
    involved. I have a blog post that goes into more depth on this. It's called
    what open search project should I contribute to or something like that.

    And the assertion is that you contribute that.Is to something that you use

    regularly or that you have experience with. And so when people ask me, hey,
    do you have anything that I could work on which does happen occasionally. I
    always have a hard time answering that because I don't know what you use.

    So it'd be better if you find something that you're using and you can work

    on improving that in some way. So think about the tools or or the libraries
    that you use and find ways to contribute directly to those to make those
    things better for yourself and for other users.

    And then,On the other side of things if you get too into open source and

    you kind of lose track of things and and are starting to burn out. My
    strategy for that is I never work on anything that's an open source that I
    don't need or don't want to work on just for fun.

    And so when somebody opens an issue on my project or something if if it's a

    feature enhancement or something that they want, but I don't need it then
    sometimes I'll just ignore it. Normally it's nice to to let them know that
    they can make a pull request or whatever andEnable them to do that But
    other times I just don't have the time and so I just kind of ignore it and
    and you know, they can always fork it.

    So it's never like a dead end for them or anything. So yeah, that's kind of

    how I avoid burnouts. If I don't particularly want to do it for the fun of
    it, or I don't need to do it for my own stuff then I just don't bother and
    I've been doing open source for I don't know like six years or so or seven
    years and it's worked out pretty well for me.

    So yeah, I encourage you to get into open source. Have a good time with it.

    Bye.

    3 min