Bah! programming!
I tried, i really tried.... i read the same book twice, and another book half way, but i just can't learn enough C to even understand what's happening whne i look at sources of some simple programs (gkrellm, wmweather) and of course, the best i can do is a simple calculator in C.
I'm thinking about giving up, on C I'm obviously a anti-talent for programming, but still i would like to learn a general purpose language to help me in everyday tasks, writing simple short programs, and C just isn't going good. I'm thinking to start on Perl, and to learn some more Bash Scripting, and when i'm able to do something useful, go back to learning C again.. Any comments, flames? Just any opinions plz so i can see on what i'm standing here. Thank you! -NSKL |
Programming can not be learned by reading books. What you need is practice, practice and more practice. Look for a small project you can do and start.
Don't give up. Code reading is not trivial, but you will get used to. And for your examples: gkrellm, wmweather ... are not isolated programs, they make more or less heavy use of librarys. If you realy want to understand what they do (and how), you will have to learn what the used librarys provide. |
Systems are not built by individuals, but through middleware you can construct client and server side solutions that meet your domain requirements.
|
I tend to believe that understanding other peoples code is
less dependent on your own language skills but rather on the quality of their inline documentation ;) and the clarity of their style, the way they name things and structure them. And poorly documented Perl isn't going to help you :} Cheers, Tink |
You really just need to find something you want to do, decide which is
the best language with which to do it (the hard part, IMHO), and then do it in isolation from other people's code (for the most part). If you try to program something you aren't interested in, you'll just get frustrated and won't learn anything about the language you are using. Trying to read someone else's code is difficult even for someone who has been coding for years, there are many ways of doing things, and unless there are a lot more comments (well written comments) than lines of code, you won't know why they did something one way, and not another. A good book is one that has good, well written code examples with well written comments. A bad book is one that talks a lot about the theory of programming without any examples of actual programming, those books are for when you already know what you are doing and want to get better. Don't give up on C, decide what YOU want to write, find a good web tutorial on something similar (if it has a lot of file I/O, find a tutorial on C file I/O, etc.). Start your code by commenting it. Make sure you know what you want to do before you start to do it. If you can't write the comments before you start, you *probably* don't have a good idea of what you are trying to accomplish. Don't bother trying to read code that isn't (well) commented, you'll just get frustrated. |
You're right in that i don't know what i want to do, im just writing useless calculators and nonsense such as that..
I will try again, cuz i hate giving up and with your suggestions i hope i'll get somewhere. Thanks for the moral support, i needed some :) Thanks again -NSKL |
i guess itīs a good idea to start with perl cause perl has a couple features that make life much more comfortable than programming c.
i.e. the CPAN.org a source of (often)well documented modules for perl programming give it a try |
All times are GMT -5. The time now is 05:23 PM. |