Starting programming with C or C++?

Discussion in 'OT Technology' started by bowrofl, Jun 12, 2009.

  1. bowrofl

    bowrofl New Member

    Joined:
    Aug 20, 2005
    Messages:
    6,555
    Likes Received:
    0
    Location:
    Toronto, Canadia
    Hello. I've decided to fill up my free time with a productive hobby, and I'd really like to learn a programming language. End goals are possible indie game development, iPhone app/Android app development. I've been doing some research but I've found conflicting opinions on what the best language to start with is.

    Cliffs background info: Took Visual Basic / Java in high school programming years ago... don't remember much :o. I have moderate HTML + CSS knowledge.

    I realize that C and C++ are both difficult, but I feel that if I got a hang of one or the other, other languages would come much easier. I have the motivation to drudge through the difficult learning curve... I'm really set on doing this. People have said that starting with C gives one a good understanding on programming fundamentals & concepts yet it may make one learn bad habits, since it's procedural not OO programming. I was just wondering what OT's programmers thought on this issue. Is it better to start off with C++ and go back to C after having a firm grip on object oriented programming habits, or start with the fundamentals and work my way up?

    Any advice & direction from those with experience is greatly appreciated. :wavey:
     
  2. Krakerjak

    Krakerjak Active Member

    Joined:
    Jul 7, 2003
    Messages:
    8,288
    Likes Received:
    0
    Location:
    Edmonton eh
  3. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    since you've done HTML and CSS.. how about starting with PHP?

    If you don't have access to a web server, you can download Apache for free and test stuff on your computer.

    You can solve real-world problems by making applications that ANYONE can use over the internet. Learn to create dynamic web pages using PHP. PHP5+ is object oriented, so you can take it as far as you feel comfortable, and much of the syntax and most of the lessons learned will translate to C++ if you want to move into other stuff.

    And Android is Java, not C/C++, and iPhone is Objective-C, not C/C++.

    If you start with C or C++, all input/output will be through the command-line or external files. Doing anything graphical can get messy fast, especially as a beginner. If you start with PHP, the interface is HTML/CSS, which you have experience with. If you get good with one, it would be easier to pick up small PHP jobs than it would be to pick up small C/C++/Java/Objective-C jobs, and if you get great with one, PHP has a huge market.. the entire internet. Objective-C is ONLY used by Apple, Java SHOULD only be used for mobile applications, and C/C++ development is likely to lead to a Visual C++/Visual C# career (which is even MORE to learn).

    Check out The Webmaster Lab: http://forums.offtopic.com/forumdisplay.php?f=168.
     
  4. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    Based on your indie game and iphone interests, I'd suggest c++. Especially if you've already had exposure to an OO language, there is zero reason to go back to a non-oo lang. Objective-C (iphone) is def closest to C++ than any other language. Hope that helps.
     
  5. Jonathan77

    Jonathan77 Dreamer, Nostalgic with the state of mind

    Joined:
    Aug 14, 2004
    Messages:
    2,437
    Likes Received:
    0
    Location:
    Atl, Ga
    What do you guys think about him learning Python? It's a very good first language in my opinion. Thought I should mention it since when it comes to programming, once you've gotten logic down and had an exposure to a language, all it takes is just learning the syntax of another language. So why not pick one that's considered universally easy to understand and program with :hs:. Just my $.02
     
  6. bowrofl

    bowrofl New Member

    Joined:
    Aug 20, 2005
    Messages:
    6,555
    Likes Received:
    0
    Location:
    Toronto, Canadia
    Thanks a lot for the replies for far :wavey:

    :coold: That link is awesome, thank you!

    Yah I realize Android is Java :hs: But if I knew C or C++ I'm sure I could easily re-learn Java... I learned the basics in high school and I don't remember it being difficult, I just remember being a high schooler and not caring enough :o

    As for PHP... honestly, I considered it. Initially I was choosing between web development & design, or computer programming... I chose programming in the end. I have lots of respect for those in web development but I'm just not sure if I'd feel satisfied within that field (although some of the stuff being done with HTML5 and AJAX like Google Wave is incredible). I'm just not sure if the stuf I will be producing in the end, after I've gone through to learn all of the concepts involved and began to apply them to my own ideas, will be applications I'm particularly interested in making. Maybe I'm just ignorant of what is possible in that area though. I know that those three possible end goals of indie game dev, iPhone app dev or Android dev would be ones that, at this moment of contemplation, motivate me enough to learn a language. I'm just internally conflicted in which direction to go and this makes me more confused :rofl: :hs:

    I do lurk in the Webmaster's Lab quite often though.

    It does help... but do you not believe that knowledge of C would benefit knowledge of C++ and more modern languages, or only after one has knowledge of these modern languages?

    :iorun:

    I've heard a lot about Python being an easy language to learn, but I guess it's back to the question of what I will be able to do with knowing Python... unless you think it's just a good springboard to launch myself off of to get the hang of programming in general before moving on to other areas.
     
  7. Jonathan77

    Jonathan77 Dreamer, Nostalgic with the state of mind

    Joined:
    Aug 14, 2004
    Messages:
    2,437
    Likes Received:
    0
    Location:
    Atl, Ga
    Probably as a good springboard. But if you've got a decent learning of programming then no need to start off in Python :hs:.
     
  8. bowrofl

    bowrofl New Member

    Joined:
    Aug 20, 2005
    Messages:
    6,555
    Likes Received:
    0
    Location:
    Toronto, Canadia
    I don't remember anything from my past experiences so I might as well say I'm starting fresh, aside from the bare basics... binary, boolean, conditional statements... I remember some structure, and just from HTML/CSS and logic, but not much else.
     
    Last edited: Jun 13, 2009
  9. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    if you're really between C and C++.. go with C++.

    there's nothing that would be easier to learn in C than C++.. and there's no huge benefit to learning C first. you'll probably benefit more by starting with object oriented programming and the advances that made C++ such a success than by starting with the watered-down version of C++.
     
  10. cp5184

    cp5184 New Member

    Joined:
    May 9, 2009
    Messages:
    277
    Likes Received:
    0
    C is a very bare language. it's kind of like, "here's a rock, now go build a skyscraper with it" in that you have to do a lot of elegant things with basically your hands, your dick... and your dick.

    that said, if what blows wind up your skirt is idiot programming exercises like counting programs, or other pointless stuff that you can do in a 10 line program with one loop or something you can probably learn most of the C you need for beginning programs like that in about a day.

    so if you want, take a saturday or sunday and dick around with c.

    now, if you want any like planned events in your game, the way I understand pretty much every game these days does it is with scripts. that's where I'd suggest you start. php, python, lua, whatever. I don't have much experiance scripting, but everybody I've talked to says that compared to real programming it's short and sweet.
     

Share This Page