1 00:00:04,057 --> 00:00:08,951 I'd like to welcome up our first speaker of the day. 2 00:00:08,951 --> 00:00:13,512 She is a senior engineer at Dev, where she builds community and 3 00:00:13,512 --> 00:00:17,139 helps improve the software careers of millions. 4 00:00:17,139 --> 00:00:19,710 She enjoys building and breaking code, 5 00:00:19,710 --> 00:00:24,257 though loves creating empathetic engineering teams a whole lot more. 6 00:00:24,257 --> 00:00:29,536 She is the creator of BaseCS and BaseDS, two writing series exploring 7 00:00:29,536 --> 00:00:34,477 the fundamentals of computer science and distributed systems. 8 00:00:34,477 --> 00:00:38,897 She also co-hosts the BaseCS podcast, and 9 00:00:38,897 --> 00:00:44,648 is the producer of the BaseCS and Byte Size video series. 10 00:00:44,648 --> 00:00:47,855 Please welcome Valdehi Joshi. 11 00:00:47,855 --> 00:00:49,139 Thank you. 12 00:00:49,139 --> 00:00:52,642 >> I'm so excited to be speaking at the Treehouse festival and 13 00:00:52,642 --> 00:00:54,192 to be here with all of you. 14 00:00:54,192 --> 00:00:58,651 And I'm especially excited to be sharing a little bit about one of my 15 00:00:58,651 --> 00:01:01,244 favorite topics, computer science. 16 00:01:01,244 --> 00:01:04,450 So, a little bit about me to start. 17 00:01:04,450 --> 00:01:09,832 I'm a senior software engineer at Forem, the open source software that powers Dev. 18 00:01:09,832 --> 00:01:13,747 And I also think it's worth mentioning that I did not go to school for 19 00:01:13,747 --> 00:01:16,506 computer science and I don't have a CS degree. 20 00:01:16,506 --> 00:01:19,381 In fact, my degree is in English. 21 00:01:19,381 --> 00:01:22,907 So I learned to code at a boot camp about six years ago, and 22 00:01:22,907 --> 00:01:27,477 I have been working professionally in the tech industry ever since then. 23 00:01:27,477 --> 00:01:29,898 And when I was first learning to code, 24 00:01:29,898 --> 00:01:33,084 I didn't really know what computer science was. 25 00:01:33,084 --> 00:01:35,691 It was only when I started interviewing for 26 00:01:35,691 --> 00:01:40,617 my second engineering role that I started to hear a few computer science terms and 27 00:01:40,617 --> 00:01:45,048 concepts being thrown around and they came up in technical interviews. 28 00:01:45,048 --> 00:01:47,226 And in these technical interviews, 29 00:01:47,226 --> 00:01:51,521 I started to realize that these concepts were coming up again and again. 30 00:01:51,521 --> 00:01:55,737 And I didn't really know that much about what people were talking about. 31 00:01:55,737 --> 00:01:59,940 I didn't really know the terminology and the jargon that they were using. 32 00:01:59,940 --> 00:02:05,443 And it was that experience that made me want to learn more about computer science, 33 00:02:05,443 --> 00:02:09,208 and it made me want to fill in those gaps in my knowledge. 34 00:02:09,208 --> 00:02:11,967 I'm someone who really doesn't like being out of the loop and 35 00:02:11,967 --> 00:02:13,361 not knowing what's going on. 36 00:02:13,361 --> 00:02:17,978 So that was pretty good motivating factor. 37 00:02:17,978 --> 00:02:22,628 And when I decided that I wanted to fill in those gaps in my knowledge, 38 00:02:22,628 --> 00:02:27,197 I decided that the easiest way to do that would just be to teach myself 39 00:02:27,197 --> 00:02:32,030 computer science, which is a pretty bold idea but definitely doable. 40 00:02:32,030 --> 00:02:33,221 A lot of people have done it. 41 00:02:33,221 --> 00:02:39,180 And the way that I went about doing this was sort of creating a schedule for 42 00:02:39,180 --> 00:02:44,261 myself and I decided that for a whole year, I was going to learn 43 00:02:44,261 --> 00:02:51,031 one new computer science concept every single week for the entire calendar year. 44 00:02:51,031 --> 00:02:55,908 And I decided that I was going to write about every new concept that I 45 00:02:55,908 --> 00:02:58,534 was learning during that year too. 46 00:02:58,534 --> 00:03:03,171 And the culmination of this project was something called BaseCS, 47 00:03:03,171 --> 00:03:07,889 a year long writing series that included all of the computer science 48 00:03:07,889 --> 00:03:11,475 topics that I taught myself throughout that year. 49 00:03:11,475 --> 00:03:17,107 So if you've ever heard CS terms or concepts being used in a conversation and 50 00:03:17,107 --> 00:03:23,092 find yourself nodding along, but you didn't really know that much about them, 51 00:03:23,092 --> 00:03:25,836 fear not because you're not alone. 52 00:03:25,836 --> 00:03:30,573 And that is exactly the way that I started out too. 53 00:03:30,573 --> 00:03:33,485 And my hope is that by the end of this talk, 54 00:03:33,485 --> 00:03:38,232 you'll have a better sense of what computer science is, and some of 55 00:03:38,232 --> 00:03:43,258 the core concepts within the fields and how to go about learning it too. 56 00:03:43,258 --> 00:03:46,744 And the other thing I wanna note is that it's impossible 57 00:03:46,744 --> 00:03:50,911 to cover everything about computer science in just 25 minutes. 58 00:03:50,911 --> 00:03:54,932 It's a huge field and 25 minutes is really not a long time. 59 00:03:54,932 --> 00:03:59,403 But hopefully, this is going to be a helpful first step in your 60 00:03:59,403 --> 00:04:03,102 journey in learning more about computer science. 61 00:04:03,102 --> 00:04:06,685 So let's start with the basics. 62 00:04:06,685 --> 00:04:09,575 What on Earth even is computer science? 63 00:04:09,575 --> 00:04:14,742 Well, if you look up the definition of the field, you'll see that 64 00:04:14,742 --> 00:04:20,577 computer science is defined as the study of computation and information. 65 00:04:20,577 --> 00:04:24,074 If we look up the definition of computer science, 66 00:04:24,074 --> 00:04:29,906 we can see that it's actually not just one field, there's all these subfields and 67 00:04:29,906 --> 00:04:33,424 specific discrete topics within that field too. 68 00:04:33,424 --> 00:04:37,342 But in my opinion, computation and information, 69 00:04:37,342 --> 00:04:43,550 those two words really do encompass the way that I think about computer science. 70 00:04:43,550 --> 00:04:50,592 If you think about it, computation really just means calculation. 71 00:04:50,592 --> 00:04:56,131 And information really just means data. 72 00:04:56,131 --> 00:05:03,873 Computer science is a combination of making calculations and dealing with data. 73 00:05:03,873 --> 00:05:08,122 If you look at CS with this lens, with this perspective, 74 00:05:08,122 --> 00:05:14,143 you start to see that understanding some fundamentals of computer science helps 75 00:05:14,143 --> 00:05:19,474 us think about and interact with and manipulate information and data. 76 00:05:19,474 --> 00:05:25,377 And oftentimes, we're making calculations about that data and 77 00:05:25,377 --> 00:05:29,574 figuring out how to modify it to fit our needs. 78 00:05:29,574 --> 00:05:35,201 Now, if you're learning to code, it can be hard to know how these two things, 79 00:05:35,201 --> 00:05:39,575 computation and information, how they fit into your life. 80 00:05:41,595 --> 00:05:45,741 And that can make it hard to know where to start learning computer science. 81 00:05:45,741 --> 00:05:50,642 But the reality is that you've probably already thought about both 82 00:05:50,642 --> 00:05:55,391 of these concepts in some capacity whether you realize it or not. 83 00:05:55,391 --> 00:05:59,199 If you've ever thought about how to structure some data, 84 00:05:59,199 --> 00:06:02,385 you were brushing up against computer science. 85 00:06:02,385 --> 00:06:06,814 If you've ever thought about how to sort through or find some data, 86 00:06:06,814 --> 00:06:09,456 you were dabbling in computer science. 87 00:06:09,456 --> 00:06:13,697 And if you've ever thought about how you can make your code 88 00:06:13,697 --> 00:06:17,595 just a little bit faster and a little more efficient, 89 00:06:17,595 --> 00:06:22,024 you're flexing your computer science muscles then, too. 90 00:06:22,024 --> 00:06:27,003 And it's this idea of computation and information that maps really quite 91 00:06:27,003 --> 00:06:30,630 well to two of the core concepts in computer science. 92 00:06:30,630 --> 00:06:33,928 Data structures and algorithms. 93 00:06:33,928 --> 00:06:39,903 Now, data structures are information part of computer science, 94 00:06:39,903 --> 00:06:44,286 while algorithms are that computation aspect. 95 00:06:44,286 --> 00:06:49,018 And data structures and algorithms were the two main concepts that I first 96 00:06:49,018 --> 00:06:52,317 started learning when I wanted to teach myself CS. 97 00:06:52,317 --> 00:06:56,988 And I found that if you start with these two topics first, 98 00:06:56,988 --> 00:07:01,868 you'll often run into other related topics along the way. 99 00:07:01,868 --> 00:07:06,428 So let's start with data structures first. 100 00:07:06,428 --> 00:07:12,611 A data structure is really just a way of organizing some data. 101 00:07:12,611 --> 00:07:14,763 If you're learning to code, 102 00:07:14,763 --> 00:07:19,934 you probably already run into data structures in some shape or format. 103 00:07:19,934 --> 00:07:25,683 For example, arrays and objects are actually both just 104 00:07:25,683 --> 00:07:30,836 data structures, so are sets and dictionaries. 105 00:07:30,836 --> 00:07:34,635 When you're learning to code, you are forced to use the data structures 106 00:07:34,635 --> 00:07:38,201 that are built into whatever programming language you're using. 107 00:07:38,201 --> 00:07:42,160 Because that's what you have to use in order to store any data that you 108 00:07:42,160 --> 00:07:42,912 care about. 109 00:07:42,912 --> 00:07:45,589 And computer science is really no different. 110 00:07:45,589 --> 00:07:46,857 When you study CS, 111 00:07:46,857 --> 00:07:52,502 you'll encounter different kinds of data structures that let you store your data. 112 00:07:52,502 --> 00:07:56,543 The only difference is that you might have not seen them in the programming language 113 00:07:56,543 --> 00:07:57,882 you're learning before. 114 00:07:59,939 --> 00:08:04,446 For example, you might have heard of and use something called an array. 115 00:08:04,446 --> 00:08:08,392 But arrays aren't the only way of organizing data. 116 00:08:08,392 --> 00:08:11,979 There's also something called a linked list, 117 00:08:11,979 --> 00:08:16,931 which is a linear data structure that orders data sequentially. 118 00:08:16,931 --> 00:08:19,341 Here's an example. 119 00:08:19,341 --> 00:08:24,272 Each element within this linked list is stored within something 120 00:08:24,272 --> 00:08:27,666 called a node and each node holds that data. 121 00:08:27,666 --> 00:08:31,778 Each node also has a pointer or reference to the next node and 122 00:08:31,778 --> 00:08:35,741 that's sort of where the linking of the list comes from. 123 00:08:35,741 --> 00:08:39,691 Now even if you've never seen this data structure before, 124 00:08:39,691 --> 00:08:44,835 at the end of the day, all this is, is just another way to organize your data. 125 00:08:44,835 --> 00:08:50,228 Learning about different data structures through the eyes of computer science 126 00:08:50,228 --> 00:08:55,321 can show us the different ways to structure information and how to hold it. 127 00:08:55,321 --> 00:09:01,383 And it can also show us scenarios when certain data structures are more useful 128 00:09:01,383 --> 00:09:07,835 and situations when they're less useful and maybe not the right tool for the job. 129 00:09:07,835 --> 00:09:08,774 For example, 130 00:09:08,774 --> 00:09:13,711 the Ruby programming language does have an array data structure built in. 131 00:09:13,711 --> 00:09:17,943 But what it doesn't have is a built in binary tree data structure, 132 00:09:17,943 --> 00:09:20,675 which is what's illustrated right here. 133 00:09:20,675 --> 00:09:24,879 Now, you might not have seen a binary tree data structure before, but 134 00:09:24,879 --> 00:09:29,296 keep in mind all it is is just another way of structuring and holding data. 135 00:09:29,296 --> 00:09:33,869 Immediately off the bat, even if we've never seen a binary tree before, 136 00:09:33,869 --> 00:09:37,944 we can see that they're different from arrays and linked lists. 137 00:09:37,944 --> 00:09:43,262 They're non linear, which means that their data is organized non sequentially. 138 00:09:43,262 --> 00:09:47,179 But they still hold data, they have nodes and they have pointers and 139 00:09:47,179 --> 00:09:50,486 they're just another way of structuring information. 140 00:09:50,486 --> 00:09:55,468 And sometimes, using a binary tree might be the right choice. 141 00:09:55,468 --> 00:09:58,590 And other times, using an array might be the better choice. 142 00:09:58,590 --> 00:10:03,813 And as you learn about different kinds of data structures, 143 00:10:03,813 --> 00:10:09,251 you also start to see how and where they are used in computing. 144 00:10:09,251 --> 00:10:13,955 For example, binary trees, like this one illustrated here, 145 00:10:13,955 --> 00:10:16,094 are used within databases. 146 00:10:16,094 --> 00:10:21,053 So in the future, if you're ever dealing with databases, 147 00:10:21,053 --> 00:10:26,720 knowing what a binary tree is and how it works can be really helpful. 148 00:10:26,720 --> 00:10:31,760 Some fundamental data structures that you might encounter while learning 149 00:10:31,760 --> 00:10:37,132 computer science are linked lists, trees, graphs, hash tables, and sets. 150 00:10:39,548 --> 00:10:43,015 So now that we've sort of covered data structures, 151 00:10:43,015 --> 00:10:47,130 let's look at the other main concept, which is algorithms. 152 00:10:47,130 --> 00:10:51,775 Now an algorithm can seem like a scary word, but 153 00:10:51,775 --> 00:10:55,849 really all it is is a set of instructions. 154 00:10:55,849 --> 00:11:01,666 And those instructions are used for deciding how to perform a calculation. 155 00:11:01,666 --> 00:11:06,473 In other words, an algorithm is basically just a function or a method. 156 00:11:06,473 --> 00:11:11,495 And we use that function or method to help us compute something. 157 00:11:11,495 --> 00:11:15,511 Algorithms actually couple pretty well with data structures. 158 00:11:15,511 --> 00:11:19,456 Because every time we have to interact with some data, 159 00:11:19,456 --> 00:11:23,143 we usually have to perform some computation on it, 160 00:11:23,143 --> 00:11:27,450 which means that we're relying on an algorithm to do that. 161 00:11:27,450 --> 00:11:31,704 For example, remember that binary tree we just saw a minute ago? 162 00:11:31,704 --> 00:11:36,034 Here's an illustration of how to insert an element into that tree. 163 00:11:36,034 --> 00:11:41,723 Now, inserting data into a data structure needs a set of instructions. 164 00:11:41,723 --> 00:11:45,755 There's no way for the computer or for a program to know how to do this, so 165 00:11:45,755 --> 00:11:48,350 we have to give it instructions to tell it how. 166 00:11:48,350 --> 00:11:51,823 And guess what, those instructions are just an algorithm. 167 00:11:51,823 --> 00:11:57,053 So in this case, the instructions to add some data to a binary 168 00:11:57,053 --> 00:12:02,200 tree are the insertion algorithm for this data structure. 169 00:12:02,200 --> 00:12:06,922 And you can imagine how, just as there's an insertion algorithm for 170 00:12:06,922 --> 00:12:10,914 this binary tree, there's also a deletion algorithm for 171 00:12:10,914 --> 00:12:13,773 removing some data from the binary tree. 172 00:12:13,773 --> 00:12:19,113 Anytime that we deal with inserting, deleting, searching through, 173 00:12:19,113 --> 00:12:25,176 sorting through some sort of data, we're dealing with an algorithm to do that. 174 00:12:25,176 --> 00:12:29,399 And as you learn more about data structures, you will naturally learn about 175 00:12:29,399 --> 00:12:32,635 the algorithms that are specific to that data structure. 176 00:12:34,308 --> 00:12:38,217 There are also some algorithms that are engineered to solve 177 00:12:38,217 --> 00:12:39,944 a very specific problem. 178 00:12:39,944 --> 00:12:44,014 For example, in this illustration you can see a binary search 179 00:12:44,014 --> 00:12:47,310 algorithm that's being performed on a dataset. 180 00:12:47,310 --> 00:12:52,716 And the binary search algorithm is something that's used specifically 181 00:12:52,716 --> 00:12:57,774 to search for or find an element within a sorted collection of data. 182 00:12:57,774 --> 00:13:01,733 As you learn more about different algorithms, you'll start to see 183 00:13:01,733 --> 00:13:05,984 that many algorithms build on other algorithms, which is pretty cool. 184 00:13:05,984 --> 00:13:11,754 So as you grow your knowledge about how different algorithms perform, 185 00:13:11,754 --> 00:13:15,804 you'll start to see them pop up in the real world. 186 00:13:15,804 --> 00:13:19,166 And as you learn the fundamentals of algorithms, 187 00:13:19,166 --> 00:13:23,980 it'll become easier to learn more complex versions of the same ideas. 188 00:13:23,980 --> 00:13:28,779 So now that we know about data structures and algorithms, there's a third concept 189 00:13:28,779 --> 00:13:32,496 which I didn't mention before, but I think it's pretty cool. 190 00:13:32,496 --> 00:13:38,021 I'm gonna throw it in there, there's a third concept which is big O notation. 191 00:13:38,021 --> 00:13:43,198 And to me it sort of sits right between data structures and algorithms. 192 00:13:43,198 --> 00:13:47,880 Big O notation is a way of measuring efficiency. 193 00:13:47,880 --> 00:13:53,054 And efficiency is something that actually applies to data structures and 194 00:13:53,054 --> 00:13:54,228 to algorithms. 195 00:13:54,228 --> 00:13:59,163 In fact, we think about efficiency a lot when we're writing code and 196 00:13:59,163 --> 00:14:03,941 when we're thinking about really intense forms of computation. 197 00:14:03,941 --> 00:14:07,005 Now, what is big O notation? 198 00:14:07,005 --> 00:14:11,580 It's really just a way to express the amount of time and 199 00:14:11,580 --> 00:14:14,380 space that something requires. 200 00:14:14,380 --> 00:14:20,841 In other words, we can use big O notation to talk about how efficient something is. 201 00:14:20,841 --> 00:14:24,695 Now this could mean how efficient it is in terms of space, 202 00:14:24,695 --> 00:14:28,406 it could also mean how efficient it is in terms of time. 203 00:14:28,406 --> 00:14:33,361 Something to note is that we always talk about efficiency and 204 00:14:33,361 --> 00:14:37,548 big O notation in the worst case scenario context. 205 00:14:37,548 --> 00:14:43,297 So we can use big O to talk about how well something performs, and 206 00:14:43,297 --> 00:14:50,027 decide on if we can improve on that and make it do better and perform better. 207 00:14:50,027 --> 00:14:55,273 And we can talk about big O in terms of both data structures and algorithms. 208 00:14:55,273 --> 00:15:00,566 So whenever we ask ourselves, how much time does it take to run this algorithm? 209 00:15:00,566 --> 00:15:07,381 What we're really asking is, what's the big O time complexity of this algorithm? 210 00:15:07,381 --> 00:15:13,200 Or, how will this algorithm perform in the worst case scenario? 211 00:15:13,200 --> 00:15:16,786 All three of those questions really are equivalent, and 212 00:15:16,786 --> 00:15:20,681 they're all talking about how efficient this algorithm is. 213 00:15:20,681 --> 00:15:25,737 So when we evaluate how an algorithm runs, we want to know how 214 00:15:25,737 --> 00:15:31,306 much time it will take for that algorithm to run as its input grows. 215 00:15:31,306 --> 00:15:34,412 If we give the algorithm more elements to process or 216 00:15:34,412 --> 00:15:37,821 perform computations on, what does the algorithm do? 217 00:15:37,821 --> 00:15:41,167 Does it slow down, does it remain the same? 218 00:15:41,167 --> 00:15:44,871 That's how we can evaluate how it behaves. 219 00:15:44,871 --> 00:15:52,218 An amazingly efficient algorithm is one that runs in constant time or O(1). 220 00:15:52,218 --> 00:15:56,797 Now this time complexity just means that the algorithm will always take 221 00:15:56,797 --> 00:16:01,550 the same amount of time to run, regardless of how its input grows in size. 222 00:16:01,550 --> 00:16:06,587 So an algorithm that is running in constant time behaves the same 223 00:16:06,587 --> 00:16:11,922 if you give it 10 elements or if you give it 10 million elements. 224 00:16:11,922 --> 00:16:14,361 It's always still just as fast, which is pretty cool. 225 00:16:14,361 --> 00:16:17,926 But these algorithms are a little bit hard to come by. 226 00:16:17,926 --> 00:16:22,104 More than likely what you'll see in the real world is some 227 00:16:22,104 --> 00:16:27,084 algorithm that runs in linear time, those are a bit more standard. 228 00:16:27,084 --> 00:16:30,327 And we can say that those run in O(n) time, 229 00:16:30,327 --> 00:16:35,248 where n is the variable that represents the size of the input data. 230 00:16:35,248 --> 00:16:38,881 So n could be 10, if you're passing the algorithm 10 elements, or 231 00:16:38,881 --> 00:16:42,591 it could be 10 million, if you're passing it 10 million elements. 232 00:16:42,591 --> 00:16:45,691 And when something runs in linear time, 233 00:16:45,691 --> 00:16:49,703 what that means is that as our input data increases, 234 00:16:49,703 --> 00:16:55,923 our algorithm's runtime increases linearly in proportion to that input data. 235 00:16:55,923 --> 00:17:00,388 On the other hand, a terribly slow algorithm might run in 236 00:17:00,388 --> 00:17:04,773 something called quadratic time, or O(n squared). 237 00:17:04,773 --> 00:17:09,260 Now, you can imagine, if n is the input data, 238 00:17:09,260 --> 00:17:13,991 how that algorithm runs as the input data grows. 239 00:17:13,991 --> 00:17:19,270 Basically an algorithm that runs in quadratic time is one that gets extremely, 240 00:17:19,270 --> 00:17:22,281 extremely slow as its input data increases. 241 00:17:22,281 --> 00:17:28,238 Its performance is directly proportional to the square of the size of its input. 242 00:17:28,238 --> 00:17:34,144 And you can see this kind of algorithm a lot when you write code that has lots 243 00:17:34,144 --> 00:17:40,823 of nested loops within it, they're often algorithms that run in quadratic time. 244 00:17:40,823 --> 00:17:43,970 And those are things to avoid, and now you know what they look like. 245 00:17:45,871 --> 00:17:50,361 But as I mentioned, we don't just need to be efficient when it comes to time, 246 00:17:50,361 --> 00:17:53,692 we also care about efficiency when it comes to space too. 247 00:17:53,692 --> 00:17:58,486 We usually wanna know how much space or memory an algorithm will use up. 248 00:17:58,486 --> 00:18:03,436 So if you find yourself asking, how much memory will this algorithm require, 249 00:18:03,436 --> 00:18:08,775 you're really just asking, what's the big O space complexity of this algorithm? 250 00:18:08,775 --> 00:18:11,957 Another way of phrasing that same question is, 251 00:18:11,957 --> 00:18:16,262 how much memory will this algorithm require as its input grows? 252 00:18:16,262 --> 00:18:21,633 And measuring efficiency doesn't just apply to algorithms, 253 00:18:21,633 --> 00:18:24,680 it applies to data structures too. 254 00:18:24,680 --> 00:18:28,681 If you find yourself asking, how much space does the data structure take up? 255 00:18:28,681 --> 00:18:33,266 Then you're really asking about the big O space complexity of that data structure. 256 00:18:33,266 --> 00:18:36,731 So you can see how you can talk about and 257 00:18:36,731 --> 00:18:42,268 consider efficiency with lots of different perspectives. 258 00:18:42,268 --> 00:18:48,011 Big O notation is pretty cool, because it allows us to evaluate the space and 259 00:18:48,011 --> 00:18:52,257 time complexity of data structures and of algorithms. 260 00:18:52,257 --> 00:18:58,383 And it gives us this language to help us standardize how to talk about efficiency. 261 00:18:58,383 --> 00:19:02,790 So all three of these core concepts, data structures, 262 00:19:02,790 --> 00:19:07,683 algorithms, big O notation, they all build on one another. 263 00:19:07,683 --> 00:19:10,489 And as you learn a little bit about one, 264 00:19:10,489 --> 00:19:15,349 you reinforce your knowledge and understanding about the others. 265 00:19:15,349 --> 00:19:22,086 So the question is, of course, how do you go about learning all of this stuff? 266 00:19:22,086 --> 00:19:26,771 I had to answer this question when I was teaching myself computer science, and 267 00:19:26,771 --> 00:19:29,046 there's really no one right answer. 268 00:19:29,046 --> 00:19:34,069 But I do wanna share a couple of strategies that really helped me when I 269 00:19:34,069 --> 00:19:39,372 wanted to learn these concepts, but I didn't really know how to start. 270 00:19:39,372 --> 00:19:45,453 So my first piece of advice is to just pick one topic and start learning. 271 00:19:45,453 --> 00:19:50,034 From there, you'll stumble upon other related topics, and 272 00:19:50,034 --> 00:19:52,865 you'll expand what you don't know. 273 00:19:52,865 --> 00:19:53,625 And that's okay, 274 00:19:53,625 --> 00:19:56,600 because the first step to knowing what to learn is knowing what you don't know. 275 00:19:56,600 --> 00:20:01,901 So just pick one topic and focus on understanding that really well. 276 00:20:01,901 --> 00:20:06,265 And maybe that means you start with a data structure that you've always wanted to 277 00:20:06,265 --> 00:20:09,552 know about, or maybe you learn about a specific algorithm. 278 00:20:09,552 --> 00:20:13,677 Or you can do what I did, which was just to learn what binary is, and 279 00:20:13,677 --> 00:20:18,471 how to count in binary, which is something I didn't even cover in this talk, 280 00:20:18,471 --> 00:20:20,057 but is also pretty cool. 281 00:20:22,180 --> 00:20:24,762 Next, figure out how you learn, and 282 00:20:24,762 --> 00:20:29,193 then find a resource that works best with your learning style. 283 00:20:29,193 --> 00:20:31,670 If you're an auditory learner, 284 00:20:31,670 --> 00:20:35,832 maybe that means you need to find a really good podcast. 285 00:20:35,832 --> 00:20:38,631 And if you're a visual learner, find those books, and 286 00:20:38,631 --> 00:20:41,861 blog post that really are going to cater to your learning style. 287 00:20:41,861 --> 00:20:46,334 And if you're somewhere in between, maybe a video would work best for you. 288 00:20:46,334 --> 00:20:51,147 Knowing how you learn is going to help you narrow down resources that best match your 289 00:20:51,147 --> 00:20:52,385 learning style, and 290 00:20:52,385 --> 00:20:56,607 then you're gonna be even more effective in your own learning journey. 291 00:20:58,648 --> 00:21:02,294 Then try to find examples of what you've learned in the wild. 292 00:21:02,294 --> 00:21:06,605 Look at different frameworks and see if they use a data structure or 293 00:21:06,605 --> 00:21:10,464 algorithm that you've just learned about under the hood. 294 00:21:10,464 --> 00:21:15,048 Or find out where that concept that you've just learned about actually applies in 295 00:21:15,048 --> 00:21:18,917 the real world, like that example with binary trees and databases. 296 00:21:18,917 --> 00:21:21,635 Computer Science is actually just a whole 297 00:21:21,635 --> 00:21:24,827 lot more than anything I've really said today. 298 00:21:24,827 --> 00:21:27,715 It's more than data structures, it's more than algorithms, 299 00:21:27,715 --> 00:21:29,322 it's more than bigger notations. 300 00:21:29,322 --> 00:21:34,979 In fact, this field encompasses things like networks, computer architecture, 301 00:21:34,979 --> 00:21:40,980 security, distributed systems, operating systems, and that's just to name a few. 302 00:21:40,980 --> 00:21:44,059 This is all to say there's just so much to learn. 303 00:21:44,059 --> 00:21:49,125 But I believe that if you learn the fundamentals, you'll often find, 304 00:21:49,125 --> 00:21:53,867 you'll bump up against some of these other related CS topics too. 305 00:21:53,867 --> 00:21:59,266 And even if you don't need to know computer science concepts immediately 306 00:21:59,266 --> 00:22:04,701 when you're learning to code, I do think it can be helpful at some point. 307 00:22:04,701 --> 00:22:10,921 Learning CS can help you think in a context of performance and efficiency. 308 00:22:10,921 --> 00:22:15,504 And it'll help you recognize pattern, and it will help you in technical interviews. 309 00:22:15,504 --> 00:22:19,732 And sometimes it'll even help you in conversations with people who are a bit 310 00:22:19,732 --> 00:22:22,391 gate keepery, and like to throw around terms. 311 00:22:22,391 --> 00:22:25,756 It's pretty empowering to know what those terms mean, and 312 00:22:25,756 --> 00:22:30,604 be able to engage in those conversations, and feel empowered that you can understand 313 00:22:30,604 --> 00:22:33,459 these concepts even without getting a CS degree. 314 00:22:33,459 --> 00:22:36,859 And a lot of the stuff can be heard at first, and 315 00:22:36,859 --> 00:22:39,225 it's okay not to know all of it. 316 00:22:39,225 --> 00:22:43,116 When I was teaching myself computer science, I quickly learned that 317 00:22:43,116 --> 00:22:47,093 as an industry, we need a lot more approachable learning materials. 318 00:22:47,093 --> 00:22:51,072 And that's why I wrote down everything that I learned along the way, so 319 00:22:51,072 --> 00:22:53,472 that it would be easier for everyone else. 320 00:22:53,472 --> 00:22:56,564 So the one thing that I hope you will do, as you decide what 321 00:22:56,564 --> 00:23:01,335 to learn in your learning journey, whether it's computer science or something else, 322 00:23:01,335 --> 00:23:05,091 the one thing I hope you'll do, is share what you learn with others. 323 00:23:05,091 --> 00:23:07,250 Help make it easier for them, and for 324 00:23:07,250 --> 00:23:10,956 the next person that tries to learn the same thing that you are. 325 00:23:13,163 --> 00:23:16,512 If you'd like to check out some of the resources that I created while learning 326 00:23:16,512 --> 00:23:18,382 Computer Science, here are a few of them. 327 00:23:18,382 --> 00:23:22,069 There's the base CS writing series and a base CS podcast, 328 00:23:22,069 --> 00:23:25,239 if that's how you'd like to learn new concepts. 329 00:23:25,239 --> 00:23:26,694 And there's also base DS, 330 00:23:26,694 --> 00:23:30,571 a writing series that I wrote a couple years ago on distributed systems. 331 00:23:30,571 --> 00:23:33,871 And there are a couple links to all of these resources, 332 00:23:33,871 --> 00:23:37,386 including a link to the video series that covers a couple of 333 00:23:37,386 --> 00:23:42,041 the fundamental algorithms and data structures that I talked about today. 334 00:23:42,041 --> 00:23:46,795 Finally, I'm working on a brand new resource which I'm 335 00:23:46,795 --> 00:23:50,967 gonna be sharing on Twitter in a couple of months. 336 00:23:50,967 --> 00:23:55,808 So, if you're curious to stay up to date with even more computer science resources, 337 00:23:55,808 --> 00:24:00,401 you can follow me there and keep up with all the new CS content that I'm creating. 338 00:24:00,401 --> 00:24:03,109 And that's about it. 339 00:24:03,109 --> 00:24:04,559 Thank you so much for listening. 340 00:24:04,559 --> 00:24:09,372 I hope you all end up trying to learn 341 00:24:09,372 --> 00:24:13,859 computer science and enjoy it. 342 00:24:13,859 --> 00:24:15,159 And even if you decide that you wanna learn something else, 343 00:24:15,159 --> 00:24:16,305 I hope you just have fun along the way while doing it. 344 00:24:16,305 --> 00:24:17,371 Thanks.