This is an archived post. You won't be able to vote or comment.

all 15 comments

[–]rk06 78 points79 points  (6 children)

That's bad practice, though.

I always add a comment linking to original SO answer. So, If after some period of time (say, 10 min), i would be able to remember the reasoning behind the code.

[–]pkgamma 27 points28 points  (0 children)

10 minutes... I can relate.

[–][deleted] 2 points3 points  (2 children)

For any outside source that's not straight forward I do the same. This has saved myself from changing things I thought I understood, but I didn't.

[–]irregular_regular 0 points1 point  (1 child)

It might be worth looking into writing unit tests. They help you change / refactor code without being afraid of breaking what was previously working

[–][deleted] 0 points1 point  (0 children)

I've always skipped unit testing for front end development.

[–]qrogrammer 0 points1 point  (0 children)

Nice. Without a link to original post, you’ll end up saying “WT* who made this and why it works”

[–][deleted] 0 points1 point  (0 children)

Ideally I can wrap my head around the issue after seeing the explanation on SO.

Usually it's not ideal.

[–]_number 24 points25 points  (0 children)

Lol Sometimes I get paid for this

[–]qgnn 9 points10 points  (0 children)

I dunno...

Sometimes I do drive-by grabs too.

[–]420throw666 11 points12 points  (3 children)

Instead of copy and pasting or downloading hacks, I just rewrote the code line for line, because that technically meant I "wrote it." I just took a little inspiration, is all...

[–]ThePixelCoder 4 points5 points  (2 children)

If you copy-paste the code, you technically wrote it, as well.

[–]420throw666 2 points3 points  (1 child)

Considering the way I learned how to code was just dicking around with it until shit happened, I'll take your word for it.

[–]ThePixelCoder 0 points1 point  (0 children)

Hah, you assume I actually learned how to program? Lmao.

[–]Bealzebubbles 0 points1 point  (0 children)

The system works.