Feeds:
Posts
Comments

The Core 6 Refactorings

Not all refactorings are created equal. Some get used a lot more than others. This is especially true with highly-indebted code. There’s a reason for this. Sets of refactorings are commonly used together to solve classes of problems, and some problems are more common than others. If you are learning to refactor, learn your tool in sets.

The most important set to learn are the Core 6 Refactorings, plus 3 critical utility functions.

These 9 operations will allow you to do the most important part of working with indebted code: read by refactoring. Fluency in these 9 is all you need. Continue Reading »

Programmers are familiar with the DRY principle: Don’t Repeat Yourself. That’s great advice for production code. But tests are different. For tests, use WET: Write Explicit Tests. The two lead to different results. Let’s look at an example. Continue Reading »

In part 1 we talked about naming as a process. We talked about how legacy code is really defined by its poor legibility, and that reading is the core of coding. And we talked about how working effectively with legacy code is simply the process of having an insight, writing it down, and checking it in.

Later parts have gotten us to a name that conveys Intent.

Now let’s look deeply at the last transition in names, from Intent to Domain Abstraction. Continue Reading »

New code is legacy code

My series about naming as a process is really about design. It focuses on design in legacy code. That has sparked people to ask about new code.

What about new code? Why not start with intent? I was taught to pseudocode or model, so that I could focus on the intent first. Then I don’t need all this after-the-fact concept discovery stuff.

  1. I always write new code with intent.
  2. I am never wrong about my intent.
  3. I’m never right either.

Continue Reading »

We are not fucking competent

We are not fucking agile. Stop talking to me about Agile.

—Boss of one of my mentees, in a 1:1 career advice session.

Though I wasn’t in the room at the time, here is my response. Feel free to use it.

Continue Reading »

In part 1 we talked about naming as a process. We talked about how legacy code is really defined by its poor legibility, and that reading is the core of coding. And we talked about how working effectively with legacy code is simply the process of having an insight, writing it down, and checking it in.

Later parts have gotten us to a target that Does the Right Thing.

Now let’s look deeply at the fifth transition in names, from Does the Right Thing to Intent. Continue Reading »

In part 1 we talked about naming as a process. We talked about how legacy code is really defined by its poor legibility, and that reading is the core of coding. And we talked about how working effectively with legacy code is simply the process of having an insight, writing it down, and checking it in.

Later parts have gotten us to an Honest and Complete name.

Now let’s look deeply at the fourth transition in names, from Honest and Complete to Does the Right Thing. Continue Reading »

In part 1 we talked about naming as a process. We talked about how legacy code is really defined by its poor legibility, and that reading is the core of coding. And we talked about how working effectively with legacy code is simply the process of having an insight, writing it down, and checking it in.

Later parts have gotten us to an Honest name.

Now let’s look deeply at the third transition in names, from Honest to Honest and Complete. Continue Reading »

In part 1 we talked about naming as a process. We talked about how legacy code is really defined by its poor legibility, and that reading is the core of coding. And we talked about how working effectively with legacy code is simply the process of having an insight, writing it down, and checking it in.

Later parts have gotten us to a Nonsense name.

Now let’s look deeply at the second transition in names, from Nonsense to Honest. Continue Reading »

In part 1, we talked about naming as a process. We talked about how legacy code is really defined by its poor legibility, and that reading is the core of coding. And we talked about how working effectively with legacy code is simply the process of having an insight, writing it down, and checking it in.

Now let’s look deeply at the first transition in names, from Missing to Nonsense. Continue Reading »

Older Posts »