Live data from Hacker News

Autocomplete from Stack Overflow

emilschutte.com

41–50 of 151 posts

Re: Autocomplete from Stack Overflow

#41

Earlier quoted context omitted.

Why not? If it gets the job done (probably faster too). I would even suggest that be realistic and allow copy/paste during interviews too!

So that interviewers can gauge your ability on searching & referencing code examples from the web? Who's being realistic?

I've often told people that I'm just a good programmer, but a phenomenal Googler. Even in interviews.

Being able to search and separate the wheat from the chaff is most definitely a skill. Unless you always want to be reinventing wheels.

Re: Autocomplete from Stack Overflow

#43

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…

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.

Re: Autocomplete from Stack Overflow

#45
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 even read code in SO answers to avoid lawsuits... how much risk do you bring to your company by copying and pasting (not to mention autocompleting) from SO?

I am not a lawyer, etc. etc.

Re: Autocomplete from Stack Overflow

#46

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 }

Older IEs don't have Array.indexOf(). So you either have to extend the Array prototype or, you know, just implement it in a more compatible way.

Or just not support older IEs.

http://browserupdate.org/

Re: Autocomplete from Stack Overflow

#49

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…

There was recently talks around changing it, and most of the feedback was very negative. You can see the initial post here [1] and the follow up post here [2].

1: https://meta.stackexchange.com/questions/271080/the-mit-lice... 2: https://meta.stackexchange.com/questions/272956/a-new-code-l...

Re: Autocomplete from Stack Overflow

#50
post #40
post #10

Earlier quoted context omitted.

Siri, make me a facebook clone.

...12 hours of involuntary surgery later: There, now you're a facebook clone.

This is close to a real pun it would do, and nearly just as dire. It's fixed in recent versions, but it used to not understand emergencies. If you said "Siri, call me an ambulance," it would come back with "OK, I'll call you 'an ambulance' from now on."
Post reply on HN