3 ms·
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 e
by supergreg 11y ago
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.
- jonnycowboy 11y agoA 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).
- ThinkCritically 11y agoWhat 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)
- drumdance 11y agoPerhaps 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.
- matt4077 11y agoThat's basically what linters do.
- lincolnbryant 11y agoESLint catches many
- TheOtherHobbes 11y agoThen 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.)
- jonnycowboy 11y agoHave 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.
- duaneb 11y agocode 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.
- megablast 11y agoGood idea. Can you provide a download link with all the code out there?
- supergreg 11y agohttp://ftp.us.debian.org/debian/pool/main/ http://ftp.us.debian.org/debian/pool/main/ is a good start