It is time to fight the black holes in your software. Don't let legacy code dictate your work. Start learning and practicing dependency injection and refactoring. Become more agile.
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flexmichael.labriola
This document discusses automated testing in Flex. It begins by explaining why automated testing is important, such as reducing costs from software errors and allowing developers to change code without fear of breaking other parts of the project. It then covers topics like writing unit tests, using theories and data points to test over multiple values, and writing integration tests. The document emphasizes that writing testable code is key, and provides some principles for doing so, such as separating construction from application logic and using interfaces. It also discusses using fakes, stubs and mocks to isolate units for testing.
Test Driven Development (TDD) is a software development process that involves writing tests before code. The TDD cycle involves three steps: 1) writing a failing test for the next piece of functionality, 2) writing just enough code to pass that test, and 3) refactoring the new and old code. TDD provides benefits like validated systems, code coverage, enabling refactoring, and documenting behavior. It promotes writing isolated, modular unit tests and designing code in a test-driven manner. While TDD has benefits, potential pitfalls include focusing on coverage over quality, neglecting refactoring steps, and writing overly broad tests.
We know that Code Reviews are a Good Thing. We probably have our own personal lists of things we look for in the code we review, while also fearing what others might say about our code. How to we ensure that code reviews are actually benefiting the team, and the application? How do we decide who does the reviews? What does "done" look like?
In this talk, Trisha will identify some best practices to follow. She'll talk about what's really important in a code review, and set out some guidelines to follow in order to maximise the value of the code review and minimise the pain.
The document discusses exploratory testing in an agile context. It describes exploratory testing as simultaneously learning about a system while designing and executing tests, using feedback from the last test to inform the next. It also discusses that agile teams do both checking of requirements through automated tests as well as exploring to discover unintended consequences. Finally, it provides an example charter for exploratory testing of editing user profiles on a system.
A code review is basically a technical discussion which should lead to improvements in the code and/or sharing
knowledge in a team. As with any conversation, it should have substance and form.
What’s involved in a good code review? What kind of problems do we want to spot and address? Trisha Gee will talk
about things a reviewer may consider when looking at changes: what potential issues to look for; why certain
patterns may be harmful; and, of course, what NOT to look at.
But when it comes to commenting on someone’s work, it may be hard to find the right words to convey a useful message
without offending the authors - after all, this is something that they worked hard on. Maria Khalusova will share
some observations, thoughts and practical tricks on how to give and receive feedback without turning a code review
into a battlefield.
This document provides guidance on developing educational materials to teach specific objectives. It recommends writing lab exercises to teach objectives, and lecture materials to prepare students for the labs. Lectures should cover necessary concepts and scaffolding, and explain the overall process and rationale. Instructions for labs should be detailed and include screen captures for clarity. Materials should be divided into modular units that take 1-2 hours each.
This document discusses best practices for test-driven development (TDD). It begins by describing the different types of tests - unit, integration, and acceptance. It then discusses the debate around having more unit tests vs acceptance tests. The document argues that less acceptance tests and more unit tests leads to faster, higher quality code. The rest of the document outlines five rules for writing effective tests: 1) Write tests before coding, 2) Don't test everything, 3) Test only public APIs, 4) Don't create extra getters for testing, and 5) Listen to what your tests are telling you about your code quality and design.
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flexmichael.labriola
This document discusses automated testing in Flex. It begins by explaining why automated testing is important, such as reducing costs from software errors and allowing developers to change code without fear of breaking other parts of the project. It then covers topics like writing unit tests, using theories and data points to test over multiple values, and writing integration tests. The document emphasizes that writing testable code is key, and provides some principles for doing so, such as separating construction from application logic and using interfaces. It also discusses using fakes, stubs and mocks to isolate units for testing.
Test Driven Development (TDD) is a software development process that involves writing tests before code. The TDD cycle involves three steps: 1) writing a failing test for the next piece of functionality, 2) writing just enough code to pass that test, and 3) refactoring the new and old code. TDD provides benefits like validated systems, code coverage, enabling refactoring, and documenting behavior. It promotes writing isolated, modular unit tests and designing code in a test-driven manner. While TDD has benefits, potential pitfalls include focusing on coverage over quality, neglecting refactoring steps, and writing overly broad tests.
We know that Code Reviews are a Good Thing. We probably have our own personal lists of things we look for in the code we review, while also fearing what others might say about our code. How to we ensure that code reviews are actually benefiting the team, and the application? How do we decide who does the reviews? What does "done" look like?
In this talk, Trisha will identify some best practices to follow. She'll talk about what's really important in a code review, and set out some guidelines to follow in order to maximise the value of the code review and minimise the pain.
The document discusses exploratory testing in an agile context. It describes exploratory testing as simultaneously learning about a system while designing and executing tests, using feedback from the last test to inform the next. It also discusses that agile teams do both checking of requirements through automated tests as well as exploring to discover unintended consequences. Finally, it provides an example charter for exploratory testing of editing user profiles on a system.
A code review is basically a technical discussion which should lead to improvements in the code and/or sharing
knowledge in a team. As with any conversation, it should have substance and form.
What’s involved in a good code review? What kind of problems do we want to spot and address? Trisha Gee will talk
about things a reviewer may consider when looking at changes: what potential issues to look for; why certain
patterns may be harmful; and, of course, what NOT to look at.
But when it comes to commenting on someone’s work, it may be hard to find the right words to convey a useful message
without offending the authors - after all, this is something that they worked hard on. Maria Khalusova will share
some observations, thoughts and practical tricks on how to give and receive feedback without turning a code review
into a battlefield.
This document provides guidance on developing educational materials to teach specific objectives. It recommends writing lab exercises to teach objectives, and lecture materials to prepare students for the labs. Lectures should cover necessary concepts and scaffolding, and explain the overall process and rationale. Instructions for labs should be detailed and include screen captures for clarity. Materials should be divided into modular units that take 1-2 hours each.
This document discusses best practices for test-driven development (TDD). It begins by describing the different types of tests - unit, integration, and acceptance. It then discusses the debate around having more unit tests vs acceptance tests. The document argues that less acceptance tests and more unit tests leads to faster, higher quality code. The rest of the document outlines five rules for writing effective tests: 1) Write tests before coding, 2) Don't test everything, 3) Test only public APIs, 4) Don't create extra getters for testing, and 5) Listen to what your tests are telling you about your code quality and design.
The document discusses ways to improve automated testing practices, such as by making tests easier to write, more readable, and more meaningful. It suggests using mocking frameworks to reduce test complexity, following standards and examples, and adopting a testing framework like Spock that addresses common issues. While progress has been made, there is still work to be done to encourage writing tests, make tests easy to write and understand, and ensure tests are meaningful and focused on the purposes of testing.
The document discusses strategies for testing legacy code, including:
1. Writing any tests, even quick and easy ones, is better than no tests, as it helps maintain old code with new bugs, hardware/OS, and third party changes.
2. Starting with characterization tests that validate expected failures can help fix complicated algorithms.
3. Writing tests divided by separated tasks and flows, focusing on the main path and avoiding edge cases, can help test legacy code not originally designed for testing.
The document discusses anti-patterns and worst practices in software development. Some examples covered include static cling pattern, flags over objects, premature optimization, copy-paste-compile, and reinventing the wheel. It also shares lessons learned from experiences, such as being mindful of date times across time zones, avoiding building SQL from untrusted inputs, and not being too cute with test data. Overall, the document aims to help developers learn from the mistakes of others and adopt better practices.
This document provides an overview of exploratory testing techniques. It discusses that exploratory testing involves simultaneous learning, test design, and test execution. Exploratory testing is tester-centric and focuses on problem solving strategies like heuristics rather than scripts. The document dispels some myths about exploratory testing, including that it is unstructured and cannot involve documentation. It provides examples of how documents can be used for reflection, information sharing, and reporting in exploratory testing.
The methods of exploratory testing has gained significant attention in industry and research in the last years. However, as many “buzzword" technologies, the introduction and application of exploratory testing is not straightforward. Exploratory testing it is not only black or white - scripted or exploratory - but also all shades of grey in between. Within the EASE industrial excellence center, we have executed an industrial workshop on exploratory testing, that helps providing understanding of how to choose feasible levels of exploration in exploratory testing. We will present the concepts of levels of exploration in exploratory testing, the outcomes of the workshop, along with relevant empirical research findings on exploratory testing.
This document discusses ways to raise the bar of software development by combining it with other disciplines. It proposes 6 intersections between software design and other fields: 1) Software Design and UX, 2) Other design disciplines, 3) Materials Science, 4) Math, 5) Engineering principles of built-in self-testing, and 6) Reaching out to scientists. It argues that considering ideas from other domains could improve software design and help address challenges like dependencies in legacy code. The document also suggests ways to fundamentally change development by precisely defining requirements and generating code from them.
Good unit tests are concise, focused on behavior rather than mechanics, and tell a story of intended usage through descriptive names and scenarios. Poor tests are overly procedural and verbose, lacking clarity. Effective testing requires considering tests as specifications that drive development by clearly expressing required functionality, rather than just verifying code works. Tests should focus on scenarios over individual operations and cut across code to demonstrate intended use.
Presentation given at GOTO Chicago that looks at why we don't like to write tests and one approach to improving automated tests that was taken by the MongoDB Java Driver team.
This document provides an overview of pair programming and discusses its benefits. It defines pair programming as two developers working together at one computer, with one typing code as the "driver" and the other reviewing the work and providing feedback as the "navigator". Research has found that pair programming can result in 15% fewer bugs and slightly better design quality compared to solo work. Benefits include improved learning, quality, focus, motivation and morale. The document also covers challenges, tips, and different pairing patterns like driver-navigator and ping-pong pairing.
This document provides an introduction to test-driven development (TDD), including its goals, benefits, and challenges. TDD is an iterative, test-first approach to development where functionality and behavior are defined by tests. Tests are written before code and define the desired API and design. Benefits of TDD include reduced defects, increased initial development time, and easier refactoring and collaboration. Adopting TDD requires practice and a focus on good design principles like separation of concerns.
The document discusses principles for writing simple testable code including focusing on core values like simplicity over flexibility, keeping code clean and formatted, injecting dependencies through constructors or parameters to reduce coupling, writing isolated tests that assert behavior rather than implementation, and using refactoring to maintain simplicity. It also provides references for further reading on simple code design.
This document provides an overview of exploratory testing. It discusses how exploratory testing involves simultaneous test design, execution, and learning. Exploratory testing is tester-centric and relies on heuristics. The tester explores the product by playing around with different features and inputs, looking for anything unusual. Their testing is guided by mental engagement techniques like alternation and branching. Exploratory testing can involve different levels of documentation and formality. It is focused on revealing new information rather than just confirming existing knowledge.
These slides quickly illustrate how you can successfully adopt Agile to improve your development efforts. In addition to discussing how and why teams are interested in Agile, it covers some of the challenges of adopting it and suggestions for ensuring success.
This document summarizes notes from Kent Beck's book "TDD by Example" on test-driven development (TDD). It outlines the core principles of TDD, including writing tests first before code and eliminating duplication. It also describes techniques like red-green-refactor cycles where tests are written to fail initially ("red"), made to pass ("green"), and then code is refactored. The document provides examples of applying TDD to a money conversion problem and discusses patterns for testing, refactoring, and overcoming fears that arise during the process.
This document discusses various techniques for rapid application testing (RAT) such as unit testing, integration testing, smoke testing, system testing, regression testing, performance testing, and test-driven development. It emphasizes automating test plans and test execution to allow tests to be run multiple times for little additional cost. The goal of testing is to balance cost and risk by reusing automated tests that are fast and good predictors of issues while throwing more tests at critical areas.
Exploratory testing is a systematic approach to discovering risks by rigorously analyzing and testing a system through heuristics and testing techniques. It involves simultaneously learning about the target system while designing and immediately executing tests, using feedback from previous experiments to inform new tests. Exploratory testing focuses on discovering things you can vary and uses models, heuristics, time-boxed sessions, and charters to structure the exploration and focus on important areas.
ITCamp 2013 - Florin Coros - Driving Your Team Towards Code QualityITCamp
This document discusses the importance of code quality and driving teams towards good code quality through practices like writing good unit tests. It advocates for writing unit tests that are small, isolated, test only one thing, and are easy to implement. Having such unit tests helps enforce good design principles and patterns that lead to code that is more maintainable, extensible and reusable. It also discusses how continuous refactoring guided by unit tests can help reduce technical debt and keep code quality high over time.
This document summarizes feedback from Milestone 1 of a software development project and plans for Milestone 2. It identifies issues with the initial code quality, testing, and functionality and provides solutions. It then outlines the plans for Milestone 2, which include consolidating into three teams, improving the Java and REST APIs, focusing on quality assurance, and expanding the functionality and realism of the simulation.
Industry-Academia Communication In Empirical Software EngineeringPer Runeson
This document discusses industry-academia communication in empirical software engineering. It provides context on a conference in 1968 that aimed to improve communication between industry and academia. It notes key differences in time horizons and languages between the two. Industry focuses on short-term market changes and profits, while academia focuses on long-term learning and publications. The document advocates for both sides to learn each other's languages and cultures to improve collaboration and help tear down walls between the two. It provides examples of successful collaboration projects over time that have helped improve practice.
This document discusses test driven development (TDD) and how it can be applied to legacy code. It describes the TDD process and patterns for writing tests. When applying TDD to legacy code, it recommends identifying change points and inflection points in the code. Tests should be written to cover the inflection point by breaking dependencies. Then changes can be made using the full TDD process, and the covered code can be refactored.
This document provides an overview of working with legacy code. It begins by defining legacy code as code without tests. It emphasizes the importance of writing tests before modifying legacy code to avoid introducing new bugs. The document outlines a process for working with legacy code that involves identifying requirements, understanding the code, writing tests, and then modifying the code. It discusses common obstacles like not understanding the code or not having time. It provides techniques for overcoming these obstacles, such as extracting methods, exposing static methods, and using test doubles. The document stresses having an attitude of cleaning up code and leaving it in a better state.
This document discusses the principles of clean code based on Robert C. Martin's book "Clean Code". It covers topics like why clean code is important, guidelines for writing clean code like keeping methods small and using descriptive names, design principles like DRY and YAGNI, and code smells to avoid like long methods and duplicated code. The overall goal is to create code that is easy to read, understand and maintain over time.
The document discusses ways to improve automated testing practices, such as by making tests easier to write, more readable, and more meaningful. It suggests using mocking frameworks to reduce test complexity, following standards and examples, and adopting a testing framework like Spock that addresses common issues. While progress has been made, there is still work to be done to encourage writing tests, make tests easy to write and understand, and ensure tests are meaningful and focused on the purposes of testing.
The document discusses strategies for testing legacy code, including:
1. Writing any tests, even quick and easy ones, is better than no tests, as it helps maintain old code with new bugs, hardware/OS, and third party changes.
2. Starting with characterization tests that validate expected failures can help fix complicated algorithms.
3. Writing tests divided by separated tasks and flows, focusing on the main path and avoiding edge cases, can help test legacy code not originally designed for testing.
The document discusses anti-patterns and worst practices in software development. Some examples covered include static cling pattern, flags over objects, premature optimization, copy-paste-compile, and reinventing the wheel. It also shares lessons learned from experiences, such as being mindful of date times across time zones, avoiding building SQL from untrusted inputs, and not being too cute with test data. Overall, the document aims to help developers learn from the mistakes of others and adopt better practices.
This document provides an overview of exploratory testing techniques. It discusses that exploratory testing involves simultaneous learning, test design, and test execution. Exploratory testing is tester-centric and focuses on problem solving strategies like heuristics rather than scripts. The document dispels some myths about exploratory testing, including that it is unstructured and cannot involve documentation. It provides examples of how documents can be used for reflection, information sharing, and reporting in exploratory testing.
The methods of exploratory testing has gained significant attention in industry and research in the last years. However, as many “buzzword" technologies, the introduction and application of exploratory testing is not straightforward. Exploratory testing it is not only black or white - scripted or exploratory - but also all shades of grey in between. Within the EASE industrial excellence center, we have executed an industrial workshop on exploratory testing, that helps providing understanding of how to choose feasible levels of exploration in exploratory testing. We will present the concepts of levels of exploration in exploratory testing, the outcomes of the workshop, along with relevant empirical research findings on exploratory testing.
This document discusses ways to raise the bar of software development by combining it with other disciplines. It proposes 6 intersections between software design and other fields: 1) Software Design and UX, 2) Other design disciplines, 3) Materials Science, 4) Math, 5) Engineering principles of built-in self-testing, and 6) Reaching out to scientists. It argues that considering ideas from other domains could improve software design and help address challenges like dependencies in legacy code. The document also suggests ways to fundamentally change development by precisely defining requirements and generating code from them.
Good unit tests are concise, focused on behavior rather than mechanics, and tell a story of intended usage through descriptive names and scenarios. Poor tests are overly procedural and verbose, lacking clarity. Effective testing requires considering tests as specifications that drive development by clearly expressing required functionality, rather than just verifying code works. Tests should focus on scenarios over individual operations and cut across code to demonstrate intended use.
Presentation given at GOTO Chicago that looks at why we don't like to write tests and one approach to improving automated tests that was taken by the MongoDB Java Driver team.
This document provides an overview of pair programming and discusses its benefits. It defines pair programming as two developers working together at one computer, with one typing code as the "driver" and the other reviewing the work and providing feedback as the "navigator". Research has found that pair programming can result in 15% fewer bugs and slightly better design quality compared to solo work. Benefits include improved learning, quality, focus, motivation and morale. The document also covers challenges, tips, and different pairing patterns like driver-navigator and ping-pong pairing.
This document provides an introduction to test-driven development (TDD), including its goals, benefits, and challenges. TDD is an iterative, test-first approach to development where functionality and behavior are defined by tests. Tests are written before code and define the desired API and design. Benefits of TDD include reduced defects, increased initial development time, and easier refactoring and collaboration. Adopting TDD requires practice and a focus on good design principles like separation of concerns.
The document discusses principles for writing simple testable code including focusing on core values like simplicity over flexibility, keeping code clean and formatted, injecting dependencies through constructors or parameters to reduce coupling, writing isolated tests that assert behavior rather than implementation, and using refactoring to maintain simplicity. It also provides references for further reading on simple code design.
This document provides an overview of exploratory testing. It discusses how exploratory testing involves simultaneous test design, execution, and learning. Exploratory testing is tester-centric and relies on heuristics. The tester explores the product by playing around with different features and inputs, looking for anything unusual. Their testing is guided by mental engagement techniques like alternation and branching. Exploratory testing can involve different levels of documentation and formality. It is focused on revealing new information rather than just confirming existing knowledge.
These slides quickly illustrate how you can successfully adopt Agile to improve your development efforts. In addition to discussing how and why teams are interested in Agile, it covers some of the challenges of adopting it and suggestions for ensuring success.
This document summarizes notes from Kent Beck's book "TDD by Example" on test-driven development (TDD). It outlines the core principles of TDD, including writing tests first before code and eliminating duplication. It also describes techniques like red-green-refactor cycles where tests are written to fail initially ("red"), made to pass ("green"), and then code is refactored. The document provides examples of applying TDD to a money conversion problem and discusses patterns for testing, refactoring, and overcoming fears that arise during the process.
This document discusses various techniques for rapid application testing (RAT) such as unit testing, integration testing, smoke testing, system testing, regression testing, performance testing, and test-driven development. It emphasizes automating test plans and test execution to allow tests to be run multiple times for little additional cost. The goal of testing is to balance cost and risk by reusing automated tests that are fast and good predictors of issues while throwing more tests at critical areas.
Exploratory testing is a systematic approach to discovering risks by rigorously analyzing and testing a system through heuristics and testing techniques. It involves simultaneously learning about the target system while designing and immediately executing tests, using feedback from previous experiments to inform new tests. Exploratory testing focuses on discovering things you can vary and uses models, heuristics, time-boxed sessions, and charters to structure the exploration and focus on important areas.
ITCamp 2013 - Florin Coros - Driving Your Team Towards Code QualityITCamp
This document discusses the importance of code quality and driving teams towards good code quality through practices like writing good unit tests. It advocates for writing unit tests that are small, isolated, test only one thing, and are easy to implement. Having such unit tests helps enforce good design principles and patterns that lead to code that is more maintainable, extensible and reusable. It also discusses how continuous refactoring guided by unit tests can help reduce technical debt and keep code quality high over time.
This document summarizes feedback from Milestone 1 of a software development project and plans for Milestone 2. It identifies issues with the initial code quality, testing, and functionality and provides solutions. It then outlines the plans for Milestone 2, which include consolidating into three teams, improving the Java and REST APIs, focusing on quality assurance, and expanding the functionality and realism of the simulation.
Industry-Academia Communication In Empirical Software EngineeringPer Runeson
This document discusses industry-academia communication in empirical software engineering. It provides context on a conference in 1968 that aimed to improve communication between industry and academia. It notes key differences in time horizons and languages between the two. Industry focuses on short-term market changes and profits, while academia focuses on long-term learning and publications. The document advocates for both sides to learn each other's languages and cultures to improve collaboration and help tear down walls between the two. It provides examples of successful collaboration projects over time that have helped improve practice.
This document discusses test driven development (TDD) and how it can be applied to legacy code. It describes the TDD process and patterns for writing tests. When applying TDD to legacy code, it recommends identifying change points and inflection points in the code. Tests should be written to cover the inflection point by breaking dependencies. Then changes can be made using the full TDD process, and the covered code can be refactored.
This document provides an overview of working with legacy code. It begins by defining legacy code as code without tests. It emphasizes the importance of writing tests before modifying legacy code to avoid introducing new bugs. The document outlines a process for working with legacy code that involves identifying requirements, understanding the code, writing tests, and then modifying the code. It discusses common obstacles like not understanding the code or not having time. It provides techniques for overcoming these obstacles, such as extracting methods, exposing static methods, and using test doubles. The document stresses having an attitude of cleaning up code and leaving it in a better state.
This document discusses the principles of clean code based on Robert C. Martin's book "Clean Code". It covers topics like why clean code is important, guidelines for writing clean code like keeping methods small and using descriptive names, design principles like DRY and YAGNI, and code smells to avoid like long methods and duplicated code. The overall goal is to create code that is easy to read, understand and maintain over time.
This document provides an overview of refactoring legacy code. It discusses the importance of refactoring to maintain and reduce complexity as a system evolves. Refactoring improves code design without changing behavior. Tests are important for refactoring to preserve existing behavior and allow changing code safely. The document outlines a recipe for refactoring legacy code, including identifying change points, adding test points, making code testable, writing tests, and then refactoring and changing code. It emphasizes that legacy code is often not initially testable, requiring changes to break dependencies before adding tests.
The document discusses code smells, which are symptoms in source code that indicate potential problems. It defines common code smells like poor naming, overly complicated code, duplicate logic, and disorganization. The document explains that code smells occur due to time constraints and lack of requirements or ownership. While code smells are not bugs, they can negatively impact readability, maintainability, and lead to bugs over time. The author recommends being vigilant for code smells and taking initiative to refactor smelly code. Tools like the LabVIEW VI Analyzer and TestStand Sequence Analyzer can help identify code smells.
You are already the Duke of DevOps: you have a master in CI/CD, some feature teams including ops skills, your TTM rocks ! But you have some difficulties to scale it. You have some quality issues, Qos at risk. You are quick to adopt practices that: increase flexibility of development and velocity of deployment. An urgent question follows on the heels of these benefits: how much confidence we can have in the complex systems that we put into production? Let’s talk about the next hype of DevOps: SRE, error budget, continuous quality, observability, Chaos Engineering.
TDD and Simple Design Workshop - Session 1 - March 2019Paulo Clavijo
The document discusses test-driven development (TDD) and simple design. It introduces TDD and some of its core practices, including test-driven development, simple design, refactoring, and pair programming. It provides an agenda for a workshop that will cover these topics over three sessions, including extreme programming (XP), the four elements of simple design, test doubles, outside-in TDD, and SOLID principles. The workshop aims to communicate best practices for using technical practices to succeed with agile development.
This document discusses Test Driven Development (TDD). TDD helps create clean, simple code designs with low coupling between components. Writing tests first allows developing code with confidence as tests accumulate. It helps avoid technical debt by refactoring code as needed. TDD produces documentation in the form of executable tests and enables continuous integration and delivery. The TDD process follows the "Red-Green-Refactor" mantra of writing a failing test first, then code to pass the test, and refactoring code as needed. Tests should be written to be fast, independent, repeatable, self-validating, and timely. Tools and coding dojos can help practice and improve TDD skills.
How I Learned to Stop Worrying and Love Legacy Code.....Mike Harris
Legacy Code. I never wrote it; everybody else did!
How many times have you waded through an ageing, decaying, tangled forrest of code and wished it would just die?
How many times have you heard someone say that what really needs to happen is a complete rewrite?
I have heard this many times, and, have uttered that fatal sentence myself.
But shouldn’t we love our legacy code?
Doesn’t it represent our investment and the hard work of ourselves and our predecessors?
Throwing it away is dangerous, because, before we do, we’ll need to work out exactly what it does, and we’ll need to tweeze out that critical business logic nestled in a deeply entangled knot of IF statements. It could take us years to do, and we’ll have to maintain two systems whilst we do it, inevitably adding new features to them both. Yes we get to reimplement using the latest, coolest programming language, instead of an old behemoth, but how long will our new cool language be around, and who will maintain that code, when it itself inevitably turns to legacy?
We can throw our arms in the air, complaining and grumbling about how we didn’t write the code, how we would never have written it the way it is, how those that wrote it were lesser programmers, possibly lesser humans themselves, but the code still remains, staring us in the face and hanging around for longer that we could possibly imagine. We can sort it out, we can improve it, we can make it testable, and we can learn to love our legacy code.
An old dinosaur mainframe faced challenges adapting to agile. [1] Its legacy codebase of 14 million lines had no documentation or structure. [2] It lacked modern tools for collaboration, testing and code management. Adopting agile practices helped by [3] focusing on experience sharing, strong product ownership and frequent customer feedback. Tailoring agile to the unique mainframe environment built a better team and improved customer satisfaction.
This document provides an overview of debugging techniques and best practices. It discusses what debugging is, common debugging rules and methods, as well as tools and techniques for preventing bugs. Key points covered include understanding the system, making failures reproducible, dividing problems, changing one thing at a time, and keeping an audit trail. The document also mentions code reviews, assertions, and defensive programming as ways to prevent bugs.
The document discusses the concept of premature optimization and how it can be counterproductive. It defines optimization as procedures used to make a system as effective as possible, especially mathematical techniques. While optimization is important, prematurely optimizing code before identifying bottlenecks can introduce bugs, waste time, and negatively impact design. The document recommends optimizing during design when possible and only optimizing code proven to be bottlenecks based on measurements. Premature optimization is identified as an anti-pattern that should generally be avoided 97% of the time.
The document discusses the process of refactoring code. It defines refactoring as changing code without altering external behavior but improving internal structure. Reasons for refactoring include making code easier to understand, cheaper to modify, and cleaner over time as a system evolves. The document then provides an example of refactoring a movie rental pricing system by extracting methods, removing duplicate code, and replacing conditional logic with polymorphism to improve the code structure.
In questa sessione verranno analizzate alcune pagine ASP.NET che verranno sottoposte a refactoring per aumentarne la modularità e comprensibilità del codice, nonchè favorire la testabilità delle funzioni core.
Si presenteranno techiche e strumenti che è possibile utilizzare in modo da avere un approccio più razionale ed 'ordinato' nella stesura del codice. Le pratiche ed i concetti illustrati sono di carattere generale, quindi liberamente applicabili ad ogni tipologia di applicazione.
1. Giorgio Zoppi discussed principles of structured software design and distributed message queues. He talked about minimizing complexity through problem decomposition, information hiding, and reducing change amplification.
2. Designing a distributed message queue involves key requirements like multiple producers and consumers, no single point of failure, sequential consistency, and data durability. Messages can be sent, received, and deleted from queues while ensuring non-loss of data.
3. The objectives of structured design are to achieve reliability, maintainability, and scalability through principles such as loose coupling, high cohesion, and minimizing unknown unknowns.
How to Meta-Sumo - Using Logs for Agile Monitoring of Production ServicesChristian Beedgen
Christian Beedgen discusses how to use application logs for monitoring production services. He provides examples of important information to include in logs like timestamps, log levels, and context. Beedgen also describes how Sumo Logic uses logs from its own production system to monitor and manage it through a "shadow system". He gives examples of log searches and aggregations that can provide insight into issues like errors, API performance, and long running operations.
This document provides an overview of 30 tips for optimizing LotusScript development. It begins with introductions and outlines, then groups the tips into three sections: Theory, Practice, and Advanced. The Theory section covers 10 fundamental tips regarding best practices like using Option Declare, version control, application lifecycles, code structure, testing, and error handling. The Practice section presents 10 tips that should be implemented regularly, such as defensive coding, extending arrays, logging, and using NotesDateTime. The Advanced section introduces more complex topics like custom classes and binding. The goal is to help LotusScript developers improve code quality, maintainability, and performance.
The document discusses unit testing principles and purposes. It states that unit testing is used to prove that classes work properly in isolation, catch bugs early, enforce high-quality code, and make refactoring safer. Unit testing encourages modular and loosely coupled code. However, it does not replace integration or system testing and not all code can be unit tested. The document also provides examples of when code should be refactored before writing unit tests.
Workshop - The Little Pattern That Could.pdfTobiasGoeschel
The document discusses refactoring a monolithic application to follow Domain-Driven Design (DDD) and microservice principles. It provides exercises and hints to guide refactoring the codebase to use Hexagonal Architecture with separated domains, commands and queries using CQRS, and persistence-oriented repositories. Later exercises discuss improving test speed by isolating dependencies and refactoring for a serverless architecture by splitting the application into individual use cases and replacing the in-memory repository.
Improve existing code with confidence, supported by unit testsDattatray Kale
Presentation by Pune software craftsmanship around how we can use automated unit tests to improve existing code with confidence. Had multiple hands-on groups exercises to solve a simulated use case. We also had effective code-based discussions to maximize our learning and expand our toolkit.
From my talk at Agile Israel 2019: A description of the possibilities of team work in software development and a straightforward process for getting there: provide the permission to work together, start mobbing, encourage pairing and remove personal assignments.
Handling Waterfall Nostalgia when Moving to AgileYaki Koren
Many issues are surfacing after starting to implement Agile (we talk about kanban and scrum) - many of them are warm memories of how we used to work in Waterfall. In this presentation Michal Epstein, My colleague from AgileSparks, and I are reviewing the various issues and how to handle them. Presented at Agile Israel 2017 by Michal and me.
Manager's role in an agile implementationYaki Koren
My lightning talk at Agile Israel 2016, 22-June. In many agile implementations (be it scrum or something else) middle managers are feeling lost: before the implementation they were the center of events, they were the ones telling other people what to do and now suddenly there is this "self organized teams" and they are requested to take a step back.
The purpose of this presentation is to show the things a manager should do in her new role. This is regardless of other roles she might be playing.
A practical guide for training a large number of people for Scrum.
Produced and Performed by the amdocs delivery agile coaching team:
Dana Alpiner (dana.alpiner@gmail.com)
Hrishikesh Karekar (hrishikesh.karekar@amdocs.com @hrishikarekar)
Keren Yahalom (keren.yahalom@amdocs.com @kyahalom)
Neta Goldstein (neta.Goldstein@amdocs.com)
Sutap Choudhury (sutap.choudhury@amdocs.com @sutapchoudhury)
Vered Raz (veredr@Amdocs.com)
Vinaya Muralidharan (vinayam@amdocs.com @vinaya1980)
Yaki Koren (yaki.koren@gmail.com @yaki_koren)
Yaniv Fitussi (yaniv.fitussi@amdocs.com)
Scrum: an old tale and a despicable overviewYaki Koren
The document summarizes the narrator's experience working on a two-person team maintaining software for an airplane maintenance depot in the 1970s. Their boss would give them a monthly list of tasks to complete with estimates, and the developers would review the estimates and determine how many they could reasonably finish within their capacity. They were able to work closely with users to deliver what was needed. While their boss sometimes wanted them to take on more, they were generally able to meet their commitments and receive positive feedback from users.
Amdocs Case Study: Massive Kanban Implementation (LKNA14)Yaki Koren
Prepared and presented by Keren Yahalom and Yaki Koren at LKNA14
The goals set before us a year and half ago were to stop saying “no” to customers for late or changed scope, while helping them achieve time to value. We have gone through a successful revolutionary change of the way we manage our projects a few years earlier (CCPM), and we felt that the organization cannot handle another revolution. Still, Our customers’ (Telecommunication Service Providers) business required better responsiveness and flexibility, reduce risks and a much faster time to market. Our hundreds to thousands person months complex mission critical projects span up to 70 groups of experts handling products that are tightly integrated over a timeline of a few months, and we had to maintain, if not improve, our quality, while reaching a sustainable development process. The challenge was huge.
In this session we will describe how we pulled it off again, in a completely different implementation approach – evolutionary, pull based. We implemented in different types of projects (huge business transformations, on going releases with existing customers), different scales (from 10 to 150 Person Years projects), different personas (the leaders, the laggers) and in a different manner (adapting the implementation to the specifics of our internal customers).
We will describe what it takes to make it work, and what obstacles we faced. we will share actual boards and reports helping the audience experience the scale, the challenge, the journey.
We will also share the story of the implementation in our first project – a mega project servicing a giant North American telecommunication service provider
Goodbye scope anxiety hello agility: Kanban implementation case study at amdocsYaki Koren
The main problem we were asked to help solve was scope instability: for years, the organization had been fighting to receive the entire scope upfront and, as time passed, this became less and less possible. Our customers’ (Telecommunication Service Providers) business required better responsiveness and flexibility. In the session we will describe our approach for the implementation: evolution. How we helped the managers to evolve and in parallel evolved our coaching practices. The session will show many examples of successful attempts at evolving and also of failures (which provide great opportunities for learning). The session should be a good kick-starter for lean agile implementation.
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j
Dr. Jesús Barrasa, Head of Solutions Architecture for EMEA, Neo4j
Découvrez les dernières innovations de Neo4j, et notamment les dernières intégrations cloud et les améliorations produits qui font de Neo4j un choix essentiel pour les développeurs qui créent des applications avec des données interconnectées et de l’IA générative.
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppGoogle
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-fusion-buddy-review
AI Fusion Buddy Review: Key Features
✅Create Stunning AI App Suite Fully Powered By Google's Latest AI technology, Gemini
✅Use Gemini to Build high-converting Converting Sales Video Scripts, ad copies, Trending Articles, blogs, etc.100% unique!
✅Create Ultra-HD graphics with a single keyword or phrase that commands 10x eyeballs!
✅Fully automated AI articles bulk generation!
✅Auto-post or schedule stunning AI content across all your accounts at once—WordPress, Facebook, LinkedIn, Blogger, and more.
✅With one keyword or URL, generate complete websites, landing pages, and more…
✅Automatically create & sell AI content, graphics, websites, landing pages, & all that gets you paid non-stop 24*7.
✅Pre-built High-Converting 100+ website Templates and 2000+ graphic templates logos, banners, and thumbnail images in Trending Niches.
✅Say goodbye to wasting time logging into multiple Chat GPT & AI Apps once & for all!
✅Save over $5000 per year and kick out dependency on third parties completely!
✅Brand New App: Not available anywhere else!
✅ Beginner-friendly!
✅ZERO upfront cost or any extra expenses
✅Risk-Free: 30-Day Money-Back Guarantee!
✅Commercial License included!
See My Other Reviews Article:
(1) AI Genie Review: https://sumonreview.com/ai-genie-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIFusionBuddyReview,
#AIFusionBuddyFeatures,
#AIFusionBuddyPricing,
#AIFusionBuddyProsandCons,
#AIFusionBuddyTutorial,
#AIFusionBuddyUserExperience
#AIFusionBuddyforBeginners,
#AIFusionBuddyBenefits,
#AIFusionBuddyComparison,
#AIFusionBuddyInstallation,
#AIFusionBuddyRefundPolicy,
#AIFusionBuddyDemo,
#AIFusionBuddyMaintenanceFees,
#AIFusionBuddyNewbieFriendly,
#WhatIsAIFusionBuddy?,
#HowDoesAIFusionBuddyWorks
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
Odoo ERP software
Odoo ERP software, a leading open-source software for Enterprise Resource Planning (ERP) and business management, has recently launched its latest version, Odoo 17 Community Edition. This update introduces a range of new features and enhancements designed to streamline business operations and support growth.
The Odoo Community serves as a cost-free edition within the Odoo suite of ERP systems. Tailored to accommodate the standard needs of business operations, it provides a robust platform suitable for organisations of different sizes and business sectors. Within the Odoo Community Edition, users can access a variety of essential features and services essential for managing day-to-day tasks efficiently.
This blog presents a detailed overview of the features available within the Odoo 17 Community edition, and the differences between Odoo 17 community and enterprise editions, aiming to equip you with the necessary information to make an informed decision about its suitability for your business.
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Crescat
Crescat is industry-trusted event management software, built by event professionals for event professionals. Founded in 2017, we have three key products tailored for the live event industry.
Crescat Event for concert promoters and event agencies. Crescat Venue for music venues, conference centers, wedding venues, concert halls and more. And Crescat Festival for festivals, conferences and complex events.
With a wide range of popular features such as event scheduling, shift management, volunteer and crew coordination, artist booking and much more, Crescat is designed for customisation and ease-of-use.
Over 125,000 events have been planned in Crescat and with hundreds of customers of all shapes and sizes, from boutique event agencies through to international concert promoters, Crescat is rigged for success. What's more, we highly value feedback from our users and we are constantly improving our software with updates, new features and improvements.
If you plan events, run a venue or produce festivals and you're looking for ways to make your life easier, then we have a solution for you. Try our software for free or schedule a no-obligation demo with one of our product specialists today at crescat.io
E-commerce Application Development Company.pdfHornet Dynamics
Your business can reach new heights with our assistance as we design solutions that are specifically appropriate for your goals and vision. Our eCommerce application solutions can digitally coordinate all retail operations processes to meet the demands of the marketplace while maintaining business continuity.
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
E-commerce Development Services- Hornet DynamicsHornet Dynamics
For any business hoping to succeed in the digital age, having a strong online presence is crucial. We offer Ecommerce Development Services that are customized according to your business requirements and client preferences, enabling you to create a dynamic, safe, and user-friendly online store.
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
SOCRadar's Aviation Industry Q1 Incident Report is out now!
The aviation industry has always been a prime target for cybercriminals due to its critical infrastructure and high stakes. In the first quarter of 2024, the sector faced an alarming surge in cybersecurity threats, revealing its vulnerabilities and the relentless sophistication of cyber attackers.
SOCRadar’s Aviation Industry, Quarterly Incident Report, provides an in-depth analysis of these threats, detected and examined through our extensive monitoring of hacker forums, Telegram channels, and dark web platforms.
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsPeter Muessig
The UI5 tooling is the development and build tooling of UI5. It is built in a modular and extensible way so that it can be easily extended by your needs. This session will showcase various tooling extensions which can boost your development experience by far so that you can really work offline, transpile your code in your project to use even newer versions of EcmaScript (than 2022 which is supported right now by the UI5 tooling), consume any npm package of your choice in your project, using different kind of proxies, and even stitching UI5 projects during development together to mimic your target environment.
Mobile App Development Company In Noida | Drona InfotechDrona Infotech
Looking for a reliable mobile app development company in Noida? Look no further than Drona Infotech. We specialize in creating customized apps for your business needs.
Visit Us For : https://www.dronainfotech.com/mobile-application-development/
2. I was told it’s good to start
a presentation with an
interesting personal story.
I have a personal story but
it’s not so interesting.
Many years ago I worked on
a Legacy system…
3. There was a specific area
that was prone to defects.
So I asked my manager to
refactor it. After 3 days of
refactoring there were no
more defects. Not very
interesting indeed.
4. 4 |
In many software
organizations there are
these black holes in the
software.
8. Fear Of Legacy Code Make US:
Dependent on specific people for specific tasks
Avoid the right solution
Slow to react
Not as agile as we would like to be
8 |
Can you afford to have this
in your organization?
9. Ending The Fear Of Legacy Code
Understand what is our safety net
Weave the safety net
Make it easy to understand and change
Make the change
9 |
Are the steps to handle
these black holes.
10. Ending The Fear Of Legacy Code
Understand what is our safety net
Weave the safety net
Make it easy to understand and change
Make the change
10 |
11. At the road
Before starting road works,
there’s a lot of work to be
done, to make it safe.
17. Unit tests!
Quick
Pin pointed
Cheap
Unit tests are very cheap,
very quick and pin point the
problem when it fails.
However it requires
discipline.
18. Unit Tests
18 |
Arrange
Act
Assert
Unit tests are built of three
phases: arrange data, act
(do the job), assert that the
actual outcome is what was
expected
19. 19 |
The answer I get from people
in organizations: “You’re
absolutely right. However our
code is like spaghetti, therefore
it is impossible to run unit
tests.”
22. Ending The Fear Of Legacy Code
Understand what is our safety net
Weave the safety net
Make it easy to understand and change
Make the change
22 |
So, what do we do with our
spaghetti code?
23. 23 |
Method
Method
Method
Method
Database
External API
Globals/static methods
Parameters
Output
1. Wrap, extract
to Interface.2. Add it as a
parameter/ field etc.
3. Create a
fake (Stub,
Mock or
Spy) for
your tests.Use available tests (manual, Integration) and
IDE refactoring (when exist) to do this slowly
and safely
Subclass and
override the
method for
the test
We handle the dependencies
one by one
24. 24 |
That’s a lot of work!
This is about technique, practice
and discipline.
25. 25 |
It took some of us one day
to create a unit test for a
method that everyone were
afraid of in a startup.
26. 26 |
Fixate the results
You don’t need a design
document to know how
should the method work.
You just need to make sure
it continues doing what it
already does.
27. Return on Investment
Start real slow
See benefits
Decide how to continue
27 |
No big investment is required.
You just need to start. It won’t
take long until you need to
make a change in a place that
already has tests – that’s
something!
28. Ending The Fear Of Legacy Code
Understand what is our safety net
Weave the safety net
Make it easy to understand and change
Make the change
28 |
Once the safety net is there the
fun begins. Now it is time to
start refactoring
29. Code Smells
Black sheep/Oddball solution
conditional complexity (If-Else)
Deodorant method
Duplicated code
Feature envy
Inappropriate intimacy/Indecent
exposure
Inefficient name
Long method/Lost intent, Large
class
29 |
Long parameter list
Primitive obsession
Side effect
Solution sprawl
Speculative generality
Switch statement
Temporary field
There are many instances of
bad code
34. Refactoring To Patterns: Small Steps (2 Min.)
34 |
Use design patterns to make the
system more robust, easier to
change
35. 35 |
Every two minutes:
• Make a small change, test
• Make a small change, test
• Make a small change, test
• Make a small change, test
• Make a small change, test
• Make a small change, test
• Stop any time, move to another task. Go home
36. Ending The Fear Of Legacy Code
Understand what is our safety net
Weave the safety net
Make it easy to understand and change
Make the change
36 |
With the safety net there and
with the code readable and
easy to change, making a
change is easy
37. Test Driven Design
Write a test to make sure what you want to move
Make the test fail
Make it pass
Refator
37 |
38. Ending The Fear Of Legacy Code
Understand what is our safety net
Weave the safety net
Make it easy to understand and change
Make the change
38 |