Check out a free preview of the full Building Awesomer Apps with Angular course:
The "Introducing Make It Work" Lesson is part of the full, Building Awesomer Apps with Angular course featured in this preview video. Here's what you'd learn in this lesson:

Lukas sets the agenda for the remaining course: Testing and Debugging, Static Analysis, Angular Performance, and Deploying.

Get Unlimited Access Now

Transcript from the "Introducing Make It Work" Lesson

[00:00:00]
>> Lukas Ruebbelke: Talking about testing is kind of like flossing your teeth or taking vitamins. We philosophically agree that we should do this, but somehow it just gets de-prioritized. Even internally as I wanna go talk about Firebase, and this module is staring at me. But we're gonna do it, and so we'll do the testing module.

[00:00:22] And from here, then it's just really all just fun and games after this.
>> Lukas Ruebbelke: Actually, let me just back this up real quick. I wanna pull up one slide to just frame how we're going to discuss this.
>> Lukas Ruebbelke: So has anybody ever heard the saying, make it work, make it right, make it fast?

[00:00:52] So pretty common saying, I think if you Googled it, I don't remember off the top of my head who said it. But I think this is a pretty good approach for being effective. That I've been on projects where people were so enamored with just building this perfect thing right out of the gate.

[00:01:11] So they spent hours and hours and hours and days and days and days and days and days and months planning the thing. And at the end of this you know huge planning cycle they had nothing to show for it. And more importantly, if you have an opportunity to go read a book like The Lean Startup.

[00:01:31] Is how do you even know what you're building is even something that the users want? And so I've seen tons of projects where you think this is it they're gonna love it. And the user just does not get it and so I think it's incredibly important to have something that works as soon as possible.

[00:01:50] And so this is why I really like the saying make it work, make it right, make it fast. Cuz I think the first thing you need to do is make something work. So that you can get it in front of the people that matter and start to get feedback.

[00:02:06] And so I'm not saying throw caution to the wind. It doesn't matter how we program cuz we're making it work. Good software principles still apply. But there is a level of variability and just the dynamic nature of what you're doing, that you have to be open to feedback loops.

[00:02:26] And willing to change, and the faster you get something in place to get that feedback loop, the better off you're going to be. So first things first, is just making something work. And a lot of times that means it should be working, it's not. And so for this, we're going to talk about testing.

[00:02:46] I find the majority of what I do is I spent 20% writing code. And 80% fixing it and figuring out what went wrong. And so being able to write test gives you the ability to know with reasonable certainty that something works. So if somebody says, well, how do you know that this works?

[00:03:07] Well, it hasn't broken yet is not a good response. Because to that end, I would say you probably should go read Black Swanby Nassim Taleb. And just pray that this doesn't happen to you. I don't think the Equifax people or whatever, it hasn't broken, but when it does [SOUND].

[00:03:30] So to that end, it hasn't broken yet is not a good response for how do you know it works? This is why we have test, to the best of our ability to make assertions that pieces in our code are working. And from there, once you validate that this is the right thing.

[00:03:51] Then you can go through and start to make it right. Cuz there's just going to be things that you miss. There's going to be pieces that just didn't get put together as tight as possible. And so even over the course of these branches, if you started going through as I'm cutting them.

[00:04:06] There are just things that are progressing that even from branch 00 start to the last branch that I've cut in this repo. I've started to make small improvement just by virtue of being in there. And so finding ways to get good feedback on your code that is a mechanism.

[00:04:28] So again this is all feedback loops. Is having a mechanism to tell you what is not right, so that you can make it right or what is suboptimal. So this is where static analysis is really, really key. And this is something that is kind of new to JavaScript.

[00:04:46] So for Java and C# and different things, you have things like SonarQube and a bunch of different things. That does phenomenal esthetics analysis of different things. And they say this is bad or good or whatever. We're starting to see this in our tooling. And so I'm pretty excited to show this.

[00:05:01] Because there's actually very little we need to do from a kind of a setup standpoint to get good feedback on our code. And then from there, once you have something working, and it's right. Well, then you can focus on making it fast. And start to say, well how do we start to improve the performance?

[00:05:24] And, interestingly enough, by talking about these three things, we're pretty much going to cover how to make it live. So that's kind of the next piece. You build this thing, what do you do with it? Where do you put it? Because especially in JavaScript, that because it's not a truly compiled language.

[00:05:45] So we essentially compile it down to ES5. But it's not like we're getting an executable. The deployment is just a little different in terms of what you develop in. Is definitely not what you wanna put on a production server. And so there's this gap here of this is what we're working with.

[00:06:06] But we're ready to actually deploy this for consumption. What do we do and what's that step? So I'll talk about that, as well. So let's hop in with this, make it work, make it right, make it fast arc. Let's go ahead and jump in and see this.