0 1 00:00:00,310 --> 00:00:01,090 All right guys. 1 2 00:00:01,090 --> 00:00:03,180 It's Angela from the brewery again. 2 3 00:00:03,180 --> 00:00:09,510 So at this stage I'm presuming that you've probably at some point in your life done a tutorial or a 3 4 00:00:09,510 --> 00:00:16,470 lesson somewhere else out there on the Internet and inevitably at some point you'll probably get stuck 4 5 00:00:16,530 --> 00:00:17,460 on a problem. 5 6 00:00:17,460 --> 00:00:22,890 Now I spend a lot of time thinking about how I can make the course such that you get stuck less often 6 7 00:00:23,070 --> 00:00:28,170 but with programming, it's almost a core part of the learning process that you do get stuck and you get 7 8 00:00:28,170 --> 00:00:29,540 yourself unstuck. 8 9 00:00:29,550 --> 00:00:34,710 So I tend to find that when I get stuck on something I try to see it as a challenge because usually 9 10 00:00:34,710 --> 00:00:40,800 when I solve it and when I figure it out there is a huge sense of satisfaction and there's usually some 10 11 00:00:40,800 --> 00:00:42,860 associated growth. 11 12 00:00:42,900 --> 00:00:49,530 Now having taught over 100,000 students online and offline. I've seen people struggle in lots of different 12 13 00:00:49,530 --> 00:00:50,120 ways. 13 14 00:00:50,220 --> 00:00:55,740 And I just wanted to summarize the steps that you can go through when you get stuck on any sort of programming 14 15 00:00:55,740 --> 00:01:01,090 problem and the framework that you can use to get yourself unstuck in the quickest way possible. 15 16 00:01:01,110 --> 00:01:07,420 Now the first step is to evaluate what is the expectation versus what is the reality. 16 17 00:01:07,440 --> 00:01:14,120 What did you expect your code to do or what did you expect to happen and what actually happened. 17 18 00:01:14,130 --> 00:01:16,310 So every time you run your code. 18 19 00:01:16,470 --> 00:01:22,860 Think to yourself what do I expect to happen and then see what really happened and try to figure out 19 20 00:01:22,980 --> 00:01:24,780 what is causing the difference. 20 21 00:01:24,870 --> 00:01:32,730 Now with Xcode, it's very helpful in pointing out errors in your code and it almost does it too well. 21 22 00:01:33,300 --> 00:01:35,700 Where it starts feeling a bit like a nagging parent. 22 23 00:01:35,850 --> 00:01:38,220 It starts giving you warnings and errors. 23 24 00:01:38,280 --> 00:01:43,560 "Oh you forgot to capitalize that" or "I don't know what you mean when you're writing this" but it can be 24 25 00:01:43,560 --> 00:01:45,040 really helpful as well. 25 26 00:01:45,090 --> 00:01:51,750 And when you get a little read error in your code it usually is accompanied by a little bit of text. 26 27 00:01:51,870 --> 00:01:53,470 And this is the error message. 27 28 00:01:53,700 --> 00:01:58,770 And most of the time it might seem like these error messages are written by aliens because they don't 28 29 00:01:58,770 --> 00:02:00,120 seem to make any sense. 29 30 00:02:00,240 --> 00:02:07,500 But you can quite easily figure out the human meaning in English for it by just putting it into google 30 31 00:02:07,800 --> 00:02:13,620 and you'll usually get lots of different answers as to what the cause might be and how you can fix the 31 32 00:02:13,620 --> 00:02:14,370 problem. 32 33 00:02:14,400 --> 00:02:19,470 And one of the Web sites if you don't already know about it it's going to shortly become your very best 33 34 00:02:19,470 --> 00:02:21,960 friend and that is stackoverflow.com. 34 35 00:02:22,260 --> 00:02:27,930 So I recommend searching for any errors that you come across into Google and then heading towards the 35 36 00:02:27,930 --> 00:02:30,830 Stack Overflow websites that come up as a result. 36 37 00:02:30,870 --> 00:02:34,860 And this is exactly what real life developers do every single day. 37 38 00:02:34,890 --> 00:02:41,130 And in fact I've worked in teams where we will all just go to the pub and have a drink and end the day 38 39 00:02:41,190 --> 00:02:43,360 if stack overflow is no longer working. 39 40 00:02:43,410 --> 00:02:45,300 So it's not cheating. 40 41 00:02:45,390 --> 00:02:48,200 It's all a part of the developer workflow. 41 42 00:02:48,210 --> 00:02:54,570 Now if that still doesn't help or you're confused by the results that you're getting back then it's a good 42 43 00:02:54,570 --> 00:03:01,350 idea to re watch some of the video up to the point when the code started breaking or it started doing 43 44 00:03:01,350 --> 00:03:07,800 something unexpected because in the videos there are always step by step instructions and it's really 44 45 00:03:07,800 --> 00:03:13,620 important that you check to make sure that you haven't made a typo here or there or you haven't capitalized 45 46 00:03:13,620 --> 00:03:18,810 something that shouldn't be capitalized and just re watch the video right before when your code broke 46 47 00:03:19,020 --> 00:03:21,570 in order to try and figure out what might have gone wrong. 47 48 00:03:21,570 --> 00:03:28,790 Now the next step is you can check your code against my code at the end of every tutorial module. 48 49 00:03:28,800 --> 00:03:36,210 There is a completed project that you can download and you can scroll through the completed code compare 49 50 00:03:36,210 --> 00:03:43,050 it to your own and see if there were any typos any errors any mistakes and if it helps you can even 50 51 00:03:43,050 --> 00:03:49,410 copy and paste sections from the completed code into your own module just to see if that line or that 51 52 00:03:49,410 --> 00:03:52,260 paragraph helped to fix the issue. 52 53 00:03:52,260 --> 00:03:56,790 And if that still doesn't solve it then the next step is head towards the Q & A. 53 54 00:03:57,210 --> 00:04:05,220 So underneath every lesson, there is a Q & A section and it's a good idea to check in the lesson when 54 55 00:04:05,220 --> 00:04:12,660 your app has broken to see whether if anybody else had similar issues to you and if you can't find anybody 55 56 00:04:12,660 --> 00:04:19,860 with the same issues then ask in the Q & A. But make sure that you ask your question in the lesson 56 57 00:04:20,100 --> 00:04:25,410 where you're having the issues that way it makes it much easier for other students to be able to learn 57 58 00:04:25,410 --> 00:04:30,870 from your mistakes and also for me to be able to quickly identify what the problem might be. 58 59 00:04:31,050 --> 00:04:37,230 And if you have a question about anything in the tutorial it's a good idea just to include the timestamp 59 60 00:04:37,560 --> 00:04:43,410 at which it occurs in the video so I can quickly watch it and figure out what you're referring to so 60 61 00:04:43,410 --> 00:04:45,270 that I can better answer your questions. 61 62 00:04:45,300 --> 00:04:50,880 Now when you are asking questions in the Q & A the way to get the most helpful responses and solutions 62 63 00:04:51,090 --> 00:04:53,080 is by following a four step approach. 63 64 00:04:53,100 --> 00:04:56,790 So firstly tell us - so myself and other students - 64 65 00:04:56,790 --> 00:04:59,200 What did you expect to happen? Then, 65 66 00:04:59,240 --> 00:05:06,660 what actually happened? And then include a screenshot of all of your code that corresponds to this situation 66 67 00:05:06,960 --> 00:05:12,550 and then include a screenshot of the debug console that includes any errors. 67 68 00:05:12,600 --> 00:05:15,090 If there were any errors or if your app has crashed. 68 69 00:05:15,120 --> 00:05:21,090 So in order to take screenshots on the Mac this shortcut is gonna save you a lot of time and it might 69 70 00:05:21,090 --> 00:05:27,150 be worth noting this down in your notebook when you use command + shift + 4 you get this little crosshair 70 71 00:05:27,180 --> 00:05:33,120 that shows up and you can start clicking and dragging the area that you want to take a screenshot with 71 72 00:05:33,600 --> 00:05:40,560 and it will save it automatically to your desktop which then you can upload into the Q & A area for 72 73 00:05:40,560 --> 00:05:45,300 the lecture and the parts that are really helpful to help you diagnose what went wrong. 73 74 00:05:45,480 --> 00:05:51,000 Are the code that you've written and also whatever is written in the debug console. 74 75 00:05:51,020 --> 00:05:53,910 So this is the part that's in the bottom half of your screen. 75 76 00:05:53,940 --> 00:05:58,860 And this is super helpful for trying to figure out what happen especially if you scroll right to the 76 77 00:05:58,860 --> 00:06:02,190 top as usually where the most helpful messages are. 77 78 00:06:02,340 --> 00:06:09,630 So that's just a brief step by step process on what to do and how to get help when you get stuck and 78 79 00:06:09,630 --> 00:06:13,050 it's important to remember that everybody gets stuck sometimes. 79 80 00:06:13,050 --> 00:06:19,500 I've spent days trying to find a bug in my code and it turns out to be just a comma that was misplaced 80 81 00:06:19,770 --> 00:06:26,790 or a semicolon that was accidentally deleted. And one of the greatest joys - for me anyways - is figuring out 81 82 00:06:26,790 --> 00:06:33,510 these problems and fixing them. So don't worry if you do get stuck. Everybody will try to help you. 82 83 00:06:33,540 --> 00:06:39,070 And just remember that getting stuck and solving it is all a part of the learning journey.