Technical Debt & Clean Code
Technical Debt & Clean Code #Clean Code Clean Code ဆိုတာဘာလဲ ။ Code ရေးတဲ့ အခါ Projectအလုပ်လုပ်ရုံပဲရေးမယ်ဆိုရင် ရေရည်မှာဘယ် လိုမှအဆင်မပြေပါဘူး။ Maintenance နဲ့ handover လုပ်တဲ့အခါ မှ အဆင်မပြေပဲ Cost ပိုများစေပါတယ်။ Clean Code က ပိုလွယ်ကူပြီးတော့ ပိုအကုန်ကျသက်သာစေပါတယ်။ Clean Code မှာ Feature လေးတွေရှိပါတယ်။ #Right Variable Naming Variable naming, class, method စတာတွေကို represent ဖြစ်တဲ့နာမည်ပေးရပါမယ်။ ဒါမှသာ readableဖြစ်မှာပါ #Not Duplication Code ရေးတဲ့အခါ တူညီတဲ့ Function တွေကို class စတာတွေကို ထက်ခါထက်ခါမရေးဖို့ဖြစ်ပါတယ်။အလို အပ်ပဲ code ဖောင်းပွတာကိုကာကွယ်ဖို့ပေါ။ DRY ( don't repeat yourself ) principle ရဲ့သေဘာ တရားပေါ့ ။ #Short and Simple Code ကိုနည်းနိုင်သမျှနည်းပြီးကစ်လစ်အောင်ရေးဖို့လိုပါတယ်။ Code အရေအတွက်နည်းမှသာထိန်းသိမ်းရတာပိူလွယ်မယ်။ Bugs ပိုနည်းမယ်။ တခြား developer ကလည်းလည်းပိုနားလည်လွယ်တာပေါ့။ #pass all test Clean code က test 100% passဖြစ်ရမယ်ဒါကတော့ရှင်းပါတယ်။ ကိုရေးထားတဲ့ test case တွေအတွက် 100% pass ဖြစ်ရမယ်ပေါ။ unclean codeတွေကတော့အပြည့်ဝpassမဖြစ်ဘူးပေါ။ #Technical Debt Code ရေးတဲ့အခါ စစရေးခြင်းမှာအာလုံေသသေသက်သက်လေးတွေရေးကြပါတယ်။ clean codeလေးဖြစ်နေတုန်းပေါ့ အချိန် နည်းကြာလာတော့ မမျော်လင့်ပဲရေးမိလိုက်တဲ့ အရှုပ်လေးတွေကများလာတော့ unclean codeဖြစ်သွားတာပေါ့။ Technical debt ဆိုတာ အလုပ်တခုကေနေ မပြီးတာလေးတွေ ပြသနာသေးသေးလေးတွေ နည်းနည်း နညး်နည်းနဲ့များလာတဲ့အခါကြာလာတော့ ပြသနာအကြီးကြီးဖြစ်လာတာပေါ့ project တစ်ခုလုံး manage လုပ်လို့မရတဲ့အနေထားဖြစ်လာတာမျိုးပေါ။ ဥပမာေပးရရင်ဟင်းချက်တဲ့အခါ မြန် မြန်ချက်ပြီး ဆားထည့်ဖိုကြော်လိုက်တာဖြစ်ဖြစ် မမြီးလိုက်တာဖြစ်ဖြစ် ဒီ technical debt လေးတွေက ဟင်းပွဲလဲပြီးတော့ တကယ်လဲစားရော စာမကောင်းဖြစ်ရတာပေါ့ product releaseလုပ်ေရာ သာမာန်ထက်များတဲ့ bugsတွေ ပေါ် လာပြီးသသနာကြုံရတာပေါ့။ ဒါကြောင့် အရေးကြီးပါတယ်။ အာကြောင့် Technical debt တွေဘာကြောင့်ဖြစ်ရတာလဲအရင်းအမြစ်ကလာတွေလဲ။ #Business pressure တခါတလေ business အြေခ အနေအရ feature release လုပ်ဖို့လိုလာတာမျိုးဆိုရင် အပြီးသေးတဲ့ အပိုင်းတွေကို hideပြီး release လုပ်ရတဲအခါဖြစ်စေပါတယ်။ #Lack of understanding Management အပိုင်းက ဒီ task ကို technical debt ဖြစ်သွားလို ဘာဆက်အကျိုးဆက်ရှိမလဲဆိုတာမသိတဲ့အခါ refcactoring လုပ်ဖို့အချိန်မရတော့တာမျိုးဖြစ်တက်တာပါ။အဲ့အခါ technical debt ကကြာလာတဲ့အခါ အဆင်မပြေတော့ဘူးပေါ့။ #Lack of Test Development testing stepတချို တွေကိုကျော်ပြီး မြန်အောင်ရေးတာမျိုးဆို တကယ် product release လုပ်တဲ့ အဲ့ technical debt ကိုပြသနာဖြစ်စေပါတယ်။ automate email test ကို မလုပ်ပဲ releaseတာမျိုးဆို production မှာ လူအများကြီးစိ ပိုမိတာမျိုး ပြသနာအကြီးကြီးဖြစ်နိုင်ပါတယ်။ #Lack of Documentation Project documentation မလုပ်ထားဘူးဆိုရင် handover လုပ်တဲ့အခါလူအသစ်ဝင်တဲ့အခါ အဆက်အခဲပိုဖြစ်စေပါတယ်။ #Lack of Interaction with team Team interaction မရှိခြင်းကလဲပါပါတယ် teamwork မရှိတဲ့အခါ project progress, workflow, business workflow ကိုနည်းလည်မှုလွဲတာ feature မှာရေးတာမျိုး တတဲ့ အလိုအပ်မဲံအများကြီး deploy ဖြစ်နိုင်ပါတယ်။ #Work long on several branches Issue , feature တစ်ခုခုအတွက် branch တွေခွဲရေးတဲ့အခါ ကြာကြာအဲ့ ခွဲထားတဲ့ branch မှာရေးလေလေ technical debt များလေလေပေါ့။ ပြန် branch merge လုပ်တဲ့အခါ code အရမ်းကွာပြီး conflit ပိုများတာပေါ့။ #Delayed refactoring Project စနေတာနဲ့ code ကနေတိုင်းအသစ်တိုးနေတာဖြစ်တဲ့အတွက် refactoring လုပ်ဖို့လဲလုပ်တယ်၊ code ပြန်စစ်တာ လိုတဲ့ မလိုတဲ့ function ပေါင်းတာဖြတ်တာစတာကိုပြောချင်တာပါ။ refactoring လုပ်ဖို့အ ချိန် deploy ဖြစ်လေလေ code ကပိုများပြီးပိုရှုပ်လာတာပေါ။ #Incompetence ဒါကရှင်းပါတယ် developer က code အဆင်ပြေပြေရေးဖို့ skill မရှိရင်ပေါ့။ ဟုတ်ပါပြီ Technical Debt နဲ့ Clean code အကြောင်းသိသွားလောက်ပြီ ထင်ပါတယ် ။ Facebook မှာရော Telegramမှာပါ ဝင်ရောက်ဆွေးနွေးပေးကြပါဗျ။Facebook page ၊ telegram channel နဲ့ Youtube Channel ကို follow subscribe လုပ်သွားနိုင်ပါတယ်ဗျ။ Facebook - @callmedevbypeter Telegram - @callmedevbypeter Youtube - Call Me Dev by Peter သိချင်တဲ့အကြောင်းအရာရှိရင် comment မှာရေးသွားပါဗျ။ Thanks you ပါ။ #callmedevbypeter #technical_debt #clean_code #web_development

