1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Which Computer science class

  1. Nov 1, 2013 #1
    I need a computer science class for my math degree.
    Should I take intro to C or intro to C++ . I know nothing about programming.
     
  2. jcsd
  3. Nov 1, 2013 #2

    IGU

    User Avatar

    C. After an intro to C++ you'll barely be able to to anything with it, and it's too complex to even begin to understand. C is simple, and understanding pointers is something a math guy should handle easily.

    And, just to be clear, it is unlikely that either one will have anything to do with computer science -- they will be programming classes. If you want to take a class that is actually about computer science, take an introduction to data structures and algorithms.
     
  4. Nov 1, 2013 #3

    Student100

    User Avatar
    Education Advisor
    Gold Member

    He likely just needs a programming language, I'd honestly advise doing both, C then C++. You won't be that proficient after, but you'll be able to write code that may be beneficial to you. Does your college offer a Matlab out Fortran class by chance, and will those meet the requirements? Then I would advise one those for you instead. Like IGU says though, I wouldn't consider any of those classes real CS, I've done three languages now and still don't understand the behind the scenes of what's happening. After I build my code, run it, It's sort of like magic at that point.

    Stacks, how the processor does what it does, ect are still a mystery to me
     
    Last edited: Nov 1, 2013
  5. Nov 1, 2013 #4
    I think we have a math class that uses matlab. should I take intro to c first then c++.
     
  6. Nov 1, 2013 #5

    Student100

    User Avatar
    Education Advisor
    Gold Member

    I would recommend it if at all possible with your class scheduling, you'll have a much better , perhaps useful, understanding.
     
  7. Nov 1, 2013 #6
    so take a class that uses matlab, but if that wont work take intro to c first.
     
  8. Nov 2, 2013 #7
    I question the advice of taking two 'intro' CS courses. The fundamentals for both should be about the same thing. If you're planning to go on to do programming in your life then either one are just a stepping stone and C and C++ should be fairly interchangeable for you at the level that you will be working in the near future. If you're not planning to go on to do more programming then taking to intro CS classes is a waste of time for even more obvious reasons.

    I think C++ is better language to begin with, personally. Perhaps that's a matter of taste?

    It's hard to recommend a class without seeing a syllabus. Also, all you've said is that you're fulfilling credit. If that's the case, then the choice is fairly inconsequential. In my experience people have an easier time with C++ than C.
     
    Last edited: Nov 2, 2013
  9. Nov 2, 2013 #8
    If you can take multiple of those courses, then C -> C++ would be the obvious answer. However, if your school offers MATLAB or you only want to take one course, then I would recommend MATLAB or C++.
     
  10. Nov 2, 2013 #9

    Student100

    User Avatar
    Education Advisor
    Gold Member

    Why would people have an easier time with C++ then C? That makes no sense.

    The fundamentals for each will be completely different, C will give you the syntax and introduce you to programming languages, an intro to C++ class should focus on classes and OOP.
     
  11. Nov 2, 2013 #10

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    Exactly. I would not recommend C++ as an introductory language. It's just too big. Python is just about perfect for a beginner language, but that apparently isn't an option.
     
  12. Nov 2, 2013 #11
    Because C++ is higher level which makes the code more readable and less cryptic.

    I think the important thing to keep in mind here is that we're talking about 'intro' courses not mastery. On an introductory level, OOP is just easier for people to interface with.
     
  13. Nov 2, 2013 #12
    I agree with you about Python or even Java but as you said, that's not an option. I'm not really sure about your 'big' statement, however. C is pretty darn big too for someone with no programming experience. I doubt the range of either them will be covered in a significant way in an intro class, thus I can't see how it matters much.

    That being said, I'd like to see syllabi. I have strong doubts about classes that are about languages. I'm of the mind that a CS class should be about topics in CS. The language is sort of incidental.
     
    Last edited: Nov 2, 2013
  14. Nov 2, 2013 #13

    Student100

    User Avatar
    Education Advisor
    Gold Member

    Errr, I would disagree with everything you wrote.
     
  15. Nov 2, 2013 #14

    Student100

    User Avatar
    Education Advisor
    Gold Member

    His "big" statement is perfectly accurate, even standardization committees take jabs at how large C++ is. C is tiny.

    I'm seriously doubting you know what you're talking about at this point.
     
  16. Nov 2, 2013 #15
    You've missed the point. The bigness of C++ relative to C is irrelevant in an introductory course. It's not as if you will explore the entire language -- or anything close to it. Of course, that irrelevance sort of runs both ways. Thus I don't think it matters much if this person takes an intro to C course or an intro to C++. What will matter is the topics that are covered in the course. The language is incidental, as I said. That's also the reason it's entirely pointless to take two intro courses.
     
    Last edited: Nov 2, 2013
  17. Nov 2, 2013 #16
    As you are perfectly entitled to do. Still it is my experience and I believe that's what we're here to share, no?
     
  18. Nov 2, 2013 #17

    Student100

    User Avatar
    Education Advisor
    Gold Member

    I'm not talking about the bigness of C++ relative to C. I'm saying C is a tiny language compared to just about any other language you might use. While C++ is a monster of a language compared to any language you might use. This is only relevant because of what you wrote in your past post which I found blatantly wrong.

    Of course it matters, if the OP just wants to meet the requirement and C will do that for them, then wham bam you're done. If the OP wants to have a bit better grasp of different programing styles, then taking C++ after will prove useful to them. So I don't understand how you say it's useless to be exposed to procedural programming (C) and then OOP style (C++), just because they're two "intro" courses.
     
  19. Nov 2, 2013 #18
    Im pretty sure higher level languages make for more readable code for humans. It is pretty much the point of a higher level language to be more readable for humans.
     
  20. Nov 2, 2013 #19

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    I agree. An introductory CS class should teach how to program (in general) instead of teaching the ins and outs of one specific language. A language is needed to teach how to program, but teaching the language should be a secondary concern.

    Since one of the core concepts of computer science is object oriented programming, this should be a part of the very first CS class. In my opinion, of course. Teaching OO techniques with a non-OO language such as C is beyond the scope of a introductory class.

    A good introductory language is one that
    1. Is easy to use and easy learn.
    2. Offers a number of different programming paradigms.
    3. Contains a number of computer science data types, built in.
    4. Provides well-established defensive programming mechanisms, many dating back to the early 1960s.
    5. Doesn't carry a lot of arcane baggage.

    C fails massively on items 2 and 3. C++ fails somewhat on item 1. Python fails massively on item 4. All have significant shortcomings with item #5. It's not so much a matter of which is better but which is worse.
     
  21. Nov 2, 2013 #20
    C++ isn't too hard to learn with the right resources. Also, I am aware of no language in existence which meets your above criteria. At this point, all languages have there short-comings. An introductory, easy-to-learn language can not be expected to support OOP, imperative and functional programming for example.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook