المعالجة التدريجية
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
pay down debt alongside feature work instead of in rewrites.
الموضوعات المخطط لها
- Boy-scout rule: leave code a little better than you found it, within the change you are making.
- Strangler technique: route new behavior to a new implementation and retire the old piece by piece.
- Make the change safe first: add characterization tests before refactoring.
- Allocate a steady share of capacity, or attach debt work to features that touch the area.
- "Rewrite everything" is rarely a remediation plan: it delays value and repeats risk.
تفاصيل المخطط المبدئي
عرض عملي
A strangler plan for pricing: add tests, extract an interface, route the new discount rules to a new module behind a flag, shrink the old module until removable.
اختبر فهمك
Why add tests before refactoring?
أظهر الإجابة
To confirm behavior stays the same.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.