SlideShare a Scribd company logo
1
©LuxoftTraining2012
Code Refáctoring
Small example
C++ Edittion
2
©LuxoftTraining2012
Пример
Crash with Segmentation fault
Back trace: DoSomethingMode::deactivate: 17
Logs:
 CompositeMode::activate
 CompositeMode::doSomething
 DoSomethingMode::doSomething
 CompositeMode::deactivate
 CompositeMode::activate
 CompositeMode::doAnother
3
©LuxoftTraining2012
Структура
4
©LuxoftTraining2012
Refactoring
Упрощать, а не усложнять
Улучшать маленькими шагами, а не все переписать
Сделать надежно, а не просто исправить ошибку
Главная ценность – понятность, а не
эффективность
Программиррование - это искусство, а не ремесло
5
©LuxoftTraining2012
Questions and Discussion

More Related Content

PPTX
Elearn Expo 2012 -Qoveo
PPTX
Face recognition with c++
PPTX
C++20 features
PPTX
Autonomous driving on your developer pc. technologies, approaches, future
PDF
Orkhan Gasimov "High Performance System Design"
PPTX
Vitalii Korzh "Managed Workflows or How to Master Data"
PDF
Yevhen Tatarynov "From POC to High-Performance .NET applications"
PDF
Oleksii Kuchuk "Reading gauge values with open cv imgproc"
Elearn Expo 2012 -Qoveo
Face recognition with c++
C++20 features
Autonomous driving on your developer pc. technologies, approaches, future
Orkhan Gasimov "High Performance System Design"
Vitalii Korzh "Managed Workflows or How to Master Data"
Yevhen Tatarynov "From POC to High-Performance .NET applications"
Oleksii Kuchuk "Reading gauge values with open cv imgproc"

More from LogeekNightUkraine (20)

PDF
Oleksandr Kutsan "Using katai struct to describe the process of working with ...
PDF
Pavlo Zhdanov "Mastering solid and base principles for software design"
PDF
Serhii Zemlianyi "Error Retries with Exponential Backoff Using RabbitMQ"
PDF
Iurii Antykhovych "Java and performance tools and toys"
PDF
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...
PPTX
Aleksandr Kutsan "Managing Dependencies in C++"
PDF
Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"
PDF
Alexandr Golyak, Nikolay Chertkov "Automotive Testing vs Test Automatio"
PPTX
Michal Kordas "Docker: Good, Bad or Both"
PPTX
Kolomiyets Dmytro "Dealing with Multiple Caches, When Developing Microservices"
PPTX
Shestakov Illia "The Sandbox Theory"
PPTX
Dmytro Kochergin “Autotest with CYPRESS”
PPTX
Ivan Dryzhyruk “Ducks Don’t Like Bugs”
PDF
Nhu Viet Nguyen "Why C++ is Becoming a Necessity for QA Automation"
PDF
Dmytro Safonov "Open-Source Map Viewers"
PPTX
Serhii Matynenko "How to Deal with Logs, Migrating from Monolith Architecture...
PPTX
Oleksii Parfeniuk "Leading a Development Team in FinTech"
PDF
Maksym Ked "Plug-In C++ Application Architecture"
PDF
Pavlo Zhdanov "Java and Swift: How to Create Applications for Automotive Head...
PDF
Oleksandr Kutsan "SmartDeviceLink and Mobile Applications on the Automotive H...
Oleksandr Kutsan "Using katai struct to describe the process of working with ...
Pavlo Zhdanov "Mastering solid and base principles for software design"
Serhii Zemlianyi "Error Retries with Exponential Backoff Using RabbitMQ"
Iurii Antykhovych "Java and performance tools and toys"
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...
Aleksandr Kutsan "Managing Dependencies in C++"
Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"
Alexandr Golyak, Nikolay Chertkov "Automotive Testing vs Test Automatio"
Michal Kordas "Docker: Good, Bad or Both"
Kolomiyets Dmytro "Dealing with Multiple Caches, When Developing Microservices"
Shestakov Illia "The Sandbox Theory"
Dmytro Kochergin “Autotest with CYPRESS”
Ivan Dryzhyruk “Ducks Don’t Like Bugs”
Nhu Viet Nguyen "Why C++ is Becoming a Necessity for QA Automation"
Dmytro Safonov "Open-Source Map Viewers"
Serhii Matynenko "How to Deal with Logs, Migrating from Monolith Architecture...
Oleksii Parfeniuk "Leading a Development Team in FinTech"
Maksym Ked "Plug-In C++ Application Architecture"
Pavlo Zhdanov "Java and Swift: How to Create Applications for Automotive Head...
Oleksandr Kutsan "SmartDeviceLink and Mobile Applications on the Automotive H...
Ad

Yurii Skrypnyk "Refactoring Based on Example"

Editor's Notes

  • #3: Предложить группе найти ошибку Как исправить? Write test Fix error Protect with setActive Create mode variables New activateSubMode Replace existing activateSubMode Remove old activate sub mode Remove getSubMode Remove map and enum Use activateSubMode in deactivation