Page 2 of 2
Re: We learn by copying
Posted: Mon Sep 07, 2009 2:36 pm
by Kevin
Solar wrote:But it isn't the only way, and it's very tempting to "copy and not learn" (a.k.a. The Dark Side of the Code).
As soon as you copy from more than one source, this doesn't work any more. At this point, you are forced to start understanding the code - otherwise you won't be able to integrate the pieces into something functional. And fortunately tutorials only cover a limited range of topics, so you'll need to do that pretty soon.
I guess this is why I've never seen an OS that is mostly copied and still can do something interesting.
Re: We learn by copying
Posted: Tue Sep 08, 2009 1:05 pm
by ClarionCoder51
Newbies copy, but good newbies copy and try to understand what's happening in the code (like me). Its being spoon-fed versus being told which spoon to use and how to use it.
Re: We learn by copying
Posted: Tue Sep 08, 2009 4:36 pm
by neon
Solar wrote:I had no internet, and no acquaintances I could learn from.
I admit today it seems natural to "copy and learn". But it isn't the only way, and it's very tempting to "copy and not learn" (a.k.a. The Dark Side of the Code).
That is fine. I myself originally started the same way (No internet, learned from books). However you are still "copying" in the sense of taking a program example in the resource and learning from it.
Of course, I suppose its possible to not take any examples and just build the program yourself using what you learned. If so then it would not be "copying".
Re: We learn by copying
Posted: Tue Sep 08, 2009 7:18 pm
by Cjreek
Hi,
I think to copy is not the only thing you (need to) do, if you're going to learn something. But it's necessary! As many former posters said... If you just copy some code, compile it, run it - this does not have any learning effect to you.
I think you learn in 3 steps:
First you just
copy something, making sure the thing you're about to learn works and is correct.
In the second step you try to
understand how it this (code i.e.) does work. You try to follow how everything works and what the idea behind this all has been.
Finally you make sure you understood everything right by
modifying the copy. If the result of your modification meets with your expectation you finally learned something.
It doesn't matter if you used a book or the internet or even the manual of something... in any case you copied the information you read/heared.
Imagine you try to learn a programming language without having ever seen a single line of code. You start your IDE or maybe just a simple text editor and you don't have ANY clue how to write some code.
You have to copy any source of information. No matter which kind of source. This could be the internet, a book, the Readme/Manuel/Helpfile of the desired programming language or even any kind of teacher who tells you some basic instructions and syntactic rules.
I think I forgot a fourth aspect in any learning process: Experience.
Sometimes you can learn just from experience. Everyone who masteres 2+ programming languages (i.e..) knows that the second one was much easier to learn then the first was.
Because from experience you know that most (every) programming languages nearly work in the same way.
(Probably my English is not that good. I hope you can understand it nevertheless )
Re: We learn by copying
Posted: Tue Sep 08, 2009 8:58 pm
by tantrikwizard
Please, lets not encourage these idiots with the copy/paste talk, there are already hundreds of teens around the world attempting to copy and paste a kernel together which will out perform linux, windows and a mac and will run all their binaries natively...if they could just figure out how to load a GDT!
Re: We learn by copying
Posted: Tue Sep 08, 2009 10:58 pm
by Cognition
I don't know that there's any real value in copying code. It always help to have an example, but generally I think excessive copying is a bad practice. You bypass the bulk of the design and implementation process to get something that "just works", I'd consider this kind of impulsive and short sighted. Especially with regards to OS development, if cannot read a specification and implement it from that alone then you're in for a world of hurt. There are some exceptions to this obviously, some software is meant to be integrated tightly and offer the mechanisms to do so with minimal overhead (Intel's ACPICA comes to mind). In general though the only mental exercise I've heard of that benefits directly from copying is memorization.
Re: We learn by copying
Posted: Tue Sep 08, 2009 11:01 pm
by xvedejas
In my opinion, code should be available. A bad coder will copy verbatim, a good coder might use the code but with modifications, and a great coder might just use the general idea. That, however, is up to the ability of the coder. Available code can be a use or detriment, but in either way it still ought to be available. I don't see a debate much beyond that.
Re: We learn by copying
Posted: Tue Sep 08, 2009 11:24 pm
by piranha
xvedejas wrote:In my opinion, code should be available. A bad coder will copy verbatim, a good coder might use the code but with modifications, and a great coder might just use the general idea. That, however, is up to the ability of the coder. Available code can be a use or detriment, but in either way it still ought to be available. I don't see a debate much beyond that.
And an amazing coder will come up with a better idea. But thats not likely.
Yes, we learn by copying. At first. But once we have the knowledge, and the ability to make our own decisions for design and implementation, then we should diverge from copying and use the basic idea and design. This will continue to the point where we can design and implement code based off of general ideas/specifications.
The difference between someone who will actually make it (not only in OSdev, but in anything) and someone who will fail is the willingness to take the hard road.
Code: Select all
/-----Hard Road ---------\
------/-Easy Road-=|:( \-------------:)
The easy road will eventually end, because you will run out of things to copy, which will either force you to learn, or force you to give up. Even if you learn from this point, it will be harder, and less productive because you skipped steps.
If you don't start learning from your copying, and start making your own designs/implementations then you will fail. But once you learn the necessary info to start making your own programs, you must start to do that.
To summerize: You learn by copying in the early stages. And after that you don't copy. But the learning does not end once you start copying. So, no, you don't
only learn by copying, but there is a significant amount of it at the beginning.
-JL
Re: We learn by copying
Posted: Tue Sep 08, 2009 11:45 pm
by MasterLee
Sometimes copying and modifying maybe an good way to learn. For example when you first learn an foreign language you will modify sentences like "Hi, my name is...". And on learning CDs you will encounter phrases like "listen and repeat".
On the other side sometimes copying isn't possible or necessary. Remember the times when you learned to use your eyes. No? Maybe back those they you didn't figure out how to use your brain the right way. Learning by trial and error is an other way of learning.
BTW: Any one read Wikipedia about learning?
Re: We learn by copying
Posted: Mon Sep 21, 2009 3:31 pm
by Masterkiller
I actually distinguish two way of learning. By describing and by copying.
Describing is when I read document, white-paper, manual - any theory. Then make classes of information by its meaning, importance, and all categories for the thing I learn. The end result must be visual, so you must imagine and understand how the things works. For example when learn physics, imagine protons like red sphere and electrons like smaller blue sphere. The forces (F) are arrows and so on. If you see something it is easier to understand. That way of learning adds your way of understanding the things to original explanation and your imagination, resulting more ideas, but requires really good explanation and good documentation, that OS Development is short off.
Copying is fast way of learning. It gives more productivity. If you see how something is done, you could do the same thing. The problem is it is strict, so if you do not need exactly that, copying is not efficient. Anyway looking how the things are done, you may test it, and then describe it, leading to the first way of learning.
Describing is learning the theory and then use it in practice. Copying is learning a practice and then use it in practice. Ideas are mainly theoretical, so if you need to understand something you must go through theory. Regular users anyway prefer practice, they do not care how something work, the care that it works, and if you copy it, then your product will it works, too. That is most of the times (but not always true).