Chulalongkorn University Theses and Dissertations (Chula ETD)

EMPIRICAL STUDY OF SOURCE LEVEL DIFFICULTY

Other Title (Parallel Title in Other Language of ETD)

การศึกษาเชิงประสบการณ์ของความยากระดับต้นฉบับ

Year (A.D.)

2013

Document Type

Thesis

First Advisor

Peraphon Sophatsathit

Faculty/College

Faculty of Science (คณะวิทยาศาสตร์)

Degree Name

Master of Science

Degree Level

Master's Degree

Degree Discipline

Computer Science and Information Technology

DOI

10.58837/CHULA.THE.2013.922

Abstract

This thesis aims to provide a straightforward measurement for source level difficulty of programs using a set of well-established measurements, namely, operators, operands, parameters, inputs and outputs, file operations, external functions or libraries, variable declarations, and flow graphs. Six popularly used programming languages, namely, C, C#, Java, Python, PHP, and Perl are selected to measure and assess source code difficulty. Four classes of problems are studied, i.e., matching, I/O, computation, and comparison, One hundred and fifty six programs written in the aforementioned programming languages are collected from the Internet to be measured. The approach transforms source code into program flow graph and utilizes traditional software metrics, namely, LOC, CCM, and HCM to measure code complexity. Experiments show that source code written in compiled languages have greater difficulty than those written in interpreted languages. In addition, there is no one language which is suitable for all types of problems. As a consequence, developers can decide on language that is appropriate for the task to be implemented.

Other Abstract (Other language abstract of ETD)

วัตถุประสงค์ของวิทยานิพนธ์นี้คือวิจัยการวัดความยากระดับต้นฉบับอย่างตรงไปตรงมาโดยใช้กลุ่มตัววัดมาตรฐานที่ใช้กัน ได้แก่ ตัวดำเนินการ ปัจจัยการดำเนินการ พารามิเตอร์ อินพุตและเอาท์พุต การดำเนินการแฟ้มข้อมูล ฟังก์ชันภายนอกหรือไลบารี การประกาศตัวแปร และกราฟการใหล งานวิจัยนี้ใช้ภาษาหกชนิดในการวัดความยากคือ ซี ซีชาร์บ จาวา ไพตอน พีเอชพี และเพิล โดยศึกษาปัญหาสี่ประเภทคือ การเทียบความเหมือน อินพุต/เอาท์พุต การคำนวณ และการเปรียบเทียบ งานวิจัยนี้ใช้โปรแกรมตัวอย่าง 156 โปรแกรมจากอินเทอร์เน็ตเป็นข้อมูล วิธีวิจัยคือแปลงต้นฉบับเป็นกราฟการใหลแล้ววัดด้วยมาตรวัดซอฟต์แวร์มาตรฐาน คือ LOC, CCM, และ HCM ผลการทดลองพบว่า ต้นฉบับที่เขียนด้วยภาษาแปลมีความซับยากมากกว่าภาษาตีความ นอกจากนี้ ไม่มีภาษาหนึ่งภาษาใดที่เหมาะสมกับปัญหาทุกประเภท ผลลัพธ์เป็นการช่วยให้ผู้พัฒนาโปรแกรมสามารถเลือกภาษาที่เหมาะสมกับงานที่จะทำให้เกิดผล

Share

COinS