[MUSIC] All right, you've had a chance to practice with our live coding in the Google doc. As you would do in a technical phone screen. It's pretty challenging,huh? Well, if you found it challenging, you're not alone. A lot of people find this task very, very challenging. So in this lesson, we're going to give you some skills to get better at this task. So, by the end of this video, you'll be able to describe common pitfalls. That people run into, when they do a technical phone screen live coding problem. So first, we're going to introduce you to Huang. Huang is a computer scientist here at UCSD and she's a rock star, she's fantastic. But she's agreed to act in these videos. To illustrate some of the pitfalls that people run into. When doing these live coding problems. So, you're going to see Huang answering a question. Like one that you would get in a technical phone screen. Her question is, to convert a string into a number, write a java method to convert a string into a number. So, let's take a look and see how she does in her first attempt. Can you write a message that will convert a string to a number please? >> Okay. I guess I'll start with writing a method. Like, takes in a string and returns integer. I think, if I remember correctly there, is a library call that I can't just use. Yeah, I think I'm done. >> All right, can you do it again, but don't use the library code. >> I'm not sure what to do. >> Well, can you think of a way to process the string maybe character by character to create the number? >> Okay. [NOISE]. Okay, I think I'm done. >> Okay. Can you, maybe think about, I see a little bit problem with what you're doing in the body of the for loop. You have the right idea but are you sure that's going to work? >> Yeah, I'm looping through, basically every digit and then when they go to the next place. I multiply by powers of ten, and then I add them together. It should give you the right value. >> All right. Well, thank you. >> All right. Thank you. >> Okay. So at this point, you're probably saying, poor Huang. She's just not going to get that job. And in fact, the recruiter on the other end is probably thinking pretty much the same thing, like, no, this is a train wreck. How much longer do I have to listen to this poor woman do this coding. Because she's just not someone that we're going to hire. So this is a bad situation all around. You don't want to find yourself in this kind of a situation. Now, what went wrong in Huang's video? We're going to look at four aspects that really are key pitfalls that people run into when they're doing these live coding problems. So the first thing was, that Huang made a whole bunch of assumptions. About the solution to the problem and about the problem itself that she shouldn't have made. The second thing that you probably noticed, was that there was a lot of silence in that video. While she was thinking and typing, she wasn't saying anything. So, it was impossible for the person on the other end of the phone screen to really get into her head. And help her out where she needed help and believe me, interviewers do want to help you. They're not trying to make you fail, They want to see you succeed. So, you need to let them into your head a little bit. The third thing was, that when she did make errors, she wasn't capable of correcting herself in those errors. So, she wasn't taking the recruiters hints and turning them into better solutions. And then finally, when she was finished, she just sort of quit and said, okay, I'm done. That's not how you want to end this kind of a problem. You want tp really go back and think, does my solution work, let me work through some test cases. So, we'll look at each of those aspects of what went wrong in her interview. And show you how she could have done things better. Now, one thing that you might be thinking is, well, you know if she was just technically stronger, things would have gone better. But in fact, theres a ton of room for improvement, even in a situation where you still make mistakes. You're going to make some mistakes in your technical phones screens, that's okay. But the key here is, what can you do to make things go as well as possible. Even in the face of where you don't exactly know the answer. Or you get off on a wrong path initially. It's not all lost, you can get yourself back on track and have a very strong interview. So let's dive in, to look at how to solve these issues