Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

LinkedIn Learning

Agile Software Development: Clean Coding Practices

via LinkedIn Learning

Overview

Learn why it's important to write code that's easily understood by both computers and humans, as well as how to do it in practice.

As a writer of code, the complier isn't your only audience. Your coworkers—and even your future self, when you fix bugs—must be able to easily understand your original intent. In this course, learn why it's important to write code that's clean—or, easily understood by both computers and humans—and how to do it in practice. Instructor Scott Ford reviews how to ensure that different aspects of your code are clearly and thoughtfully constructed, including names, formatting, and logic. Plus, he explains what a "clean" unit test looks like, and how to ensure that your tests are fast and efficient.

Syllabus

Introduction
  • Write code for humans, not machines
  • What you should know
  • Clean code definition
1. Clean Names
  • Why are clean names important?
  • Prefer clarity over brevity
  • Acronyms and abbreviations
  • Class and type names
  • Method and function names
  • Variable names
  • Parameter names
  • Constant names
2. Clean Formatting
  • Why clean formatting matters
  • Indendation and bracket placement
  • Line wrapping
  • Whitespace
  • Comments
3. Clean Logic
  • Magic numbers and constants
  • Parameter lists
  • Predicate methods
  • Making good use of loops
4. Clean Unit Tests
  • What's a "unit" test?
  • Keep your tests fast
  • Single assertion per test
  • Keep your tests isolated
  • DRY vs. WET tests
Conclusion
  • Next steps

Taught by

M. Scott Ford

Related Courses

Reviews

Start your review of Agile Software Development: Clean Coding Practices

Never Stop Learning!

Get personalized course recommendations, track subjects and courses with reminders, and more.

Sign up for free