Back Button Techniques
Code Reflections

Code Reflections

Reflecting upon the code you've written is an important step for any developer. It's not enough to simply extract, refactor, and call it a day. No. Once complete, you must evaluate what you've done. Is the code now better? Is it more clear? Don't underestimate how difficult a question this can be. Our brains manage to trick us at every turn.

Advanced
4 episodes
1h 10m
4
Latest Episode in This Series

Added 1 month ago

Refactoring for Clarity

In this lesson, we'll use real code as the basis for a series of small refactors that...

Watch
Code Reflections

Code Reflections

Reflecting upon the code you've written is an important step for any developer. It's not enough to simply extract, refactor, and call it a day. No. Once complete, you must evaluate what you've done. Is the code now better? Is it more clear? Don't underestimate how difficult a question this can be. Our brains manage to trick us at every turn.

Begin
4
Latest Episode in This Series

Added 1 month ago

Refactoring for Clarity

In this lesson, we'll use real code as the basis for a series of small refactors that...
Watch

Your Teacher | Jeffrey Way

https://laracasts.s3.amazonaws.com/avatars/jeffrey-avatar.jpg's avatar
Hi, I'm Jeffrey. I'm the creator of Laracasts and spend most of my days building the site and thinking of new ways to teach confusing concepts. I live in Orlando, Florida with my wife and two kids.
    1. EPISODE 1

      Run Time 17:23

      "Is it better?" is a question I ask myself on a daily basis. It's not such an easy question to answer, when it comes to code. No, it turns out that our brains have a unique way of tricking us at every turn. Still, despite the difficulty, it's vital that you force this question into your internal dialogue. "Is the code now better?" Sure, I extracted files. Sure, it better follows the single responsibility principle. Sure, it's more open to extension. But is it better?

    2. EPISODE 2

      Run Time 12:59

      Over the last few weeks, at the time of this writing, I've been working on a component refactor for the Laravel Mix codebase. Now that I've mostly completed this refactor, let's review the before and after, while once again asking ourselves the important question, "Is this better?"

    3. EPISODE 3

      Run Time 24:21

      In real life, you won't always have time to go over each line of code with a fine tooth comb. No, the truth is that, too often, the business needs it done now. Not in three weeks. Now. You can complain on Reddit when you're done. Sorry, it's a simple reality of the workplace. In this episode, let's review a "gift certificate" section of Laracasts that, late last year, I needed to build and deploy all in the same day. We'll review the compromises I made, what I might have done differently with more time, and how I view the code, today, with fresh eyes.

    4. EPISODE 4

      Run Time 15:45

      In this lesson, we'll use real code as the basis for a series of small refactors that should hopefully improve clarity. We'll discuss autonomy, use-cases, model responsibility, and more.

Series still in development robot

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