{"title":"JavaScript: The Used Parts","authors":"S. Gude, M. Hafiz, Allen Wirfs-Brock","doi":"10.1109/COMPSAC.2014.69","DOIUrl":null,"url":null,"abstract":"We performed an empirical study to understand how different language features are used by JavaScript developers in practice, with the goal of using this information to assist future extensions of JavaScript. We inspected more than one million unique scripts (over 80 million lines of code) from various sources: JavaScript programs in the wild collected by a spider, (supposedly) better JavaScript programs collected from the top 100 URLs from the Alex a list, JavaScript programs with new language features used in Firefox Add-ons, widely used JavaScript libraries, and Node.js applications. Our corpus is larger and more diversified than those in prior studies. We also performed a study on 45 JavaScript developers to understand the reasons behind some of their language feature choices. Our study shows that there is a wide-spread confusion about newly introduced JavaScript features, a continuing misuse of existing problematic features, and a surprising lack of adoption of object-oriented features. Understanding JavaScript programming practices will assist many stakeholders: tool developers can analyze the requirements of better tools and more responsive IDEs and programmers can learn about the used (and the good) parts of JavaScript.","PeriodicalId":106871,"journal":{"name":"2014 IEEE 38th Annual Computer Software and Applications Conference","volume":"92 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2014-07-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2014 IEEE 38th Annual Computer Software and Applications Conference","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/COMPSAC.2014.69","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
We performed an empirical study to understand how different language features are used by JavaScript developers in practice, with the goal of using this information to assist future extensions of JavaScript. We inspected more than one million unique scripts (over 80 million lines of code) from various sources: JavaScript programs in the wild collected by a spider, (supposedly) better JavaScript programs collected from the top 100 URLs from the Alex a list, JavaScript programs with new language features used in Firefox Add-ons, widely used JavaScript libraries, and Node.js applications. Our corpus is larger and more diversified than those in prior studies. We also performed a study on 45 JavaScript developers to understand the reasons behind some of their language feature choices. Our study shows that there is a wide-spread confusion about newly introduced JavaScript features, a continuing misuse of existing problematic features, and a surprising lack of adoption of object-oriented features. Understanding JavaScript programming practices will assist many stakeholders: tool developers can analyze the requirements of better tools and more responsive IDEs and programmers can learn about the used (and the good) parts of JavaScript.