tags:

views:

133

answers:

6

I can usually understand the syntax and learn the syntax quickly for most languages, but what is the best way to learn how the syntax works and the logic behind it, so I can program more efficiently and more logically.

Hopefully this question makes sense. Any answers would be much appreciated!

+3  A: 

I would recommend that you just write some programs.
The best way to learn to program and be comfortable with it is to practice.

In particular, you should strive to understand exactly what you're doing.
If you try some code, and it doesn't work, you should make sure that you understand exactly why it didn't work instead of randomly changing things until it starts working. If you have trouble with this, we'll be glad to help you. (I assume)

SLaks
Is there some sort of curriculum I can follow. I want to challenge myself, but I am not sure what programs to write to do so.
Jake Brooks
Write whatever interests you. Or you can try to solve stuff like the Project Euler problems (http://projecteuler.net/).
Svish
I'm not convinced that diving in is the best approach for gaining an appreciation of "the logic behind [the syntax]." "Strive to understand" is obviously good advice, but without some resources that can give him a leg up with that understanding or help him to confirm his guesses/inferences/assumptions, this could easily lead to wasted effort, erroneous conclusions and/or cargo cult programming. And while SO may help him with "how do I do this," it's not a great place to try to assemble the big picture he appears to want.
itowlson
@itowlson: I disagree. The best way to understand something is to actually use it; there's a big difference between theory and practice. Besides, what would you suggest?
SLaks
The reason why I pose this question is because I feel often while programming for my course I seem to lack the creativity that other students possess. I believe this is because I do not understand the concepts as well and can't really stretch my programming outside of the box.
Jake Brooks
Itowlson, I am curious of what your strategy is, could you please share?
Jake Brooks
lol i like the part where it says (I assume)
baeltazor
+1  A: 

I believe that the Deitel & Associates books are good for you.

Visual C# 2008

alt text

Ngu Soon Hui
Thanks. Hopefully my local library has them.
Jake Brooks
A: 

I think you should be able to find something worthwhile in this thread about good free programming books:

http://stackoverflow.com/questions/391523/what-are-some-good-free-programming-books

nmr
A: 

As Slacks said best way to learn programming is to program. Nothing can replace practice.

However, if you strive to be more creative then learning different programming paradigms, through different programming languages might be your answer.

For practice, try to apply knowledge from one paradigm into the other. Most of the time results will be sub-par, occasionally they're be average solution and once every blue moon you'll get some amazing work done but either way you'll learn a valuable thing (learning what doesn't work is as important as learning what doesn't work).

Daniel Fath
Thanks, I will certainly look into programming paradigms.
Jake Brooks
A: 

try to write simple programs while reading the beginning of "digital design, by morris mano"

you just need to know what is logic gates and how to think

hope this book helps you ;)

Ahmad Dwaik
A: 

What helps for me is to try your own thing. For example, when you're following an example saying to draw a rectangle, draw a circle instead. Refer to the documentation when needed. This way you also get familiar with the format of the documentation.

Devoted