Ninja-style refactoring and other tricks

You can always look at improving three things: the first, the second, and the code that was not written by you. 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
    Youtube. . .



    , Symfony. , - .





    . 3 .









Connect next Thursday, October 1, at 19:00 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 do not change a lot of code at once. Sales stability 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 ...



Fixing 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's approach to refactoring work?



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.





โ€” ; - ยซยป



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 the approach to refactoring work in your team?



We have a modular code and fairly low coupling, it helps. As for 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 straightforward solution, but mark part of the code with detailedtodo... Once a month or more, I go throughtodoin the project and see what can be changed from this 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 refactoring in life)



The most memorable story about this.



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



How does your team approach to refactoring?



The initiative is completely given to the developers.



Refactoring is ... An



ongoing process of improving your code.



ps We hope to see you on the stream on Thursday . Prepare your stories.



All Articles