Back Button PHP

10 Techniques for Cleaner Code

We've all written code that misses the mark. Sure, it works, but, still, you're left with the feeling that you've missed something. The difficult part, unfortunately, is recognizing what that "something" is.

In this series, we'll review ten techniques, one per episode, to improve the clarity of your PHP code.

2 episodes
30:13 mins
Start Series
  • Latest Episode: Play With Confidence

  • Like this series? Share the love!

  • Episode 1 Run Time 13:04

    Technique #1. You can't improve your code if you're terrified to change it. That's where tests come into play. Think of them as refactoring insurance. Go ahead, make as many tweaks as you need to. Each step of the way, your tests will let you know if you've made a mistake.

  • Episode 2 Run Time 17:09

    Technique #2. Now that we've learned to back up our code with a series of tests, we can move on to the second technique. Clean code isn't a straight line. Often, you'll follow a variety of roundabouts, tunnels, and even u-turns to get there. The secret is to play with confidence. Make a small tweak, run the tests, and then decide: "Is this better than before?"

*Series still in development. Check back often for updates.