A cry for help

Hello, my name is Zac, I'm 23 years old, and I've been struggling to learn programming languages no matter how basic they may be. I've tried reading books, they don't seem to help, I have somewhat of a problem when it comes to comprehending from them. I've wanted to be a programmer for a very long time. I made it my goal more or less at a very young age, I'd say 10 or 11. My main goal is C++, being told if you can write C++ you can write anything, that sounds like a good starting place. I do like a challenge but I just cannot seem to wrap my head around programming, so I'm here on this forum, hoping that maybe one of you generous souls might make some time to help me one on one. Either by voice or text, preferably voice. I know you all have lives and probably do not have the time to spare for me, but I figured I might as well ask and hope for something, if anything. Living with my girlfriend, who might as well be my wife, we struggle to make ends meet, both working at our cities local hardware store, we don't make much money, and if it weren't for that, I would gladly pay someone for this kind of help, but unfortunately I'm in no position to do so.

If you are one who has a little bit of free time and would like to contribute some knowledge, please email me at zac198969@gmail.com

Thank you so much for reading and my fingers are crossed!

Good night.
C and C++ are not ideal teaching languages. If you're struggling with programming in general, starting with C++ won't help.

If you are going to be taught from scratch, you'll need to be able to communicate using diagrams as well as written and spoken words. It's mostly conceptual. The code is just the implementation of an idea.
kbw is right C/C++ are not good languages to start learning programming languages.

Also, learning C, C++ or any language is not learning programming (language is just one part of it). So if you have been reading language books then you need to consider read book about programming/algorithms as well.

Without idea about what to develop there is no use having knowledge how to develop (which corresponds to learning languages)

But if you are bent on learning programming and developing code using C++ at the same time a good place to start is http://cplusplus.com/doc/tutorial/ (for C++).

Look here for lectures/courses about introduction to programming
http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/

Start with Introduction to Computer Science and Programming then go onto Introduction to Algorithms and so on. You will find similar free courseware from reputed universities on the web.
Start learning HTML language, it is much easier than C++, I would recommend you to get this book "INTERNET & WORLD WIDE WEB HOW TO PROGRAM" by Deitel . Once you are done with this book get this one "Problem Solving with C++" by Walter Savitch. Be patient, and do not skip any chapter without understanding every and each word in it. Another book that would be very helpful is "Data Structures and Algorithm Analysis in C++" by Mark Allen Weiss. Keep in mind that programming XP comes by practicing. To learn these Three books you will need like 1 year but it depends. Anyways GOOD LUCK
closed account (o1vk4iN6)
HTML isn't really a programming language, it's more of a file format then anything, there are no if statements or variable types, etc. Unless your thinking of Javascript.
@Eyad: Get out.

@xerzi: It is a markup language that is interpreted by the browser. It is not a programming language. It isn't even a scripting language. If someone wants to learn programming, recommending HTML is like recommending that a doctor should learn how to cook.

As for you, Zac, C++ is just one of many programming languages. Learning the language won't teach you how to program, nor can it make you think like a programmer. If you're having trouble understanding the basic principles of programming, you should spend time learning about logic, how a computer works, etc. I, personally, can't recommend any books, since I didn't have this problem. However, you're not the only one who has these questions, and after some quick searching, I found this topic on another forum. I hope it helps.

http://programmers.stackexchange.com/questions/94969/techniques-to-increase-logic-at-programming
Last edited on
I learned in BASIC, it is a lot easier that C++ (With the drawbacks of slow performance and less capabilites than C++) it helps you figure out the structure until you shift to something like C++ with more cryptic commands.
When i first learned, i got turned off by java, and jumped right into c/c++ and i've never regretted it. C++ teaches you restraint and shear willpower. You can jump right into c/c++ but as far as it not being an ideal teaching language, im gonna call bull. Why? because you dont have to use anything other than references to objects to program. No one is forcing anyone to use a pointer, and on another note arrays are practically equivalent to a list of references to objects, aka, a pointer to a list. Thats something you probrably wouldn't think about if you have never learned such a language.
If you go into c++, c, java, python or any general programming language learn the following (in order), skipping around take up a lot of time:

0. Basic arithmetic and algebra

1. Basic, trivial computer science: whats a bit? whats a word? whats a byte? how are these stored? what is ram? what is a file? how are characters represented in a computer system? what is syntax and semantics? what is the difference between the two?

2. How to setup a compiler and use an IDE = {Codeblocks, Visual Studio, Netbeans}

3. The 2 standard entry points for any c/c++ application: int main(){return 0;},
int main(int,char*[]){}

4. The different types bool (boolean),char, short, int, long, float, double

5. The difference between floating point numbers and integers (precision and accuracy).
Examples are int vs float or long vs double

6. learn what an operation is. An operation requires operands or variable or constant in which we receive an output, in short operators are just functions.
take the + operator for example
let f(x,y) = what the plus operator returns = f(x,y) = x + y
How about the equals '=' operator? It just assigns the right val to the left value.

7. How to declare a variable, "what is a variable anyway"? It goes back to basic algebra/maths
 
int index = 0;//variable 


8. How to get input and do output (cout<<, cin>>, printf(), scanf())

9. Learn simple control structures. if and switch for example. If maps a condition to an execution statement, a statement which you will perform operations within based upon the truth value of the condition "input". switch() on the other hand maps its input a variable for example to a value that matches its value.

10. Make some simple programs to test your knowledge, maybe a simple console based game or guessing game, you know enough now to do something trivial but landmarks your ability to program in general. Make non memory based calculator program that switch's or if's to what operation you want to perform.

