Re:Autocomplete from Stack Overflow
by supergreg on Tuesday March 22, 2016 @09:16AM
(#11336300)
Rather than indexing StackOverflow, why not do this by indexing all the open source code out there? Sure StackOverflow answers are good, but they usually skip error checking for focusing on the question at hand. Code used in production applications surely is more sound.
[ Parent
| on HN ]
code quality is context sensitive. There's a lot of crap in the Linux kernel that makes sense in context that would be terrible in any other context.
Come up with a general purpose algorithm for evaluating the quality of code and we can get somewhere. AFAIK that's the whole point of being a developer: you can compare the code intelligently.
Re:Autocomplete from Stack Overflow
by jonnycowboy on Tuesday March 22, 2016 @09:25AM
(#11336353)
A good start would be for Github to host a package that contains the latest versions of each repo. However even they may not have that right (depends on TOS).
Re:Autocomplete from Stack Overflow
by ThinkCritically on Tuesday March 22, 2016 @09:42AM
(#11336462)
What they really need is a way to rank github code by quality - so that a tool like this pulls in the good code (as opposed to code of lesser quality)
Re:Autocomplete from Stack Overflow
by TheOtherHobbes on Tuesday March 22, 2016 @02:01PM
(#11338503)
Then you build a helper tool that analyses the differences between good code and bad code.
Then you set it loose on its own source - and you have an AI that takes over the world. (Or at least github, which is more or less the same thing.)
Perhaps instead of using StackOverflow "correct" answers, someone could create a site that has example of anti-patterns and code smells, which you could then use to analyze the code on Github and link to possible alternatives.
That's basically what linters do.
Re:Autocomplete from Stack Overflow
by lincolnbryant on Tuesday March 22, 2016 @11:22AM
(#11337225)
ESLint catches many
Re:Autocomplete from Stack Overflow
by jonnycowboy on Wednesday March 23, 2016 @02:52PM
(#11347180)
Have the code editor report back to the cloud the amount of times a certain snippet was "selected"/used. And just rank the drop-down box/autocomplete options accordingly.
Good idea. Can you provide a download link with all the code out there?
http://ftp.us.debian.org/debian/pool/main/ is a good start