refactoring – simple word which all of you already heard about it - do minh tuan

30
Refactoring A simple word which all of you already heard about –Do Minh Tuan

Upload: devdayorg

Post on 12-Aug-2015

71 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

RefactoringA simple word which all of you already heard about

–Do Minh Tuan

Page 2: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

I’m Tuan• Live in Da Nang.

• Working in Axon Active Vietnam.

• Scrum Master, Team Leader, Software Engineer.

• Java, Javascript, Code Generator.

[email protected]

Page 3: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

Story

Page 4: Refactoring – simple word which all of you already heard about it - Do Minh Tuan
Page 5: Refactoring – simple word which all of you already heard about it - Do Minh Tuan
Page 6: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

–Martin Fowler

“a change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior.”

What is Refactoring ?

Page 7: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

ADDING FUNCTION REFACTORING

you can only wear one hat at a time

Page 8: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

Why should you refactor ?

Page 9: Refactoring – simple word which all of you already heard about it - Do Minh Tuan
Page 10: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

Improve your software design

Page 11: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

Easier to understand

Page 12: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

Future Developer

Page 13: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

Save your energy

Page 14: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

Finding bugs

Page 15: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

Programming faster

Page 16: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

Video

Page 17: Refactoring – simple word which all of you already heard about it - Do Minh Tuan
Page 18: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

When do you refactor ?

Page 19: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

–Don Roberts

“The first time you do something, you just do it. The second time you do something similar, you wince at the duplication, but you do the duplicate thing anyway. The third time you do something similar, you refactor”

Page 20: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

Adding function

Page 21: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

Fixing bugs

Page 22: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

Coding review

Page 23: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

“If it stinks, change it”

Page 24: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

Long Method

Large Class

Long Parameter List

Divergent Change

Shotgun Surgery

Data Clumps

Feature Envy

Primitive Obsession

Switch Statements

Parallel Inheritance HierarchiesSpeculative Generality

Temporary Field

Message Chains

Middle manInappropriate IntimacyIncomplete Library Class

Data ClassRefuse Bequest

Comment

Duplicated Code

Page 25: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

Demo

Page 26: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

–Kent Beck

“I’m not a great programmer, I’m just a good programmer with great habits.”

Page 27: Refactoring – simple word which all of you already heard about it - Do Minh Tuan
Page 28: Refactoring – simple word which all of you already heard about it - Do Minh Tuan
Page 29: Refactoring – simple word which all of you already heard about it - Do Minh Tuan
Page 30: Refactoring – simple word which all of you already heard about it - Do Minh Tuan

[email protected]

https://vn.linkedin.com/in/dominhtuan

Thank you !