[00:00:19] We're gonna go slow, but the other thing I'm gonna tell you is, this is just harder, right? There's more stuff going on here. This is the more difficult portion of this for someone that hasn't programmed before. If you've programmed before, a lot of this will look somewhat familiar.
[00:00:36] But again, remember this course is geared towards people that haven't programmed before. So, bear with me through the basics here and hopefully you'll learn tidbits about programming that you didn't know before. I promise you there's stuff in here that will help everybody. Okay, So, What is code? And I think my answer might surprise a lot of people.
[00:01:03] People think it's something that humans work really hard on so that computers will do the thing that you tell them to do. Partial definition, I think is correct. But I'm gonna argue the code is for humans first and computers second. And the reason why I say that is you write code so that later you can go back and maintain that code.
[00:01:52] It's because it's easier for humans to understand and maintain and continue forward with. So I want you to keep that in mind when you're writing code, that you're writing this so that someone later can read it. You're not writing it so that your program will work correctly, necessarily, you're doing that as well.
[00:02:11] But you're writing it so that you can come back and understand what you were thinking, understand what you were trying to do, and then if there's a bug in there be able to fix it. So another way I like thinking about this, which I put here in my notes, is you're essentially writing notes to yourself about how to solve a problem that a computer can understand.
[00:02:56] It's just bonkers, some of the things that people do with code. Just Google it, code golf, there's some wild things out there. And the code that they have to do to be able to achieve that is so clever. It's unreadably clever. Don't do that, [LAUGH] unless you're doing code golf, you don't want your code to be clever.
[00:03:17] You want your code to be clear, succinct, to the point, all these kinds of things. Yeah, I've had to maintain code that's 10 years old, 15 years old, 20 years old, and the code that's really well written, makes it feel really nice to try and maintain that code.
[00:03:37] Even if it's using really old style and techniques and stuff like that, if it's well documented and well thought out and clearly laid out, it's no problem. But then I had to maintain this just bananas PHP for in-memory graph database that someone invented. And it was just written in just the most opaque, weird style of writing code.
[00:04:01] They used single letter variables and a bunch of stuff like that. It was like a nightmare. One of the worst parts of my career is trying to maintain this person's really old, terrible code. So, all this is, I will probably be your coworker some day. This is my plea to you to write clear code so that we can both understand it.
[00:04:26] Okay, be explicit. It's okay to write more code to be more explicit. Computers are really fast these days. So for the most part, you can take a little bit of performance hit to be extra clear on things, optimized for humans first and computers later. Okay, that's my spiel to you, I start with that because I want you to take that ethos with you of, I'm gonna write clear code that I can understand.