Post Made Community Wiki by tia
3 added 410 characters in body
source | link

Is it bad? Maybe... for learning small examples, for testing out a concept, it's not that bad.

BUT... you have to understand what you are copy/pasting. Otherwise, how do you know that the code is really doing? Sure, it gets the one result you want on the screen but maybe it has horrible performance, maybe it has security holes, maybe it causes memory leaks, maybe it summons Cthulhu, maybe it will cause customer credit card numbers to be leaked, maybe it contains a backdoor...

And most likely, maybe it requires some tweaking to meet business requirements and if you don't understand the code you will not be able to properly tweak it (or better yet: write a more "correct" version)...

As for "RTFM", yes, I do when it's available. I would read the BufferedReader javadocs, and if I can't get enough information to get my code working, I would then hit Google and search for "Java BufferedReader example". I would not expect the code I find to work immediately with my code, but I would expect to find a simple working stand-alone sample that I can use as an example to correct my own code.

And when it's your own code that you are copying/pasting, that's usually a sign to start refactoring.

Is it bad? Maybe... for learning small examples, for testing out a concept, it's not that bad.

BUT... you have to understand what you are copy/pasting. Otherwise, how do you know that the code is really doing? Sure, it gets the one result you want on the screen but maybe it has horrible performance, maybe it has security holes, maybe it causes memory leaks, maybe it summons Cthulhu, maybe it will cause customer credit card numbers to be leaked, maybe it contains a backdoor...

And most likely, maybe it requires some tweaking to meet business requirements and if you don't understand the code you will not be able to properly tweak it (or better yet: write a more "correct" version)...

And when it's your own code that you are copying/pasting, that's usually a sign to start refactoring.

Is it bad? Maybe... for learning small examples, for testing out a concept, it's not that bad.

BUT... you have to understand what you are copy/pasting. Otherwise, how do you know that the code is really doing? Sure, it gets the one result you want on the screen but maybe it has horrible performance, maybe it has security holes, maybe it causes memory leaks, maybe it summons Cthulhu, maybe it will cause customer credit card numbers to be leaked, maybe it contains a backdoor...

And most likely, maybe it requires some tweaking to meet business requirements and if you don't understand the code you will not be able to properly tweak it (or better yet: write a more "correct" version)...

As for "RTFM", yes, I do when it's available. I would read the BufferedReader javadocs, and if I can't get enough information to get my code working, I would then hit Google and search for "Java BufferedReader example". I would not expect the code I find to work immediately with my code, but I would expect to find a simple working stand-alone sample that I can use as an example to correct my own code.

And when it's your own code that you are copying/pasting, that's usually a sign to start refactoring.

2 added 32 characters in body
source | link

Is it bad? Maybe... for learning small examples, for testing out a concept, it's not that bad.   

BUT... you have to understand what you are copy/pasting. Otherwise, how do you know that the code is really doing? Sure, it gets the one result you want on the screen but maybe it has horrible performance, maybe it has security holes, maybe it causes memory leaks, maybe it summons Cthulhu, maybe it will cause customer credit card numbers to be leaked, maybe it contains a backdoor...

And most likely, maybe it requires some tweaking to meet business requirements and if you don't understand the code you will not be able to properly tweak it (or better yet: write a more "correct" version)...

And when it's your own code that you are copying/pasting, that's usually a sign to start refactoring.

Is it bad? Maybe... for learning small examples, for testing out a concept, it's not that bad.  BUT... you have to understand what you are copy/pasting. Otherwise, how do you know that the code is really doing? Sure, it gets the one result you want on the screen but maybe it has horrible performance, maybe it has security holes, maybe it causes memory leaks, maybe it summons Cthulhu, maybe it will cause customer credit card numbers to be leaked, maybe it contains a backdoor, maybe it requires some tweaking to meet business requirements and if you don't understand the code you will not be able to properly tweak it (or better write a more "correct" version)...

And when it's your own code that you are copying/pasting, that's usually a sign to start refactoring.

Is it bad? Maybe... for learning small examples, for testing out a concept, it's not that bad. 

BUT... you have to understand what you are copy/pasting. Otherwise, how do you know that the code is really doing? Sure, it gets the one result you want on the screen but maybe it has horrible performance, maybe it has security holes, maybe it causes memory leaks, maybe it summons Cthulhu, maybe it will cause customer credit card numbers to be leaked, maybe it contains a backdoor...

And most likely, maybe it requires some tweaking to meet business requirements and if you don't understand the code you will not be able to properly tweak it (or better yet: write a more "correct" version)...

And when it's your own code that you are copying/pasting, that's usually a sign to start refactoring.

1
source | link

Is it bad? Maybe... for learning small examples, for testing out a concept, it's not that bad. BUT... you have to understand what you are copy/pasting. Otherwise, how do you know that the code is really doing? Sure, it gets the one result you want on the screen but maybe it has horrible performance, maybe it has security holes, maybe it causes memory leaks, maybe it summons Cthulhu, maybe it will cause customer credit card numbers to be leaked, maybe it contains a backdoor, maybe it requires some tweaking to meet business requirements and if you don't understand the code you will not be able to properly tweak it (or better write a more "correct" version)...

And when it's your own code that you are copying/pasting, that's usually a sign to start refactoring.