One of the main hindrances to teams being able to respond rapidly to new features are technical problems resulting from bad coding practices, also known as technical debt. Melissa and Brett will cover Agile tools and practices that help development teams write better code and increase maintainability. Topics that will be covered include:
Pair programming
Automated Unit Testing
Refactoring
Test-Driven Development
Agile Architecture
We've all been faced with legacy code and often decided to rewrite, feeling it will be easier. There are many reasons this can be wrong. Adam Culp will talks about the entire journey of refactoring a legacy code base. He will begin with assessment and why, move on to planning how and when, cover execution and testing, give step-by-step examples, and even show how to manage the process effectively. Attendees will gain insight and tips on how to handle their own pile of code and refactor happy.
Seconda serata di introduzione al Test-Driven Development, tenuta in XPeppers a Trento il 24 Ottobre 2012.
Nelle slide c'è anche la descrizione del coding dojo sullo string calculator che abbiamo svolto assieme.
This presentation is part of one of my webinar in clean code webinar series. The contents are slightly edited to share the information in public domain. In this presentation, I tried to provide detailed introduction to code refactoring practice.
This presentation will be useful for software architects/Managers,developers and QAs. Do share your feedback in comments.
Data Generation with PROSPECT: a Probability Specification ToolIvan Ruchkin
Presented at the Winter Simulation Conference 2021.
Abstract: Stochastic simulations of complex systems often rely on sampling dependent discrete random variables. Currently, their users are limited in expressing their intention about how these variables are distributed and related to each other over time. This limitation leads the users to program complex and error-prone sampling algorithms. This paper introduces a way to specify, declaratively and precisely, a temporal distribution over discrete variables. Our tool PROSPECT infers and samples this distribution by solving a system of polynomial equations. The evaluation on three simulation scenarios shows that the declarative specifications are easier to write, 3x more succinct than imperative sampling programs, and are processed correctly by PROSPECT.
We've all been faced with legacy code and often decided to rewrite, feeling it will be easier. There are many reasons this can be wrong. Adam Culp will talks about the entire journey of refactoring a legacy code base. He will begin with assessment and why, move on to planning how and when, cover execution and testing, give step-by-step examples, and even show how to manage the process effectively. Attendees will gain insight and tips on how to handle their own pile of code and refactor happy.
Seconda serata di introduzione al Test-Driven Development, tenuta in XPeppers a Trento il 24 Ottobre 2012.
Nelle slide c'è anche la descrizione del coding dojo sullo string calculator che abbiamo svolto assieme.
This presentation is part of one of my webinar in clean code webinar series. The contents are slightly edited to share the information in public domain. In this presentation, I tried to provide detailed introduction to code refactoring practice.
This presentation will be useful for software architects/Managers,developers and QAs. Do share your feedback in comments.
Data Generation with PROSPECT: a Probability Specification ToolIvan Ruchkin
Presented at the Winter Simulation Conference 2021.
Abstract: Stochastic simulations of complex systems often rely on sampling dependent discrete random variables. Currently, their users are limited in expressing their intention about how these variables are distributed and related to each other over time. This limitation leads the users to program complex and error-prone sampling algorithms. This paper introduces a way to specify, declaratively and precisely, a temporal distribution over discrete variables. Our tool PROSPECT infers and samples this distribution by solving a system of polynomial equations. The evaluation on three simulation scenarios shows that the declarative specifications are easier to write, 3x more succinct than imperative sampling programs, and are processed correctly by PROSPECT.
A quick paced introduction to "Test Driven Development" (TDD) in an agile environment. The TDD philosophy states that you should develop your tests and then write code to make your tests pass and satisfy user requirements.
Some time ago, when refactoring code or adding business logic, my tests failed -> leaving me unsure if I did break something or not.
How to write tests, where you can completely change the implementation and verify that it still works without breaking any test? Feels like a utopia? Come and see how to do this with "real" project example!
This presentation is simply for motivating developers towards test automation and test-driven development. It discusses lightly unit testing, mocking and integration testing, too.
Ryan Goulding and Colin Dixon's presentation from the 2017 Open Networking Summit on Making Strongly-typed NETCONF Usable.
NETCONF's use of strongly-typed YANG to describe device configuration makes safe and robust device configuration possible, but also exposes complexities in operation. Most deployments choose to use a controller or management system to help with issues of inventory and credential management. Further, this controller often does sanity checks to ensure that operations are likely to be successful on devices and, if not, there is useful debugging information. Frustratingly, this exposes trade-offs between relying on strict enforcement of YANG to catching errors early and more relaxed behavior to enable compatibility with imperfect NETCONF implementations in the real world. We show how we navigated these trade-offs to provide a flexible, open-source NETCONF solution that is strongly-typed and enables simple configuration changes for compatibility with imperfect NETCONF implementations.
A quick paced introduction to "Test Driven Development" (TDD) in an agile environment. The TDD philosophy states that you should develop your tests and then write code to make your tests pass and satisfy user requirements.
Some time ago, when refactoring code or adding business logic, my tests failed -> leaving me unsure if I did break something or not.
How to write tests, where you can completely change the implementation and verify that it still works without breaking any test? Feels like a utopia? Come and see how to do this with "real" project example!
This presentation is simply for motivating developers towards test automation and test-driven development. It discusses lightly unit testing, mocking and integration testing, too.
Ryan Goulding and Colin Dixon's presentation from the 2017 Open Networking Summit on Making Strongly-typed NETCONF Usable.
NETCONF's use of strongly-typed YANG to describe device configuration makes safe and robust device configuration possible, but also exposes complexities in operation. Most deployments choose to use a controller or management system to help with issues of inventory and credential management. Further, this controller often does sanity checks to ensure that operations are likely to be successful on devices and, if not, there is useful debugging information. Frustratingly, this exposes trade-offs between relying on strict enforcement of YANG to catching errors early and more relaxed behavior to enable compatibility with imperfect NETCONF implementations in the real world. We show how we navigated these trade-offs to provide a flexible, open-source NETCONF solution that is strongly-typed and enables simple configuration changes for compatibility with imperfect NETCONF implementations.
Enter the mind of an Agile Developer, BSG shares with you how we do software development and how to embed agile methodologies into your development process.
Test Driven Development Methodology and Philosophy Vijay Kumbhar
A technique for building software that guides software development by writing tests. This is the philosophy and state of mind that a developer should change and start following TDD
Discover why unit testing is such an important practice in software development and learn about Test Driven Development, mocking and other code testing practices in .Net
Prashant technical practices-tdd for xebia eventXebia India
Theme: Agile Technical Practices
Epic: TDD implementation
Stories:
Context of TDD
What is TDD
Response of Developers to TDD implementation
Practices complimenting TDD
Success with TDD
The original promise of TDD was that it would assist in guiding the development of clean code, but it often ends up polluting our architecture with excessive composition, is expensive to write, and becomes an obstacle to change, not an aid to refactoring. In this talk, we look at the fallacies of TDD and learn about the key principles that we should be following for mastery of this practice. This talk is intended for those who have been practicing TDD, or who have tried TDD and given up because of shortcomings in the approach they were taught.
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020OdessaJS Conf
How to develop NodeJS apps effectively? I will tell you all details and share his personal experience on the whole process: from the very start and up to the production stage.
You will also learn more about Docker, SDLC and 12 Factor App. Save the date!
Mixing d ps building architecture on the cross cutting examplecorehard_by
В рамках доклада мы поговорим о важности архитектурных решений, в том числе, для обеспечения высокого качества ПО при минимальных трудозатратах. Сквозной пример из области резервного копирования данных позволит лучше понять техническую, QA и общепроцессную составляющие подхода. Прошло достаточно времени, чтобы раскрыть технические детали без нарушения NDA, предложенный вариант на базе метрик, которые мы обязательно упомянем, был признан лучшим архитектурным решением в рамках компании – одного из лидеров отрасли, получил награду Microsoft, был «размножен» на смежные области. Приступаем: Builder, Decorator, Composite, Iterator и Visitor - как эти паттерны помогли решить нетривиальную С++ задачу.
QA Strategies for Testing Legacy Web AppsRainforest QA
Paul Miles, Software Development Manager at NPR, discusses QA strategies and tools his team uses to address the challenge of maintaining legacy products at NPR.
In this presentation, he covers:
- How to effectively strategize what types of tests to add to legacy software
- What cost-effective tools and testing strategies you can adopt in your organization
- Approaches about how to incorporate testing into your organization’s build pipelines
- How to foster testing centric culture in your organization
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
Cyaniclab : Software Development Agency Portfolio.pdfCyanic lab
CyanicLab, an offshore custom software development company based in Sweden,India, Finland, is your go-to partner for startup development and innovative web design solutions. Our expert team specializes in crafting cutting-edge software tailored to meet the unique needs of startups and established enterprises alike. From conceptualization to execution, we offer comprehensive services including web and mobile app development, UI/UX design, and ongoing software maintenance. Ready to elevate your business? Contact CyanicLab today and let us propel your vision to success with our top-notch IT solutions.
Experience our free, in-depth three-part Tendenci Platform Corporate Membership Management workshop series! In Session 1 on May 14th, 2024, we began with an Introduction and Setup, mastering the configuration of your Corporate Membership Module settings to establish membership types, applications, and more. Then, on May 16th, 2024, in Session 2, we focused on binding individual members to a Corporate Membership and Corporate Reps, teaching you how to add individual members and assign Corporate Representatives to manage dues, renewals, and associated members. Finally, on May 28th, 2024, in Session 3, we covered questions and concerns, addressing any queries or issues you may have.
For more Tendenci AMS events, check out www.tendenci.com/events
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?XfilesPro
Worried about document security while sharing them in Salesforce? Fret no more! Here are the top-notch security standards XfilesPro upholds to ensure strong security for your Salesforce documents while sharing with internal or external people.
To learn more, read the blog: https://www.xfilespro.com/how-does-xfilespro-make-document-sharing-secure-and-seamless-in-salesforce/
In software engineering, the right architecture is essential for robust, scalable platforms. Wix has undergone a pivotal shift from event sourcing to a CRUD-based model for its microservices. This talk will chart the course of this pivotal journey.
Event sourcing, which records state changes as immutable events, provided robust auditing and "time travel" debugging for Wix Stores' microservices. Despite its benefits, the complexity it introduced in state management slowed development. Wix responded by adopting a simpler, unified CRUD model. This talk will explore the challenges of event sourcing and the advantages of Wix's new "CRUD on steroids" approach, which streamlines API integration and domain event management while preserving data integrity and system resilience.
Participants will gain valuable insights into Wix's strategies for ensuring atomicity in database updates and event production, as well as caching, materialization, and performance optimization techniques within a distributed system.
Join us to discover how Wix has mastered the art of balancing simplicity and extensibility, and learn how the re-adoption of the modest CRUD has turbocharged their development velocity, resilience, and scalability in a high-growth environment.
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
Traditional software testing methods are being challenged in retail, where customer expectations and technological advancements continually shape the landscape. Enter generative AI—a transformative subset of artificial intelligence technologies poised to revolutionize software testing.
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Anthony Dahanne
Les Buildpacks existent depuis plus de 10 ans ! D’abord, ils étaient utilisés pour détecter et construire une application avant de la déployer sur certains PaaS. Ensuite, nous avons pu créer des images Docker (OCI) avec leur dernière génération, les Cloud Native Buildpacks (CNCF en incubation). Sont-ils une bonne alternative au Dockerfile ? Que sont les buildpacks Paketo ? Quelles communautés les soutiennent et comment ?
Venez le découvrir lors de cette session ignite
Modern design is crucial in today's digital environment, and this is especially true for SharePoint intranets. The design of these digital hubs is critical to user engagement and productivity enhancement. They are the cornerstone of internal collaboration and interaction within enterprises.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
Into the Box Keynote Day 2: Unveiling amazing updates and announcements for modern CFML developers! Get ready for exciting releases and updates on Ortus tools and products. Stay tuned for cutting-edge innovations designed to boost your productivity.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
How Recreation Management Software Can Streamline Your Operations.pptxwottaspaceseo
Recreation management software streamlines operations by automating key tasks such as scheduling, registration, and payment processing, reducing manual workload and errors. It provides centralized management of facilities, classes, and events, ensuring efficient resource allocation and facility usage. The software offers user-friendly online portals for easy access to bookings and program information, enhancing customer experience. Real-time reporting and data analytics deliver insights into attendance and preferences, aiding in strategic decision-making. Additionally, effective communication tools keep participants and staff informed with timely updates. Overall, recreation management software enhances efficiency, improves service delivery, and boosts customer satisfaction.
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...informapgpstrackings
Keep tabs on your field staff effortlessly with Informap Technology Centre LLC. Real-time tracking, task assignment, and smart features for efficient management. Request a live demo today!
For more details, visit us : https://informapuae.com/field-staff-tracking/
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Software Engineering, Software Consulting, Tech Lead.
Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Security,
Spring Transaction, Spring MVC,
Log4j, REST/SOAP WEB-SERVICES.
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
5. ● Continuous Code Review
● Better Design w/ Less Code
● Faster Problem Solving
● More People Familiar w/ System
● Team Grows Closer
Pair Programming - Benefits
9. What is Automated Unit Testing?
Use of special software to control the
execution of unit tests and the comparison of
actual outcomes with predicted outcomes.
To get full benefit run as part of the build
process and schedule to run automatically
once or twice a day.
10. Automated Unit Test Suite Benefits
● Unit tests find problems early in the development cycle
● Developers will be less afraid to change code
● Development process becomes more flexible
● Easier for a developer to take over code they are
unfamiliar with (improves “Truck Factor”)
● Reduces need for manual testing
● Software development becomes more testable and
repeatable
11. What is a Unit Test Case?
● A test for a single unit of functionality
● Each method tests a specific bit of
functionality
● Automated by the test-runner framework
12. AAA Test Structure
● Structure:
○ Arrange
○ Act
○ Assert
● Benefits:
○ Readable
○ Consistent
public class SalesTaxTest
{
private SalesTax unit;
@Test
public void TestCalculate()
{
unit = new SalesTax(); // ARRANGE
double tax = unit.Calculate(10); // ACT
Assert.assertEquals(tax, 0.9); // ASSERT
}
}
13. Unit Testing Best Practices
● Test simple stuff first
● Get it working - then test boundaries/exceptions
● Use assert
● Keep tests small & understandable
● Make test method names descriptive
● Keep tests independent of each other
● Avoid System.out messages
● Don’t repeat tests! Test once and trust it.
14. Test Doubles
● Stand in for a collaborating object e.g. database,
webservice
● Create test independence
● Make tests run faster
● Types of Doubles
○ Fakes: working implementation e.g.fake web service
○ Mocks: preprogrammed with expectations
○ Stubs: provide canned answers to the test’s calls
17. What is Refactoring?
“A change to the system that leaves its behavior
unchanged, but enhances some non-functional quality -
simplicity, flexibility, understandability, performance”
-- Kent Beck, Extreme Programing Explained (p. 179)
“A change made to the internal structure of software to
make it easier to understand and cheaper to modify without
changing its observable behavior.”
-- Martin Fowler, Refactoring (p. 53)
18. Why Refactor the Code?
● Prevent “design decay”
● Clean up messes
● Simplify
● Increase readability / understandability
● Find bugs
● Reduce debugging time
● Build in what we learn about the application
● It’s part of the creative process
19. When to Refactor
● Code reviews / TDD cycle
● Rule of three
○ cut & paste. Third time copying? Now is the time to
generalize and move this to a new procedure.
● When you:
○ add functionality
○ learn something about the code
○ identify a code smell
20. What is a Code Smell?
● any symptom in the code that possibly
indicates a deeper problem.
● not bugs - but indicate weaknesses in design
that may be slowing down development or
increasing the risk of bugs or failures in the
future.
21. Code Smells (1/2)
● Duplicated code: near-identical code in multiple places
● Long method: a too large method/function/procedure
● Large class: a class that has grown too large.
● Too many parameters: decreases readability/quality.
● Identifier names are too short or excessively long
● Complex conditionals: branches that check lots of
unrelated conditions and edge cases that don't seem to
capture the meaning of a block of code.
22. Code Smells (2/2)
● Comments - refactor so these are no longer needed!
● Feature envy: excessive use of another class’ methods
● Inappropriate intimacy: a class that has dependencies
on implementation details of another class.
● Lazy class / Freeloader: a class that does too little.
● Contrived complexity: simpler design would suffice.
● Excessive use of literals (use named constants)
23. Why Developers Resist Refactoring
● Lack of understanding
● Short-term focus
● Not paid for overhead tasks like refactoring
● Fear of breaking current program
Use TDD to overcome this fear!
25. TDD as a Design Approach
● Tests define up front what “works” means
● Programing by intention - write tests for what
code intends to do not what the code you just wrote
does.
● Focus on minimum set of required features
● Regular integration of small changes
● Evolutionary Design: Tests provide a safety
net for refactoring.
27. How to Get to Green? Implement it!
Obvious
Implementation
code the real implementation, if
it's obvious and can quickly make
test pass, otherwise...
public int Sum(int x, int y)
{
return x + y;
}
28. How to Get to Green? Fake it
Fake it
hardcode constants to make test
pass, gradually generalize code
using variables
public int Fibonacci(int n)
{
if (n >= 1) return 1;
return 0;
}
29. How to Get to Green? Triangulate
Triangulate
figure out the behavior of an
algorithm by examining a couple
of test cases instead of just one.
public void TestSum()
{
Assert.AreEqual(4, Plus(3, 1));
Assert.AreEqual(7, Plus(4, 3));
}
30. Use TDD to Earn a Gift Card!
TDD is a great tool to use in solving the code challenges. E.g. Function takes a
Roman Numeral String and returns the Decimal value.
● Start with simple valid numbers I, III... up to more complex tests
● Incorporate tests for boundary conditions and invalid numbers
● With a set of tests you can easily refactor your solution.
VALID NUMBERS INVALID NUMBERS
I Boundary: Empty, 0, MMMM
III iii
IV IVIV, IIII, IIX, MXXXX
VI, XLIX, MMMDCCCLXXXVIII ABCDEF
31. A Great TDD Example!
● Bowling Kata - how to score a bowling
game.
● Eclipse and junit step-by-step presentation
on red - green - refactor to solve (butunclebob.
com/files/downloads/Bowling%20Game%20Kata.ppt)
36. Standards and Principles
● Agree as a team
○ coding and naming conventions
○ toolset
■ Static Code Analysis, Test mocks, etc
○ best practices
● Avoid Technical Debt
● Follow well established principles and
patterns
37. Object Oriented Design Principles
S ingle Responsibilty
O pen/Closed
L iskov Substitution
I nterface Segregation
D ependency Inversion
38.
39. The Single Responsibility Principle
● Every class should have a single responsibility, and that responsibility
should be entirely encapsulated by the class. All its services should be
narrowly aligned with that responsibility.
● Single Reason to Change
40. class Book {
function getTitle() {
return "A Great Book";
}
function getAuthor() {
return "John Doe";
}
function turnPage() {
// pointer to next page
}
function printCurrentPage() {
echo "current page content";
}
}
41.
42. The Open/Closed Principle
● You should be able to extend a classes
behavior without modifying it
● Open for extension, but closed for
modification
43. public double Area(object[] shapes)
{
double area = 0;
foreach (var shape in shapes) {
if (shape is Rectangle) {
Rectangle rectangle = (Rectangle) shape;
area += rectangle.Width*rectangle.Height;
} else {
Circle circle = (Circle)shape;
area += circle.Radius * circle.Radius * Math.PI;
}
}
return area;
}
44.
45. The Liskov Substitution Principle
● Derived classes must be substitutable for
their base classes
46. public class Rectangle {
private int width;
private int height;
// setters and getters
}
public class Square extends Rectangle {
public Square(int height, int width) {
setWidth(width);
setHeight(height);
}
}
47.
48. The Interface Segregation Principle
● No client should be forced to depend on
methods it does not use
49. interface Worker {
void work();
void eat();
}
class HumanWorker implements Worker {
Public void work { /* do work stuff */ }
Public void eat { /* eat stuff */ }
}
class RobotWorker implements Worker {
Public void work { /* do work stuff */ }
Public void eat { /* ACK! I don't eat! */ }
}
interface Worker {
void work();
}
interface Eater {
void eat();
}
class HumanWorker implements Worker, Eater {
Public void work { /* do work stuff */ }
Public void eat { /* eat stuff */ }
}
class RobotWorker implements Worker {
Public void work { /* do work stuff */ }
}
50.
51. The Dependency Inversion Principle
● High-level modules should not depend on
low-level modules. Both should depend on
abstractions.
● Abstractions should not depend on details.
Details should depend on abstractions.
52. class Worker {
private FileWriter fileWriter;
public Worker() {
fileWriter = new FileWriter();
}
}
class Worker {
private FileWriter fileWriter;
public Worker(FIleWriter writer) {
fileWriter = writer;
}
}
interface FileWriter {
// writer files or something
}