Show notes
Hey friends so today is office hour stay and I am answered a question on
office hours that I thought I'd share with you and it's from Salem and thequestion was hey can't can you walk us through the process for when you getstuck on a problem and what I do is I try to find where the problem is.I don't try to just do a bunch of random things and hope that one of them
works or the solves a bug or whatever because what can happen is, you canimplement the wrong solution in the right place and and move the problemandSo that you like you haven't actually saw the problem you just moved itsomewhere else and now you think that you've solved the problem but you'regonna hear about this in the future and or like you might implementsomething wrong and and somebody else can create this problem all overagain, so you need to understand why the problem exists as well as how youcan avoid it in the future and then it can actually help to have a test inplace to make sure that the problem doesn't show up again, so one thingthat can be helpful is to write a test that that reproduces the problemfirst because that way like,You just have a much better iteration cycle ondid I fix it no or yes or whatever but another really critical piece ofthis is to isolate that problem so remove as much as you can and the bestway to do this is to reproduce it in a small isolated example, so try totake it outside of your app just install the dependencies that you know,you need or whatever bring in the code that you know, you need andreproduce it in that small example sometimes that's possible sometimes it'snot but that's the best possible thing.That you can do is to just remove as much as you can in a completely
isolated example sometimes it's a very difficult so if you can't then thenext best thing is to take your existing app where you're experiencing theproblem and remove pieces of code until ultimately eventually you'll windup with nothing on the page except the component that's giving you theheadache or whatever the case may be or you're running only a single fileon node that is causing the problem and and that can help you isolate theproblem sometimes that's difficult and so especially when you're talkingabout like async stuff rate.Conditions or whatever console logs can be really helpful in in those
situations but yeah really finding where the problem is and if it's aregression then finding which commit caused the regression can also bequite helpful so doing a get bisect whether using the command or just doingit kind of by hand can also be really helpful in isolating the problem, sohopefully all that is helpful good luck to you in dealing with these typesof problems, it's no fun, but I know you can do it have a great day.
