[CUSE] Discussion Paper ครั้งแรก

Blog นี้เป็น Blog ที่ดองมานานเกือบเดือนครับ เพราะจำได้ว่ารุ่งขึ้นมีสอบครับ ระหว่างอ่านทบทวนก็เริ่มเบื่อเลยมาเขียน Blog ดองไว้ครับ สำหรับการนำเสนอ Paper ครั้งนี้เป็นของวิชา Software Metrics ครับ โดยตัว Paper ที่กลุ่มผมนำเสนอชื่อว่า Applying Metrics to Identify and Monitor Technical Debt Items during Software Evolution

ใน Paper นี้เป็นการบอกว่าเมื่อ Software มีการวิวัฒนาการขึ้นไปเนี่ย ถ้าเรามีการจัดการมันไม่ดี ทั้งด้าน Requirement Resource และเวลา ส่งผลให้ระหว่างที่ Software มันสร้างมูลค่าให้องค์กร ตัวมันเองยังแอบสะสมหนี้เสียด้วย โดยคุณ Ward Cunningham ได้นิยามคำขึ้นเพื่อเรียกว่า Technical Debt ครับ ในตัว Paper พยายามนำ Software Metrics มาแสดงความสัมพันธ์กับตัว Technical Debt ครับ โดย Metrics ที่เอามาอ้างถึงมีดังนี้

  • Couplings Metric
    • Afferent Couplings (AC) - วัดจำนวน object อื่นๆ ที่มาใช้งาน object หนึ่ง เช่น A, B, C มาใช้งาน C แสดงว่าค่า Afferent coupling = 3
    • Efferent Couplings (EC) -  วัดจำนวน object อื่นๆ ที่ถูกใช้งานจาก object หนึ่ง เช่น A, B ถูกใช้งานจาก C แสดงว่าค่า Efferent coupling = 2
  • Object Oriented Metric
    • Depth of Inheritance Tree (DIT): provides the position of the class in the inheritance tree. A class situated too deeply in the inheritance tree will be relatively complex to develop, test and maintain. Thus, it is useful to know and regulate this depth;
    • Lack of Cohesion in Methods (LCOM):
      • number of unconnected method pairs in a class representing independent parts with low cohesion;
      • Metric นี้วัดจํานวนของเมท็อดที่มีการเรียกใช้ตัวแปร ที่มีการประกาศไว้ภายในคลาส ดังสูตรต่อไปนี้  ซึ่งถ้าจํานวนของ Method มีการเรียกใชตัวแปรที่ประกาศไวภายในคลาสมากจะเกิด Low Cohesion แต่จะมีความซับซ้อนมาก ถ้าจํานวนของเมท็อด มีการเรียกใช้ตัวแปรที่ประกาศไว้ ภายในคลาสน้อย จะเกิด High Cohesion แต่จะมีความซับซ้อนน้อย
      • *** ที่ดี High Cohesion &; Low Coupling
      • สอดคล้องกันของ object นั้นๆ นั่นคือใน object นั้นๆ จะต้องมีหน้าที่รับผิดชอบเดียวกัน ทำให้เราสามารถแยก module ของ code ได้ง่าย
    • Number of children - number of direct and indirect descendent classes of a class;
  • Cyclomatic complexity (CC):  -ซับซ้อนของ class และ method โดยพื้นฐานจะนับความซับซ้อนของ method  มีน้อยๆ ดี เพราะ ตัว UnitTest จะน้อยตาม
  • Code duplication:
    • set of metrics composed of
      • Duplicated Lines (number of physical lines touched by duplication),
      • Duplicated Blocks (number of duplicated blocks participating in duplication),
      • Duplicated Files (number of files containing duplicated lines or blocks)
      • Density of duplicated lines, where Density = (DuplicatedLines/PhysicalLines)*100;
    • เป็น Type หนึ่งของ Code Smell
  • Documentation related measures:
    • they are used to assess the level of the code documentation. The main example is the number of comment lines in the code
    • Metric ย่อยๆ
      • Number comment of line
      • Non-Comment Lines of Code
      • Public Undocument Classs, Methods and Variable

หลังจากนำเสนอไปทางอาจารย์ได้มีการ Comment ครับ โดย Paper ตัวนี้เป็นงานแบบ Workshop (งานวิจัยที่ยังไม่เสร็จ ยังไม่ได้ทฤษฎีออกมา เป็นกการเขียน Paper เพื่อจุดประกายให้นักวิจัยท่านอื่นๆ มาต่อยอดครับ) แต่ทำให้ตัวผมเห็นภาพของการทำวิจัยมากขึ้นครับ

หมายเหตุ ภาพ Feature ผมไม่ได้ทำเองนะครับ ต้องขอบคุณเพื่อนเซียนที่ทำครับ ^___^