Legacy code
Ez a fejezet gyakorlatilag teljes egészében Michael Feathers Working Efficiently with Legacy Code c. könyvén alapszik. Itt elérhető egy prezentáció a szerzőtől.
Mi a Legacy Code?
Code without tests is bad code. It doesn’t matter how well written it is; it doesn’t matter how pretty or object-oriented or well-encapsulated it is. With tests, we can change the behavior of our code quickly and verifiably. Without them, we really don’t know if our code is getting better or worse.
-- Feathers, M. (2004). Working Effectively with Legacy Code: Preface
- További definíciók
- Legacy Code
The Legacy Code Dilemma
When we change code, we should have tests in place. To put tests in place, we often have to change code.
-- Feathers, M. (2004). Working Effectively with Legacy Code: Part I / Chapter 2
Code Smells
Changing Software
adding a feature fix a bug refactor optimizing structure changes changes changes functionality changes new funcionality changes resource usage changes -- Feathers, M. (2004). Working Effectively with Legacy Code: WORK EFFECT LEG CODE p1. pp 6. Prentice Hall Professional.
The legacy code algorithm
- Working Effectively with Legacy Code
- Matthias Günther jegyzetei a „Working Effectively with Legacy Code” könyvből
- Jeremy W. Sherman jegyzetei a „Working Effectively with Legacy Code” könyvből
Sensing & Separation
- Sensing — We break dependencies to sense when we can’t access values our code computes.
- Separation — We break dependencies to separate when we can’t even get a piece of code into a test harness to run.
-- Feathers, M. (2004). Working Effectively with Legacy Code: Part I / Chapter 3
Mocking
- Type of Mocks
- Test Doubles — Fakes, Mocks and Stubs
- ez egy másik írás, bővebb, ábrákkal, Java kódokkal...
- Test Doubles
- az úriember blogján egyébként rengeteg hasonló hosszúságú, elég releváns bejegyzés van
- How to write good tests
Seams
A seam is a place where you can alter behavior in your program without editing in that place.
-- Feathers, M. (2004). Working Effectively with Legacy Code: Part I / Chapter 4
SOLID
- S.O.L.I.D. Software Development, One Step at a Time
- igen részletes írás
- SOLID Design Principles
- Core Design Principles for Software Developers by Venkat Subramaniam
- Hosszabb (2,5 órás) előadás, a Single Responsibility inenntől, ez olyan 25 perc