Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Clean Code in PHP

You're reading from   Clean Code in PHP Expert tips and best practices to write beautiful, human-friendly, and maintainable PHP

Arrow left icon
Product type Paperback
Published in Oct 2022
Publisher Packt
ISBN-13 9781804613870
Length 264 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Alexandre Daubois Alexandre Daubois
Author Profile Icon Alexandre Daubois
Alexandre Daubois
Carsten Windler Carsten Windler
Author Profile Icon Carsten Windler
Carsten Windler
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Part 1 – Introducing Clean Code
2. Chapter 1: What Is Clean Code and Why Should You Care? FREE CHAPTER 3. Chapter 2: Who Gets to Decide What “Good Practices” Are? 4. Chapter 3: Code, Don’t Do Stunts 5. Chapter 4: It is about More Than Just Code 6. Chapter 5: Optimizing Your Time and Separating Responsibilities 7. Chapter 6: PHP is Evolving – Deprecations and Revolutions 8. Part 2 – Maintaining Code Quality
9. Chapter 7: Code Quality Tools 10. Chapter 8: Code Quality Metrics 11. Chapter 9: Organizing PHP Quality Tools 12. Chapter 10: Automated Testing 13. Chapter 11: Continuous Integration 14. Chapter 12: Working in a Team 15. Chapter 13: Creating Effective Documentation 16. Index 17. Other Books You May Enjoy

What Is Clean Code and Why Should You Care?

If you are new to PHP: Hypertext Preprocessor (PHP) and software development in general, there’s a good chance you haven’t come across clean code yet. We all began here; everybody must be aware of this. Clean code is more than just a set of rules. It is a real mindset—a way of thinking about what you are creating.

We often come across developers that have been in information technology (IT) for many years, even decades, and never had to worry about clean code. This may be for several reasons for this: working alone on a project for many years or developing on a legacy code base are a few of many reasons “clean code” did not reach their ears or wasn’t one of their concerns.

Become aware of clean code—the earlier the better. As with many other habits, once you have adopted a way of working with code, it is difficult to change this. It may be because you are not convinced at all about what clean code is about, you are not sure it applies to you, or you may just be lazy about applying new “rules” because yours are already working for you (be assured that everyone’s been through this). But if you care about it and you are taking note—well, you’ve already done the hardest part, because this means that you are ready to change your habits. Don’t misunderstand us—the point is not to change everything you’ve learned up to now; it’s more a case of improving the skills you already have.

You may not be aware of this, but it is pretty certain that you already have some habits that totally suit clean-code principles and that are natural to you and completely new to other developers. You should note that the goal of clean-code principles is not to be controversial at all.

The main topics we’ll cover in this chapter are listed here:

  • What this book will cover
  • Understanding what clean code is
  • The importance of clean code in teams
  • The importance of clean code in personal projects
You have been reading a chapter from
Clean Code in PHP
Published in: Oct 2022
Publisher: Packt
ISBN-13: 9781804613870
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime