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!

C++ Independent Study for Research Position Advice

  1. Jun 3, 2010 #1
    Hey, I go to the University of Rochester, and I am currently entering my sophomore year as a physics major. Speaking to one of the physics department's staff members at the school, I was able to set up a research position with one of the professors in the astrophysics department. In order for this research position to actually occur, I have to have a "basic" knowledge of c++. I was then given the opportunity to learn this basic knowledge over the summer. Mind you my study of this will be unguided by University standards. So I bought a hefty book, downloaded c++ from bloodshed, found a university course online for an intro to c++, and I've been on my way for the past week. Now my question is (sorry for the long pre-amble), what in god's name does this woman mean by "basic"? Any idea on how much I am expected to know for a research position in the field of Astrophysics? The professor Alice Quillen, deals a lot with models of planetary and galaxy formation. Any ideas?
     
  2. jcsd
  3. Jun 3, 2010 #2
    Just download "learn C++ in 24 hours" off of a torrent site or something and do the whole book. After that you should have a pretty good understanding of C++
     
  4. Jun 3, 2010 #3
    hm, I was thinking more of what topics were most prevalent to the topic of research I wanted. But Thank-You!
     
  5. Jun 3, 2010 #4
    Any other suggestions?
     
  6. Jun 3, 2010 #5

    jtbell

    User Avatar

    Staff: Mentor

    Why not ask her?
     
  7. Jun 3, 2010 #6
    I have already exercised that option. I sent her an e-mail, and she said that the professor went down to South America for a month. She said that it would be pretty hard to contact her since the Professor seldom checks her e-mail. I have yet to hear back, and I don't want to wait to long - for I want to be prepared for this as possible. Again this staff member is not a physicist- just a very useful women with strong connections in the department.

    *not sure why I said "again this staff member.." I never said it in the first place, oops lol"
     
  8. Jun 3, 2010 #7
    How much programming experience do you already have? If any, what languages do you know best, and to what extent do you know them? This information will help me provide a more personalized response--I have a pretty significant programming background.

    But my more general response is that it's not going to be of much use to try to figure out exactly what features of the language are "basic" and what features aren't. If you don't have much programming experience, it's far more important to learn the fundamental techniques and ideas of the discipline--which are independent of language--and to learn how to learn the language as you go.

    A common saying among programmers is that a good programmer can pick up a new language relatively easily, although it may take some time to master the new language's nuances. This is true. As it happens C++ has an unbelievably huge number of nuances--you will absolutely not master it over a summer--but like any language it can be used (perhaps ineffectively) without mastery of the nuances.

    Unfortunately, I am not even sure how I learned C++. It was the first language I learned, and I was 11/12 at the time. The books I used were, honestly, terrible, and I wouldn't recommend them. I know I struggled a bit, and I suspect I mainly learned through a vast amount of experimentation. It was hardy an optimal route. Plus I had no teacher--in fact no human guidance at all besides the bad books.

    Consequently I am not up to speed on the best modern resources for picking up the language. I'm going to look into it, and I'll post here again--or edit this response--later.
     
  9. Jun 3, 2010 #8
    Thanks for your response zpconn. As of a little while ago: no programming background whatsoever expect for a few glances at v-python.

    I currently have just finished learning I guess a 1st lectures worth of material: simple input output assignments, simple flow of control, simple if statements - like right now I am finishing up a an age calculator program where given what month it is, year, and how old you are- if you want to find out how old you will be in a specific amount of years and months from now it will find it for you - again simple stuff, I'm just not sure what to expect.
    I don't even know what the research position duties would entail me to use the programming - again I am very new to this whole physics major thing. Feel like I'm groping in the dark at times - which was why I was wondering if anyone knew what programming they would expect of me for a beginning research position (im assuming it has to be on the simple side for undergraduates to be able to do it, and when I mean simple I just mean not unattainably impossible to understand.
     
  10. Jun 4, 2010 #9

    jtbell

    User Avatar

    Staff: Mentor

    My list of "basic" stuff would probably look like this:

    Arithmetic (including the functions in the math library: sin(), exp(), etc.)
    Simple I/O using the terminal (consol) and using files
    If-statements
    Loop statements (while, for, do-while)
    Functions and how to pass data to/from them
    Arrays (actually I prefer vectors but I don't think they're used much in numerical work)

    One area in which it would be really helpful to get some input from the professor, or at least someone who knows how she works, is whether she prefers the "C style" or the "C++ style" ways of doing certain things. For example:

    I/O - C-style uses printf, sprintf, etc., and format specification strings; C++-style uses cin, cout, file streams, and I/O manipulators.

    Character data - C-style uses arrays of char, and char* pointers; C++-style uses the 'string' data type and its member functions from the standard library (#include <string>).

    Data collections - C-style uses arrays and pointers, C++-style uses vectors from the standard library (#include <vector>).

    And that's even without getting into the object-oriented stuff in C++, or the more sophisticated features of the standard C++ library.
     
  11. Jun 4, 2010 #10
    ah thank-you very much! I already have a few of the stuff you mentioned learned, still a ways to go. In the end I'll just keep studying it till the time comes I suppose and hope it is enough.
     
  12. Jun 4, 2010 #11
    It should be. Even if not, just nod to whatever your professor suggests, and ask for advice on the Internet.
     
  13. Jun 4, 2010 #12
    Ah and then that is where physicsforums.com comes in, again thanks folks
     
  14. Jun 5, 2010 #13
    Last edited: Jun 5, 2010
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook