You have found the more you change the code, the more difficult it becomes. Refactoring is a developer practice of improving the internal structure of an existing code without changing the external behavior. It makes code changes for present or future easier. You may have heard about Refactoring from colleagues, books, articles and have probably tried or hear it the first time. This talk presents what it is, why it is important and what you can do to get better at it based on the experience of mentoring on technical practices to others. This talk is suitable for people who want to grow their skill on creating easy to change software for themselves and others.
1 of 36
Download to read offline
More Related Content
Get better at Refactoring
1. GET BETTER AT REFACTORING
stanly@odd-e.com
@stanlylau
12. EXPERIENCED PROGRAMMERS DO NOT
WRITE INFINITELY COMPLEX CODE;
THEY WRITE CODE THATS BLINDINGLY
SIMPLE
99 Bottles of OOP
GROWTH OF A DEVELOPER
13. THE NATURE OF SOFTWARE DEVELOPMENT
LEARNING THIS NATURE
AND DEALING WITH IT
HELPS TO INCREASE
FLEXIBILITY.
AMOUNT OF
BAD CODE
# BUGS
TIME SPENT
ON FIXING
BUGS
PANIC
QUICK HACKS
MOTIVATION OF
DEVELOPERS
REFACTORING
AMOUNT OF
CODE SMELLS
INDICATES
OPPORTUNITY FOR
16. REFACTORING
IS A DISCIPLINED TECHNIQUE FOR
RESTRUCTURING AN EXISTING BODY OF
CODE, ALTERING ITS INTERNAL
STRUCTURE WITHOUT CHANGING ITS
EXTERNAL BEHAVIOR.
MARTIN FOWLER
INTRODUCE
PARAMETER OBJECT
EXTRACT CLASS
INTRODUCE
LOCAL VARIABLE
RENAME
MOVE METHODEXTRACT METHOD
INLINE VARIABLE
18. CODE SMELLS
A CODE SMELL IS A SURFACE
INDICATION THAT USUALLY
CORRESPONDS TO A DEEPER PROBLEM
IN THE SYSTEM
MARTIN FOWLER
DUPLICATED CODE
MAGIC NUMBER
FEATURE ENVY
PRIMITIVE OBSESSION
LONG METHOD
COMMENTS
27. HOW TO START
ESSENTIAL SKILLS
Explain the code with design principles
Identify code smells
Refactor either manually or through IDE
Familiar with unit/integration tests
Familiar with functionality behaviour youre changing
Understand abstractions
28. TRY CODING DOJO SESSIONS
ON PRODUCTION CODE
PICK CODE SMELLS TO REMOVE