I need a Teacher

01/12/2011 15:32 kiiD2NiCe#1
sup every one. i really want to learn how to program and wanted to know if any one in this forum would be my teacher for free or show me the basics. i am only 15 so i don't really have money so i am asking for free teaching which is kinda crazy but any ways if you wanna help me add me at [Only registered and activated users can see links. Click Here To Register...]
thank you
01/12/2011 17:12 leighrex#2
Just google, C# tutorial? Or you can read forums and you'll find many tutorials / website links to tutorials.
01/12/2011 17:16 Lateralus#3
You should learn *at least* programming syntax and basic concepts (and practice them), since someone teaching you the basics is wasting their time (there are lots of resources available on the web to help you learn). Then if you have any questions, you should find someone to help.
01/12/2011 17:18 kiiD2NiCe#4
Quote:
Originally Posted by Lateralus View Post
You should learn *at least* programming syntax and basic concepts (and practice them), since someone teaching you the basics is wasting their time (there are lots of resources available on the web to help you learn). Then if you have any questions, you should find someone to help.
well i have been using google and tutorials but i have problems with loop int and bool
01/12/2011 20:37 Lateralus#5
Quote:
Originally Posted by kiiD2NiCe View Post
well i have been using google and tutorials but i have problems with loop int and bool
Err... that's a strange range to have problems with. I'm assuming you're learning C#.

An "int" is a variable type that can store 4-byte (or 32-bit) values. To fully understand the storage capacity of variables, I'd advise you read an explanation of binary and hexadecimal values and a little about computer organization. I'll explain a little about them to you, but I'd suggest you read some materials on them.

A 4 byte value can contain a range (in hexadecimal) from 00000000 to FFFFFFFF. There are two main ways (4 if you count sign+magnitude and 1's complement) to represent a number. One is the unsigned representation, which has a minimum value of 0 and a maximum value of 2^n-1 (n being the maximum number of bits a variable can hold). The problem with this representation is that there is no way to represent a negative number. Of course, there's an implementation for this representation in C#, and it is useful if you do not want/expect negative number input (e.g. the variable type "uint"). The other way is the 2's complement representation. This representation allows negative numbers by having the most significant bit (the one with the highest magnitude [e.g. the leftmost]) denote a negative number when it is 1, and a positive when it is 0. For example, if I were to have a 5-bit number, 10010, this would represent -14 base-10 in 2's complement notation, or 18 in unsigned. Again, if you're lost, read some explanations of binary/hexadecimal values, it should be much clearer after doing so.

There are other variable types as well, and should be used if you expect an input to be higher/less than the minimum/maximum capacity. In C#, these are bytes (8-bit and are unsigned by default, you can use sbyte to denote a signed byte (2's complement)), shorts (16-bit), int (which you know are 32-bit), and long (64-bit). By using a smaller capacity variable size, you are saving memory and cutting down resources used by your program.

With that out of the way, let me explain bools. Boolean variables are stored as 8-bit types, but the only valid input to boolean variables are 0 (for deasserted, false) and 1 (for asserted, true). These are used primarily for condition testing, which I assume you know since you haven't stated you're having trouble with them.

Looping is very useful if you want to perform the same action a certain number of times. Programmers use them so that they don't need to write the same code over and over. There are 4 types of loops in C#; for, while, do/while, and foreach. A for loop initializes a variable, tests a condition, and performs an operation after each loop. A while loop simply tests a condition and loops if the condition is true, a do/while loop is almost exactly like a while loop, except it executes the code in the loop before testing the condition (useful for menus), and a foreach loop in used primarily in traversing containers (I think, I'm newish to C#, C++ is my language). Here's a quick example of the loops, with the exception of the do/while (self-explanatory), and the foreach loop, since I don't think you've gotten there yet.

int i = 0;
while (i < 10)
{
// Do something here
i++;
}

for (int i = 0; i < 10; i++)
{
// Do something here
}

Both of these loops do the exact same thing, and will execute the code in the curly braces 10 times.

If I made a mistake, and I probably did because I rushed it, tell me. Hopefully that's a bit clearer than before.
01/18/2011 02:46 kiiD2NiCe#6
Quote:
Originally Posted by Lateralus View Post
Err... that's a strange range to have problems with. I'm assuming you're learning C#.

An "int" is a variable type that can store 4-byte (or 32-bit) values. To fully understand the storage capacity of variables, I'd advise you read an explanation of binary and hexadecimal values and a little about computer organization. I'll explain a little about them to you, but I'd suggest you read some materials on them.

A 4 byte value can contain a range (in hexadecimal) from 00000000 to FFFFFFFF. There are two main ways (4 if you count sign+magnitude and 1's complement) to represent a number. One is the unsigned representation, which has a minimum value of 0 and a maximum value of 2^n-1 (n being the maximum number of bits a variable can hold). The problem with this representation is that there is no way to represent a negative number. Of course, there's an implementation for this representation in C#, and it is useful if you do not want/expect negative number input (e.g. the variable type "uint"). The other way is the 2's complement representation. This representation allows negative numbers by having the most significant bit (the one with the highest magnitude [e.g. the leftmost]) denote a negative number when it is 1, and a positive when it is 0. For example, if I were to have a 5-bit number, 10010, this would represent -14 base-10 in 2's complement notation, or 18 in unsigned. Again, if you're lost, read some explanations of binary/hexadecimal values, it should be much clearer after doing so.

There are other variable types as well, and should be used if you expect an input to be higher/less than the minimum/maximum capacity. In C#, these are bytes (8-bit and are unsigned by default, you can use sbyte to denote a signed byte (2's complement)), shorts (16-bit), int (which you know are 32-bit), and long (64-bit). By using a smaller capacity variable size, you are saving memory and cutting down resources used by your program.

With that out of the way, let me explain bools. Boolean variables are stored as 8-bit types, but the only valid input to boolean variables are 0 (for deasserted, false) and 1 (for asserted, true). These are used primarily for condition testing, which I assume you know since you haven't stated you're having trouble with them.

Looping is very useful if you want to perform the same action a certain number of times. Programmers use them so that they don't need to write the same code over and over. There are 4 types of loops in C#; for, while, do/while, and foreach. A for loop initializes a variable, tests a condition, and performs an operation after each loop. A while loop simply tests a condition and loops if the condition is true, a do/while loop is almost exactly like a while loop, except it executes the code in the loop before testing the condition (useful for menus), and a foreach loop in used primarily in traversing containers (I think, I'm newish to C#, C++ is my language). Here's a quick example of the loops, with the exception of the do/while (self-explanatory), and the foreach loop, since I don't think you've gotten there yet.

int i = 0;
while (i < 10)
{
// Do something here
i++;
}

for (int i = 0; i < 10; i++)
{
// Do something here
}

Both of these loops do the exact same thing, and will execute the code in the curly braces 10 times.

If I made a mistake, and I probably did because I rushed it, tell me. Hopefully that's a bit clearer than before.
thanks for the help
01/18/2011 16:14 XxenkixX#7
Take a book of c++ coding. i have somthing but it's in german.
01/18/2011 19:21 Lateralus#8
There's 31.4 GB of CMPS materials on demonoid. Just saying, not trying to advocate any pirating (but it's worth it). :)

