How valid is this approach to the study of programming?

Hello. I learn the basics of developing for Android. Decided to start with the calculator. Before that he wrote only of the Elbe in C and simple tasks in java, i.e. in addition to the bottle, pivoting and row of the matrices on the console I didn't do anything.

The calculator is almost ready, but I just find it very difficult that I wrote it.
Yes, he fully laid out UI, but the logic is almost completely copied, of course, thoroughly understanding it.
I doubt that this approach is productive, since only understand someone else's code, on occasion, a bit of optimizing under his problem, not write code from your head.

Is it true directional vector? In the future, will the number of this approach to quality?
July 12th 19 at 16:58
10 answers
July 12th 19 at 17:00
In today's world 80% of the tasks solved by copy-paste someone else's code and a small edit. (British scientists have proved it).
For common tasks there are ready-made solutions. No need to reinvent the wheel, and even more complex because of this.

You also should not simply copy someone else's code and understand it, but to try to reproduce it.
Ie something like this:
- Kopipastom
- To understand why and how it works
- Remove all, create a new project and write everything from scratch without hints (handles).

This approach will be more effective.

But everyone is different, and each is trained as it is convenient. If you believe that you are well mastered the material in this way, anything terrible in it is not present. Just try to reproduce the result from scratch, and if you succeed - you really learned how to do it.
Went to play, not kompleksuya. Thank you) - kira commented on July 12th 19 at 17:03
There are opponents of copy-paste:
www.gunsmoker.ru/2010/05/90.html
However, we are talking about Internet, not about books. - jaeden13 commented on July 12th 19 at 17:06
have meat too, there are opponents but that doesn't stop me eating it. - destany34 commented on July 12th 19 at 17:09
July 12th 19 at 17:02
Well, actually 99.9% of programmers take this vector of development. The remaining percentage apparently those who don't have Internet :)
29437996.jpg
The main thing is not to do it mindlessly, and try to understand "what and why" in code that you take. Over time, will be less copy-paste, and more to manage their own brains.
It's easy for someone to Google, skopipastit and tie to your code ready-made solution, and it's easy for someone to write bike) - kira commented on July 12th 19 at 17:05
Come on, seriously? 99.9% of programmers so learn? - jaeden13 commented on July 12th 19 at 17:08
July 12th 19 at 17:04
Writing of heads is a unique code. Copy-paste someone else's code, especially if they thoroughly to understand it is a great idea. Understanding the many other people's code, I see the difference, you see different approaches, don't run in their sandbox.

In addition, you have a very correct approach that you brought the matter to the end and released the product, but it is not only a study of programming in some language, but also the technology stack - how to not only write a piece of code, but to compile and upload to the phone, and run directly on the target device. Plus UI.
July 12th 19 at 17:06
Programming in the first place, should always be focused on the task.
If in your tasks it is enough to take someone else's code and do not require a study of all the rules.
If it is desirable to dig (it is suspected that there will be problems, or just enough money and time), or if necessary, it is necessary to dig.

Because the approach must be intellectual, and not a categorical "Yes/no".
If "Yes" - that is to aim in any task to dig out everything to the last bit, you have to dig all the standard libraries, platforms, IDE, operating system (and th? it might be useful. happen) - then you know, no not enough time, and a real customer this pastime will not pay.
But if "no" - that is, always and everywhere to float on the surface - then you will not unique and many will not do.

