Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16
Okay im sure this will probably give me a bunch of different opinions as google searches do but I figured a few solid answers from other Linux users would help. ...
  1. #1
    Just Joined!
    Join Date
    Dec 2008
    Posts
    30

    C Programming

    Okay im sure this will probably give me a bunch of different opinions as google searches do but I figured a few solid answers from other Linux users would help.

    I want to learn C but I have been told and read online to start with Python or something like that first. To be completely honest I've read 4 chapters of a Python book and it just doesn't excite me like C does. So my question is would it really be that bad just to skip learning python and just try and master C?

    The only coding experience I have is HTML and CSS... I want to learn a Language that I can use in fun ways while contributing to the open source community and hopefully one day invest time in a team developing a new distro. I personally dont see how python would help. But I really dont know. What do you guys suggest (just trying a new python book) or (Just jump into C)???

    Thanks in advance for any help.

  2. #2
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    If you know what language you want to program in then "go for it". I find C the perfect language for beginners and experts...try googling this book "The C Programming Language by Kernighan and Ritchie" it used to available in a digital download...Good luck Geard4143

  3. #3
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    So once you've learned a programming language, many of the ideas involved translate well to other languages. Python is a hot language these days, and some people feel that it's easier than other languages, hence why they recommend learning it first. However, it's also a much more complicated language.

    C is a very simple language that can be used to do very powerful things, which is why a lot of people like it and why it is still used today. I think that you can definitely consider learning C as a first language.

    I will echo gerard's comment and tell you to pick up a copy of "The C Programming Language" by Kernighan and Ritchie. This is basically the de facto guide on C, as Ritchie was actually one of the language's inventors. It's a pretty short book, and it teaches you all you could want to know, and even delves a bit into the POSIX libraries (useful for UNIX programming).

    And, of course, if you have problems, we are always here to help explain things.

    Good luck!
    DISTRO=Arch
    Registered Linux User #388732

  4. #4
    Just Joined!
    Join Date
    Dec 2008
    Posts
    30
    Cool, thanks for the input guys. I started last night and im on Hour 4 of the Sams Teach Yourself C in 24 hours... I also ordered "The C Programming Language" last night... I figure between the two I should get this. The funny thing is that there were a few things I couldnt really wrap my head around in Python but after reading into C more and learning what I have I can actually get what I was missing in Python. So I guess for me C really is the Beggining Language.

    So far no major issues other than my GCC not working so I uninstalled and reinstalled and it works also downloaded TCC which worked while I was trying to figure out my GCC issues...

    Anyway, again... Thanks for your input.

  5. #5
    Linux Engineer Thrillhouse's Avatar
    Join Date
    Jun 2006
    Location
    Arlington, VA, USA
    Posts
    1,377
    Quote Originally Posted by riot1ne View Post
    Cool, thanks for the input guys. I started last night and im on Hour 4 of the Sams Teach Yourself C in 24 hours...
    Not to discourage you but I think you should read this. It's a particularly damning indictment of those "teach yourself [language x] in [y hours]" gimmicks.

    It's great that you're ready and willing to dive into C but you should probably understand that to learn C to the level that it sounds like you're striving for will require a great deal of personal investment on your part (especially if you plan on teaching yourself). You may be in for some long, frustrating nights but I think the book that gerard4143 and Cabhan mentioned will probably benefit you more in the long run.

    Good luck.

  6. #6
    Just Joined! cheapscotchron's Avatar
    Join Date
    Dec 2008
    Location
    swamps of jersey
    Posts
    68
    I agree with gerard. The C Programming Language by K&R is a classic. Required reading.

    Happy New Year
    CSR

  7. #7
    Just Joined!
    Join Date
    Dec 2008
    Posts
    30
    I completely agree with you guys, the teach yourself C book I have i've had for years just sitting on my shelf. So what I have been doing is I read a chapter then research the net for more in depth explanations on the section.

    For instance last night I was stuck back at the beginning of "hour 3" because the vague explanation on constants and variables wasn't good enough to help me figure out what part of the code snippet in the book was not going to work at the end of the chapter... Once I researched it a little more I was able to consider myself to have a firm grasp on the subject.

    I figure between the hourly book the internet and "the C programming language" (book)Once it comes in the mail I should have a much better understanding than I do now and from there just practice practice practice...

  8. #8
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    The funny thing is that there were a few things I couldnt really wrap my head around in Python but after reading into C more and learning what I have I can actually get what I was missing in Python. So I guess for me C really is the Beggining Language.
    I taught myself Perl before I taught myself C, and while I understood Perl pretty well, it wasn't until I learned C that I understood why it did some things it did. I found that learning C has made me a much better programmer in all of my languages, since you understand what's going on at a lower level. So I'm glad you're having the same experience.
    DISTRO=Arch
    Registered Linux User #388732

  9. #9
    Just Joined!
    Join Date
    Dec 2008
    Posts
    30
    I thought I was the only one who looked at it that way... It makes sense though, so what I dont get is why suggest people to learn other languages first? And the argument is usually its easier, personally I would opt for the harder way cause hardwork pays off...

    Anyway so im pretty deep in the book and the net.... The shipping of my book is dead slow but I was wondering if you guys knew somewhere online I could download uncompiled source code to read through and help me understand more...

  10. #10
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    Riot1ne if your serous about C programming and Linux its probably a good idea to go to a web site or get a book on the GCC(gnu compiler collection) and read it and learn it. This one area "GCC" will pay back dividends in you programming pursuits...Hope this helps Gerard4143

    Note: there is a really good web site out there, for GCC, but I can't find it right now. Maybe someone here in the forums knows of it and can pass it on....

    Try this link An Introduction to GCC - Table of Contents

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...