Unexpected Lessons I've Learned After 15 Years Of Coding

00:43:05
https://www.youtube.com/watch?v=3h7Lc85RDLo

Ringkasan

TLDREn aquest vídeo, l'autor comenta un article que ofereix consells de programació que l'autor original hauria volgut saber fa 15 anys per millorar més ràpidament en programació. La reflexió es centra en evitar errors comuns del passat, com les solsucions temporals a problemes de codificació, utilitzar adequadament la revisió de sol·licituds de codi per aprendre una base de codi nova, i gestionar adequadament el balanç entre qualitat i rapidesa de desenvolupament segons el context. També es remarca la importància d'estar obert a aprendre constantment i millorar les habilitats tècniques, i la crítica constructiva dels errors per fomentar millores futures.

Takeaways

  • 👨‍💻 Començar pel tab de PR pot oferir millor aprenentatge en codi massiu.
  • ⚙ Solucions duradores són preferibles a pegats ràpids en el codi.
  • 📈 Equilibrar qualitat i velocitat segons el context del projecte.
  • 🔄 Errors ràpidament corregits poden augmentar la fidelitat dels usuaris.
  • 💡 Millorar amb les eines tecnològiques és essencial per l'eficiència.
  • 👥 Apprendre mitjançant les PR pot revelar més que llegir el codi directament.
  • ❓ Fer i respondre preguntes 'tontes' fomenta l'aprenentatge.
  • 🔍 Fem atenció a la complexitat incidental i mitiguem-ho.
  • 📄 Escriure codi simple tendeix a escalar millor.
  • 🛠 Trieu eines adequades i dominin-les per un treball més eficient.
  • 🚀 Enfocar-se en enviar característiques ràpidament i sovint millora l'agilitat.
  • 🤖 Aprofitar desplegaments automàtics ajuda en la resolució de problemes.

Garis waktu

  • 00:00:00 - 00:05:00

    L'autor discuteix de com evitar crear vídeos de "Com aprendre a programar des del principi", però llegeix un article d'un amic programador que ofereix consells valuosos basats en les seves experiències personals. La idea és millorar més ràpidament i solucionar problemes de manera més eficient.

  • 00:05:00 - 00:10:00

    Es descriu una experiència amb el desenvolupament d'aplicacions iOS on es van resoldre problemes de crashtests de l'aplicació per actualitzacions en diferents fils. També es menciona com millorar el rendiment posant múltiples crides de base de dades en paral·lel.

  • 00:10:00 - 00:15:00

    L'autor expressa el valor d'un nou punt de vista en els projectes de programació i com el frescor d'una perspectiva nova pot ajudar a identificar problemes que han estat acceptats com a normalitat. Recomana escoltar atentament les impressions dels novells en un projecte.

  • 00:15:00 - 00:20:00

    S'explica com l'obsessió per la qualitat en detriment de la rapidesa pot ser perjudicial en la majoria d'aplicacions web. L'autor aconsella equilibrar entre qualitat i velocitat depenent del context i assumir els errors com a part de l'aprenentatge en projectes de poc risc.

  • 00:20:00 - 00:25:00

    S'emfatitza la importància de ser eficient amb les eines de desenvolupament i com això millora la productivitat. També es destaca que es necessita entendre bé les eines abans de descartar-ne una més senzilla i funcional.

  • 00:25:00 - 00:30:00

    L'autor parla sobre solucionar problemes de manera més profunda en lloc de fer pegats superficials i com això contribueix a crear una base de codi més neta i sostenible a llarg termini. S'encoratja a investigar i entendre les arrels dels problemes de programació.

  • 00:30:00 - 00:35:00

    Es recomana desplegar freqüentment i començar a pensar en el procés de desplegament des de l'inici d'un projecte. Això ajuda a detectar errors abans, facilita la reproducció de problemes i redueix la complexitat al treballar en entorns reals.

  • 00:35:00 - 00:43:05

    Finalment, s'anima a fer preguntes "estúpides" perquè sovint són el reflex de problemes més amplis o comunes que altres han temut mencionar. És important mantenir una comunicació clara i oberta entre els equips per resoldre problemes de manera més eficient.

Tampilkan lebih banyak

Peta Pikiran

Mind Map

Pertanyaan yang Sering Diajukan

  • Quin consell es menciona sobre com aprendre un nou codi base?

    Es recomana començar pel tab de sol·licituds de modificació (PR) per entendre millor les bases de codi grans, ja que la majoria del codi pot no haver estat tocat durant molts anys.

  • Quin enfocament es recomana per solucionar errors de codi de manera duradora?

    Es destacava la importància de solucionar problemes de manera que impedeixin futurs errors en lloc de solucions temporals, com reordenar les actualitzacions d'estat per evitar valors nuls no desitjats.

  • Com es suggereix gestionar la qualitat del codi respecte a la velocitat de desenvolupament?

    És essencial valorar el context del projecte per decidir l'equilibri adequat entre la velocitat de desenvolupament i la qualitat del codi, especialment en entorns on els errors no són crítics.

  • Quin benefici inesperat se cita dels errors de programari en un context de desenvolupament de startups?,

    Feedback d'usuaris de programari que encara té errors pot resultar beneficiós per al desenvolupament si es corregeixen ràpidament, ja que els usuaris que experimenten una solució ràpida poden ser més fidels.

  • Què es recomana sobre la millora de les habilitats amb eines i tecnologies?

    Es recomana ser proficient amb les eines de desenvolupament i estar disposat a aprendre constantment per millorar l'eficiència.

  • Per què es recomana iniciar amb la lectura de sol·licituds de modificació en un projecte nou?

    Observant els canvis i què és discutit entre els membres de l'equip pot oferir un millor punt de partida que llegir línia per línia el codi existent.

Lihat lebih banyak ringkasan video

Dapatkan akses instan ke ringkasan video YouTube gratis yang didukung oleh AI!
Teks
en
Gulir Otomatis:
  • 00:00:00
    we've all seen those click baity how I
  • 00:00:03
    would learn to code if I started over
  • 00:00:04
    videos and I always thought I would
  • 00:00:07
    avoid making one and honestly I'm going
  • 00:00:09
    to continue that said I saw this article
  • 00:00:12
    and I was very excited for it so we're
  • 00:00:14
    going to read it this is the closest
  • 00:00:16
    you're ever going to get for one of
  • 00:00:17
    those classic OG how I would learn to
  • 00:00:19
    code from the start videos but I just
  • 00:00:21
    want to read this blog post cuz it
  • 00:00:22
    looked cool and the author's a bro so
  • 00:00:24
    without further Ado let's dive into M
  • 00:00:26
    Buffett's post a bunch of programming
  • 00:00:28
    advice I'd give myself 15 years AG go I
  • 00:00:30
    finally have the feeling that I'm a
  • 00:00:31
    decent programmer so I thought it would
  • 00:00:33
    be fun to write some advice with the
  • 00:00:34
    idea of what would have gotten me to
  • 00:00:36
    this point faster not claiming that this
  • 00:00:38
    is great advice for everyone just that
  • 00:00:39
    it would have been good advice for me
  • 00:00:41
    let's see if it'll be good advice for me
  • 00:00:42
    as well very curious this is a lot of my
  • 00:00:45
    comments like to let me know I'm still
  • 00:00:46
    clearly not a very good programmer teach
  • 00:00:48
    theun if you or your team are shooting
  • 00:00:50
    yourselves in the foot constantly fix
  • 00:00:52
    the gun it's better not become anti-
  • 00:00:54
    react I can't tell you how many times
  • 00:00:56
    I've been on a team and there's
  • 00:00:57
    something about the system that's very
  • 00:00:59
    easy to screw up but no one thinks about
  • 00:01:01
    ways to make it harder to make that
  • 00:01:03
    mistake when I was doing iOS Dev used
  • 00:01:05
    core data and subscribed to changes from
  • 00:01:07
    a bunch of views the subscription
  • 00:01:08
    callback came on the same thread that
  • 00:01:10
    the change was triggered from sometimes
  • 00:01:12
    that was the main thread and sometimes
  • 00:01:14
    it was a background thread importantly
  • 00:01:15
    in iOS Dev you can only make UI updates
  • 00:01:18
    on the main thread or your app crashes
  • 00:01:20
    so a new subscription could be working
  • 00:01:22
    fine but then it would break when
  • 00:01:23
    someone triggered an update from a
  • 00:01:24
    background thread or if you add a UI
  • 00:01:27
    update later on these are always really
  • 00:01:28
    fun if you have some code that is
  • 00:01:30
    working fine but it's on Main thread
  • 00:01:31
    you're like oh for performance Reasons
  • 00:01:33
    I'm going to move it and then don't test
  • 00:01:35
    it thoroughly enough and then it breaks
  • 00:01:37
    for your users I've seen this in all
  • 00:01:38
    sorts of things this is not exclusive to
  • 00:01:40
    iOS this is development of applications
  • 00:01:42
    this was just something that people
  • 00:01:44
    transparently accepted and often came up
  • 00:01:46
    in reviews for newer people on the team
  • 00:01:48
    every now and then one would slip
  • 00:01:49
    through and we'd go at a dispatch q.
  • 00:01:52
    main. async when we saw the crash report
  • 00:01:54
    I decided to fix it and it took 10
  • 00:01:56
    minutes to update a subscription layer
  • 00:01:58
    to call subscribers on the main thread
  • 00:01:59
    itself which eliminated a whole class of
  • 00:02:01
    crashes and a bit of mental load I'm not
  • 00:02:04
    trying to be like look at these idiots
  • 00:02:06
    not fixing an obvious issue with the
  • 00:02:08
    code base when it was obvious to me
  • 00:02:10
    because it would have been obvious to
  • 00:02:11
    anyone who thought about it for a few
  • 00:02:13
    minutes I had one of these recently
  • 00:02:15
    where I was helping a certain
  • 00:02:16
    undisclosed application that had a
  • 00:02:18
    certain massive Bill and a really slow
  • 00:02:21
    site on a certain service and when I
  • 00:02:24
    looked at their code they had like five
  • 00:02:27
    plus Prisma database calls on every API
  • 00:02:30
    endpoint all blocking even though they
  • 00:02:33
    had no data in common so they had a big
  • 00:02:36
    await block before you even start the
  • 00:02:39
    request just to get the user data then
  • 00:02:40
    they had another giant await huge query
  • 00:02:43
    to get some more data then right after
  • 00:02:46
    three more queries and I was able to
  • 00:02:49
    Forex their performance by just taking
  • 00:02:51
    all those queries and putting them in a
  • 00:02:53
    promise.all so that they could all run
  • 00:02:55
    in parallel instead of individually do I
  • 00:02:58
    think those devs suck I'll mence my
  • 00:03:00
    words but theoretically any of them
  • 00:03:01
    could have looked at and been like yeah
  • 00:03:03
    that's dumb we probably shouldn't do it
  • 00:03:04
    that way it's not that I am so much
  • 00:03:06
    better than those other devs it's just
  • 00:03:08
    that I've done it more I care a lot and
  • 00:03:10
    I'm a fresh set of eyes on the code base
  • 00:03:12
    it's like yeah this should be better and
  • 00:03:14
    as the author says here these things
  • 00:03:15
    tend to stick around a weird amount
  • 00:03:17
    because there's never a natural time to
  • 00:03:18
    address them I see this so often
  • 00:03:21
    especially with performance stuff
  • 00:03:22
    because if your performance sucks when
  • 00:03:23
    do you fix it usually when it sucks so
  • 00:03:25
    bad that it's causing problems and not
  • 00:03:27
    until then when you're first getting
  • 00:03:28
    onboarded you're not trying to change
  • 00:03:30
    anything big I I an exception here I I
  • 00:03:33
    have had times where I joined a code
  • 00:03:35
    base that was massive and I was like
  • 00:03:37
    wait you guys aren't using prettier you
  • 00:03:39
    guys don't have slint setup it's 2024
  • 00:03:42
    and you're still writing this JavaScript
  • 00:03:44
    like it's the the early 2000s and I've
  • 00:03:46
    had times where my first poll request to
  • 00:03:48
    a repo was like 100,000 line change and
  • 00:03:50
    everyone hated me but then a week later
  • 00:03:51
    they liked me but yes you probably
  • 00:03:53
    shouldn't be trying to change anything
  • 00:03:55
    big what you should be doing is reading
  • 00:03:56
    the poll request tab you know what I'm
  • 00:03:58
    going to do I'm going to in parallel
  • 00:04:01
    write my advice to younger Theo advice
  • 00:04:04
    to younger Theo and I expect this to be
  • 00:04:07
    different but have overlap in the
  • 00:04:09
    lessons the first one I want to put in
  • 00:04:11
    here is don't learn a code base through
  • 00:04:14
    the code
  • 00:04:17
    tab start in the pr tab I've said this
  • 00:04:20
    for a while and I'll continue
  • 00:04:21
    emphasizing it when you're working on a
  • 00:04:23
    big code base for the first time the
  • 00:04:25
    worst thing you can do is start by
  • 00:04:27
    reading the code because in a giant code
  • 00:04:29
    base the the vast majority of the code
  • 00:04:31
    hasn't been touched possibly for a
  • 00:04:33
    decade even 90% plus of the code in a
  • 00:04:36
    big code base just doesn't get touched
  • 00:04:40
    and if you spend all your time trying to
  • 00:04:41
    read and understand that code you're
  • 00:04:43
    screwed but if you go and read a whole
  • 00:04:45
    bunch of poll requests you see what is
  • 00:04:47
    merging what people push back on what is
  • 00:04:49
    changing and why it's changing your
  • 00:04:52
    understanding of that codebase will be
  • 00:04:53
    significantly better than if you just
  • 00:04:55
    try to read it line by line in fact if
  • 00:04:56
    you had two people one who has read all
  • 00:04:59
    of the code and one who has read half
  • 00:05:01
    the poll requests I promise you the one
  • 00:05:03
    who's read half the poll requests
  • 00:05:05
    understands the code Bas significantly
  • 00:05:06
    better than the person who seen every
  • 00:05:08
    line of code in it guaranteed yeah back
  • 00:05:10
    to the article as they said when you're
  • 00:05:12
    first getting onboarded you're not
  • 00:05:13
    trying to change everything and
  • 00:05:14
    certainly not anything big so you may
  • 00:05:16
    think it's weird but you shouldn't go
  • 00:05:17
    changing a bunch of things that you're
  • 00:05:18
    still learning about then when you've
  • 00:05:20
    been on the team for a while it sort of
  • 00:05:22
    just Fades into the background I really
  • 00:05:24
    like this framing because if you show up
  • 00:05:25
    to a new code base and you're like this
  • 00:05:28
    seems wrong you're often too scared to
  • 00:05:30
    do the right thing and then after a
  • 00:05:32
    while once you're comfortable it's now
  • 00:05:34
    become normalized to you that's a really
  • 00:05:36
    good framing I had not thought of before
  • 00:05:38
    and it's actually something I try to
  • 00:05:39
    index on when I'm running teams I'm
  • 00:05:41
    going to add another point to my takes
  • 00:05:44
    which is it's very easy to get into the
  • 00:05:47
    state where if somebody new is showing
  • 00:05:49
    up on the project they haven't touched
  • 00:05:51
    it all before and they say hey these
  • 00:05:52
    things are weird you're like oh don't
  • 00:05:54
    worry you'll get used to it but you're
  • 00:05:56
    saying that because you yourself are
  • 00:05:57
    used to it it doesn't mean it's normal
  • 00:06:00
    doesn't mean it's good so what I've
  • 00:06:02
    learned to do is listen extra carefully
  • 00:06:05
    when the dev shows up on the project for
  • 00:06:07
    the first time what stands out to them
  • 00:06:10
    what went wrong in the onboarding what
  • 00:06:11
    was unclear when they started reading
  • 00:06:13
    through the code what made their first
  • 00:06:14
    poll request hard to do you don't get
  • 00:06:16
    that feedback from your existing devs
  • 00:06:18
    because they're all stock homed into it
  • 00:06:20
    so the only way you can actually improve
  • 00:06:23
    on those metrics is by taking massive
  • 00:06:26
    advantage of the unique opportunity of a
  • 00:06:28
    Dev trying out your code base and trying
  • 00:06:29
    to contribute to it for the first time
  • 00:06:31
    that's a rare experience and if you want
  • 00:06:33
    it to be better for the next Dev listen
  • 00:06:35
    very carefully to the current one who's
  • 00:06:37
    onboarding right now and I I couldn't
  • 00:06:38
    agree more that this is super common
  • 00:06:40
    that devs are scared to make the big
  • 00:06:42
    change based on what they expect and
  • 00:06:44
    then by the time they have the
  • 00:06:45
    confidence is too normalized and they
  • 00:06:47
    move on it's a mindset shift you just
  • 00:06:50
    need to occasionally remind yourself
  • 00:06:52
    that you are capable of making you and
  • 00:06:53
    your team's life easier when these sorts
  • 00:06:55
    of things are hanging around absolutely
  • 00:06:58
    absolutely agree first there's actually
  • 00:07:00
    a good question here do you worry that
  • 00:07:02
    person is coming in and trying to make
  • 00:07:03
    what is comfortable to everyone else
  • 00:07:05
    more comfortable for them or what
  • 00:07:06
    they're used to seeing that's a
  • 00:07:07
    conversation to have but chances are if
  • 00:07:10
    you're showing up and you've worked in
  • 00:07:12
    other code bases especially at a company
  • 00:07:14
    like I when I was at twitch I touched
  • 00:07:16
    like probably 20 plus code bases in a
  • 00:07:18
    meaningful way and when I was working on
  • 00:07:20
    most of them the tooling was relatively
  • 00:07:22
    consistent there was obviously lots of
  • 00:07:24
    differences between them but then when I
  • 00:07:25
    would show up in another code base from
  • 00:07:27
    a different team be like oh you guys are
  • 00:07:28
    just behind the standards of the rest of
  • 00:07:31
    the company can I propose some changes
  • 00:07:34
    to make these things a little more in
  • 00:07:35
    sync and usually a couple do would push
  • 00:07:37
    back but a few others would be like yeah
  • 00:07:39
    I worked on two other code bases here
  • 00:07:40
    and those were better we should have
  • 00:07:42
    that here too and as long as you can
  • 00:07:44
    build a few allies and have a good
  • 00:07:45
    conversation these changes are almost
  • 00:07:47
    always worth doing and talking about
  • 00:07:49
    back to the article assess the trade-off
  • 00:07:51
    that you're making between quality and
  • 00:07:53
    pace and make sure it's appropriate for
  • 00:07:54
    your context Banger after Banger damn
  • 00:07:57
    there's always a trade-off between
  • 00:07:58
    implementation and how confident you are
  • 00:08:00
    about correctness so you should ask
  • 00:08:02
    yourself how okay is it to ship bugs in
  • 00:08:04
    my current context if the answer to this
  • 00:08:06
    doesn't affect the way you work you're
  • 00:08:08
    being overly inflexible what a banger
  • 00:08:11
    God coming out stronger than even me on
  • 00:08:13
    it what a way to say unit tests are
  • 00:08:15
    useless if they're useless to you so
  • 00:08:17
    yeah obviously I agree I think that the
  • 00:08:20
    way you write software that failures
  • 00:08:22
    would kill people should be very
  • 00:08:23
    different from the way you write
  • 00:08:24
    software where failures mean they don't
  • 00:08:26
    get a fancy Emoji when they hit a button
  • 00:08:28
    quite as fast as they would otherwise
  • 00:08:30
    it's important to recognize the the
  • 00:08:32
    difference in these types of things
  • 00:08:34
    where certain Services should never fail
  • 00:08:36
    ever and if they do people die and then
  • 00:08:38
    there's other services like especially
  • 00:08:40
    in the startup world where as
  • 00:08:41
    unintuitive as it may seem failures
  • 00:08:43
    might actually be somewhat good an
  • 00:08:45
    interesting thing we learned when we
  • 00:08:46
    were running ping is that if we had two
  • 00:08:48
    customers one had no issues they signed
  • 00:08:50
    up and everything went well and then one
  • 00:08:52
    customer had some issue big small
  • 00:08:55
    whatever and they report it to us if we
  • 00:08:57
    fix that issue for them fast enough and
  • 00:08:59
    we get them involved in the conversation
  • 00:09:01
    so they feel listened to understood and
  • 00:09:03
    cared for the customer that had the bug
  • 00:09:05
    will be more loyal than the one who
  • 00:09:07
    didn't so if we had built everything in
  • 00:09:09
    a way where it's harder to write bugs we
  • 00:09:11
    might have had less happy customers not
  • 00:09:13
    even accounting for the fact that if we
  • 00:09:15
    slowed things down enough to never ship
  • 00:09:16
    bugs we would never have shipped a lot
  • 00:09:18
    of the features that our users wanted
  • 00:09:19
    and if they did still run into bugs it
  • 00:09:21
    would have taken us even more time to
  • 00:09:22
    fix them so ignoring all of that having
  • 00:09:25
    bugs was still better in our context in
  • 00:09:27
    scenario we making Medical where that
  • 00:09:29
    would not be the case we're making a
  • 00:09:31
    silly app for streamers to collaborate
  • 00:09:33
    very different use case very different
  • 00:09:35
    results very very different context and
  • 00:09:38
    you should adjust the way you work based
  • 00:09:40
    on that context couldn't agree more at
  • 00:09:43
    my first job I was working on Greenfield
  • 00:09:45
    projects around data processing which
  • 00:09:47
    had good systems in place for
  • 00:09:48
    retroactively reprocessing data the
  • 00:09:50
    impact of shipping a bug was very minor
  • 00:09:52
    the proper response to that environment
  • 00:09:54
    is to rely on the guard rails a bit move
  • 00:09:56
    faster because you can you don't need
  • 00:09:58
    100% test cover or an extensive QA
  • 00:10:00
    process which will slow down the pace of
  • 00:10:02
    Dev at my second company I was working
  • 00:10:05
    on a product used by tens of millions of
  • 00:10:07
    people which involved high value
  • 00:10:08
    financial data and personally
  • 00:10:10
    identifiable information even a small
  • 00:10:12
    bug would entail a postmortem I shipped
  • 00:10:14
    features at a snails pace but I also
  • 00:10:16
    think I may have shipped zero bugs that
  • 00:10:18
    year usually you're not at the second
  • 00:10:20
    company I've seen a lot of devs air on
  • 00:10:22
    the side of that sort of programming
  • 00:10:24
    though I couldn't agree more even when I
  • 00:10:27
    was at twitch I found a lot of teams
  • 00:10:28
    trying to meet like Amazon's reliability
  • 00:10:31
    standard it's twitch I loved
  • 00:10:34
    working at twitch it was a great company
  • 00:10:36
    building awesome things and I'm
  • 00:10:37
    streaming live on Twitch right now by
  • 00:10:38
    the way every Wednesday live on Twitch
  • 00:10:40
    if you want to see how I record these
  • 00:10:41
    videos and hang out and chat with my
  • 00:10:43
    homies here twitch is a great place to
  • 00:10:44
    work twitch is a really cool product
  • 00:10:46
    twitch does not need to have six NES of
  • 00:10:48
    reliability and if that results in a
  • 00:10:50
    shipping worse features slower it's a
  • 00:10:52
    mistake and the fact that we had such
  • 00:10:54
    insane code coverage rules was just
  • 00:10:56
    obnoxious it actually resulted in us not
  • 00:10:59
    shipping things well pretty regularly a
  • 00:11:01
    story I tell a lot because it haunts me
  • 00:11:03
    is that we had I think there was 80 or
  • 00:11:05
    90% code coverage as a rule I had a
  • 00:11:07
    feature that we rewrote to be about a
  • 00:11:10
    tenth as much code so we had the old
  • 00:11:12
    version which was let's make up numbers
  • 00:11:15
    um let's say 100,000 lines of code and
  • 00:11:17
    we had the smaller version which was
  • 00:11:18
    10,000 lines of code both are probably
  • 00:11:20
    10x smaller doesn't matter the 100,000
  • 00:11:22
    line of code version had code coverage a
  • 00:11:24
    bit over 80% the 10,000 line of code
  • 00:11:27
    small version had code coverage at 100%
  • 00:11:30
    both were in the project because it was
  • 00:11:32
    feature flagged so you'd get one or the
  • 00:11:34
    other we had moved 100% of users over to
  • 00:11:36
    the new one the new one was faster it
  • 00:11:38
    had new features users liked it more
  • 00:11:40
    you're ready to go okay so it's time to
  • 00:11:42
    deprecate the old one to delete that
  • 00:11:44
    100,000 line of code mess I never could
  • 00:11:46
    delete it because deleting it put us
  • 00:11:49
    just below the code coverage threshold
  • 00:11:51
    even though the feature I replaced it
  • 00:11:52
    with had better code coverage it didn't
  • 00:11:55
    matter because the pure number of lines
  • 00:11:57
    of code that were tested being removed
  • 00:11:59
    was enough to just barely drop us under
  • 00:12:01
    the threshold and I would not be
  • 00:12:03
    surprised if that giant pile of unused
  • 00:12:06
    code still existed in the twitch code
  • 00:12:08
    base simply because deleting it hurt a
  • 00:12:11
    metric that didn't matter for a product
  • 00:12:13
    where people can play games and talk to
  • 00:12:14
    each other that is every layer of that
  • 00:12:17
    is stupid every single one and even if I
  • 00:12:19
    loved working at twitch that's just
  • 00:12:21
    proof of how dumb this is the only code
  • 00:12:23
    coverage number that's acceptable is
  • 00:12:25
    100% And even that is dumb too yeah I I
  • 00:12:27
    digress anyway
  • 00:12:30
    as they were saying usually you're not
  • 00:12:31
    at the second company I've seen a lot of
  • 00:12:33
    devs air on the side that of that sort
  • 00:12:35
    of programming though in situations
  • 00:12:36
    where bugs aren't Mission critical which
  • 00:12:38
    is 99% of web apps totally agree you're
  • 00:12:41
    going to get further with shipping fast
  • 00:12:43
    and fixing bugs fast than you would
  • 00:12:44
    taking the time to make sure you're
  • 00:12:46
    shipping pristine features on your first
  • 00:12:48
    try totally agree and I also agree that
  • 00:12:51
    good test should not think about code
  • 00:12:52
    coverage percentages but if you're going
  • 00:12:54
    to enforce one the only percentage of
  • 00:12:56
    code coverage that makes any sense at
  • 00:12:57
    all is 100 still doesn't make much sense
  • 00:12:59
    but at least it makes some a less than
  • 00:13:01
    100% number nonsense useless throw it
  • 00:13:04
    away next Point spending time sharpening
  • 00:13:07
    the a is almost always worth it Prime is
  • 00:13:09
    going to love that one you're going to
  • 00:13:11
    be renaming things you're going to be
  • 00:13:12
    typing type definitions finding re
  • 00:13:14
    references Etc a lot and you should be
  • 00:13:16
    fast at this you should know all of the
  • 00:13:18
    major shortcuts in your editor you
  • 00:13:20
    should be a confident and fast typist
  • 00:13:22
    you should know your OS well you should
  • 00:13:24
    be proficient in the Shell you should
  • 00:13:26
    know how to use the browser Dev tools
  • 00:13:27
    efficiently and effectively I can can
  • 00:13:29
    already tell people are going to be in
  • 00:13:30
    the comments like you can't just spend
  • 00:13:31
    all day tweaking your neovim config I
  • 00:13:33
    mean if you become a YouTuber that talks
  • 00:13:35
    about neovim you can but I digress
  • 00:13:37
    sometimes you need to chop the tree too
  • 00:13:39
    I don't think I've ever seen someone
  • 00:13:40
    actually overdo this though one of the
  • 00:13:42
    biggest green flags I've seen in new
  • 00:13:43
    Engineers is a level of care in choosing
  • 00:13:45
    and becoming proficient with their tools
  • 00:13:47
    you know
  • 00:13:48
    what fine my issue is never that
  • 00:13:51
    somebody's really excited about NE ofm
  • 00:13:53
    is when they shame others for being less
  • 00:13:54
    excited if you want to go all in on NE
  • 00:13:57
    and really care about the cooling
  • 00:13:59
    experience that you have A+ if you're
  • 00:14:01
    going to make fun of me for saying vs
  • 00:14:02
    code is good enough get off my team
  • 00:14:05
    that's my line also on that note before
  • 00:14:07
    I forget I went through this phase so I
  • 00:14:09
    can talk all the I want I still
  • 00:14:11
    spent a whole summer at Amazon
  • 00:14:14
    configuring my I3 t-u neovim everything
  • 00:14:18
    because I wanted to be a real legit
  • 00:14:20
    hacker so I could feel less like an
  • 00:14:21
    impostor and learning those skills
  • 00:14:23
    helped me a ton I got way better at ins
  • 00:14:27
    and outs of navigating
  • 00:14:29
    complex developer environments that all
  • 00:14:31
    said once I got a Macbook I kind of just
  • 00:14:34
    drifted towards full screen vs code and
  • 00:14:37
    I've been happy with it since but like I
  • 00:14:39
    had to do my time in the trenches of a
  • 00:14:41
    crazy complex developer experience setup
  • 00:14:44
    that I owned all of and was really
  • 00:14:45
    confident in before I could make that
  • 00:14:47
    shift with similar confidence where I
  • 00:14:49
    just live in command Tab and Tilda and
  • 00:14:51
    as you guys can see I have very little
  • 00:14:52
    stuff open cuz I don't need to have a
  • 00:14:54
    whole lot of stuff
  • 00:14:55
    open next point you can't easily explain
  • 00:14:58
    something is difficult then it's
  • 00:15:00
    incidental complexity which is probably
  • 00:15:02
    worth addressing I love that I love this
  • 00:15:04
    point if you can't say why it's complex
  • 00:15:07
    you should fix it like this is hard is
  • 00:15:11
    not a good answer this is hard because A
  • 00:15:13
    and C where those things are simple
  • 00:15:15
    that's a good answer my favorite manager
  • 00:15:17
    in my career had a habit of pressing me
  • 00:15:19
    when I would claim something was
  • 00:15:20
    difficult to implement often his
  • 00:15:22
    response was something along the lines
  • 00:15:23
    of isn't this just a matter of sending
  • 00:15:25
    up X when we y or isn't this just like Z
  • 00:15:28
    that we did a couple months ago very
  • 00:15:29
    highlevel objections is what I'm trying
  • 00:15:31
    to say not on the level of the actual
  • 00:15:33
    functions and classes that we were
  • 00:15:35
    dealing with which is what I was trying
  • 00:15:36
    to explain I think conventional wisdom
  • 00:15:38
    is that it's just annoying when managers
  • 00:15:40
    simplify things like this I know I've
  • 00:15:42
    pissed off a lot of people doing that
  • 00:15:44
    but a shockingly high percentage of the
  • 00:15:46
    time I'd realized when he was pressing
  • 00:15:47
    me that most of the complexity I was
  • 00:15:49
    explaining was incidental complexity and
  • 00:15:51
    that I could actually address that first
  • 00:15:54
    thus making the problem as trivial as he
  • 00:15:55
    was making it sound this sort of thing
  • 00:15:57
    tends to make future changes easier as
  • 00:15:59
    well I'll drop the hot take of this is
  • 00:16:01
    why I like react and a lot of the new
  • 00:16:02
    react stuff is once you stop thinking
  • 00:16:05
    about those details and you plan the
  • 00:16:07
    system and make decisions around the
  • 00:16:09
    design I actually find it to be much
  • 00:16:11
    easier to both build and reason about
  • 00:16:13
    and then longterm most importantly makes
  • 00:16:15
    it easier to maintain these are all good
  • 00:16:18
    things try to solve bugs one layer
  • 00:16:20
    deeper ooh and react's already coming up
  • 00:16:23
    oh boy imagine you have a react
  • 00:16:24
    component in a dashboard that deals with
  • 00:16:26
    a user object retrieved from state of
  • 00:16:28
    the currently logged in user you see a
  • 00:16:30
    bug report in Sentry Sentry plug Channel
  • 00:16:32
    sponsor they're not sponsoring this
  • 00:16:33
    great product for debugging stuff though
  • 00:16:35
    you see a bug in Sentry where user was
  • 00:16:37
    null during render you could add a quick
  • 00:16:39
    if no user returned null or you could
  • 00:16:41
    investigate a bit more and find that
  • 00:16:43
    your logout function makes two distinct
  • 00:16:44
    State updates the first is setting the
  • 00:16:47
    user to null and then the second is
  • 00:16:48
    redirecting the user to the homepage you
  • 00:16:50
    swap the two and now no component will
  • 00:16:52
    ever have this bug again because the
  • 00:16:54
    user object is never null when you're
  • 00:16:55
    within the dashboard keep doing the
  • 00:16:57
    first sort of bug fix and you end up
  • 00:16:59
    with a mess keep doing the second type
  • 00:17:01
    of bug fix and you'll have a clean
  • 00:17:02
    system and a deep understanding of the
  • 00:17:04
    invariance makes perfect sense it's so
  • 00:17:06
    tempting to just if no user return null
  • 00:17:09
    I will say as a huge react query fan
  • 00:17:11
    I've been guilty of this where I solve
  • 00:17:13
    those error cases where they're coming
  • 00:17:15
    up with errors but since especially with
  • 00:17:17
    like the new model I find myself just
  • 00:17:19
    defining within the call the right thing
  • 00:17:22
    the update to set things to null should
  • 00:17:23
    also send you to the right place I
  • 00:17:25
    absolutely agree you should aim for the
  • 00:17:27
    second type of fix don't underestimate
  • 00:17:29
    the value of digging into history to
  • 00:17:31
    investigate some bugs again reading PO
  • 00:17:33
    requests all that stuff really really
  • 00:17:35
    good strategies I've always been pretty
  • 00:17:37
    good at debugging weird issues with the
  • 00:17:38
    usual toolkit of print line and the
  • 00:17:40
    debugger so I never really looked at get
  • 00:17:42
    much to figure out the history of a bug
  • 00:17:44
    but for some bugs it's crucial I
  • 00:17:45
    recently had an issue with my server
  • 00:17:47
    where it was leaking memory seemingly
  • 00:17:49
    constantly and then getting out of
  • 00:17:50
    memory killed and restarted I couldn't
  • 00:17:52
    figure out the cause of this for the
  • 00:17:53
    life of me every likely culprit was
  • 00:17:55
    ruled out and I couldn't reproduce it
  • 00:17:57
    locally it felt like throwing darts
  • 00:17:59
    blindfolded I've certainly had bugs that
  • 00:18:01
    felt like that and it is miserable I
  • 00:18:03
    looked at the commit history and found
  • 00:18:04
    that it started happening after I added
  • 00:18:06
    support for Play Store payments never a
  • 00:18:08
    place I would have looked in a million
  • 00:18:09
    years it's just a couple of HTTP
  • 00:18:11
    requests turns out it was getting stuck
  • 00:18:13
    in an infinite Loop of fetching access
  • 00:18:15
    tokens and after the first one expired
  • 00:18:17
    maybe every request only added a
  • 00:18:18
    kilobyte or so to the memory when
  • 00:18:20
    they're retrying every 10 milliseconds
  • 00:18:22
    or so on multiple threads that starts to
  • 00:18:24
    add up quick and usually this is the
  • 00:18:26
    sort of thing that would have resulted
  • 00:18:27
    in a stack Overflow but I was using
  • 00:18:29
    async recursion in Rust which doesn't
  • 00:18:31
    stack
  • 00:18:32
    Overflow rust is a great programming
  • 00:18:35
    language this never would have occurred
  • 00:18:36
    to me but when I'm forced to look into a
  • 00:18:38
    specific bit of code that I know must
  • 00:18:40
    have caused it suddenly the theory pops
  • 00:18:42
    up I'm not sure what the rule is here
  • 00:18:44
    for when to do this and when not to it's
  • 00:18:46
    intuition based in a different sort of
  • 00:18:47
    huh to a bug report that triggers this
  • 00:18:50
    sort of Investigation you'll develop the
  • 00:18:52
    intuition over time but it's enough to
  • 00:18:53
    know that sometimes it's invaluable if
  • 00:18:55
    you're
  • 00:18:56
    stuck along similar lines try out get
  • 00:18:59
    bisect if the problem is amendable to it
  • 00:19:02
    meaning a g history of spa commits a
  • 00:19:04
    quick automated way to test for the
  • 00:19:06
    issue and you have one commit you know
  • 00:19:08
    is bad and one that's good I'm going to
  • 00:19:09
    go a slightly weird angle with this for
  • 00:19:11
    my own
  • 00:19:13
    advice make it
  • 00:19:15
    deploy then make it useful I'd find that
  • 00:19:19
    a lot of devs early on especially myself
  • 00:19:21
    would spend so much time trying to make
  • 00:19:22
    the code work locally on their machine
  • 00:19:24
    that by the time they had it working it
  • 00:19:26
    was already complex enough to deploying
  • 00:19:28
    it was nonviable with modern tools that
  • 00:19:31
    make CI and CD easy like forsell netlify
  • 00:19:34
    any of these other options you can just
  • 00:19:35
    link your project to a GitHub repo and
  • 00:19:38
    now it will auto deploy Auto build and
  • 00:19:42
    auto publish any changes you make when
  • 00:19:44
    you push up the commits which makes it
  • 00:19:46
    significantly easier in a situation like
  • 00:19:48
    this where you're trying to figure out
  • 00:19:49
    which commit broke you're trying to
  • 00:19:50
    figure out why deploy aren't working or
  • 00:19:52
    why out of memory is happening if you
  • 00:19:54
    have the ability to Auto deploy every
  • 00:19:56
    version you can go look at an old
  • 00:19:58
    version and see whether or not it was
  • 00:19:59
    working as expected these types of
  • 00:20:01
    things become exponentially easier and
  • 00:20:03
    the amount of time you'll spend dealing
  • 00:20:04
    with these things is exponentially lower
  • 00:20:07
    one more similar thing learn get really
  • 00:20:11
    early I know this what's gotten me into
  • 00:20:13
    trouble but the confidence you get from
  • 00:20:15
    realizing making changes isn't scary is
  • 00:20:18
    huge when I started school it was very
  • 00:20:20
    clear to me that my peers were scared
  • 00:20:22
    when I would use their machines in
  • 00:20:24
    delete code because to them code deleted
  • 00:20:26
    was code gone forever but if you learn
  • 00:20:28
    the basics of get you don't worry
  • 00:20:30
    anywhere near as much yeah this is a
  • 00:20:32
    great reference I helped the dev a while
  • 00:20:35
    back who was trying to deploy their
  • 00:20:36
    giant remix project onto versel I was
  • 00:20:39
    the one screen sharing I was just you
  • 00:20:41
    can even tell from the uh terminal there
  • 00:20:43
    that's obviously me that's my color
  • 00:20:45
    coding that's my um t-u everything that
  • 00:20:49
    was my machine because I was so annoyed
  • 00:20:51
    that the particular Dev that was having
  • 00:20:53
    the problem was insisting that vercell
  • 00:20:55
    was the issue even though they had never
  • 00:20:57
    once got it to deploy so my response was
  • 00:21:00
    what the can we get this remix can
  • 00:21:02
    we get a remix project to deploy and
  • 00:21:05
    then we can debug the difference between
  • 00:21:06
    the two because you should have made
  • 00:21:07
    this deploy as soon as you made it and I
  • 00:21:08
    was able to get it working in like 10
  • 00:21:10
    minutes once I jumped in even with like
  • 00:21:11
    Lee Rob and crew hopping in too it was a
  • 00:21:14
    a fun chaotic experience that absolutely
  • 00:21:17
    could have been settled if the dev had
  • 00:21:19
    deployed before they built so as
  • 00:21:21
    unintuitive as it might sound to put
  • 00:21:23
    deploy first before you make something
  • 00:21:25
    useful trust me it makes life better and
  • 00:21:28
    that's why all of my tutorials I deploy
  • 00:21:30
    really really early and then we do the
  • 00:21:33
    rest
  • 00:21:35
    after back to the article this is a
  • 00:21:37
    great article by the way uh shout out M
  • 00:21:39
    Buffett will give you a big Shout Out
  • 00:21:41
    near the end I'm sure I'll put their
  • 00:21:42
    Twitter in the description too give them
  • 00:21:43
    a follow it's really easy to write
  • 00:21:45
    terrible code but it's also really easy
  • 00:21:47
    to write code that follows absolutely
  • 00:21:48
    every best practice which has been unit
  • 00:21:51
    integration fuzz and mutation tested for
  • 00:21:53
    good measure your startup will just run
  • 00:21:54
    out of money before you finish don't
  • 00:21:56
    forget those Airbnb lint rules that
  • 00:21:58
    Airbnb doesn't even use so a lot of
  • 00:22:00
    programming is figuring out the balance
  • 00:22:02
    absolutely agree I'm going to drop the
  • 00:22:04
    hot take of simple almost always scales
  • 00:22:07
    one more of Mind aim for simple it
  • 00:22:10
    scales well I'll even put surprisingly
  • 00:22:14
    well I find people will look at a simple
  • 00:22:16
    thing and say oh what happens when
  • 00:22:18
    that's at Enterprise scale well if the
  • 00:22:20
    architecture is simple enough then what
  • 00:22:22
    the way it scales up as it gets more
  • 00:22:24
    difficult is way less bad than something
  • 00:22:25
    that starts difficult and has more
  • 00:22:27
    complexity as you go and it's a balance
  • 00:22:29
    it's absolutely balance but if you aim
  • 00:22:31
    for simple the likelihood that things
  • 00:22:33
    scale well is actually higher not lower
  • 00:22:36
    and people love to pretend otherwise and
  • 00:22:37
    they're wrong if you erir on the side of
  • 00:22:40
    writing code quickly you'll occasionally
  • 00:22:42
    get bitten by a bad bit of tech debt you
  • 00:22:43
    learn stuff like I should add great
  • 00:22:45
    testing for data processing because it
  • 00:22:46
    often is impossible to correct later or
  • 00:22:49
    I should really think through table
  • 00:22:50
    design because changing things without
  • 00:22:51
    downtime can be extremely hard if you ER
  • 00:22:54
    on the side of writing perfect code you
  • 00:22:56
    don't get any feedback sorry rust
  • 00:22:59
    things just universally take a long time
  • 00:23:01
    you don't know where you're spending
  • 00:23:02
    your time on things that really deserve
  • 00:23:04
    it and matter or if you're just wasting
  • 00:23:06
    that time feedback mechanisms are
  • 00:23:08
    essential for Learning and you're not
  • 00:23:10
    getting that I absolutely agree I was
  • 00:23:12
    just filming a video earlier about
  • 00:23:14
    Ladybird which is a new browser that's
  • 00:23:16
    entirely unusable because its goal is
  • 00:23:18
    implementing web standards not being a
  • 00:23:19
    good usable browser as a result the
  • 00:23:22
    likelihood that they get actual feedback
  • 00:23:24
    about what is and isn't working is way
  • 00:23:26
    lower versus the browser I'm using Arc
  • 00:23:29
    which I've used for a while now still
  • 00:23:31
    has a fun bug where when I click the
  • 00:23:33
    collections tab because I download a lot
  • 00:23:35
    of things it lags my browser is chugging
  • 00:23:38
    now because I have some thousand files
  • 00:23:41
    in that folder which means I can give
  • 00:23:43
    them that feedback and they're
  • 00:23:45
    rethinking decisions around their entire
  • 00:23:47
    Swift architecture because Swift is so
  • 00:23:49
    bad at long lists but they're able to
  • 00:23:51
    learn these things and make these
  • 00:23:52
    changes because they have actual users
  • 00:23:54
    because they ship something sooner
  • 00:23:56
    versus ladybird which isn't going to use
  • 00:23:57
    any existing solution they're building
  • 00:23:59
    everything themselves and as a result
  • 00:24:01
    the amount of time it takes for them to
  • 00:24:02
    get any feedback at all is
  • 00:24:06
    massive to be clear I don't mean bad as
  • 00:24:09
    in I couldn't remember the Syntax for
  • 00:24:11
    creating a hash map so I did two inter
  • 00:24:12
    Loops instead I mean bad like the
  • 00:24:14
    following instead of a rewrite of our
  • 00:24:16
    data ingestion to make the specific
  • 00:24:18
    State unrepresentable I added a couple
  • 00:24:19
    asserts over our invariance at a couple
  • 00:24:22
    key checkpoints oh
  • 00:24:25
    oh yeah our server models are exactly
  • 00:24:28
    the same as the dto we would write so I
  • 00:24:30
    just serialized those instead of writing
  • 00:24:32
    all the boiler plates so we can write
  • 00:24:33
    the dto later as
  • 00:24:35
    needed I skipped writing tests for these
  • 00:24:37
    components because they're trivial and a
  • 00:24:38
    bug in one of them is no big deal I mean
  • 00:24:40
    that's all components ideally but yeah
  • 00:24:42
    good
  • 00:24:43
    examples make debugging easier I like
  • 00:24:46
    that one a lot let's see what he has to
  • 00:24:48
    say here there's so many little tricks
  • 00:24:50
    I've acquired over the years on making
  • 00:24:51
    software easier to debug if you don't
  • 00:24:53
    make any effort to make debugging easy
  • 00:24:55
    you're going to spend unacceptable
  • 00:24:56
    amounts of time debugging each isue as
  • 00:24:58
    your software gets more and more complex
  • 00:25:00
    hey uh nextjs make things easier to
  • 00:25:04
    debug please thanks I know you're
  • 00:25:05
    working on it I know's working on it I
  • 00:25:07
    just had to point that out because if
  • 00:25:08
    you don't have browser tools things are
  • 00:25:10
    a lot harder it's a great Point too
  • 00:25:11
    you'll be terrified to make changes
  • 00:25:13
    because even a couple new bugs might
  • 00:25:15
    take you a week to figure out yep
  • 00:25:17
    there's plenty of code bases I'm scared
  • 00:25:19
    to touch because I'm more likely to add
  • 00:25:20
    a bug than fix the thing I'm trying to
  • 00:25:22
    fix in the first place here's some
  • 00:25:25
    examples of what I mean by the way this
  • 00:25:26
    person's a huge chest brow and has a cou
  • 00:25:28
    cool chess Services they built for the
  • 00:25:30
    back end of chessbook they have a
  • 00:25:31
    command to copy all of a user's data
  • 00:25:33
    down to local so they can reproduce
  • 00:25:35
    issues easily with only a username based
  • 00:25:37
    they trace every local request with open
  • 00:25:39
    Telemetry making it very easy to see how
  • 00:25:41
    a request spends its time also based
  • 00:25:43
    even though open Telemetry is a
  • 00:25:44
    standard I have a scratch file that acts
  • 00:25:46
    as a pseudo repple which re-executes on
  • 00:25:48
    every change ooh I love this I'm a big
  • 00:25:52
    fan of having a Sandbox file in your
  • 00:25:53
    project so that you can just try things
  • 00:25:55
    there and not have to like spin a bunch
  • 00:25:57
    of stuff up to do it this makes it easy
  • 00:25:59
    to pull out bits of code and play around
  • 00:26:01
    with it to get a better idea of what's
  • 00:26:02
    going on love it totally agree oh here's
  • 00:26:05
    a fun one in staging they limit
  • 00:26:06
    parallelism to one so that it's easier
  • 00:26:08
    to visually parse logs ooh spicy I like
  • 00:26:12
    it for the front end I have a debug
  • 00:26:14
    requests setting which prevents
  • 00:26:15
    optimistic loading of data to make it
  • 00:26:17
    easier to debug requests interesting I
  • 00:26:19
    think I dig that I also have a debug
  • 00:26:21
    State setting that will print out the
  • 00:26:22
    entire state of the program after each
  • 00:26:25
    update along with a pretty diff of what
  • 00:26:27
    happened they also have a file full of
  • 00:26:29
    little functions that get the UI into
  • 00:26:31
    specific States so that is they're
  • 00:26:32
    trying to fix bugs they don't have to
  • 00:26:33
    keep clicking in the UI to get to that
  • 00:26:35
    state I should have more of that it's a
  • 00:26:36
    weird example but I have this project
  • 00:26:38
    Doge T3 G so I actually put this little
  • 00:26:41
    query Pam on the page where Dev mode is
  • 00:26:44
    true now we get this thing on the page
  • 00:26:47
    where I can really quickly add a bunch
  • 00:26:49
    of values add money and then get this
  • 00:26:52
    into the state I'm trying to debug at
  • 00:26:53
    any given time this was essential to
  • 00:26:57
    getting this working I can't imagine how
  • 00:26:59
    I would have built this project without
  • 00:27:00
    it there's definitely not a really
  • 00:27:02
    popular project in the front-end world
  • 00:27:04
    that is significantly more annoying than
  • 00:27:07
    it ever should be that people use
  • 00:27:09
    because getting their components into
  • 00:27:10
    the right state is really hard that's
  • 00:27:12
    that's definitely not a thing it's not
  • 00:27:14
    like people would use this component
  • 00:27:16
    Library tool to debug UI because they
  • 00:27:19
    don't have a way to get the UI into the
  • 00:27:20
    state that they're actually testing that
  • 00:27:22
    would be absurd there's definitely not a
  • 00:27:24
    whole industry of people making really
  • 00:27:26
    annoying tools that keep getting misused
  • 00:27:28
    because UI devs kind of suck that's
  • 00:27:31
    definitely not a thing unrelated website
  • 00:27:33
    by the way ignore whatever I was just
  • 00:27:35
    scrolling totally don't know how I ended
  • 00:27:36
    up there yeah having ways to get your
  • 00:27:38
    components into the state that they
  • 00:27:39
    should be yeah you should and every Dev
  • 00:27:42
    should normalize that the idea of making
  • 00:27:44
    it easy to see play with debug Etc it
  • 00:27:47
    helps with places you wouldn't even
  • 00:27:48
    expect like having these tools makes
  • 00:27:50
    like QA easier too it's just it's good
  • 00:27:53
    it's really good practice to find simple
  • 00:27:55
    ways to get your application into the
  • 00:27:57
    states that you're actually working on
  • 00:27:58
    it also will encourage you by the way to
  • 00:28:00
    make things simpler because if it's too
  • 00:28:02
    hard to get things in the right State
  • 00:28:04
    you'll start to realize ways to simplify
  • 00:28:05
    that State Management and those are
  • 00:28:07
    almost always worthwhile stay vigilant
  • 00:28:10
    about how much of your debugging time is
  • 00:28:11
    spent on setup reproduction and cleanup
  • 00:28:13
    afterwards if it's over 50% you should
  • 00:28:15
    figure out how to make it easier even if
  • 00:28:17
    that will take slightly longer this time
  • 00:28:19
    bugs should get easier to fix over time
  • 00:28:21
    all else being equal I hate that's a
  • 00:28:23
    spicy take because it's entirely correct
  • 00:28:25
    as a code base gets more complex you
  • 00:28:27
    should be counter trting that making
  • 00:28:29
    reproduction even easier to deal
  • 00:28:31
    with when working on a team you should
  • 00:28:34
    usually ask the question I'm putting
  • 00:28:36
    that in mind too uh dumb questions rule
  • 00:28:40
    I've talked about this a bunch I can't
  • 00:28:41
    even remember which videos I have
  • 00:28:43
    because there been so many the dumb
  • 00:28:44
    questions rule is a thing I apply to new
  • 00:28:46
    Engineers when they join my team I
  • 00:28:48
    mandate a minimum number of dumb
  • 00:28:50
    questions that they have to ask every
  • 00:28:52
    day if they haven't asked me at least
  • 00:28:54
    one dumb question every day for their
  • 00:28:57
    first week or two the day is not over
  • 00:28:59
    until they ask the question the reason I
  • 00:29:01
    push this is because devs and honestly
  • 00:29:03
    everyone is really insecure about
  • 00:29:05
    feeling dumb in saying dumb things so I
  • 00:29:08
    force them to get over that by making
  • 00:29:10
    them do it ask the dumb question and it
  • 00:29:11
    kind of goes back to this point earlier
  • 00:29:13
    of taking feedback from unfamiliar devs
  • 00:29:15
    more seriously because the dumb question
  • 00:29:18
    is a thing others probably thought when
  • 00:29:19
    they were trying the project for the
  • 00:29:21
    first time but they were too scared to
  • 00:29:22
    say and if you don't get that feedback
  • 00:29:24
    you'll never know and this goes both
  • 00:29:27
    ways if you're the Dev that always asks
  • 00:29:29
    the question you're more likely to be
  • 00:29:31
    working in code bases that solve these
  • 00:29:33
    problems because if everyone on the team
  • 00:29:34
    isn't willing to say it and you're also
  • 00:29:36
    not willing to say it it won't get fixed
  • 00:29:38
    but even if everyone else isn't willing
  • 00:29:40
    but you are all of a sudden these things
  • 00:29:42
    start to get fixed so it's really
  • 00:29:44
    important to ask the questions even if
  • 00:29:46
    no one else on your team is in the worst
  • 00:29:48
    cases you get fired for and you can find
  • 00:29:50
    a team that's better aligned with you
  • 00:29:51
    there's a spectrum of trying to figure
  • 00:29:53
    out everything for yourself versus
  • 00:29:55
    bugging your co-workers with every
  • 00:29:57
    little question and I I think most
  • 00:29:58
    people start their careers way too far
  • 00:30:00
    on the former side absolutely agree it
  • 00:30:03
    has been hard for me to find people who
  • 00:30:04
    ask too many questions when they're
  • 00:30:06
    working with me there are absolutely
  • 00:30:08
    people who are not working for me that
  • 00:30:10
    are just random people in my DMs asking
  • 00:30:11
    me all sorts of stupid totally see
  • 00:30:13
    that that is a problem but for the vast
  • 00:30:15
    majority of people especially once
  • 00:30:16
    they're employed they're almost scared
  • 00:30:18
    to ask the question and you got to push
  • 00:30:20
    them to or if you're that person you
  • 00:30:21
    just got to do it don't be scared to ask
  • 00:30:23
    the question almost ever there's always
  • 00:30:25
    someone around that has been in the code
  • 00:30:27
    base for longer or knows technology X
  • 00:30:29
    way better than you or knows the product
  • 00:30:30
    better or is just a more experienced
  • 00:30:32
    engineer in general there's so many
  • 00:30:34
    times in that first 6 months of working
  • 00:30:35
    somewhere where you could spend over an
  • 00:30:37
    hour figuring something out or you could
  • 00:30:39
    get the answer in a few minutes again
  • 00:30:41
    really important point I can't tell you
  • 00:30:43
    how many times the dumb question ended
  • 00:30:45
    up being well I've been stuck on this
  • 00:30:46
    for 4 hours do you have any tips on how
  • 00:30:48
    to get this particular tool working and
  • 00:30:51
    my response was oh yeah you should run
  • 00:30:53
    these two commands instead I should have
  • 00:30:54
    updated the docs for that my bad I'm
  • 00:30:56
    going to go fix that and now this thing
  • 00:30:57
    that had spent hours on get solved in
  • 00:31:00
    like 30 seconds and our docs improve
  • 00:31:03
    huge massive this is a great thing thank
  • 00:31:06
    you schaer for sharing this junior Dev
  • 00:31:09
    here I've been praised as the best on my
  • 00:31:11
    team at asking questions ask the
  • 00:31:13
    question you don't have to be an
  • 00:31:15
    experienced engineer to ask good
  • 00:31:16
    questions in fact the inexperienced
  • 00:31:18
    Engineers they have a massive Advantage
  • 00:31:20
    because they have better questions
  • 00:31:22
    because they're not going to default to
  • 00:31:24
    existing knowledge that might be
  • 00:31:25
    incorrect they're going to challenge the
  • 00:31:27
    thing and they're going to ask great
  • 00:31:29
    questions as a result lean into that as
  • 00:31:31
    a junior Dev and as an experienced one
  • 00:31:34
    get those questions get that feedback
  • 00:31:35
    it's all so helpful this happens all the
  • 00:31:37
    time I I can't I would love if you have
  • 00:31:40
    this to link it because this happens
  • 00:31:44
    five times a day there is no world in
  • 00:31:46
    which I remember your specific question
  • 00:31:48
    like you it we all have these moments
  • 00:31:51
    that haunt you know what one more piece
  • 00:31:52
    of
  • 00:31:53
    advice that one dumb thing that haunts
  • 00:31:56
    you
  • 00:31:58
    nobody remembers
  • 00:32:00
    it I have plenty of those I have so many
  • 00:32:04
    of these moments where like wow I can't
  • 00:32:07
    believe I thought that or did that like
  • 00:32:09
    like here's a fun one that actually got
  • 00:32:10
    brought up because others remembered it
  • 00:32:12
    for me so bad example but I love it I
  • 00:32:14
    didn't know react query could be used
  • 00:32:16
    for things that weren't graphql until
  • 00:32:18
    Tanner Lindley was on Jason langdorf
  • 00:32:20
    stream there's actually in the VOD I bet
  • 00:32:23
    I could find it yeah cool almost
  • 00:32:25
    certainly going to be at this time stamp
  • 00:32:27
    yeah yes look at me in chat
  • 00:32:30
    there look at
  • 00:32:32
    that I am so so so stupid and somehow
  • 00:32:35
    just realize react query isn't just a
  • 00:32:37
    graphql client I need to go do a very
  • 00:32:39
    deep dive and this was October 21st 2020
  • 00:32:44
    we've all had these issues we've all had
  • 00:32:46
    that moment where we feel dumb and
  • 00:32:48
    nobody remembers the only reason that
  • 00:32:50
    one got noticed is somebody else was
  • 00:32:52
    watching the video and said yo Theo I
  • 00:32:54
    saw you pop up in stream here look at
  • 00:32:55
    your comments I was like wow holy
  • 00:32:57
    I'm dumb but no one else remembered no
  • 00:32:59
    one remembers those moments don't worry
  • 00:33:01
    about it and again the only time that
  • 00:33:03
    this would ever annoy people if you're
  • 00:33:05
    asking too many questions is if it's
  • 00:33:06
    clear you could have found the answer
  • 00:33:08
    yourself in a few minutes and even then
  • 00:33:10
    it can be useful because you might not
  • 00:33:12
    have known the strategy to find the
  • 00:33:13
    answer and if I then show you that
  • 00:33:16
    awesome you'll ask less questions I've
  • 00:33:18
    had once or twice in my career where
  • 00:33:19
    somebody would ask questions over and
  • 00:33:20
    over and I'm like okay how did you try
  • 00:33:22
    to figure this out and then realize they
  • 00:33:24
    didn't know about one of the docs
  • 00:33:26
    resources or one of the things to search
  • 00:33:28
    sort for and when I show them that they
  • 00:33:30
    would stop like almost every time if
  • 00:33:32
    you're asking too many questions it's
  • 00:33:33
    because you haven't been shown the way
  • 00:33:34
    to find the answers and if you ask too
  • 00:33:36
    many questions awesome now we can
  • 00:33:38
    realize that deficiency exists and we
  • 00:33:40
    can plug it after you responded to me I
  • 00:33:43
    sat down and got really into
  • 00:33:44
    understanding how these things actually
  • 00:33:46
    work so it helped you a ton that's
  • 00:33:47
    awesome I'm sorry if I was harsh in the
  • 00:33:50
    reply there but I it sounds like you
  • 00:33:52
    used that opportunity to level up and be
  • 00:33:53
    better like even if I didn't handle your
  • 00:33:55
    question well it seems like you handled
  • 00:33:57
    it awesome and I really hope that you're
  • 00:34:00
    not scared of asking questions in the
  • 00:34:01
    future because that's dope to have you
  • 00:34:03
    here have you sharing this experience
  • 00:34:05
    and have you productive enough to to
  • 00:34:06
    deeply understand next now you massively
  • 00:34:09
    leveled up as a result of that so I love
  • 00:34:11
    that shipping Cadence matters a lot
  • 00:34:14
    think hard about what will get you
  • 00:34:16
    shipping quickly and often love this
  • 00:34:19
    startups have limited Runway projects
  • 00:34:21
    have deadlines when you quit your job to
  • 00:34:23
    strike out on your own your savings will
  • 00:34:24
    only last you so many months that this
  • 00:34:26
    hits too deep this hurts Hur me in my
  • 00:34:28
    soul
  • 00:34:30
    ideally your speed on a project
  • 00:34:33
    only compounds over time until h no I I
  • 00:34:36
    have another Theo point and it's not
  • 00:34:37
    even that related to this but it's
  • 00:34:39
    inspiring me uh you don't know what
  • 00:34:42
    level you're at until you get an offer
  • 00:34:45
    at that level somewhere else companies
  • 00:34:49
    love to make you think you're not a
  • 00:34:50
    certain level because they don't want to
  • 00:34:52
    pay you for that promotion so they
  • 00:34:54
    always make the promotion process hell
  • 00:34:56
    there was a window where I didn't think
  • 00:34:57
    I was a senior Dev because I was having
  • 00:35:00
    problems getting my senior doc to like
  • 00:35:02
    get started I just getting my managers
  • 00:35:03
    to do it was annoying turns out those
  • 00:35:06
    managers sucked and when I started
  • 00:35:07
    applying to other companies Not only was
  • 00:35:09
    I massively exceeding their bar for
  • 00:35:11
    senior I was approaching like the staff
  • 00:35:13
    level bar and I didn't realize that
  • 00:35:14
    because I didn't realize I should be
  • 00:35:16
    talking to other companies and not
  • 00:35:18
    basing my ability on what this one
  • 00:35:20
    particular person thinks they should or
  • 00:35:22
    shouldn't sign off on because the
  • 00:35:23
    reality was if that manager promoted me
  • 00:35:25
    they'd have one less headcount for a
  • 00:35:27
    senior Dev but if they didn't promote me
  • 00:35:29
    they could hire another senior Dev and
  • 00:35:31
    have me underpaid outworking that senior
  • 00:35:33
    Dev it was an obvious win for my team so
  • 00:35:36
    I never understood what my actual level
  • 00:35:38
    was because my company had a competitive
  • 00:35:40
    advantage of not telling me and then
  • 00:35:41
    when I figured it out gave him the
  • 00:35:43
    finger and quit they were worse off as a
  • 00:35:45
    result regardless this happens all the
  • 00:35:47
    time and you as an individual developer
  • 00:35:50
    should know how much you're actually
  • 00:35:51
    worth what your skills actually look
  • 00:35:53
    like measured up against other actual
  • 00:35:55
    companies so do interviews a ton all for
  • 00:35:57
    that a point interview a lot at least
  • 00:36:01
    once every 6 months one more on this
  • 00:36:04
    topic give
  • 00:36:06
    interviews if you're qualified for the
  • 00:36:08
    role you're qualified to interview for
  • 00:36:10
    the
  • 00:36:15
    role yeah I find so many devs take way
  • 00:36:18
    too long to get into the interview
  • 00:36:20
    process on both sides they take too long
  • 00:36:22
    to start getting interviews to work at a
  • 00:36:24
    company and once they're at the company
  • 00:36:26
    they're hesitant to start giving
  • 00:36:27
    interviews interviews are essential to
  • 00:36:29
    our success and growth and opportunities
  • 00:36:31
    as devs you got to push through it it
  • 00:36:33
    sucks but you have to give interviews do
  • 00:36:36
    interviews deeply understand interviews
  • 00:36:38
    if you can't do those well you're
  • 00:36:40
    massively bottlenecking yourself and
  • 00:36:42
    your capabilities certainly
  • 00:36:44
    bottlenecking your success yeah this hit
  • 00:36:46
    deep the reason I thought of all of that
  • 00:36:47
    is I just started thinking too much
  • 00:36:48
    about quitting and going off on my own
  • 00:36:51
    and realizing at that moment oh I
  • 00:36:53
    should have quit a while earlier I am
  • 00:36:56
    very down if you're down to share but no
  • 00:36:59
    pressure at all hoi I still want to
  • 00:37:02
    understand why the session never gets
  • 00:37:03
    past the client this is strange as
  • 00:37:04
    to me the data is there but it simply
  • 00:37:06
    never receives the prop I'm looking all
  • 00:37:07
    over for the solution this one was not
  • 00:37:10
    actually
  • 00:37:11
    particularly obvious yeah I'm going to
  • 00:37:14
    drop an even hotter take for you hooi
  • 00:37:16
    this wasn't a problem with your
  • 00:37:18
    understanding so much as next being
  • 00:37:21
    shitty get serers side props being a
  • 00:37:24
    function both for redirecting and for
  • 00:37:27
    passing props is bad this code shows
  • 00:37:32
    just how bad the conflation of concerns
  • 00:37:35
    that existed in Old Pages router was the
  • 00:37:38
    fact that you could do this that you
  • 00:37:39
    could return a redirect and props is a
  • 00:37:42
    fundamental design failure in next so I
  • 00:37:45
    do not blame you at all for this this is
  • 00:37:49
    why old nextjs sucked and this is also
  • 00:37:52
    why I think new nextjs is so good it
  • 00:37:54
    does a great job at solving these
  • 00:37:55
    problems by not having these magic fun
  • 00:37:57
    that have all of these different roles
  • 00:37:59
    you just component style call what
  • 00:38:01
    you're doing when you do it so I
  • 00:38:02
    actually am pumped that you found this
  • 00:38:04
    example because it's subtle but it
  • 00:38:06
    actually perfectly showcases the types
  • 00:38:08
    of design failures that the old next
  • 00:38:10
    model by Design encouraged a lot of so
  • 00:38:14
    phenomenal oh I missed your follow-up
  • 00:38:16
    question too my bad on that you pass
  • 00:38:18
    session as props it does not show in the
  • 00:38:19
    props initial
  • 00:38:25
    problem uh I think you understand now so
  • 00:38:28
    whenever you send the data grabs app
  • 00:38:30
    grabbing session provider so whenever
  • 00:38:32
    you send the data of the session as
  • 00:38:34
    props s is grabbing it passing it yep
  • 00:38:38
    yep to be clear these things were way
  • 00:38:40
    more complex than they should have been
  • 00:38:43
    and none of this is your fault like I
  • 00:38:46
    really want to emphasize that point this
  • 00:38:48
    design sucked because of next and I
  • 00:38:52
    actually love that you brought this up
  • 00:38:53
    as an example because yeah this was your
  • 00:38:56
    huge learning is you had only worked in
  • 00:38:57
    single Page Apps and this abstraction
  • 00:38:59
    for them wasn't great like you know that
  • 00:39:02
    was a good question cuz it was like you
  • 00:39:04
    didn't pretend you understood more than
  • 00:39:05
    you did you said that it doesn't make
  • 00:39:07
    sense it's small I'm going to give you a
  • 00:39:09
    massive compliment here there's a lot of
  • 00:39:11
    subtle things in this question that I
  • 00:39:12
    think you did really well I want to
  • 00:39:15
    understand you didn't say this is wrong
  • 00:39:17
    or dumb you didn't say this problem
  • 00:39:20
    sucks or that this tool sucks you said
  • 00:39:22
    that you want to understand why this
  • 00:39:24
    strange thing is happening and you even
  • 00:39:26
    said strange to you the qualifiers here
  • 00:39:29
    are actually incredible this is like
  • 00:39:30
    almost like an artistic example of like
  • 00:39:32
    a really really good question when you
  • 00:39:33
    feel lost and clueless you owned that it
  • 00:39:36
    was your desire to understand this was
  • 00:39:39
    the fact that you said the word
  • 00:39:40
    understand before describing the problem
  • 00:39:42
    that you want to understand huge huge
  • 00:39:44
    green flag you're not just trying to fix
  • 00:39:46
    the problem and move on you want to
  • 00:39:47
    understand it and it's strange to you
  • 00:39:50
    you know it might not be strange to
  • 00:39:51
    others you know that there might be
  • 00:39:52
    something better that's just not
  • 00:39:53
    clicking for you this is a great great
  • 00:39:56
    question so yeah I wouldn't even qualify
  • 00:39:59
    this as a dumb question honestly if if
  • 00:40:01
    you had presented this to me as an
  • 00:40:02
    employee of mine as your dumb question I
  • 00:40:05
    would have said no that's a good
  • 00:40:06
    question come back with the Dumber one
  • 00:40:07
    later this is great A+ fantastic
  • 00:40:09
    representation and like to anyone
  • 00:40:11
    looking for examples of how to ask a
  • 00:40:13
    question about something you don't
  • 00:40:14
    understand here you go just say it say
  • 00:40:16
    that you want understand and you don't
  • 00:40:18
    and say what is confusing to you
  • 00:40:20
    fantastic A++ thank you for sharing that
  • 00:40:22
    who you wrot by the way like that's
  • 00:40:24
    really good gold example of asking a
  • 00:40:27
    question when you're clueless people are
  • 00:40:29
    really scared to do if you just don't
  • 00:40:31
    understand at all it's scary to ask the
  • 00:40:33
    question but you did it you learned a
  • 00:40:35
    bunch and now I get to highlight you in
  • 00:40:36
    a video as an example of these types of
  • 00:40:38
    things A+ is all around I love this
  • 00:40:41
    thank you for sharing don't worry about
  • 00:40:43
    having to participate in the time and
  • 00:40:44
    all that but if you're down and you're
  • 00:40:46
    here clearly you bring a lot of value so
  • 00:40:48
    pump to have you here man anyways let's
  • 00:40:50
    see more what this author has to say
  • 00:40:52
    ideally your speed on a project only
  • 00:40:53
    compounds over time until your shipping
  • 00:40:55
    features faster than you could have ever
  • 00:40:57
    imagined to ship fast you need to do a
  • 00:40:59
    lot of things oh I'm so pumped that you
  • 00:41:01
    have you're the best person to teach
  • 00:41:03
    like knowing that you ask questions that
  • 00:41:05
    well means you're going to set a really
  • 00:41:07
    good example for the students the fact
  • 00:41:09
    that there's people that are learning
  • 00:41:10
    from you makes me very very excited back
  • 00:41:12
    to these examples of things that you
  • 00:41:13
    should do if you want to ship fast you a
  • 00:41:16
    system that isn't prone to bugs you need
  • 00:41:17
    a quick turnaround time between teams
  • 00:41:19
    you need a willingness to cut out the
  • 00:41:20
    10% of a new feature that's going to
  • 00:41:22
    take half the time Yep this happs a lot
  • 00:41:25
    the the number of times I see a product
  • 00:41:27
    a feature a tech plan a spec that would
  • 00:41:30
    be way way simpler if we trim one or two
  • 00:41:34
    things half my videos where I'm ranting
  • 00:41:35
    about old jobs are just me complaining
  • 00:41:38
    about this specifically so couldn't
  • 00:41:40
    agree more consistent reusable patterns
  • 00:41:42
    that you can compose together for New
  • 00:41:43
    screens features and end points Yep this
  • 00:41:46
    is a huge part of why react one by the
  • 00:41:48
    way the fact that the patterns and
  • 00:41:49
    components can all be reused composed
  • 00:41:52
    stacked and done all these crazy ways
  • 00:41:54
    that's why react really took off early
  • 00:41:56
    because it scaled well to small projects
  • 00:41:59
    and big projects and it lets you move
  • 00:42:00
    really fast quick and easy deploys wow I
  • 00:42:03
    must have pre-read when I said make it
  • 00:42:05
    deploy then make it useful crazy process
  • 00:42:07
    that doesn't slow you down like flaky
  • 00:42:09
    tests slow CI fuzzy linters slow PR
  • 00:42:11
    reviews jira as a religion Etc yep and
  • 00:42:16
    about a million other things of course
  • 00:42:18
    shipping slowly should Merit a
  • 00:42:20
    postmortem as much as breaking
  • 00:42:21
    production does holy spicy take that I
  • 00:42:24
    love our industry doesn't run like that
  • 00:42:26
    but it doesn't mean you can't personally
  • 00:42:28
    follow the north star of shipping fast
  • 00:42:30
    couldn't agree more at every scale I
  • 00:42:33
    just dropped the link in the reply to
  • 00:42:34
    this tweet because that was such a great
  • 00:42:36
    article I know I say that a lot but uh
  • 00:42:39
    holy I'm very thankful for this
  • 00:42:40
    author when I found this article
  • 00:42:42
    initially I quickly checked their
  • 00:42:43
    Twitter they were following me I was
  • 00:42:45
    like oh my God awesome I reached out
  • 00:42:47
    they were really hyped and God I'm
  • 00:42:49
    excited for them to see this video
  • 00:42:50
    because that was great I say this a lot
  • 00:42:52
    but that article was great I haven't
  • 00:42:55
    agreed that hard on something I've read
  • 00:42:56
    on stream for a while let me know what
  • 00:42:57
    you think in the comments though and
  • 00:42:58
    what you learned that might benefit you
  • 00:43:00
    as an experience Dev or as a new one
  • 00:43:02
    until next time peace Nars
Tags
  • consells de programació
  • solucions duradores
  • rendiment del codi
  • aprenentatge eficient
  • gestió de la qualitat