OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 25, 2024 1:20 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: We learn by copying
PostPosted: Mon Sep 07, 2009 2:36 pm 
Offline
Member
Member

Joined: Sun Feb 01, 2009 6:11 am
Posts: 1070
Location: Germany
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.

_________________
Developer of tyndur - community OS of Lowlevel (German)


Top
 Profile  
 
 Post subject: Re: We learn by copying
PostPosted: Tue Sep 08, 2009 1:05 pm 
Offline
Member
Member
User avatar

Joined: Sun Aug 16, 2009 11:52 am
Posts: 28
Location: Georgia, USA
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.

_________________
"The n00b zone is for loading and unloading newbies only."


Top
 Profile  
 
 Post subject: Re: We learn by copying
PostPosted: Tue Sep 08, 2009 4:36 pm 
Offline
Member
Member
User avatar

Joined: Sun Feb 18, 2007 7:28 pm
Posts: 1564
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".

_________________
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}


Top
 Profile  
 
 Post subject: Re: We learn by copying
PostPosted: Tue Sep 08, 2009 7:18 pm 
Offline
Member
Member

Joined: Thu May 28, 2009 2:41 pm
Posts: 70
Location: Germany
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:

:arrow: First you just copy something, making sure the thing you're about to learn works and is correct.
:arrow: 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.
:arrow: 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 :mrgreen: )


Top
 Profile  
 
 Post subject: Re: We learn by copying
PostPosted: Tue Sep 08, 2009 8:58 pm 
Offline
Member
Member

Joined: Sun Jan 07, 2007 9:40 am
Posts: 153
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!

_________________
www.davidmott.com


Top
 Profile  
 
 Post subject: Re: We learn by copying
PostPosted: Tue Sep 08, 2009 10:58 pm 
Offline
Member
Member

Joined: Tue Apr 15, 2008 6:37 pm
Posts: 191
Location: Gotham, Batmanistan
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.

_________________
Reserved for OEM use.


Top
 Profile  
 
 Post subject: Re: We learn by copying
PostPosted: Tue Sep 08, 2009 11:01 pm 
Offline
Member
Member
User avatar

Joined: Thu Jun 04, 2009 5:01 pm
Posts: 168
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.

_________________
Valix is an experiment in an interpreted userspace with object-oriented and functional design patterns. Developers needed! Join #valix on irc.freenode.net


Top
 Profile  
 
 Post subject: Re: We learn by copying
PostPosted: Tue Sep 08, 2009 11:24 pm 
Offline
Member
Member
User avatar

Joined: Thu Dec 21, 2006 7:42 pm
Posts: 1391
Location: Unknown. Momentum is pretty certain, however.
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:
       /-----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

_________________
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io


Top
 Profile  
 
 Post subject: Re: We learn by copying
PostPosted: Tue Sep 08, 2009 11:45 pm 
Offline
Member
Member

Joined: Fri Mar 13, 2009 8:51 am
Posts: 90
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?

_________________
50₰


Top
 Profile  
 
 Post subject: Re: We learn by copying
PostPosted: Mon Sep 21, 2009 3:31 pm 
Offline
Member
Member
User avatar

Joined: Sat May 05, 2007 6:20 pm
Posts: 153
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).

_________________
ALCA OS: Project temporarity suspended!
Current state: real-mode kernel-FS reader...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 134 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group