11. Truth tables: some may argue that this should be learned earlier but i disagree, the purpose of the other things are to get your hands dirty and appetite wet. I suggest you wikipedia truth tables if you are interested.

12. Learn about loops: What is a loop? It is simply a program statement that is executed over and over based upon the truth value of its input. Take the while loop for example, it is akin to a repeating if statement based upon its truth value.
will these statements ever terminate?:

1
2
3
4
5
6
7
8
int main()
{
while( true )
{
//do something here...
}
return 0;
}

1
2
3
4
5
6
7
8
9
int main()
{
bool bQuit = false;
do
{
std::cout<<"Hello World"<<endl;
}while(!bQuit)
return 0;
}


13. Congratulations, you have graduated to a level of basic knowedge of the features of most scripting and or programming languages.

14. This ties into math knowledge, What is a function, How do you declare a function? How do you call a function? What does the function return? Is it a method, something that does an doesnt return or does it have a return value?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <math.h>
#include <iostream>
#include <stdio.h>
using namespace std;
//return_type function_name_foo(){} <---in general
float foo_Something(float x, float y,float theta)
{
  return x * cosf(theta) - y *  sinf(theta);
}
int main()
{
float theta = 45.0f;
float theta_angle_rad = theta * M_PI /180;//degree to radians because 2PI = 360 <=> PI = 180
  return foo_Something(0,1, theta_angle_rad);
}


15. Learn about what a pointer and reference is BEFORE you learn about arrays. A pointer is what it says. It points to an address, therefore it is the address, you are able to dereference it to access the object, the object of that memory "address".

none allocation based:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
int i_variable = 0;
int* p = &i_variable;
*p = 10; //if *p == 10 then i_variable must be 10 because p points to i_variable
//no cleanup, we didnt allocate anything ourselves, the compiler did it for us
printf("%d\n",p);//is what this prints a value or an address?
printf("%d\n",*p);//again...

return *p; 
}

1
2
3
4
5
6
7
8
9
10
11
12
13
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
int iVariable = -1000;
int & r_iVariable = iVariable;

if( r_iVariable == -1000 )//if p then q 
printf("Successful reference is successful: %d.\n",r_iVariable);

return iVariable;
}


allocation based (new, malloc, delete, free):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <iostream>
#include <stdio.h>
using namespace std;//namespaces are for another tutorial, use them, they are your friend
//they are like what folders are to your files, but for your project
int main()
{
int* p_iVariable = new int(10);//dynamically allocates a variable and sets it equal to 10

//most common mistake: p_iVariable = 10 //recall that a pointer is an address 
//we want to modify the value at the address, not the address itself
*p_iVariable = 9001;//its over....9000
printf("p_iVariable = %d\n",*pIVariable);
//.... do other stuff
delete p_iVariable;//since we only allocated one we use delete( void* )
//if we did instead p_iVariable = new int[100]; then we would use delete []
//...
p_iVariable = 0;//do this especially if you intend to reuse the pointer

return 0;
} 


16. Learn about what an array is. Basically an array is a list of elements or objects of a certain type.

1
2
3
4
5
//array of c-style character strings
//each element being a pointer to a character string
//strArray[0] => "Goku"
char *strArray[] = {"Goku","Vegeta","Bardock","Frieza","Chewbacca","idontknowthisnameistoodamnlongtocompileanditisrandomansomayonaseandtoast"};
int u_dirty_sombitch [] = {69};//array with only 1 element. 


17. Learn Object/Set theory. What is an object, what can you do to/with that object. What does that object encompass/contain? Classes can be abused but they help you to add structure and reuse to your code as well as abstraction, an easier way to look at things.

...im getting a bit lazy here, but you know what i mean. I got carried away, I hope this helps you all. PS. after all of the above, programming in any other language becomes only a matter of syntax and everything else aside from advanced topics, modifiers for example: const, static, inline,etc., is program language specific.
Last edited on
good luck
closed account (o1vk4iN6)
I feel like my daughter was just taken if I had one... lol
Last edited on
In summary of PacketPirate said, which i wholly agree with, LEARN 2 LOGIC XD. Because logic is more important than the programming language, with good logic you can do anything in "a" language that you can in "b" language. Right now I'm taking discrete math, and i tell you it is no joke, but It helps a whole lot with understanding things.
Last edited on
closed account (9y8C5Di1)
What you really should focus on when learning programming is not what the code looks like, but what the code and the specific fucntions do, so changing from c++ to another language is not necessary if you are already on c++. Though i must admitt that c++'s language is very logical, and easier to understand than languages like blitz3d and such. Those low level languages are good for getting the logical thinking right tho, because they use mostly words and not symbols.
@DeXecipher - your 17 point post was epic - GOOD WORK!!!

If I could add my 5 cents worth -:

The best way to learn anything is by actually doing. Computer textbooks can be overwhelming, IMO you need to actually create your own programs, make lots of mistakes, but learn from them.

Hope all goes well.
To get started, you don't need all that stuff.

In these Von Neumann languages, you need to understand:
1. variables (strings/numbers, and containers like arrays)
2. conditions (if/then/else)
3. loops (for/while/repeat)
4. subroutines (functions/procedures)

I learned programming from an Appendix on BASIC in a Discrete Math book. You don't need all that theory to get started.
http://www.amazon.com/Finite-Mathematics-A-Discrete-Approach/dp/067307921X

You could start with Ruby or Python.
Last edited on
Topic archived. No new replies allowed.