how to be a good C programmer?

This is a discussion on how to be a good C programmer? within the C Programming forums, part of the General Programming Boards category; hi guys, I would like to start learning in C programming. So, may i ask any suggestions and experiences from ...

  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    7

    how to be a good C programmer?

    hi guys,

    I would like to start learning in C programming. So, may i ask any suggestions and experiences from you guys that can share with me how to be the good C programmer? I think yours experience will help me to shorten my learning period to adapt this knowledge. Any books or website also welcome to recommend to me. Thanks...

  2. #2
    abyss - deep C
    Join Date
    Oct 2007
    Posts
    46
    Hi Seaman,

    Welcome aboard....
    Get hold of some book on C which will teach you the basic syntax of the language and some easy exercises.
    Once you pick up the basics, start reading the book "K&R C" and work out the exercises. This would be more than enough.
    BTW...This forum is a good enough place to post your doubts/queries on the C programming language.

    cheers
    maverix

  3. #3
    Registered User Welder's Avatar
    Join Date
    Oct 2007
    Location
    Washington
    Posts
    100
    seaman, I will explain the way I learned years back.

    You first need motivation. Think of a program you want to write in the future and remember that. It will be your goal and motivation to learn.

    Buy an ANSI C handbook. I had one that was the size of a hotel bible and contained the syntax, description, and examples of everything in the ANSI C language. This came in handy. But with the internet, I find myself not needing it anymore. You should still have it on hand.

    Then start downloading simple examples and tutorials off the internet and start learning the basics.

    Once you get the basics down, start writing your program. Start with the basics of the program, and write bit by bit. If you don't know how to do something, ask it on this board or research it. Line by line your program will come together and you will be learning a ton about programming along the way.

    As you get better you will find yourself going back and rewriting your old code to be run more efficient.

    Eventually you will have your program finished and you will have learned every step along the way.

    It worked for me. I stopped programming for about 6 years and just picked it up again a few weeks ago. I forgot almost everything I used to know. I set a goal for a program and am now about 50% finished with it thanks to the help of people on this board and a lot of hours behind the code editor.

  4. #4
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Quote Originally Posted by seaman View Post
    hi guys,

    I would like to start learning in C programming. So, may i ask any suggestions and experiences from you guys that can share with me how to be the good C programmer? I think yours experience will help me to shorten my learning period to adapt this knowledge. Any books or website also welcome to recommend to me. Thanks...
    1) Patience and work. You need to spend regular time doing something with coding in C. Like any language, if you don't use it, you quickly forget it.

    2) Memorize and use common code syntax. Parts of code you'll use over and over again in your programs. Don't insist on "individualized" idioms of syntax that obfuscate your code, as much as they make it "clever".

    Getting away from using parts of the language that have been found troublesome - like scanf() for user input, or gets(). Maybe not the first month out, but as soon as you understand their deficiencies, switch to the better alternatives.

    3) Syntax and basic logic is critical, but understanding how to work with logical "structures" is also critical: arrays, linked lists, tree's, hash's, structs, etc.

    4) Getting a handle on top down and bottom up design, and how to use that in designing a program in the first place. Not needed for trivial programs, but in real life, the problems, and programs, are not usually trivial. Straight forward, jumping in to code right away methodology, just won't do the trick.

    5) Work your code up, and compile it frequently. Never leave yourself with 100 lines of uncompilable code over three new functions, and then wonder how to sort out the resulting 50 or so compiler errors.

    Meter by meter, coding is sweeter.

  5. #5
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    And if possible, take a class or two. Especially if by "good programmer", you mean good enough to get a programming job. Most professional programers either have a computer science degree, or they took several computer science courses while working on degree in another "technical" subject (i.e. Math, engineering, or science).

    Quote Originally Posted by DougDbug
    Learning to program is like learning to play the guitar. You can quickly learn a few chords, but it's going to take a year before you can impress your friends.
    Last edited by DougDbug; 11-05-2007 at 02:51 PM.

  6. #6
    Registered User
    Join Date
    Oct 2007
    Posts
    7
    Quote Originally Posted by maverix View Post
    Hi Seaman,

    Welcome aboard....
    Get hold of some book on C which will teach you the basic syntax of the language and some easy exercises.
    Once you pick up the basics, start reading the book "K&R C" and work out the exercises. This would be more than enough.
    BTW...This forum is a good enough place to post your doubts/queries on the C programming language.

    cheers
    maverix

    Hi Maverix,

    Thanks be my first adviser in learning C. Ya, this forum is a good enough place for me to start learning. All people here so nice. Cheers.



    seaman

  7. #7
    Registered User
    Join Date
    Oct 2007
    Posts
    7
    Quote Originally Posted by Welder View Post
    seaman, I will explain the way I learned years back.

    You first need motivation. Think of a program you want to write in the future and remember that. It will be your goal and motivation to learn.

    Buy an ANSI C handbook. I had one that was the size of a hotel bible and contained the syntax, description, and examples of everything in the ANSI C language. This came in handy. But with the internet, I find myself not needing it anymore. You should still have it on hand.

    Then start downloading simple examples and tutorials off the internet and start learning the basics.

    Once you get the basics down, start writing your program. Start with the basics of the program, and write bit by bit. If you don't know how to do something, ask it on this board or research it. Line by line your program will come together and you will be learning a ton about programming along the way.

    As you get better you will find yourself going back and rewriting your old code to be run more efficient.

    Eventually you will have your program finished and you will have learned every step along the way.

    It worked for me. I stopped programming for about 6 years and just picked it up again a few weeks ago. I forgot almost everything I used to know. I set a goal for a program and am now about 50% finished with it thanks to the help of people on this board and a lot of hours behind the code editor.

    hi welder,

    my friend, thanks for your experience sharing. This is what i want to hear from you guys. You should be a good programmer. May i know what is the title name of your hotel bible size programming handbook? Btw, welcome to re-learn your C programming. Cheers !


    seaman

  8. #8
    Registered User
    Join Date
    Oct 2007
    Posts
    7
    Quote Originally Posted by Adak View Post
    1) Patience and work. You need to spend regular time doing something with coding in C. Like any language, if you don't use it, you quickly forget it.

    2) Memorize and use common code syntax. Parts of code you'll use over and over again in your programs. Don't insist on "individualized" idioms of syntax that obfuscate your code, as much as they make it "clever".

    Getting away from using parts of the language that have been found troublesome - like scanf() for user input, or gets(). Maybe not the first month out, but as soon as you understand their deficiencies, switch to the better alternatives.

    3) Syntax and basic logic is critical, but understanding how to work with logical "structures" is also critical: arrays, linked lists, tree's, hash's, structs, etc.

    4) Getting a handle on top down and bottom up design, and how to use that in designing a program in the first place. Not needed for trivial programs, but in real life, the problems, and programs, are not usually trivial. Straight forward, jumping in to code right away methodology, just won't do the trick.

    5) Work your code up, and compile it frequently. Never leave yourself with 100 lines of uncompilable code over three new functions, and then wonder how to sort out the resulting 50 or so compiler errors.

    Meter by meter, coding is sweeter.

    Hi adak,

    yoyo..Happy to see your recommended steps. I think i need to try to write the progaram before i can fully understand what your told especially the step 3. Anyway, thanks and have a nice day!

    Meter by meter, coding is sweeter.


    seaman

  9. #9
    Registered User
    Join Date
    Oct 2007
    Posts
    7
    Quote Originally Posted by DougDbug View Post
    And if possible, take a class or two. Especially if by "good programmer", you mean good enough to get a programming job. Most professional programers either have a computer science degree, or they took several computer science courses while working on degree in another "technical" subject (i.e. Math, engineering, or science).
    Hi DougDbug,

    Thanks for your advise. I wish to take a class to learn but now i have no time to do it. Actually now i started work and my company require programming skill to complete the project. This is the reason i starting to learn C programming.
    Good day!


    seaman

  10. #10
    Registered User
    Join Date
    Oct 2007
    Posts
    7
    May i know what software you guys use for running C programming? Turbo C? Visual studio?

  11. #11
    Banned
    Join Date
    May 2007
    Location
    Berkeley, CA
    Posts
    329
    As you start to learn the language, learn the precise terms. Ie, learn the difference between a reference and pointer, the difference between a function and a method, the difference between formal parmeters and arguments, the difference between push/pop vs insert/delete, etc. Otherwise if you start to use sloppy technical wording when asking for help, a lot of really comptent engineers are going to just ignore you. I think the ones that come to mind are certain unamed Senior Engineers from Sony and Mozilla.

  12. #12
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Quote Originally Posted by seaman View Post
    May i know what software you guys use for running C programming? Turbo C? Visual studio?
    I have and use both. Visual Studio has a free copy you can download.

    I use Turbo C sometimes, just because I have grown so use to it, I can code up little stuff, faster than with Visual Studio.

    VS is much more compliant with the C standards, of course. Turbo C is way old, now. A goody for old timers like me, but Visual Studio is what I'd recommend for a beginner, today.

  13. #13
    Registered User Welder's Avatar
    Join Date
    Oct 2007
    Location
    Washington
    Posts
    100
    Quote Originally Posted by seaman View Post
    hi welder,

    my friend, thanks for your experience sharing. This is what i want to hear from you guys. You should be a good programmer. May i know what is the title name of your hotel bible size programming handbook? Btw, welcome to re-learn your C programming. Cheers !


    seaman
    seaman, I wish I knew as much as you. That book is long gone. That single book earned me hundreds of thousands of dollars alone. I will look around for it, and if I find it I will buy it in a heartbeat. And when I find it I will post it here.

    And if anybody out there can give any tips on what this book is, I would appreciate it. It was a small blue book. It was approximately 7"x5" and was basically just a C reference. I bought it at a mainstream bookstore about 7-9 years ago so it is probably still in circulation.

  14. #14
    Registered User
    Join Date
    Oct 2006
    Location
    Omaha, Nebraska
    Posts
    116
    Hey man, good to have you on the boards!!!
    theres a if you wanna get started right away, theres a tutorialhere with a lot of good information on the side bar.

    books are always good too though
    i like my Practical C by Steve Oualline distributed by O'Reilly press.
    i really dig alot of there stuff. just preference though.
    hope it helps and happy programming!!!

  15. #15
    Registered User
    Join Date
    Sep 2006
    Posts
    230
    Quote Originally Posted by seaman View Post
    May i know what software you guys use for running C programming? Turbo C? Visual studio?
    I've tried those two. But some advised me to use a simple text editor with some features like indenting, syntax highlighting, etc. like TextPad and a command compiler like GCC to learn the basics.
    This way you should learn to understand the compiler's warnings and errors and also learn basic debugging without all those nice features in VS.

    Remember, walk slowly. Don't try to jump. If you really find VS much better than the others, then take it. But remember it all depends on your own opinion.

    Again I repeat, walk. Don't run. It'll just make things harder on you.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Good C++ books for a begginer
    By Rare177 in forum C++ Programming
    Replies: 13
    Last Post: 06-22-2004, 04:30 PM
  2. Good sound storage method
    By VirtualAce in forum Game Programming
    Replies: 1
    Last Post: 10-14-2003, 05:18 AM
  3. linked list recursive function spaghetti
    By ... in forum C++ Programming
    Replies: 4
    Last Post: 09-02-2003, 02:53 PM
  4. Opinion on GOOD digicam
    By Shadow in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-22-2003, 05:37 PM
  5. Question about atheists
    By gcn_zelda in forum A Brief History of Cprogramming.com
    Replies: 160
    Last Post: 08-11-2003, 11:50 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21