In my opinion this is pretty much what you should do, as long as you strip away what isn't needed and comment and name your variables reasonable names for the task at hand.
How even does the CC share-alike provision propogate for a small snippet of code like that? As in, how far does the copyleft cover? Does the entire project now have to be freely distributable? Are licence incompatibilities now an issue?
(Although a fair amount of the less lengthy stuff on SA are probably just common idioms which the answerers didn't come up with to begin with, so this would in those cases be perhaps a moot point.)
58
u/420ass_slayer69 Jun 28 '19
it not stealing, if it open source
32
u/[deleted] Jun 28 '19
oh , you steal code ? what a shame ! it's not like i do the same !
7
u/Tjstictches Jun 28 '19
After a couple of years, I pretty much just steal all of my old code because I remember how much of a pain in the ass it was to write from scratch.
5
u/developedby Jun 28 '19
All code from StackOverflow is licensed with CC BY-SA 4.0, so you can use it all you want, as long as you obey the license
3
u/__MrFahrenheit Jun 29 '19
GPL: You are being rescued, please do not resist
3
u/Couro_ Jun 29 '19
me on stack overflow or github
1
u/Gydo194 Jun 29 '19
Hahaha this just had to happen one day
1
u/froggie-style-meme Dec 14 '19
That's how programming is. Hell, bill gates learned assembly on the fly whilst developing windows.
The boot script for windows was also written on the fly. Literally.
0
u/[deleted] Jun 28 '19
[deleted] — view deleted comment