Code quality is important, and everyone seems to agree on that, but what does it mean to produce quality code? How do you know when you've done so? Why is it so important that you continue to try? What happens if you just stop caring? In this video, gain a clear understanding of the definition of code quality, why it’s important, and the impact of ignoring it.
- [Instructor] Code quality, what does that phrase mean to you? I imagine you have your opinions. And a search of the internet will yield many more. For this course, it's the desire to create code that is easy to understand and work with. Why should we care about code quality? The best way to answer this question is to start by considering the many different audiences that consume the code that you write. First you have the computer. When it doesn't understand the code that you write, it lets you know by reporting compiler or runtime errors. That one's fairly objective. You mess up, it reports an error, no big deal. And then there are the other members of your team, humans who will need to be able to read the code you write and understand what it does. If they don't understand it, they'll have to ask you questions every time they need to make a change. Hopefully you'll be available to answer their questions. And even more so, hopefully you'll still remember the answers. That brings us to another important audience for the code that you write, your future self. How confident are you that you'll be able to one day read what you wrote and still understand it? How much do you trust your memory to preserve your intention? I don't know about you, but I don't trust myself. I don't trust my future availability for my team. And I certainly don't trust my future memory. But here's the thing. I don't have to, because I know my code will speak for me as long as I consider code quality.
Released
3/28/2019- Code quality metrics and tools
- Exploring code complexity
- Adjusting complexity thresholds
- Analyzing hotspots and churn
- Visualizing code coverage
- Finding duplication
- Securing dependencies
- Maintaining a consistent coding style
Share this video
Embed this video
Video: What is code quality?