1 00:00:00,390 --> 00:00:05,560 Hello and welcome to this course on swift coding for absolute beginners. 2 00:00:05,940 --> 00:00:08,280 Now, how do you know if this course is actually for you? 3 00:00:08,280 --> 00:00:13,200 Because you've probably looked at quite a few courses so far and wondered which is which and how do 4 00:00:13,200 --> 00:00:14,190 I differentiate? 5 00:00:14,220 --> 00:00:19,740 Well, first of all, I'm going to tell you that I was never a pro developer until about 10 years ago. 6 00:00:19,740 --> 00:00:24,100 So I learnt probably at the same age as you are trying to learn. 7 00:00:24,330 --> 00:00:30,510 So I understand what it's like to hear big words thrown around and not understand what any of them mean 8 00:00:30,660 --> 00:00:32,730 and just feel generally a little bit lost. 9 00:00:33,770 --> 00:00:39,950 What I try to do in this course is introduce programming concepts in Swift, but they apply to all languages 10 00:00:39,950 --> 00:00:45,050 really in a way that you can understand quickly and easily. 11 00:00:45,260 --> 00:00:51,140 So you can then build on that to build your own fully functioning apps without having to rely on courses 12 00:00:51,140 --> 00:00:54,720 like this or people like me to hold your hand and show you what's going on. 13 00:00:55,520 --> 00:00:58,090 So let's get on to the content of the course. 14 00:00:58,640 --> 00:01:02,960 I've got a list of files here that I've prepared and are uploaded into the course. 15 00:01:03,230 --> 00:01:07,490 We're going to start with the very basics and the basics consist of variables. 16 00:01:07,730 --> 00:01:11,110 Variables are just little bits of information in memory. 17 00:01:11,690 --> 00:01:14,350 There are a few caveats to that. 18 00:01:14,360 --> 00:01:19,040 Of course, there are a few things we need to be aware of when it comes to variables, but I run you 19 00:01:19,040 --> 00:01:20,800 through all of that throughout the course. 20 00:01:21,260 --> 00:01:27,860 Now, it's worth noting that after each section there is a task and a bit of homework. 21 00:01:27,860 --> 00:01:29,840 That's after every single lecture. 22 00:01:30,050 --> 00:01:34,700 And that's the best way that you can learn how to code is to actually do it. 23 00:01:35,030 --> 00:01:40,910 The tasks get progressively harder as we go through, but harder tasks make for stronger people. 24 00:01:40,910 --> 00:01:41,300 Right? 25 00:01:42,170 --> 00:01:43,250 So that's the variables. 26 00:01:43,250 --> 00:01:48,620 Then we're going to look at type conversions and swift, which is a big source of terrible crashes and 27 00:01:48,620 --> 00:01:50,090 errors in many, many apps. 28 00:01:50,300 --> 00:01:56,090 And I'm going to show you how to neatly sidestep that using type conversions or not using them as a 29 00:01:56,090 --> 00:01:57,350 good engineer should do. 30 00:01:58,270 --> 00:02:01,030 Then we're going to look at tuples, I'll say no more about that. 31 00:02:02,250 --> 00:02:09,450 But I will say something about options, options solve the no problem, the no problem is something 32 00:02:09,450 --> 00:02:11,820 that's plagued many, many languages over the years. 33 00:02:12,060 --> 00:02:17,790 And if you get a no reference exception in a program, don't worry about what that means. 34 00:02:17,820 --> 00:02:20,460 It doesn't matter what program it is, the whole thing will crash. 35 00:02:20,730 --> 00:02:24,390 OK, so we definitely do not want that because we get bad reviews. 36 00:02:24,720 --> 00:02:25,920 I've had those, trust me. 37 00:02:27,000 --> 00:02:32,760 We're going to look then at operators and swift and collections such as ARray's, which there are just 38 00:02:32,760 --> 00:02:34,860 collections of variables. 39 00:02:35,910 --> 00:02:39,540 And as always, with all of these, you get the source code. 40 00:02:39,810 --> 00:02:43,700 You also get the homework and the solutions for those. 41 00:02:44,130 --> 00:02:45,720 So what else are we going to do in this? 42 00:02:45,990 --> 00:02:48,300 Well, let's look at some advanced swift code. 43 00:02:48,720 --> 00:02:53,490 We are going to control flow in swift using for in loops. 44 00:02:53,640 --> 00:02:57,930 And I'm going to show you a few tricks that perhaps you didn't know, even if you did know about for 45 00:02:57,930 --> 00:03:03,900 loops before this, then we're going to look at conditional statements such as, if else, switch case. 46 00:03:04,290 --> 00:03:09,930 These will control the some of the flow through your app and decide which path your code is going to 47 00:03:09,930 --> 00:03:10,430 go down. 48 00:03:10,740 --> 00:03:14,610 I'm also going to show you ways to use them that won't end up in spaghetti code. 49 00:03:14,820 --> 00:03:21,480 So many beginners, when they first start out, have a bunch of code they write and it's really difficult 50 00:03:21,480 --> 00:03:22,710 to track what's going on. 51 00:03:22,710 --> 00:03:26,490 And when you come to change it six months later, forget about it. 52 00:03:26,520 --> 00:03:30,110 You're not going to know what's what and you will start again. 53 00:03:30,240 --> 00:03:32,190 So I'm going to show you how to avoid those problems. 54 00:03:32,700 --> 00:03:35,340 And I'm going to look at control, transfer and functions. 55 00:03:35,520 --> 00:03:39,330 Functions are a very basic element in programming functions or methods. 56 00:03:40,050 --> 00:03:42,060 So I'll show you what those are all about here. 57 00:03:43,140 --> 00:03:44,460 What have we got next here? 58 00:03:44,670 --> 00:03:45,930 We've got nested functions. 59 00:03:46,230 --> 00:03:50,040 Well, we'll discover that in the course we got enumerations. 60 00:03:50,220 --> 00:03:53,580 Now, enumerations are so underused by people. 61 00:03:54,000 --> 00:03:56,880 And I think it's because people don't teach them when they're beginners. 62 00:03:57,060 --> 00:03:58,860 The enumerations are your friend. 63 00:03:59,100 --> 00:04:03,420 They stop you from having, again, that spaghetti code that you don't need. 64 00:04:04,290 --> 00:04:09,900 They also prevent you from having mistakes, the kinds of which I'll reveal in that section. 65 00:04:10,620 --> 00:04:16,260 Then we're going to look at classes, how, when and why we should use classes and how they organize 66 00:04:16,260 --> 00:04:17,550 things around our code. 67 00:04:17,790 --> 00:04:21,690 And then there are two items I need you to do in classes. 68 00:04:21,690 --> 00:04:27,240 Solution one, and solution to the tasks themselves aren't actually that difficult in this course. 69 00:04:27,240 --> 00:04:30,930 But each task sometimes builds on previous items. 70 00:04:31,050 --> 00:04:36,150 And there are one or two tasks where I really tax your brain because I want you to understand what's 71 00:04:36,150 --> 00:04:36,810 going on here. 72 00:04:37,440 --> 00:04:42,510 And the way I text your brain is I bring up previous subjects from a couple lectures ago and I get you 73 00:04:42,510 --> 00:04:45,870 to integrate those in the tasks that you are about to do. 74 00:04:46,200 --> 00:04:52,830 So all in all, this entire course is geared up to make you a top developer in Swift. 75 00:04:52,950 --> 00:04:59,360 It doesn't matter if you're going to be using iOS, Mac iPad, Apple Watch, Apple TV, it doesn't matter. 76 00:05:00,000 --> 00:05:07,110 This is the very foundation that you need in order to become a proper developer. 77 00:05:08,070 --> 00:05:11,280 So if you're excited about starting the course, then let's begin.