Doing refactoring seems to be obvious practice in a software development. In many teams times it is not being done at all. "We have no time to do it!". "We are not allowed". "We don't know where to start and how to do it pragmatically". Many programmers are familiar with classic refactorings or even more complex refactorings to patterns, clean code rules and naming rules. But it is not enough. Pragmatic refactoring is a difficult practice that requires many years of experience. And what if you or folks from your team don't have that experience? Then refactoring may be more harmful than useful. The Natural Course of Refactoring is a process, workflow that expresses something what may seem obvious for experienced refactoring practitioner but very difficult to figure out for beginners or even more advanced practitioners. It is like red-green-refactor for TDD. NCR is a way of thinking which shifts your focus from single refactorings to a more holistic approach. It is also decision framework helping you to specify what is next pragmatic step (if there is any).It helps you to recognize what stage the particular fragment of source code is, what you can do about it and decide if to do something or leave it as it is. It guides you what exact refactorings you should take into consideration in the particular stage and also which refactorings are way too big steps.
Mariusz Sieraczkiewicz - Natural course of refactoringAgile Lietuva
Doing refactoring seems to be obvious practice in a software development. In many teams times it is not being done at all. "We have no time to do it!". "We are not allowed". "We don't know where to start and how to do it pragmatically". Many programmers are familiar with classic refactorings or even more complex refactorings to patterns, clean code rules and naming rules. But it is not enough. Pragmatic refactoring is a difficult practice that requires many years of experience. And what if you or folks from your team don't have that experience? Then refactoring may be more harmful than useful. The Natural Course of Refactoring is a process, workflow that expresses something what may seem obvious for experienced refactoring practitioner but very difficult to figure out for beginners or even more advanced practitioners. It is like red-green-refactor for TDD. NCR is a way of thinking which shifts your focus from single refactorings to a more holistic approach. It is also decision framework helping you to specify what is next pragmatic step (if there is any).It helps you to recognize what stage the particular fragment of source code is, what you can do about it and decide if to do something or leave it as it is. It guides you what exact refactorings you should take into consideration in the particular stage and also which refactorings are way too big steps. Who can benefit from this?
Every programmer beginning refactoring practice or having need for clear guidance about refactoring process.
Every leader who wants refactoring to become an everyday practice even in inexperience team.
Every coach who wants to have a simple yet powerful framework to teach refactoring as a whole process (not only weakly connected pieces).
Structured soft skills (not only) for Technical Leaders - Agilia Brno 2014BNS IT
You are not a born leader. You haven't been prepared to be one but you were chosen to be. And then everything changed. Now you should be a good communicator, negotiator, mediator, facilitator, motivator. You have heard that you should be a servant leader, should prefer collaboration over contract negotiation, people over processes but … you think: „What the heck should I exactly do?“ Most of the leadership hints are general, fuzzy and unstructured. If it sounds familiar to you, this is a talk for you.
We will talk about fundamental soft skills in a structured way. You will see a lot of schemas, diagrams, algorithms, dependencies you weren't aware of before. This way misty soft world will become familiar and easier to understand for left-brainers (people loving to think in an analytical way).
What we will talk about?
How to resolve tough (conflict) situations.
How to find a problem solution.
How to conduct effective meetings in a way nobody told you about earlier.
Who will benefit from this?
Technical leaders, team leaders, any other kind of leaders working dealing with software development.
Leaders and all technical folks interested in developing their soft skills.
Technical guys (developers, testers, ux designers) at least having clue that soft skills might be really important in their work.
Mariusz Sieraczkiewicz - Natural course of refactoringAgile Lietuva
Doing refactoring seems to be obvious practice in a software development. In many teams times it is not being done at all. "We have no time to do it!". "We are not allowed". "We don't know where to start and how to do it pragmatically". Many programmers are familiar with classic refactorings or even more complex refactorings to patterns, clean code rules and naming rules. But it is not enough. Pragmatic refactoring is a difficult practice that requires many years of experience. And what if you or folks from your team don't have that experience? Then refactoring may be more harmful than useful. The Natural Course of Refactoring is a process, workflow that expresses something what may seem obvious for experienced refactoring practitioner but very difficult to figure out for beginners or even more advanced practitioners. It is like red-green-refactor for TDD. NCR is a way of thinking which shifts your focus from single refactorings to a more holistic approach. It is also decision framework helping you to specify what is next pragmatic step (if there is any).It helps you to recognize what stage the particular fragment of source code is, what you can do about it and decide if to do something or leave it as it is. It guides you what exact refactorings you should take into consideration in the particular stage and also which refactorings are way too big steps. Who can benefit from this?
Every programmer beginning refactoring practice or having need for clear guidance about refactoring process.
Every leader who wants refactoring to become an everyday practice even in inexperience team.
Every coach who wants to have a simple yet powerful framework to teach refactoring as a whole process (not only weakly connected pieces).
Structured soft skills (not only) for Technical Leaders - Agilia Brno 2014BNS IT
You are not a born leader. You haven't been prepared to be one but you were chosen to be. And then everything changed. Now you should be a good communicator, negotiator, mediator, facilitator, motivator. You have heard that you should be a servant leader, should prefer collaboration over contract negotiation, people over processes but … you think: „What the heck should I exactly do?“ Most of the leadership hints are general, fuzzy and unstructured. If it sounds familiar to you, this is a talk for you.
We will talk about fundamental soft skills in a structured way. You will see a lot of schemas, diagrams, algorithms, dependencies you weren't aware of before. This way misty soft world will become familiar and easier to understand for left-brainers (people loving to think in an analytical way).
What we will talk about?
How to resolve tough (conflict) situations.
How to find a problem solution.
How to conduct effective meetings in a way nobody told you about earlier.
Who will benefit from this?
Technical leaders, team leaders, any other kind of leaders working dealing with software development.
Leaders and all technical folks interested in developing their soft skills.
Technical guys (developers, testers, ux designers) at least having clue that soft skills might be really important in their work.
The is from the book Agile Development in .NET by Dan Hermes. Most Agile methodologies used in .NET shops nationwide are variations of Scrum and Extreme Programming(XP). This booklet covers these tools and techniques: Test-driven Development (TDD), Behavior-driven Development (BDD), Continuous Integration (CI), and Refactoring to Patterns. The QuickNotes series covers relevant topics in software development to provide the reader with a swift overview of important trends, terms, and concepts. This book is available at Amazon.com.
Evolutionary Design - NewCrafts Paris 18 May 2018Adi Bolboaca
Evolutionary Design: “The art of growing a system by observing its naturaltraits and then normalizing and optimizing its growth” Evolutionary Design seems to be one of the black arts of software development.
Evolution = transformation Evolving the code is not done by magic, we the programmers evolve the code,. And we need specific techniques for that. When we evolve, we transform the code to something else. We will talk about some of these transformations, when to use each one and why.
Simplicity We work feature by feature and not layer by layer. All the development is done on a vertical thin slice through all the layers. We use evolutionary refactoring with many design principles in our mind, but not with a predefined design. We respect the principles, but focus on finding the simplest solution for the problem.
Focus on the problem, not the solution We want to rather focus on the problem and not the solution, rather than when we know the solution, but we just find the fastest way to implement it. When we know the solution, the question is: can it be improved; is it worth it? We will talk about some heuristics of “good enough”.
This talk will be an interactive one, presenting some of the most useful techniques for Evolutionary Design.
Most of the people think that quality in software development is limited to manual testing on the latest stage before releasing a product. That might be true 20 years ago in the industrial era. But current world is much more dynamic than before. Time to market became the most crucial metric nowadays. Releasing code to production need to be done faster and faster. How to maintain quality on a sufficient level in this fast paced environment? How to find a time to work on quality improvements? Those are two main questions I want to answer during this talk. Do not expect a silver bullet or even receipt to success. But definitely expect a lot of information about continuous delivery/deployment/improvements with a case studies and lessons we learned at Spotify.
Spotify Engineering Culture:
https://labs.spotify.com/2014/03/27/spotify-engineering-culture-part-1/
https://labs.spotify.com/2014/09/20/spotify-engineering-culture-part-2/
Scaling Agile @ Spotify
http://blog.crisp.se/2012/11/14/henrikkniberg/scaling-agile-at-spotify
Scaled Agile @ Spotify
http://vimeo.com/111131934
Become a better UX designer through codeRamon Lapenta
Presentation at UX London 2014
The web is a fluid and inherently flexible medium - to design effectively for it you need to understand it better. In this hands-on workshop we will look to level up your HTML & CSS skills to learn how you can create responsive prototypes and re-usable pattern libraries for your web projects. We’ll explore how to create layouts that flow beautifully from tiny screens to large ones and how to design responsive grids from the content-out. Through practical examples we’ll discuss the benefits of developing responsive pattern libraries including when and how to use them.
In this talk I talked about how,in the Kamaelia project, we manage the dilemma of encouraging innovation and creativity in a project whilst maintaining an engineered solution. Why? Because we find it allows a high level of creative freedom, whilst also providing a path through to a high level of confidence in the reliabilty of the final code.
CodeValue Architecture Next 2018 - Executive track dilemmas and solutions in...Erez PEDRO
Moderen Software projects are challenging to develop. Eran Stiller, Ronen Rubinfeld, and Erez Pedro from CodeValue show a method for conducting multidisciplinary product discovery.
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...BA and Beyond
Good software is not only error-free software, but more importantly software that does what the customer needs. This seems obvious, but in reality, the communication gap between business professionals and software development teams still causes a loss of time, money and good will.
Behaviour Driven Development (BDD) tries to bridge the gap between the different stakeholders.
At UCLL, we started a research project to promote this methodology with Belgian companies. We are strong believers and try to find out why BDD it is not more widely used. The goal is to develop an ‘implementation model’, a set of best practices, do’s and don’ts, helping companies to successfully distill high-quality specifications that can guide the development and testing process from the start of a project.
We would love to share our experiences, talk about the problems we come across, and discuss the way we handle them.
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie WellsRosie Wells
Insight: In a landscape where traditional narrative structures are giving way to fragmented and non-linear forms of storytelling, there lies immense potential for creativity and exploration.
'Collapsing Narratives: Exploring Non-Linearity' is a micro report from Rosie Wells.
Rosie Wells is an Arts & Cultural Strategist uniquely positioned at the intersection of grassroots and mainstream storytelling.
Their work is focused on developing meaningful and lasting connections that can drive social change.
Please download this presentation to enjoy the hyperlinks!
More Related Content
Similar to Natural course of refactoring - Mix-IT Lyon 2014
The is from the book Agile Development in .NET by Dan Hermes. Most Agile methodologies used in .NET shops nationwide are variations of Scrum and Extreme Programming(XP). This booklet covers these tools and techniques: Test-driven Development (TDD), Behavior-driven Development (BDD), Continuous Integration (CI), and Refactoring to Patterns. The QuickNotes series covers relevant topics in software development to provide the reader with a swift overview of important trends, terms, and concepts. This book is available at Amazon.com.
Evolutionary Design - NewCrafts Paris 18 May 2018Adi Bolboaca
Evolutionary Design: “The art of growing a system by observing its naturaltraits and then normalizing and optimizing its growth” Evolutionary Design seems to be one of the black arts of software development.
Evolution = transformation Evolving the code is not done by magic, we the programmers evolve the code,. And we need specific techniques for that. When we evolve, we transform the code to something else. We will talk about some of these transformations, when to use each one and why.
Simplicity We work feature by feature and not layer by layer. All the development is done on a vertical thin slice through all the layers. We use evolutionary refactoring with many design principles in our mind, but not with a predefined design. We respect the principles, but focus on finding the simplest solution for the problem.
Focus on the problem, not the solution We want to rather focus on the problem and not the solution, rather than when we know the solution, but we just find the fastest way to implement it. When we know the solution, the question is: can it be improved; is it worth it? We will talk about some heuristics of “good enough”.
This talk will be an interactive one, presenting some of the most useful techniques for Evolutionary Design.
Most of the people think that quality in software development is limited to manual testing on the latest stage before releasing a product. That might be true 20 years ago in the industrial era. But current world is much more dynamic than before. Time to market became the most crucial metric nowadays. Releasing code to production need to be done faster and faster. How to maintain quality on a sufficient level in this fast paced environment? How to find a time to work on quality improvements? Those are two main questions I want to answer during this talk. Do not expect a silver bullet or even receipt to success. But definitely expect a lot of information about continuous delivery/deployment/improvements with a case studies and lessons we learned at Spotify.
Spotify Engineering Culture:
https://labs.spotify.com/2014/03/27/spotify-engineering-culture-part-1/
https://labs.spotify.com/2014/09/20/spotify-engineering-culture-part-2/
Scaling Agile @ Spotify
http://blog.crisp.se/2012/11/14/henrikkniberg/scaling-agile-at-spotify
Scaled Agile @ Spotify
http://vimeo.com/111131934
Become a better UX designer through codeRamon Lapenta
Presentation at UX London 2014
The web is a fluid and inherently flexible medium - to design effectively for it you need to understand it better. In this hands-on workshop we will look to level up your HTML & CSS skills to learn how you can create responsive prototypes and re-usable pattern libraries for your web projects. We’ll explore how to create layouts that flow beautifully from tiny screens to large ones and how to design responsive grids from the content-out. Through practical examples we’ll discuss the benefits of developing responsive pattern libraries including when and how to use them.
In this talk I talked about how,in the Kamaelia project, we manage the dilemma of encouraging innovation and creativity in a project whilst maintaining an engineered solution. Why? Because we find it allows a high level of creative freedom, whilst also providing a path through to a high level of confidence in the reliabilty of the final code.
CodeValue Architecture Next 2018 - Executive track dilemmas and solutions in...Erez PEDRO
Moderen Software projects are challenging to develop. Eran Stiller, Ronen Rubinfeld, and Erez Pedro from CodeValue show a method for conducting multidisciplinary product discovery.
BA and Beyond 20 - Elke Steegmans and David Vandenbroeck - Behaviour-driven d...BA and Beyond
Good software is not only error-free software, but more importantly software that does what the customer needs. This seems obvious, but in reality, the communication gap between business professionals and software development teams still causes a loss of time, money and good will.
Behaviour Driven Development (BDD) tries to bridge the gap between the different stakeholders.
At UCLL, we started a research project to promote this methodology with Belgian companies. We are strong believers and try to find out why BDD it is not more widely used. The goal is to develop an ‘implementation model’, a set of best practices, do’s and don’ts, helping companies to successfully distill high-quality specifications that can guide the development and testing process from the start of a project.
We would love to share our experiences, talk about the problems we come across, and discuss the way we handle them.
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie WellsRosie Wells
Insight: In a landscape where traditional narrative structures are giving way to fragmented and non-linear forms of storytelling, there lies immense potential for creativity and exploration.
'Collapsing Narratives: Exploring Non-Linearity' is a micro report from Rosie Wells.
Rosie Wells is an Arts & Cultural Strategist uniquely positioned at the intersection of grassroots and mainstream storytelling.
Their work is focused on developing meaningful and lasting connections that can drive social change.
Please download this presentation to enjoy the hyperlinks!
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...SkillCertProExams
• For a full set of 760+ questions. Go to
https://skillcertpro.com/product/databricks-certified-data-engineer-associate-exam-questions/
• SkillCertPro offers detailed explanations to each question which helps to understand the concepts better.
• It is recommended to score above 85% in SkillCertPro exams before attempting a real exam.
• SkillCertPro updates exam questions every 2 weeks.
• You will get life time access and life time free updates
• SkillCertPro assures 100% pass guarantee in first attempt.
This presentation, created by Syed Faiz ul Hassan, explores the profound influence of media on public perception and behavior. It delves into the evolution of media from oral traditions to modern digital and social media platforms. Key topics include the role of media in information propagation, socialization, crisis awareness, globalization, and education. The presentation also examines media influence through agenda setting, propaganda, and manipulative techniques used by advertisers and marketers. Furthermore, it highlights the impact of surveillance enabled by media technologies on personal behavior and preferences. Through this comprehensive overview, the presentation aims to shed light on how media shapes collective consciousness and public opinion.
3. www.bnsit.pl
Once you get started, you’ll only stop
because you’re exhausted.
One mistake and the consequences
may be really huge.
Why refactoring is like sex?
Natural Course of Refactoring 2014 3
(adapted from http://www.thealmightyguru.com/Humor/Docs/ProgrammingIsLikeSex.html)
4. www.bnsit.pl
People more talk about it than
actually do.
You can do it for money or for fun.
It’s not really an appropriate topic for
dinner conversation.
Why refactoring is like sex?
Natural Course of Refactoring 2014 4
(adapted from http://www.thealmightyguru.com/Humor/Docs/ProgrammingIsLikeSex.html)
5. www.bnsit.pl
Beginners do a lot of noise about it.
Some people are just naturally good at it,
.. but some people will never realize how
bad they are, and you’re wasting your time
trying to tell them.
Why refactoring is like sex?
Natural Course of Refactoring 2014 5
(adapted from http://www.thealmightyguru.com/Humor/Docs/ProgrammingIsLikeSex.html)
6. www.bnsit.pl
It doesn’t go so well when you’re
drunk, but you’re more likely to do it.
You’ll miss it after a longer break.
Why refactoring is like sex?
Natural Course of Refactoring 2014 6
(adapted from http://www.thealmightyguru.com/Humor/Docs/ProgrammingIsLikeSex.html)
9. www.bnsit.pl
Introducing changes to software (so called
progressive changes) usually modifies
structure of the code, what cumulated
makes the code less readable. The number
of dependencies and interactions between
different system modules increase, so that
it is more difficult to understand and
modify.
Why is it difficult to understand software after some
time of its evolution?
Natural Course of Refactoring 2014 9
10. www.bnsit.pl
Even answers to easy questions are difficult to
find.
The problem lies more in a code readibility,
than in the programmers reading skills.
Even great reader will not perform good in
such environment.
What alters programmers productivity in this case?
Natural Course of Refactoring 2014 10
13. www.bnsit.pl
Everyday refactoring
Within a reach of every programmer
Can be done in minutes
Mostly safe, IDE-base automatic refactorings
For local health of the code
Part of programming practice
No excuse for not doing it
Main practices
Cleaning names
Naming conditions
Extracting methods
Moving methods and extracting classes
Everyday refactoring
Natural Course of Refactoring 2014 13
14. www.bnsit.pl
Strategic refactoring
A team longer term effort
Requires aligning with iteration planning
Generates items in backlog
Risky activity that requires intensive testing (including good
tests suite)
Difficult and time-consuming
Check carefully if refactoring gives you enough value
(Feather’s Quadrant)
Main practices
Introducing high level design patterns
Introducing architectural changes
Strategic refactoring
Natural Course of Refactoring 2014 14
16. www.bnsit.pl
1. complexity := 1
2. For every decision point (if, while, for,
and, or, try, case, break, continue)
complexity++
3. if 6 <= complexity <= 10 – simplify a
method
4. if complexity > 10 – compose method
McCabe Metric (Cyclomatic Complexity)
Simplified version
Natural Course of Refactoring 2014 16
17. www.bnsit.pl
High complexity/
Seldom changes
Don’t touch it.
High complexity/
Frequent changes
Apply strategic
refactoring
Low complexity/
Seldom changes
Utils, good for
experiments
Low
complexity/Frequent
changes
Heaven
Feather’s Quadrant
Natural Course of Refactoring 2014 17
Confront with:
• team opinions
• business strategy
Frequency of changes
Complexity
21. www.bnsit.pl
Sometimes it is the most difficult point
Try to…
• find an author and ask for help
• find somebody who worked with the code and
ask for help
• find somebody who knows the system (or
module) and ask for help
• Do it yourself if none of above are possible
Understand
Natural Course of Refactoring 2014 21
22. www.bnsit.pl
Mental tools
Simple code cleaning
Clean up the names
Add temporary comments to the code
Introduce lazy variables initialization
Make optical cleanup (make more space)
Scaffolding refactoring
Do some exploratory refactoring to be thrown away
The only goal is to gain more understanding of the code
Done in Notepad or something similar
Understand
Natural Course of Refactoring 2014 22
23. www.bnsit.pl
They should be temporary. Delete them after refactoring.
// SMELL it doesn’t look good, copy-
paste antipattern
// REFACTOR introduce factory
// NOTE send a message
// IDEA it can be modeled as a state
machine
Introduce refactoring comments
Natural Course of Refactoring 2014 23
27. www.bnsit.pl
Move meaningful private methods to another
classes.
You can’t test private method without hacks so
if it is worth testing, find another class where
this method will be public.
Extract responsibilities
Natural Course of Refactoring 2014 27
28. www.bnsit.pl
Mental tools
Single responsibility principle
Move method refactoring
Extract class refactoring
Introduce Domain Object
Introduce Value Object
Extract responsibilities
Natural Course of Refactoring 2014 28
30. www.bnsit.pl
Flexibility based on requirements
eg. be prepared for many cripting algorithms, starting with 5
Flexibility which emerged from code
eg. your team has written 8 reports with similar structure
Never guess for flexibility
Do you REALLY need flexibility?
Natural Course of Refactoring 2014 30
31. www.bnsit.pl
Strategy, Template method – different versions
of the same algorithm
State – simple state machines
Factory – polimorphic object creation
Builder – creating complex object in multiple
steps
Decorator – flexibility in enhancing behaviour
at runtime
Observer – loosen dependencies by indirect
communication (events)
Some design patterns applications
Natural Course of Refactoring 2014 31
34. www.bnsit.pl
It is always a strategic decision.
It is useful to have regular Design Retrospective
meetings when such ideas are discussed.
Evolve architecture
Natural Course of Refactoring 2014 34
35. www.bnsit.pl
Mental tools
Introducing/removing layers
Introducing or replacing ORM/NoSQL/?
Important change in building blocks
Changing or introducing new framework
Introducing events
Introducing state machine
Moving towords DDD, Microservices, CQRS
Introducing Bounded-Context (DDD)
Applying Anticorruption Layer
Evolve architecture
Natural Course of Refactoring 2014 35
38. www.bnsit.pl
It is just a model – neither true nor false
Big classes and big methods has fragments of code
in different NCR stages
Quite seldom code is in Compose method step
(which the most increases readability)
The consecutive steps are done more seldom than
preceding ones
Some comments
Natural Course of Refactoring 2014 38
39. www.bnsit.pl
Extracting responsibilities and Introducing
flexibility should be attracted by current
architecture vision (Architectural Mantra)
Lack of the architecture vision may push you to
local optimum
NCR is an ongoing process and should be a part
of whole software process.
NCR and architecture
Natural Course of Refactoring 2014 39
Techniki pracy z kodem
40. www.bnsit.pl
Why NCR?
Easy to teach
Easy to understand and remeber
Separates everyday and strategic refactoring
Indicates the simplest (safe) possible step in the
moment
Gives hints what kind of refactorings can be
applied in the moment
NCR IN A TEAM
Natural Course of Refactoring 2014 40
41. www.bnsit.pl
Natural Course of Refactoring.
A refactoring workflow.
Mariusz Sieraczkiewicz
@ms_bnsit_pl
http://msieraczkiewicz.blogspot.com
41