View
114
Download
0
Category
Preview:
Citation preview
C a m p u s P a r t y 2 0 1 4
REFACTORING WORKSHOP Carla Suárez @carlast22
María Gómez @mariascandella !
REFACTORING
!
▫︎Method to change the code.
▫︎ The internal structure of a module get changed while the external one keeps unaltered.
▫︎Used for cleaner and better structured code.
2
SKILLS NEEDED FOR DEVELOPMENT
▫︎Use of good practices (SOLID principle)
▫︎Work on a incremental fashion
▫︎ TDD (test driven development)
▫︎Well designed test cases
▫︎ Pair programming
3
SOLID
▫︎ Single Responsibility Principle
▫︎Open/Closed Principle
▫︎ Liskov Substitution Principle
▫︎ Interface Segregation Principle
▫︎Dependency Inversion Principle
4
SOLID
▫︎Open/Closed Principle
6
“Software entities should be open for extension, but close for modification”
SOLID
▫︎ Liskov Substitution Principle
7
“Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that
program”
SOLID
▫︎ Interface Segregation Principle
8
“No client should be force to depend on method it does not use”
SOLID
▫︎Dependency Inversion Principle
9
“Modules should depend upon abstractions, no upon concretions.”
WORKING INCREMENTALLY
10
InitialPlanning
Planning
Requirements Analysis & Design
Implementation
Deployment
TestingEvaluation
http://en.wikipedia.org/wiki/Iterative_and_incremental_development
UNIT TESTS
▫︎A way to test the correctness of a piece of code.
▫︎ They ensure that a module works correctly in an independent way.
11
PAIR PROGRAMMING
▫︎ Two developer working on the same code in the same computer.
▫︎Benefits:
▫︎Higher quality.
▫︎More productivity
▫︎ Less prone to errors
▫︎ Ping-pong model
14
Recommended