View Single Post
Old June 6th, 2009   #48 (permalink)
S.T.A.R.S.
 
S.T.A.R.S.'s Avatar
 
Join Date: Jan 2006
Location: Planet Earth...
Posts: 593
Quote:
Originally Posted by cottonvibes View Post
well, i would recommend you be "very descriptive" instead of simple.

i remember when i was a noob a lot of tutorials would tell me what code simply does, but it wouldn't explain descriptively how the code works, and why we were doing it that way.
so, i didn't learn much from those tutorials.

if you don't explain why and how the code works, then you'll only be teaching the people how to copy and paste.

(this is just a general suggestion, i wasn't in your old class so i don't know how you taught the stuff)
I totally agree with you.I remember when I started learning C# approximately 4 years ago,all I did was copying and pasting the code for each function...wether that function was a BUTTON CLICK EVENT and so on......But then after few months I noticed that if I don't understand the code,it's very hard to make something all by yourself WITHOUT copying and pasting.So I decided to learn "how to understand" the code.I remember when I found the code for windows shut down.All I did was copy and paste.I didn't understand a word of that code,but I didn't even really care lol.But then later I KNEW that C# is going to be SUPER HARD if I just do copy and paste WITHOUT understanding the code.

When I started to learn how to understand the code,it was pretty hard in the beginning,but later it was easier every time.I noticed that the code has logical words.Let's take the most simple for example.MESSAGE BOX.The code as we all know is:

MessageBox.Show("Hello there!");

Now let's split and explain every single word from this code:

Message = We want to display some text message on the screen.
Box = Something like a box--->The little window in which that text
message is going to be written.
. = We are writing the dot to open the menu which will provide us many
different options which we can choose to use for the previous part of
the code--->"MessageBox".
Show = We want to SHOW that text message on the screen.
("Hello there!") = But the computer doesn't know WHAT text we want to
display in the message box,(little box or window),so we
need to write THE TEXT which we WANT TO DISPLAY on
the screen IN that message box,(little box or window).
The text is ALWAYS written between the quotes and
in some cases like this one,the quotes and the text must
be inside the brackets.--->("Hello there!")
; = The semicolon must be ALWAYS written on the end of the statement.
(STATEMENT is ONE line of code).--->For example:
MessageBox.Show("Hello there!");

NOTE that this example is for the C# language.In Visual Basic (VB) language you DO NOT
need to write the semicolon on the end of the statement.


So this is how I started to learn to understand every new code 3 years ago.Yes I agree with you that people must understand the code otherwise the copy and paste won't help so much in the future,ESPECIALLY if the code is long and complicated.
__________________
GOODBYE FOREVER EVERYONE...
S.T.A.R.S. is offline