I never imagined i'd get this much resistance from the simple question of "where do you start?"
It's like trying to get into a secret society.
Oh... Yeah, no. I understand now why nobody understood your question.
I'll try to explain you the misunderstanding, but first a warning : I'll take shortcut, and not always stick to the strict reality. What I'll say is the truth, but it seem for me that explaining the problem is, here at least, better that detailing explicitly the concept.
So, let's go with the points you listed as example :
- What are libraries ?
Er... libraries for which language and, first what kind of libraries ?
For C/C++/C# (and other but there's the most know), libraries are the parts of the language which aren't strictly instructions of this language. "If something = that", is an instruction, but "open( this file )" isn't. The last one is a function of the C libraries. It's fully a part of the official ANSI C language, but not an instruction. These libraries are always in binary form, and you'll find (almost always) natively in every OS.
But C/C++/C# also have user defined libraries. It's the same thing, and still a different thing. The same, because like the standard ANSI C libraries, they extend the language by adding functions which will do the thing for you. Mostly you find them in source format, and they are directly include inside your future binary program... Oh, have I forgot to say that the standard ANSI C libraries can also be include directly inside your future binary... or not, it depend.
Now there's libraries for other languages. Perl, Python, etc., all have their libraries. But they aren't named libraries, and while they are the same than these for C, they also are different.
- What's with using underscore so much?
Er.. here again, in which language ? Oh, and first, used, but where ?
_myVariable and my_variable are two way to use the underscore, and the reasons are completely different. The second one is just a way to write the names of variables, function, whatever can be named. It's a convention, but with no importance. Some write myVariable (camelCase), other MyVariable (PascalCase), and some my_variable (snake_case), but it change absolutely nothing ; really, nothing at all.
The first one, it's different. Well, in fact it's also a convention, but still it's different. Well, in fact Python is the only language where it's different, but still it's different, trust me... More seriously. With modern language came the concept of "objects" and later "private variables" ; where "private" is related to the object, which mean that they literally can't be used outside of the object.
Languages defined before this time evolved and included the notion of objects, but can't include the "private" thing. So, coders came to a convention. A variable/fonction/whatever starting with an underscore is private. Because of the way the language work, they can be used outside of the object, but the leading underscore mean, "warning, this is a private variable. Don't fuck with it ! In fact, forget that it exist, this isn't the variable you're looking for !"
But, like I said, this is "except with Python". Python kept the convention, but work a little differently when the variable have a leading underscore. The variable can be used outside of the object, but aren't always shown and, if I remember correctly, aren't exported outside of a module (the Python form of library, except that a library can be other thing than a module).
Python also add the double leading underscore, which have yet another meaning and don't work exactly like variable with a single leading underscore ; while they still can be used outside of the object. It also add the double leading and double trailing underscore, which is yet another thing.
- What does # do?
This one is easy, it's the way to mark a comment. Some language (C/C++ by example) use another way to mark a comment, but I don't know a language which have another use for the "#"... Well, speaking about it, something deep in my memory tell me that there's one which use it as variable (?) introducer, but I'm not sure.
- Why so many indentations?
Er... in which language ? No, I'll answer directly because I understood this one : Because Python users are insane
There's some language, Python is one of them, where indentation have a major importance, while most of the language don't care at all about them.
Here's a example of a basic function, firstly in Perl (voluntary not indented):
Code:
sub addition()
{
my res = 0
foreach( @_ )
{ res += $_; }
return a + b;
}
then in Python :
Code:
def addition( *args ):
res = 0
for i in args:
res += i
return a + b
In both example you have two blocs (an ensemble of code lines that form a single entity, but this ensemble can be a single line). In Perl, the bloc are started by a "{" and ended by a "}". In Python, you mark a bloc the ":" at the end of the line which introduce this bloc, and the bloc itself is all the line with a higher indentation that this line ; note that all the lines of a bloc MUST have exactly the same indentation.
- Is WHITESPACE the same as a regular space ?
Yes, but no, but still yes.
A regular space is one of the few whitespace, also name white characters. Another well know whitespace is the tabulation. So, in most of the language, tabulation and space are the same thing, but not in Python. In Python they are forbidden for indentation of the code.
In fact it come for a problem with a long, long history. Some people indent their code with space, some other with tabulation, and these people can work on the same code. As long as the tabulation is of 8 spaces, all is great, the space indented lines and tabulation indented ones are at the same level. But if suddenly a new coder start to work for the project, and have a tabulation of 5 spaces, the lines aren't indented anymore.
But the reason why they are forbidden in Python code is not aesthetic. It's just that what's the difference between two tabulation and 8 spaces ? Are they the same indentation or not ? Like it's the indentation which define the blocs, you need a strong knowledge here ; so, no tabulation.
And, voila, I answered your question. But I think that you feel more confuse now that after my answers. The misunderstanding is that you think that, generally speaking, "all the language are the same" ; by example, a library is a library whatever the language. In the same times, coders know that each language is unique, even those which seem the same.
Sorry again, but there's no way to escape it, you'll need to learn a programming language
Don't worry, what "library" mean, why's the meaning of "#", and so on, all these questions will have their answer in the doc you'll choose. It's mandatory since the answer isn't the same for each language.
Edit: My god, my poor english skills
I corrected the most obvious errors, sorry for the one I left.