I.e. repelled from tasks, and how to take it?
And take them from a more global purposes: freelance, work in the office, such a direction...
A lot depends on the personal characteristics of someone born to reverse-engineer, and someone inventor rather than a researcher, and for them the answer to your question will be different.
An interesting position about the conditional division into researchers and inventors) - kira commented on July 12th 19 at 17:09
: need to find myself. This is checked at random, + there is some psychological tests, built on observations, not proven, but is still able to help. Try to answer on the forums. On any topic. If the researcher would want to present the best of what you know. If the inventor, the answer is rather short and synthetic, i.e. invented on the go, or you stupidly take jagged ice from the head or Wikipedia, without being new.
You can, of course, and switch between modes of thinking. But better still every business needs to trust profam. - jaeden13 commented on July 12th 19 at 17:12
: usually all spread. Out - the researcher. - destany34 commented on July 12th 19 at 17:15
: if Yes, then you are in some measure have the potential to learn unfamiliar things deeply.
But the usefulness of any study is still determined by the real tasks, which are demand driven. If the industry's demand for cheap downsoft, then Pro should not sell expensive quality no matter what.
First, he should gently discuss the issue with the most appropriate customers, maybe they'll agree to change the niche.
And if not, then it needs to think about how to embody the concept of RAD, which will allow cheap downsoft to write quickly and thereby to get a decent amount at the same time. That was like the Chinese - "better with a million buyers to collect on the ruble than the buyer to a million." - Marquis_Zieme commented on July 12th 19 at 17:18
July 12th 19 at 17:08
Well, first, you always have somewhere to go. Second, why reinvent the wheel. If there is a ready code then why not use it. On the other hand, and to abuse the copy-paste not worth it. Densely often meet questions like "Where can I find the ...", "who has the code ..." . A simple rule: "Know where to copy - copy, I do not know - write yourself (don't forget to give skopirovat others)"
July 12th 19 at 17:10
To read someone else's code is no less useful than writing your. Especially if it is someone else's good code.
July 12th 19 at 17:12
The calculator is almost ready, but I just find it very difficult that I wrote it

DNA your you also wrote, but not you, it's not depressing, right? And she herself copy-paste billions of years without a twinge of conscience. Take the example of a DNA
The main engine of progress your maturity as a programmer is how you will quickly learn to copy-paste, understand the capabilities and limitations of your tools
Programming is primarily about problem solving. How fast will you understand what bad code is different and determines your progress
Try to find flaws in your code itself. Then ask experienced colleagues. Then rewrite. Then repeat again N again. Put every time more challenging goals, don't be afraid to read someone else's code than to write it myself(most professional programmers are more read than write). And may the force be with you!
Thank you for your answer. Very motivating! - kira commented on July 12th 19 at 17:15
July 12th 19 at 17:14
Copy-paste is evil.
And designera become not is far know yourself to copypaste Yes molds mold.
Best as said is to understand someone else's code and write your.
July 12th 19 at 17:16
There are people who to learn, just look how others do it. Seeing the implementation of something for example, I try to reproduce some pieces of code to rewrite by hand. And, do not worry because of this. As they say "a Psychologist is not one who knows the answers to the questions, and the one who knows how to look for them".
July 12th 19 at 17:18
The calculator is almost ready, but I just find it very difficult that I wrote it.

This is an important question. While not writing anything myself, copying someone else's may seem easy. But once you want to write a program and you think, "well, will she be mine? If I think of others pieces under some other people's rights?". Well, if there will not be anything special (free license and all that). But it could be so that you will be earning in the program (unexpectedly for himself). And then the author of any piece, which has never been seen, he immediately wakes up and asks you "where's my share for work?". You want it (part of it) to clean and then face the second issue that lies in the same plane "And how to remove it? I don't know how, because I used to only copy".

I doubt that this approach is productive, since only understand someone else's code, on occasion, a bit of optimizing under his problem, not write code from your head.

This is an important question. Yes, copying the code to the extent possible, there is a Directive: you can copy or write copy. But this applies to those who already know how to write it all. This is a very important difference - the fool who copies, and the professional copies. If you can not, sooner or later have to do something on their own (writing from scratch or heavily alter someone else's) and you can't, because it never developed in it. And the brain is very simple: if you're involved in it some centers, they all remember and employ then; if you did not use the right centers, the brain is simply nothing to remember. The copy code does not involve synthesizing parts of the brain.

Find more questions by tags AndroidIT education