Technical Debt & Clean Code
Technical Debt & Clean Code #Clean Code Clean Code ဆိုတာဘာလဲ ။ Code ရေးတဲ့ အခါ Projectအလုပ်လုပ်ရုံပဲရေးမယ်ဆိုရင် ရေရည်မှာဘယ် လိုမှအဆင်မပြေပါဘူး။ Maintenance နဲ့ handover လုပ်တဲ့အခါ မှ အဆင်မပြေပဲ Cost ပိုများစေပါတယ်။ Clean Code က ပိုလွယ်ကူပြီးတော့ ပိုအကုန်ကျသက်သာစေပါတယ်။ Clean Code မှာ Feature လေးတွေရှိပါတယ်။ #Right Variable Naming Variable naming, class, method စတာတွေကို represent ဖြစ်တဲ့နာမည်ပေးရပါမယ်။ ဒါမှသာ readableဖြစ်မှာပါ #Not Duplication Code ရေးတဲ့အခါ တူညီတဲ့ Function တွေကို class စတာတွေကို ထက်ခါထက်ခါမရေးဖို့ဖြစ်ပါတယ်။အလို အပ်ပဲ code ဖောင်းပွတာကိုကာကွယ်ဖို့ပေါ။ DRY ( don't repeat yourself ) principle ရဲ့သေဘာ တရားပေါ့ ။ #Short and Simple Code ကိုနည်းနိုင်သမျှနည်းပြီးကစ်လစ်အောင်ရေးဖို့လိုပါတယ်။ Code အရေအတွက်နည်းမှသာထိန်းသိမ်းရတာပိူလွယ်မယ်။ Bugs ပိုနည်းမယ်။ တခြား developer ကလည်းလည်းပိုနားလည်လွယ်တာပေါ့။ #pass all test Clean code က test 100% passဖြစ်ရမယ်ဒါကတော့ရှင်းပါတယ်။ ကိုရေးထားတဲ့ test case တွေအတွက် 100% pass ဖြစ်ရမယ်ပေါ။ unclean codeတွေကတော့အပြည့်ဝpassမဖြစ်ဘူးပေါ။ #Technical Debt Code ရေးတဲ့အခါ စစရေးခြင်းမှာအာလုံေသသေသက်သက်လေးတွေရေးကြပါတယ်။ clean codeလေးဖြစ်နေတုန်းပေါ့ အချိန် နည်းကြာလာတော့ မမျော်လင့်ပဲရေးမိလိုက်တဲ့ အရှုပ်လေးတွေကများလာတော့ unclean codeဖြစ်သွားတာပေါ့။ Technical debt ဆိုတာ အလုပ်တခုကေနေ မပြီးတာလေးတွေ ပြသနာသေးသေးလေးတွေ နည်းနည်း နညး်နည်းနဲ့များလာတဲ့အခါကြာလာတော့ ပြသနာအကြီးကြီးဖြစ်လာတာပေါ့ project တစ်ခုလုံး manage လုပ်လို့မရတဲ့အနေထားဖြစ်လာတာမျိုးပေါ။ ဥပမာေပးရရင်ဟင်းချက်တဲ့အခါ မြန် မြန်ချက်ပြီး ဆားထည့်ဖိုကြော်လိုက်တာဖြစ်ဖြစ် မမြီးလိုက်တာဖြစ်ဖြစ် ဒီ technical debt လေးတွေက ဟင်းပွဲလဲပြီးတော့ တကယ်လဲစားရော စာမကောင်းဖြစ်ရတာပေါ့ product releaseလုပ်ေရာ သာမာန်ထက်များတဲ့ bugsတွေ ပေါ် လာပြီးသသနာကြုံရတာပေါ့။ ဒါကြောင့် အရေးကြီးပါတယ်။ အာကြောင့် Technical debt တွေဘာကြောင့်ဖြစ်ရတာလဲအရင်းအမြစ်ကလာတွေလဲ။ #Business pressure တခါတလေ business အြေခ အနေအရ feature release လုပ်ဖို့လိုလာတာမျိုးဆိုရင် အပြီးသေးတဲ့ အပိုင်းတွေကို hideပြီး release လုပ်ရတဲအခါဖြစ်စေပါတယ်။ #Lack of understanding Management အပိုင်းက ဒီ task ကို technical debt ဖြစ်သွားလို ဘာဆက်အကျိုးဆက်ရှိမလဲဆိုတာမသိတဲ့အခါ refcactoring လုပ်ဖို့အချိန်မရတော့တာမျိုးဖြစ်တက်တာပါ။အဲ့အခါ technical debt ကကြာလာတဲ့အခါ အဆင်မပြေတော့ဘူးပေါ့။ #Lack of Test Development testing stepတချို တွေကိုကျော်ပြီး မြန်အောင်ရေးတာမျိုးဆို တကယ် product release လုပ်တဲ့ အဲ့ technical debt ကိုပြသနာဖြစ်စေပါတယ်။ automate email test ကို မလုပ်ပဲ releaseတာမျိုးဆို production မှာ လူအများကြီးစိ ပိုမိတာမျိုး ပြသနာအကြီးကြီးဖြစ်နိုင်ပါတယ်။ #Lack of Documentation Project documentation မလုပ်ထားဘူးဆိုရင် handover လုပ်တဲ့အခါလူအသစ်ဝင်တဲ့အခါ အဆက်အခဲပိုဖြစ်စေပါတယ်။ #Lack of Interaction with team Team interaction မရှိခြင်းကလဲပါပါတယ် teamwork မရှိတဲ့အခါ project progress, workflow, business workflow ကိုနည်းလည်မှုလွဲတာ feature မှာရေးတာမျိုး တတဲ့ အလိုအပ်မဲံအများကြီး deploy ဖြစ်နိုင်ပါတယ်။ #Work long on several branches Issue , feature တစ်ခုခုအတွက် branch တွေခွဲရေးတဲ့အခါ ကြာကြာအဲ့ ခွဲထားတဲ့ branch မှာရေးလေလေ technical debt များလေလေပေါ့။ ပြန် branch merge လုပ်တဲ့အခါ code အရမ်းကွာပြီး conflit ပိုများတာပေါ့။ #Delayed refactoring Project စနေတာနဲ့ code ကနေတိုင်းအသစ်တိုးနေတာဖြစ်တဲ့အတွက် refactoring လုပ်ဖို့လဲလုပ်တယ်၊ code ပြန်စစ်တာ လိုတဲ့ မလိုတဲ့ function ပေါင်းတာဖြတ်တာစတာကိုပြောချင်တာပါ။ refactoring လုပ်ဖို့အ ချိန် deploy ဖြစ်လေလေ code ကပိုများပြီးပိုရှုပ်လာတာပေါ။ #Incompetence ဒါကရှင်းပါတယ် developer က code အဆင်ပြေပြေရေးဖို့ skill မရှိရင်ပေါ့။ ဟုတ်ပါပြီ Technical Debt နဲ့ Clean code အကြောင်းသိသွားလောက်ပြီ ထင်ပါတယ် ။ Facebook မှာရော Telegramမှာပါ ဝင်ရောက်ဆွေးနွေးပေးကြပါဗျ။Facebook page ၊ telegram channel နဲ့ Youtube Channel ကို follow subscribe လုပ်သွားနိုင်ပါတယ်ဗျ။ Facebook - @callmedevbypeter Telegram - @callmedevbypeter Youtube - Call Me Dev by Peter သိချင်တဲ့အကြောင်းအရာရှိရင် comment မှာရေးသွားပါဗျ။ Thanks you ပါ။ #callmedevbypeter #technical_debt #clean_code #web_development

CallMeDevbyPeter
Since 2022