DEV Community

Cover image for Find refactoring candidates with Churn
Patryk Woziński
Patryk Woziński

Posted on

Find refactoring candidates with Churn

👋 Some time ago I've written a blog post about the problem related to working with classes/modules/functions/methods with both high complexity level and high frequency of changes. It's a problem because if you're doing changes in files that are complex and are often edited - you can easily introduce an error into your application. That's quite dangerous!

Refactoring in itself has no sense - but when it comes to solving problems with more complicated pieces of code that have a chance to destroy your critical business path - then refactoring is worth doing.

Alt Text

How to find refactoring candidates? Use churn! I've created this tool (it's still under development) for detecting which modules need your attention. That's ported Ruby/PHP library. :) I'm still learning Elixir and this project is helping me a lot.

Every improvement related to other things than bottlenecks is muda. When you're using Churn then you'll be focused only on real problematic places in your code.


Feel free to contribute, there are many things to do in this project (cache, better parallelism, and so on).

Happy refactoring! 👨‍💻

Discussion (0)