Also, there are MIT video lectures on algorithm analysis and advanced data structures, which are really helpful when you get to more advanced concepts, and I doubt I would have done well in that class without them.
01/19/2011 02:28 pro4never#9
Quote:
Originally Posted by Lateralus View Post
There's 31.4 GB of CMPS materials on demonoid. Just saying, not trying to advocate any pirating (but it's worth it). :)

Also, there are MIT video lectures on algorithm analysis and advanced data structures, which are really helpful when you get to more advanced concepts, and I doubt I would have done well in that class without them.
Mind posting a link? I'm in the process of downloading a few ebooks from pirate bay on some diff programming stuff now, just wondering if you had any recommendations.

Keeping in mind I'm mostly just interested in C# (I should learn C++ at some point but def putting it off)

Also considering learning some php soon (aka what I'm dling now lol)

always <3 having more materials to reference.

PS: those looking for info on C#, I have C# for dummies uploaded (re-uploaded, someone else posted it but I don't have the link so can't give credit :S)

[Only registered and activated users can see links. Click Here To Register...]
01/20/2011 14:09 Lateralus#10
Quote:
Originally Posted by pro4never View Post
Mind posting a link? I'm in the process of downloading a few ebooks from pirate bay on some diff programming stuff now, just wondering if you had any recommendations.

Keeping in mind I'm mostly just interested in C# (I should learn C++ at some point but def putting it off)

Also considering learning some php soon (aka what I'm dling now lol)

always <3 having more materials to reference.

PS: those looking for info on C#, I have C# for dummies uploaded (re-uploaded, someone else posted it but I don't have the link so can't give credit :S)

[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]

Huge collection - here's a list of what's inside the torrent...

Code:
Main 4 folders:
- Programming Languages
- Basics
- Advanced
- Others

* Programming Languages:
- C
- C# & .NET
- C++
- Erlang
- F#
- Heskell
- Java
- Lisp
- Objective-C
- scripting
- Perl
- Python
- Shell
- XML
- Windows Programming

* Basics
- Assembly Language
- Data Structure and Algorithms
- Computer Architecture
- Software Engineering
- Operating Systems
- Video tutorials (Structure and Interpretation of Computer Programs)

* Advanced
- Principles of Programming Languages
- Theory of Computation
- Graph Theory
- Compiler Design
- Discrete Mathematics
- Multicore Programming
- Technical Papers
- Design

* Others
- Networks
- Cryptography
- Digital Signal Processing
- Hack
- TeX
- XML
- Web Programming
- Misc
If you're in school for computer science, I'd STRONGLY recommend getting this torrent. It helps tremendously. I'm taking discrete mathematics as the next course in my curriculum, and there's a great video lecture on it with 20-something videos by a distinguished professor in here (he also makes the course extremely easy to understand). Again, HIGHLY RECOMMENDED.