Continuous Regression Testing for Safer and Faster Refactoring
1 Aurora InnovationContinuous Regression Testing for Safer and Faster Refactoring Pejman Ghorbanzade Aurora Innovation3 Aurora Innovation Engineers spend 17 hours per week maintaining software. *Stripe *Stripe 2019 Developer Coef�cient Report4 Aurora Innovation Maintaining Software Reading Refactoring Upgrading Migrating Debugging Adding tests Writing documentation Resolving technical debt “The0 码力 | 85 页 | 11.66 MB | 5 月前3How to Build Your First C++ Automated Refactoring Tool - CppCon 2023
1● Who Am I ● Refactoring Tooling Use Cases ● Clang Crash Course ● Writing a Clang Tidy Check Live ● Special Thanks & Questions Agenda 2Who Am I 01 3Proprietary + Confidential C++ Core Libraries Core Libraries 9Proprietary + Confidential Large Scale Refactorings & Automated Refactoring Tools 10 10Refactoring Tool Use Cases 02 11Proprietary + Confidential Consistent Code Formatting 12 hasType(isInteger())))))), this) }So you have a node SO WHAT? 70 70Be Yourself So you have a node 71 71Refactoring 06 72 72The Bound Nodes 73 73 void check(const ast_matchers::MatchFinder::MatchResult &Result)0 码力 | 83 页 | 6.03 MB | 5 月前3Leveraging a Functional Approach for More Testable and Maintainable ROS 2 Code
ROS 2 ● ROS 2 Conventional Approach ● Introduction to Functional Programming Principles ● Refactoring using Functional Programming Principles ● ConclusionIntroductionAbout Me ● Robotics Engineer services can be assigned ● No need to have a PathGenerator object that inherits from rclcpp::Node Refactoring PathGenerator class PathGenerator : public rclcpp::Node { public: explicit PathGenerator(rclcpp::NodeOptions The private functions of PathGenerator can be turned into free functions and lambda functions Refactoring PathGenerator class PathGenerator : public rclcpp::Node { public: explicit PathGenerator(rclcpp::NodeOptions0 码力 | 200 页 | 1.77 MB | 5 月前3Dependency Injection in C++
string, Cache&, const Data&, ...) { // ... } 61 Bloomberg Refactoring for DIbool execute(Bucket& bucket) { // ... } 62 Bloomberg Refactoring for DI struct Bucket { DB& db_; Com& com_; FileLdr& ldr_; numerous to injectGod-Like Class 64 Bloomberg Refactoring for DI Pricing Sizing Actions Saving Sending Business logic verifying Rules65 Bloomberg Refactoring for DI God-Like Class Pricing Sizing Encapsulated functionality ✓ Unit testing ✓ Refactor ✓ Prelude to DI Glue Logic66 Bloomberg Refactoring for DI God-Like Class Pricing Sizing Actions Saving Sending Distribution Logic Gather Information0 码力 | 106 页 | 1.76 MB | 5 月前3Back to Basics: Design Patterns
configuration manager ■ Hold global configuration values 37 This is the option we want!Time for the refactoring! (1/2) ● The first step is to move our global variables into a class ○ This groups both variables some behaviors (i.e. member functions) for working with these values as well 38Time for the refactoring! (2/2) ● We move our globals into a class and will make them member variables ○ ConfigurationManager ○ Memory is only allocated if you actually use the Singleton ● Cons ○ Wrong usage could take refactoring ■ (i.e. In the case that you need two instances of an object) ○ Not thread-safe, you will have0 码力 | 96 页 | 2.10 MB | 5 月前3Making Games Start Fast: A Story About Concurrency
safe, but they also make it thread inefficient ◉ Keeping a computation lock free may require refactoring to use another approach ◉ Adding a lock might look fine in profiler because another bottleneck isn’t important ◉ No locks are being used 50What if I need to update shared state? 51 🔗Refactoring shared state ◉ Make copies ◉ Split problematic iteration in 2 loops ○ Parallel apply using a to the locking scheme allowed for parallelization ◉ Even better gains could be achieved by refactoring to lock free ◉ But we already reduced from 6.8s to 1.1s 61Making it a problem for the future0 码力 | 76 页 | 2.22 MB | 5 月前3Quickly Testing Qt Desktop Applications With Approval Tests
Scientific C++ and Qt developer since 1999 • My mission: Sustainable and efficient testing and refactoring of legacy code – Co-author of “Approval Tests for C++” • Consulting & training via “Clare Macrae Needs refactoring to add tests Can’t refactor without tests7 Typical Scenario • • • • • Need to change the code No tests Not designed for testing Needs refactoring to add via: – bit.ly/TestingQt – github.com/claremacrae/talks • Sustainable and efficient testing and refactoring of legacy code • Consulting & training via “Clare Macrae Consulting Ltd” – claremacrae.co.uk0 码力 | 77 页 | 6.96 MB | 5 月前307. 杜逸先 使用 VS Code 开发 Python 项目的最佳实践
Code与Python——Autocomplete and IntelliSense VS Code与Python——Refactoring(Extract Variable) VS Code与Python——Refactoring(Extract Method) VS Code与Python——Refactoring(Sort imports) VS Code与Python——Linting VS Code与Python——Linting0 码力 | 46 页 | 2.65 MB | 1 年前3Adventures with Legacy Codebases: Tales of Incremental Improvement
linters ○ New type-checking ○ Code changes needed to adopt ● A goal to increase test coverage ○ “Refactoring” to make code more testable“X% of your code will be rewritten in 5 years.ˮKubrick, Stanley. 2001 v=v_yzLe-wnfk Maintainability and Refactoring Impact of Higher-Level Design Featureshttps://www.youtube.com/watch?v=torqlZnu9Ag How to Build Your First C Automated Refactoring Toolhttps://www.youtube.com/watch0 码力 | 77 页 | 4.34 MB | 5 月前3Google C++ Style Guide
meant for inclusion should end in .inc. 3 All header files should be self-contained. Users and refactoring tools should not have to adhere to special conditions to include the header. Specifically, a header developers incorrectly use that interface now must explain how the macros formed the interface. Refactoring and analysis tools have a dramatically harder time updating the interface. As a consequence, we user does something wrong. Template metaprogramming interferes with large scale refactoring by making the job of refactoring tools harder. First, the template code is expanded in multiple contexts, and it’s0 码力 | 83 页 | 238.71 KB | 1 年前3
共 688 条
- 1
- 2
- 3
- 4
- 5
- 6
- 69
相关搜索词
ContinuousRegressionTestingforSaferandFasterRefactoringHowtoBuildYourFirstC++AutomatedToolCppCon2023LeveragingFunctionalApproachMoreTestableMaintainableROSCodeDependencyInjectioninBackBasicsDesignPatternsMakingGamesStartFastStoryAboutConcurrencyQuicklyQtDesktopApplicationsWithApprovalTests07杜逸先使用VS开发Python项目最佳实践AdventureswithLegacyCodebasesTalesofIncrementalImprovementGoogleStyleGuide