Code Decay

  • یوسف مهرداد

What is Code Decay?
Code decay occurs when a software system becomes increasing difficult to maintain. The design and code of the system become more complex, making changes to the system becomes noticeably more difficult, more costly in time and resources, and more prone to regression errors. Code decay can result in a system that is more expensive to maintain because the number of errors introduced by a single change in the system (regression) steadily increases. In the worst case, a single change can – on average – introduce one or more regression errors into the system.

How Does Code Decay Occur?
Code decay occurs simply by touching the code. The more code is touched – as measured by changes to the files where the code resides – the higher the amount of code decay. This is true on average across the collection of files. Code decay happens because code tends to increase in complexity the more it’s modified. Files that have been modified the most are usually the most complex, thus most likely to suffer from code decay.

How Can Maintenance Slow Down Code Decay?
Refactoring reduces code decay. Refactoring is a set of techniques for simplifying code without changing what it does.

Reference: IBM RUP for Maintenance

گزیده:
«تنها حریفی که در مقابل من پس از باخت، بهانه نمی آورد، کامپیوتر است.»
بابی فیشر قهرمان شطرنج

https://bibalan.com/?p=561
یوسف مهرداد

یوسف مهرداد


کانال تلگرام

نظرات (2)

wave
  • علیرضا اسماعیلی

    ۱۹ شهریور ۱۳۹۱ در ۰۰:۰۰

    از زمانی که شما را می‎شناسم، اینکه همیشه توجه ویژه‎ای به Refactoring داشته‎اید، برایم کمی عجیب بوده است. احساس می‎کنم نگاه شما به این موضوع کمی – شاید هم خیلی:) – متفاوت است. لطفا در وبلاگتان به این موضوع بیشتر بپردازید.

    —————————
    آقای مهندس اسماعیلی عزیز
    سلام
    شما همیشه لطف داشته‌اید.
    به روی چشم. اگر عمری بود، انشاءالله.
    وقت خوش
    مهرداد

    پاسخ
  • محسن عابدی

    ۱۰ مهر ۱۳۹۱ در ۰۰:۰۰

    واس استاد این اتفاق واسم افتاده همین Code Decay !!
    Refactoring چیه از کجا شروع کنم چی کار کنم ؟

    —————————-
    آقای مهندس عابدی عزیز
    سلام، وقت به خیر
    کتاب زیر را مطالعه فرمایید.
    Refactoring: Improving the Design of Existing Code
    by Martin Fowler(with Kent Beck, John Brant, William Opdyke, and Don Roberts)

    شاد باشید

    پاسخ

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *

برای خروج از جستجو کلید ESC را بفشارید