How to Refactor Millions of Line of Code Without Alienating Colleagues - Fred Tingaud - CppCon 2019

preview_player
Показать описание



At first look, Clang-Tidy looks like a convenient static analysis tool. But it is actually the emerged part of an incredible iceberg that can change the way software developers work on big projects.
Using the extension API provided by clang tooling, you can design custom tools that will allow you to get rid of bad patterns or API mistakes in your code that were historically considered "too deep-rooted to fix". Through concrete examples we will see what these custom tools can do and how this could impact your everyday job as software maintainers.
But wielding such powerful tools can be hard! And working on big projects also means you are likely working in an ecosystem with a lot of other developers. What happens when each time these colleagues try to sync their repository they find out one of your refactorings completely changed the API they were calling in their local work? We will see the difficulties and pitfalls one can encounter when developing and using clang based refactoring tools and how to avoid or reduce them.

Fred Tingaud
Principal software engineer, Murex


*-----*
*-----*
Рекомендации по теме
Комментарии
Автор

That vacuum cleaner analogy is brilliant!

PhilippeCarphin
Автор

This is a great presentation, I keep coming back every few months to rewatch. :)

faktorial
Автор

So nice that we are using clangTidy at out company and it is enforced to apply it but ONLY to new code, on existing code that was rejected despite the entire code-base having been ported from an older system to GIT. That leaves us with sourecode were there are different coding-styles, different libraries for tracing (yes, they introduced a new library that must be used for tracing but kept the old one), and processes that are straight copies of 20 year old Oh, and of course still using macro-magic for everything.

ABaumstumpf
Автор

clang-tidy (default ubuntu get) managed to break my code... added incorrect initialization of C-style arrays... maybe I should raise a bug report..

jhbonarius