Why not copy and paste???? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why not copy and paste????

Why can't we use copy and paste option in programming language? That's helps us to save time and minimize work. Am I correct 🤔🤔🤔

14th Oct 2019, 1:38 PM
M P Surya Sai
M P Surya Sai - avatar
7 Answers
+ 4
We basically do that all the time. For example whenever you write #include <whatever> in your C code, you're basically copypasteing code that other people have written for you. That said, you always have to watch out if you have the right to copypaste a certain piece of code. Depending on what it is, you may be breaking laws copying code. Also, for learning purposes, you should try to write the code yourself, even if you could just copy it from somewhere.
14th Oct 2019, 1:58 PM
HonFu
HonFu - avatar
+ 4
Nothing wrong with it as long as as there is no unnecessary/inefficient copying of blocks of code.
24th Nov 2019, 11:22 PM
Sonic
Sonic - avatar
+ 2
I use copy and pase, at least to copy and paste my own work so I don't have to type it again. But if you're talking about copy and paste a solution from online, you can...but there is the problem if you actually understand the code you're copying, and if you're learning a language you won't get that practice of typing the language.
14th Oct 2019, 1:56 PM
Odyel
Odyel - avatar
+ 1
type it youself if you want to learn. on the development we want to keep it DRY. if you're using same codes over and over, copy pasting will make the source file larger and make it harder to read. just make a function.
14th Oct 2019, 2:59 PM
Taste
Taste - avatar
0
I do it all time, because you don't habe to always understand everything, even if you use code that you can't fully understand, there will be a time where must understand it, and since you have already used it a lot and tested it many times it's much easier to undertand, but I'm talking about copy-paste of a line or two, not a whole script
14th Oct 2019, 2:33 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
0
What I am asking is it possible or not?????
14th Oct 2019, 3:57 PM
M P Surya Sai
M P Surya Sai - avatar
- 1
To make you learn!
14th Oct 2019, 9:49 PM
Maria