Ninja-style refactoring and other tricks

Can be forever look at improve three things: the first, the second, and the code you didn’t write. We decided to dedicate one of the upcoming online meetups to him:
  • look at the code of a popular open source project on github,
  • we will show different approaches to its refactoring, discuss useful tools, possible rakes – well, we will write a little live.
  • and we’ll also play this elephant for the best refactoring story
    Stories will be accepted in the chat broadcast on Youtube… The best story will be subjectively chosen by the hosts at the end of the stream. We will send an elephant from Moscow to anywhere in the world.

    The elephant has a second side, which is Symfony. Perhaps it will be important for someone to know this.


    The elephant is official. He went to us for 3 months.

Connect next Thursday 1st October at 19:00 in Moscow / Kiev / Minsk. Here you can see the stream schedule and get a reminder

Under the cut is an acquaintance with the participants and several “warm-up” stories from them.

Valentin Nazarov – co-host; led CRM-1, one of the oldest projects in Skyeng

Tell us about your first refactoring experience.

Disassembled in 2011 a self-written engine of some project about tourism. I was a novice developer then, it didn’t seem like a little 🙂 But even now it would be very difficult to gnaw such a thing.

What is the most memorable story about this?

See above.

How does your team approach to refactoring?

We practice ninja refactoring: we touch only those places where red flags are obvious (duplicate code, brute force in the mental model, etc.), and don’t change a lot of code at once. Stability of sales is important, and people should really read and understand during code reviews.

The guys from the company once wrote a whole post about the practices of other teams.

Refactoring is …

Work on bugs.

Alexander Makarov – co-host; saws the 3rd version of the Yii framework

Tell us about your first refactoring experience.

Oh, I don’t remember, but there were all sorts of things. And refactored without tests, and then broke. And I lost some of the business logic. And without understanding the code, refactoring is wrong.

What is the most memorable refactoring story?

I was ideally trying to write a blog engine. The process lasted for three years … Now I would not call that code good.

How does your team approach to refactoring?

A draft pull request is posted for everyone to see. Then everyone swoops in and leaves comments. As a result, we will refactor.

Sometimes we refactor on purpose too, but the procedure is about the same.

Refactoring is …

A way to avoid getting bogged down in tech debt.

Valentin Udaltsov – will refactor; runs a telegram channel “Pykh”

Tell us about your first refactoring experience.

It’s hard to remember, I’ve always loved this thing.

What is the most memorable story about this case?

Once on a large project, I optimized the Symfony Security configuration. On Friday it was deployed, and on Monday it turned out that all weekend clients could not access one of the key sections of the site through OAuth …

How does your team approach to refactoring?

We have a modular code and fairly low coupling, it helps. As for the new features, we don’t try to do everything right at once. This is impossible and ineffective. Some problems need to be loaded into the head in order to get a solution in a couple of months. Therefore, we often stop at some simple solution in the forehead, but mark part of the code with detailed todo. Once a month or more, I go through the todo in the project and see what can be redone from it right now. The rule is that you have to do something.

Refactoring is …

When you do better, because now you know how.

Leonid Korsakov – will refactor; conducts the chat of the PHP community of Tatarstan

Tell us about your first refactoring experience.

I have never worked on a project with perfect code. So with refactoring for life)

The most memorable story about this.

Once a lot of code was refactored, features were added, but the release never went into production.

How does your team approach to refactoring?

The initiative is completely given to the developers.

Refactoring is …

Continuous process of code improvement.

ps Hope to see you at stream on Thursday… Prepare your stories.

Similar Posts

Leave a Reply Cancel reply