SitePoint Sponsor

User Tag List

Page 1 of 3 123 LastLast
Results 1 to 25 of 66

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    262
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Should I learn C & C++ before learning PHP?

    I've read on a few sites that a knowledge of C/C++ makes it easier for you to learn PHP. Some even recommended learning a bit of C/C++ before diving into PHP.

    What's your opinion regarding this?

  2. #2
    SitePoint Wizard silver trophy Jelena's Avatar
    Join Date
    Feb 2005
    Location
    Universum, 3rd Corner
    Posts
    3,000
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    No, there is no need to learn C/C++ before learning PHP. If your goal is to learn PHP then dive into it asap.
    If you had known C it would be advantage now, but definitely there is no need for that.
    -- Jelena --

  3. #3
    SitePoint Wizard dreamscape's Avatar
    Join Date
    Aug 2005
    Posts
    1,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    >> C/C++ makes it easier for you to learn PHP

    That is if you already know C/C++ you can probably learn PHP quicker & easier than someone who doesn't know C/C++

    But you don't need to know C/C++ to learn PHP. There are many programers who started with PHP. Not your older programmers, because PHP hasn't been around for much more than 10 years. But many people who've begun programming within the last 10 years start with PHP, just like many start with Java, and many start with C, and many start with [insert some programming language here].

    Anyone that says you should start programming with this or that language is out of their mind with superiority.

  4. #4
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dreamscape
    >> C/C++ makes it easier for you to learn PHP

    That is if you already know C/C++ you can probably learn PHP quicker & easier than someone who doesn't know C/C++

    But you don't need to know C/C++ to learn PHP. There are many programers who started with PHP. Not your older programmers, because PHP hasn't been around for much more than 10 years. But many people who've begun programming within the last 10 years start with PHP, just like many start with Java, and many start with C, and many start with [insert some programming language here].

    Anyone that says you should start programming with this or that language is out of their mind with superiority.
    Learning C takes more time, but is ultimately a more complex language. As so, PHP will be easier to learn once you fluently know C. Learning C will also help you appreciate the finer details (memory management et cetera) that PHP doesn't.

    If you EVER plan on using C, you should learn it first. That way learning PHP is easier. If you learn PHP first, then decide to go to C, you're going to have a much harder time.

  5. #5
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    262
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the advice. One follow-up question. If I do decide to learn C, should I start with regular C then move to C++, or just skip regular C and start with C++?

  6. #6
    SitePoint Zealot
    Join Date
    Oct 2001
    Location
    Nanaimo, BC, Canada
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can just start with C++, learning C first would be a waste of time in my opinion.

    If you do decide to go ahead with that, I really recommend getting a good book on C++. There's a ton of online tutorials, but I always find I make way better progress with books.

  7. #7
    SitePoint Member
    Join Date
    Sep 2005
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by champ
    Thanks for the advice. One follow-up question. If I do decide to learn C, should I start with regular C then move to C++, or just skip regular C and start with C++?

    I started learning c++. I have the M$ bundle with the Cd's and the book thats like 5000+ pages. (no way to properly learn it in two months!). Now in that book it tells you straight away. If you do not know c don't learn it now. Go straight to c++. Cause the diff in code is minute BUT it will be a hindrance to learning c++ as you will find yourself reverting back to c rules. So if dabbling in c Lang at all go C++. And as far as I recall, c++ still has the best mem management and while takes mroe to program is fastest lang for the machine to run (side what-bindary LOL). As for C# well that has some major pitfalls. And isn't quite being widely accepted yet (not sure of details on it). And as its been said if your goal is php go for that right off the bat. Im trying to learn both. LOL.

    Now these are all programer freindly lang. I started in the cassette days dabbling with code. Typing 10010101 101010 1010101011110101011 for pages and pages, one line wrong-boom! Down goes the proggy. And several times after pages of work my friends sister would trip over the cord and kill the power. All lost since the tape wasnt on yet! ugh! Wow so glad for these easier methods. But remember it all goes back to 1's and 0's in the end. The less steps it takes for us to program usually means the more interpiting the machine must do which slows the programs speed down in the end. (thats how I understand it anyways)

  8. #8
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would forget C/C++ entirely.

    If you want to learn something with similar concepts to C++ but more relevant to the web community etc. then go for Java, or if you're a Microsoft advocate C# in a .NET framework.

    Sean

  9. #9
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by champ
    I've read on a few sites that a knowledge of C/C++ makes it easier for you to learn PHP. Some even recommended learning a bit of C/C++ before diving into PHP.

    What's your opinion regarding this?
    Depends on what you want. For learninig php and webscripting you need nothing but common sense. Php is a simple language designed for non-programmers. However if you want to become a professional programmer, C knowledge is a must.

    If I do decide to learn C, should I start with regular C then move to C++, or just skip regular C and start with C++?
    (Modern) C++ has virtually nothing in common with C. Learning C is mandatory, further, you have a choice between "heavy" languages (C++, C#, Java) and "lightweight" ones like Python or Ruby. PHP is optional BTW

  10. #10
    SitePoint Zealot suro's Avatar
    Join Date
    Jan 2005
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by stereofrog
    However if you want to become a professional programmer, C knowledge is a must.
    To become a professional programmer in general or a professional PHP programmer?
    And what do you mean saying a professional programmer? Isn't he the one that knows binary trees and many more principles of programming generally?

    Isn't knowing programming mean knowing the art of the programming?

    Thanks.

    P.S. I'm still stuck C? or PHP? - the latter I love.

  11. #11
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think there is no such thing as "professional <any-language> programmer". Learning new language takes normally from two days to two months, if you know the basics. "Professional programmer" is a person who understands how computers and networks really work, not how they could be "programmed" in some concrete environment.

  12. #12
    SitePoint Zealot suro's Avatar
    Join Date
    Jan 2005
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by stereofrog
    I think there is no such thing as "professional <any-language> programmer". Learning new language takes normally from two days to two months, if you know the basics. "Professional programmer" is a person who understands how computers and networks really work, not how they could be "programmed" in some concrete environment.
    So to be a Professional PHP programmer you must mostly know how networks work and Web application development methodologies. Am I right?

  13. #13
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No

  14. #14
    SitePoint Wizard dreamscape's Avatar
    Join Date
    Aug 2005
    Posts
    1,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A "professional programmer" is just someone who makes their living through programming [as opposed to someone who does it as a hobby].

    A "professional PHP programmer" is just someone who makes their living through programming in PHP.

    A "professional ________" is just someone who makes their living through ________. It is their profession. Yes a word that is hardly used anymore today, but it is where "professional" comes from.

    >> I think there is no such thing as "professional <any-language> programmer"

    I'm going to have to call you right here. There are plenty of people who make their living by programming in a single language [this doesn't mean they don't know or are not learning other languages though].

  15. #15
    SitePoint Member
    Join Date
    Sep 2005
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    >> C/C++ makes it easier for you to learn PHP

    That is if you already know C/C++ you can probably learn PHP quicker & easier than someone who doesn't know C/C++

    But you don't need to know C/C++ to learn PHP. There are many programers who started with PHP. Not your older programmers, because PHP hasn't been around for much more than 10 years. But many people who've begun programming within the last 10 years start with PHP, just like many start with Java, and many start with C, and many start with [insert some programming language here].



    >> Can I insert the language here "English"?

  16. #16
    SitePoint Evangelist chiphunt1's Avatar
    Join Date
    Oct 2003
    Location
    louisville, ky
    Posts
    436
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Learning new language takes normally from two days to two months, if you know the basics.
    If you can learn C in 2 months, you should be coming up with new forms of energy or something. NOBODY can learn C in two months, I don't care who you are.

    I learned C and C++ during college and use PHP now for the WEB. I will say that I still learn more about all three languages everyday. Unless you plan on becoming a software engineer that builds software for the *nix platform or something, I would learn PHP and C#.NET. I do think you should learn a 3rd level language like C or Java or C# in addition to a 4th level language like PHP. If you're just going to be a web developer, then stick to C#, PHP, and maybe a little BASH shell scripting.

  17. #17
    SitePoint Evangelist chiphunt1's Avatar
    Join Date
    Oct 2003
    Location
    louisville, ky
    Posts
    436
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    By the way, I would assume the person who told you to learn C or C++ told you that because PHP is written in C. That's what I mean by PHP being a 4th level language.

  18. #18
    My true identity MaxS's Avatar
    Join Date
    Nov 2004
    Location
    New York
    Posts
    768
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Simple answer: No.

  19. #19
    SitePoint Member
    Join Date
    Sep 2005
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think it's probably a good idea to learn how to program before using PHP. I don't think PHP is a good language to learn with.

    It's my belief that a good teaching language should be very strict and rigid, and I don't believe that to be true of PHP, or C.

  20. #20
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Most programmers who have had formal training will have studied C at some time or other so they will have at least some experience with C.

    If you can learn C in 2 months, you should be coming up with new forms of energy or something. NOBODY can learn C in two months, I don't care who you are.
    Find C a bit difficult?

    Once you know virtually any other programming language, it is very easy to pick up a new language in no time at all. The basic concept of types, expressions, functions and parameters can be applied to almost any language. My advantage when it came to learning C is that I had lots of experience with other languages so it didn't take me any time at all to learn it. However I'd argue that it's not unreasonable for even a beginner to learn C in less that 2 months if he is quick-witted.

    I have a feeling that my experience isn't typical - I'd guess that most people would start with C before learning other languages.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff

  21. #21
    SitePoint Enthusiast
    Join Date
    Aug 2003
    Location
    Canada
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I agree with mmj.

    Learning C to learn PHP is certainly not a requirement, per se. But, if you know some C (or most any other programming language, for that matter), then PHP will come more easily. C and PHP are synactically very similar. It'll go the other way around too.

  22. #22
    Non-Member Gator99's Avatar
    Join Date
    Sep 2004
    Location
    Florida
    Posts
    613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Probably like asking should I learn to drive a car before I learn to ride a bicycle.

  23. #23
    SitePoint Addict
    Join Date
    Mar 2005
    Location
    India
    Posts
    280
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Gator99
    Probably like asking should I learn to drive a car before I learn to ride a bicycle.
    Good One. lol

  24. #24
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Gator99
    Probably like asking should I learn to drive a car before I learn to ride a bicycle.
    It's like playing with medicine balls for 10 minutes so that you'll have no problems playing a 60 minute basketball game.

    Quote Originally Posted by viv5
    No need.
    PHP is easier than C++.

    For those who want to learn C++:
    Learn PHP first and then go for C++
    That's like going and playing basketball with a tennis ball, and then trying to play a 60 minute game with a basketball. It's just going to make your life harder.

    Quote Originally Posted by The New Guy
    Learn PHP simply because you have way more fun developing for it. This is because it is easy to make a web app. With C/C++ your basically stuck to console programming when your a beginner. Boring.
    I jumped straight into the Windows APIs and started making Windows apps first. I only used console apps for learning the language (playing around with stuff basically). I guess it depends what your motivations are for learning -- mine was to develop a Windows application for a client.

  25. #25
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    A little, but bicycles have been around for longer than cars have, and cars are safer too. I think it's probably the other way around.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff


Bookmarks

Posting Permissions

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