1 00:00:01,000 --> 00:00:06,340 Welcome to another developer fundamental video. I think you know what that means. 2 00:00:06,410 --> 00:00:07,970 "How's it going John?" 3 00:00:08,230 --> 00:00:10,640 "Not bad partner. Follow me I'll cover you." 4 00:00:10,850 --> 00:00:19,710 A developer needs to solve problems that there aren't clear answers to. 5 00:00:19,770 --> 00:00:23,730 The best developers are the ones who are left to their own devices to figure out a problem. 6 00:00:23,900 --> 00:00:28,760 They are able to find errors in their code and solve it themselves. 7 00:00:28,800 --> 00:00:31,530 They have questions or something they don't understand. 8 00:00:31,710 --> 00:00:32,990 Well no problem. 9 00:00:33,120 --> 00:00:36,750 They know how to use the resources they have to figure it out. 10 00:00:36,900 --> 00:00:40,270 At the end of the day we are engineers. 11 00:00:40,440 --> 00:00:44,730 This is what we do and this is a developer fundamental. 12 00:00:44,880 --> 00:00:50,720 How can we solve this problem you're having when I'm not around to answer these questions for you. 13 00:00:50,970 --> 00:00:54,140 So how can you practice this? 14 00:00:54,180 --> 00:00:57,280 Let me introduce you to your most important resource 15 00:00:57,300 --> 00:01:06,130 as a developer: Stackoverflow. Stackoverflow is probably in the top five most used tools by any developer. 16 00:01:06,820 --> 00:01:13,640 Whether you're a game developer or a network admin a security expert or a web developer. 17 00:01:13,750 --> 00:01:19,090 Every day people in the field post questions you get answers from some of the best in the world. 18 00:01:19,480 --> 00:01:25,530 The website is so extensive that the question you have is most likely already asked and answered. 19 00:01:25,650 --> 00:01:32,250 I can't remember how many times stackoverflow has saved me when I was stuck on a problem. 20 00:01:32,670 --> 00:01:37,590 So in this short video I want to show you an important skill a developer should have - that is problem solving. 21 00:01:37,590 --> 00:01:39,260 In real life, You don't have a teacher or 22 00:01:39,260 --> 00:01:44,320 an instructor you can just ask for an answer every time you are stuck. 23 00:01:44,460 --> 00:01:50,170 No, most likely you have to figure things out yourself using the tools at your disposal. 24 00:01:50,890 --> 00:01:55,420 I'm not joking when I say most developers spend half their time on google. 25 00:01:55,600 --> 00:01:58,260 I want to start practicing that muscle. 26 00:01:58,330 --> 00:02:00,250 When you have a question ask yourself, 27 00:02:00,460 --> 00:02:06,700 "Knowing what I know and the tools at my disposal what is the best way for me to get to the end - to solve 28 00:02:06,700 --> 00:02:07,540 this problem?" 29 00:02:07,540 --> 00:02:15,810 The first step when you are stumped is to Google. And most likely one of the first links that pops up 30 00:02:15,900 --> 00:02:23,430 if you include the word Javascript or CSS or HTML 31 00:02:23,430 --> 00:02:24,140 well most likely one of the first links will be stackoverflow. 32 00:02:24,330 --> 00:02:28,740 So let me show you an example and take you through a real life scenario. 33 00:02:28,740 --> 00:02:35,020 I've got a piece of text which is a string and I need to find how many exclamation marks it has. 34 00:02:35,400 --> 00:02:49,320 Well again just Google something along the lines of "check if string contains substring javascript". 35 00:02:49,600 --> 00:02:50,660 So I just Googled this. 36 00:02:50,650 --> 00:02:51,940 Let's see what pops up. 37 00:02:52,070 --> 00:02:58,410 And yeah we have a whole bunch of things, and you can see that the first two links are stackoverflow. 38 00:02:58,520 --> 00:03:02,010 So I would click on this and see that, 39 00:03:02,300 --> 00:03:08,360 all right the question is, you know, "I would expect a string that contains method but there doesn't seem 40 00:03:08,360 --> 00:03:10,760 to be one." well, Javascript doesn't have one. 41 00:03:11,000 --> 00:03:16,650 And people have answered this and you can see over here that there's a few things. 42 00:03:16,670 --> 00:03:21,350 One while there's 49 answers that's a lot there's votes, that's all this. 43 00:03:21,360 --> 00:03:22,300 It's active. 44 00:03:22,310 --> 00:03:27,960 I usually like looking at the both because the top answer will have the most upvotes. 45 00:03:27,980 --> 00:03:30,640 You can see here that this person has a ton. 46 00:03:30,770 --> 00:03:31,880 It also has a checkmark. 47 00:03:31,880 --> 00:03:37,610 This checkmark means that the person who asked the question has verified that this infact works. 48 00:03:37,760 --> 00:03:45,680 And usually I like looking at the top answer and 49 00:03:45,680 --> 00:03:45,920 then kind of browsing through the second answer as well. 50 00:03:45,920 --> 00:03:52,990 Just make sure that I didn't miss anything because sometimes when new things happen this question might 51 00:03:52,990 --> 00:03:54,440 have been ask let's see when it was asked. 52 00:03:54,450 --> 00:03:55,780 It was asked eight years ago. 53 00:03:55,910 --> 00:04:02,720 Maybe the top answer since then, maybe Javascript included a contains method that we can use on strings 54 00:04:02,720 --> 00:04:06,710 and maybe the top answer now isn't exactly the top answer anymore. 55 00:04:06,830 --> 00:04:11,930 So I like scrolling through or making sure that you know maybe the first three answers are good but 56 00:04:12,020 --> 00:04:17,390 if you scroll up over here we see that this person actually kept updating their answer and even has 57 00:04:17,390 --> 00:04:20,339 the ES6 method "includes". 58 00:04:20,690 --> 00:04:26,870 So now that I know I see that, oh! I can just use the 'includes' function and with the 'includes' function 59 00:04:27,200 --> 00:04:30,310 I can just do something like this. 60 00:04:30,350 --> 00:04:33,080 I can say does the string 61 00:04:35,640 --> 00:04:38,060 "Helloooo!" with an exclamation mark. 62 00:04:38,220 --> 00:04:44,210 Well does "Helloooo!" have an exclamation mark? 63 00:04:47,360 --> 00:04:55,060 and I get an error, well because if I look over here it's not 'include' it is 'includes'. Let me try that again 64 00:04:55,480 --> 00:04:56,540 and I get 'true'. 65 00:04:56,830 --> 00:05:00,540 If I do a let's say an 'a'. 66 00:05:00,910 --> 00:05:03,340 I get 'false' because well, it doesn't including anything. 67 00:05:03,490 --> 00:05:05,490 So there you go stackoverflow 68 00:05:05,560 --> 00:05:08,060 just answered my question. 69 00:05:08,320 --> 00:05:11,360 And you can see over here there's a few other things that you can look at. 70 00:05:11,380 --> 00:05:19,240 One is, you can look at some of the comments that people have made and comments usually have votes as 71 00:05:19,240 --> 00:05:22,860 well so I like looking at comments with a lot of votes. 72 00:05:23,030 --> 00:05:27,390 And you can see people have provided valuable links. 73 00:05:27,410 --> 00:05:34,730 You also see that on the right hand side you have linked answer so maybe this page doesn't answer you 74 00:05:34,760 --> 00:05:41,520 but stackoverflow is smart enough to say, "Hey! maybe this is why you're looking for:" 75 00:05:41,520 --> 00:05:42,800 and you have 'related' you have a ton. 76 00:05:42,840 --> 00:05:48,390 The last thing I want to point out is you also want to look at usually the person that's answering. 77 00:05:48,390 --> 00:05:56,810 You see that 'Fabien' which has a lot of gold stars and a lot of points on stackoverflow, 78 00:05:57,060 --> 00:05:58,160 well this person answering. 79 00:05:58,170 --> 00:06:01,620 This person looks pretty pretty credible from all their stats. 80 00:06:01,620 --> 00:06:07,770 So that is most likely a good answer by this and actually know a few companies that look at stackoverflow profiles 81 00:06:07,770 --> 00:06:14,310 to see how good of a developer a person is, because if you're a developer that answers questions 82 00:06:14,310 --> 00:06:17,870 on stackoverflow and provide a lot of value, 83 00:06:18,120 --> 00:06:20,120 well, you must be a good developer. 84 00:06:20,380 --> 00:06:24,380 So remember this Googling and stackoverflow is very important. 85 00:06:24,420 --> 00:06:30,240 If you don't find the answer there you can create an account and 86 00:06:30,240 --> 00:06:31,110 ask yourself the question on stackoverflow. 87 00:06:31,320 --> 00:06:35,310 But better yet go to the zero-to-mastery Slack chat 88 00:06:41,810 --> 00:06:44,750 and if your question wasn't answered on stackoverflow 89 00:06:48,640 --> 00:06:55,460 again, go to our community here and you have a ton of channels that you can ask questions in. 90 00:06:55,540 --> 00:07:01,860 For example if you are on channels of here you'll see all the channels that we have if you have 91 00:07:01,870 --> 00:07:08,830 Bootstrap questions, if you have Github questions, you go into the community and you ask all your questions. 92 00:07:08,830 --> 00:07:11,420 The Javascript channel is always always active. 93 00:07:11,440 --> 00:07:13,590 Very very helpful people on there. 94 00:07:13,660 --> 00:07:20,250 And remember you have a community of developers even after you're done with this course 95 00:07:20,290 --> 00:07:21,400 where they're willing to help you. 96 00:07:21,670 --> 00:07:27,470 So it is good to practice not just asking questions all the time but discovering answers yourself. 97 00:07:27,730 --> 00:07:29,710 Learn to debug your own code. 98 00:07:29,890 --> 00:07:35,720 Develop them muscle and you'll be a great developer. 99 00:07:35,820 --> 00:07:36,040 See you in the next one. Bye-bye