Is there anybody crawling the web for JavaScript files and looking at metrics or patterns in the way that lexicographers might study a corpus of natural language?
Not to my knowledge but that sounds interesting. I think that there is probably a lot of "valid code" that is not necessarily legible to human eyes. Javascript is also rather open in its potential.... Would you be looking at the statistics for how variables are named, or more for the style and format of method/function calls and such?
It's only a whim so far, but I think I'd be interested in looking for patterns in ASTs. If you can imagine scraping all the javascript off of a bunch of websites, I'd expect to see something like genotypes of jQuery emerge, with detectable shifts for different versions or builds.
If you were looking at JavaScript projects on npm/Github, I'd be interested seeing if projects and authors have a consistent style that's visible at the AST level. If so, would it be possible describe or classify that style in a way that enables finding more work by the same author?
3 comments
[ 0.18 ms ] story [ 19.2 ms ] threadIf you were looking at JavaScript projects on npm/Github, I'd be interested seeing if projects and authors have a consistent style that's visible at the AST level. If so, would it be possible describe or classify that style in a way that enables finding more work by the same author?