Live data from Hacker News

Autocomplete from Stack Overflow

emilschutte.com

51–60 of 151 posts

Re: Autocomplete from Stack Overflow

#51

If it's a joke "Ahah", if not it's just depressing. SO is a valuable resource to confront and understand concepts. Let's not encourage this copy/paste culture

The OS/SDK/Browser/Protocol/Firmware which you used to type this comment is a compiled copy/paste of a zillion lines of code, of which you probably typed none. If we encourage the DRY paradigm in the whole development cycle, copy/pasting a function is just a further reach of such paradigm. Now, if a programmer decides whether or not study and understand the pasted code has nothing to do with the quality of the final…

All I can say in response is I sincerely hope we never end up working together

Re: Autocomplete from Stack Overflow

#53
I had a conversation with a coworker a few days ago where I jokingly suggested building an AI system that you give a failing test suite and it uses stackoverflow answers to make your tests pass. Sounds like we are one step closer to making that happen.

Re: Autocomplete from Stack Overflow

#54

A great way to increase your liability in an automated fashion! Sure, the code on Stack Overflow is licensed as MIT... but what assurance is there that the code which was posted is original property that the poster owns copyright to? What assurance is there that the posters won't claim patents on the methods being used? The risk is low, but it's certainly not 0. Big companies caution their software developers to not…

Which big companies? I've never heard of such a policy.

Re: Autocomplete from Stack Overflow

#56

Earlier quoted context omitted.

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).

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)

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.

Re: Autocomplete from Stack Overflow

#57

Cool idea, but kind of ironic that the example you used produces unnecessarily complicated stack overflow solutions. A JavaScript "contains" function is as simple as: var contains = function (needle, haystack) { return haystack.indexOf(needle) !== -1 }

You should submit this to SO, so that future developers can have it autocompleted in their projects.

Re: Autocomplete from Stack Overflow

#58

Earlier quoted context omitted.

The OS/SDK/Browser/Protocol/Firmware which you used to type this comment is a compiled copy/paste of a zillion lines of code, of which you probably typed none. If we encourage the DRY paradigm in the whole development cycle, copy/pasting a function is just a further reach of such paradigm. Now, if a programmer decides whether or not study and understand the pasted code has nothing to do with the quality of the final…

This is like the car mechanic who goes to the used-parts dealer (the junkyard) and grabs the first part with the same size screw holes as the broken part.

Did you just call SO a junkyard?

Re: Autocomplete from Stack Overflow

#59

Earlier quoted context omitted.

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)

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

#60

Earlier quoted context omitted.

The OS/SDK/Browser/Protocol/Firmware which you used to type this comment is a compiled copy/paste of a zillion lines of code, of which you probably typed none. If we encourage the DRY paradigm in the whole development cycle, copy/pasting a function is just a further reach of such paradigm. Now, if a programmer decides whether or not study and understand the pasted code has nothing to do with the quality of the final…

All I can say in response is I sincerely hope we never end up working together

Don't worry: we won't. You, me and the rest of us are going obsolete ;)
Post reply on HN