jscefr: A Framework to Evaluate the Code Proficiency for JavaScript

Chaiyong Ragkhitwetsagul,Komsan Kongwongsupak,Thanakrit Maneesawas,Natpichsinee Puttiwarodom,Ruksit Rojpaisarnkit,Morakot Choetkiertikul,Raula Gaikovina Kula,Thanwadee Sunetnanta
2024-08-29
Abstract:In this paper, we present jscefr (pronounced jes-cee-fer), a tool that detects the use of different elements of the JavaScript (JS) language, effectively measuring the level of proficiency required to comprehend and deal with a fragment of JavaScript code in software maintenance tasks. Based on the pycefr tool, the tool incorporates JavaScript elements and the well-known Common European Framework of Reference for Languages (CEFR) and utilizes the official ECMAScript JavaScript documentation from the Mozilla Developer Network. jscefr categorizes JS code into six levels based on proficiency. jscefr can detect and classify 138 different JavaScript code constructs. To evaluate, we apply our tool to three JavaScript projects of the NPM ecosystem, with interesting results. A video demonstrating the tool's availability and usage is available at <a class="link-external link-https" href="https://youtu.be/Ehh-Prq59Pc" rel="external noopener nofollow">this https URL</a>.
Software Engineering
What problem does this paper attempt to address?
### What problems does this paper attempt to solve? This paper aims to solve the problem of how to evaluate JavaScript code proficiency. Specifically, the author has developed a tool named jscefr, which is used to detect and classify different language elements used in JavaScript code snippets, and measure the proficiency required to understand and process the code based on these elements. By correlating JavaScript code with the six proficiency levels (A1 to C2) of the Common European Framework of Reference for Languages (CEFR), jscefr can effectively evaluate programming ability in software maintenance tasks. #### Main problems include: 1. **Lack of a systematic evaluation method for JavaScript code proficiency**: - Although there are currently some methods for evaluating programming skills, the systematic tools specifically for JavaScript code proficiency are still not perfect. 2. **The need to improve software maintenance efficiency**: - In the software maintenance process, it is crucial to understand the developers' ability to understand specific code snippets. By evaluating code proficiency, it can help teams allocate tasks and conduct code reviews more effectively. 3. **Adapting to the rapidly evolving JavaScript ecosystem**: - As a widely - used language, JavaScript has a large and constantly - updating ecosystem (such as NPM libraries). Therefore, a dynamic evaluation tool is required to keep up with these changes. #### Specific goals of jscefr: - **Classify JavaScript code constructs**: jscefr can identify and classify 138 different JavaScript code constructs. - **Evaluate code proficiency based on CEFR standards**: Using the six - level standards (A1 to C2) of CEFR, jscefr can assign the corresponding proficiency level to each code construct. - **Apply to real - world projects**: The effectiveness and extensibility of jscefr have been verified by analyzing three popular JavaScript projects (Next.js, React, SvelteKit). #### Experimental results show: - In the three projects, the proficiency of most files is concentrated at the B1 level, indicating that developers need to have intermediate JavaScript skills to effectively maintain these projects. - Only a small number of files have reached high levels (such as C2), which shows that most of the code does not require extremely complex programming techniques. Through these efforts, jscefr not only provides a new method for evaluating JavaScript code proficiency, but also provides a valuable reference tool for future software maintenance and development.