Jobs for physics PhD's / At what point can you claim to know C++ ?

In summary: I'm looking at a resume from one now.In summary, it is expected for a physics PhD candidate to have a strong understanding of C++ as it is commonly used in the field. However, it is not necessary to be an expert in the language to apply for C++ based jobs. Employers may be willing to train candidates on any specific skills needed for the job. It is also beneficial to highlight any projects or experiences with C++ on a resume and bring examples of code to an interview. Additionally, considering learning another language, such as data mining or statistics, can open up other job opportunities. However, for technical positions, a strong understanding of C++ and other programming concepts is necessary.
  • #1
Doofy
74
0
Jobs for physics PhD's / At what point can you claim to "know C++"?

I am a year away from graduating my HEP PhD and I'm thinking about what comes next. Postdoc is an obvious option, but the impression I get from this site and elsewhere is that it's a short-sighted one. I'm therefore thinking about what else I can do, what I've got to offer in other fields/careers.

My PhD has almost solely involved working with C++, but whilst I am no rookie at this point, I am by no means an expert either. I had sat one C++ based module as an undergrad but by the time I started my PhD, almost all had been forgotten and I was essentially learning it from scratch. Furthermore, my PhD has been about doing what I need to with C++ to get physics results, not about getting a broad knowledge of the language for its own sake.

I'm comfortable with the basic machinery of it - well-versed in terms in terms of the syntax, the use of loops, arrays, functions, structures, vectors, I can de-bug what I write, but I know there must be so much more to it that I am unfamiliar with. For example, despite understanding what a pointer is since they appear in all the "beginners" literature, I have never used one in any practical application. Or say I was asked in an interview the meaning/use of "istringstream" or to explain "inheritance", I would be unable to.

What I'm hoping for here is for someone to sum up what you would expect an applicant for a C++ based job* to know. OR, can I apply for C++ -based jobs assuming employers will take me on assuming that I can pick up what I need as I go along?

I'm also considering starting to learn another language in my spare time, but I do not know which one and welcome any suggestions.

Thanks.

* a job that a HEP physics graduate might typically apply for, eg. quantitative analyst has crossed my mind.
 
Last edited:
Physics news on Phys.org
  • #2
So I've had to craft some technical questions for interview, and one of the questions I always ask for people who claim knowledge of an object oriented language is to give a brief description of inheritance. That seems high-level enough that you should probably have some idea what that means. I try to avoid asking about specific classes.

Your best bet is probably to describe the projects you have done with C++ in your resume, and bring example code you've written to the interview. That will give the interviewer something to focus on.

You might want to consider looking at data mining/analyst jobs, where a HEP experiment knowledge of statistics will be highly useful, and you can try to steer the interviewers to numerical/statistical questions.
 
  • Like
Likes 1 person
  • #3
I would absolutely expect anyone claiming knowledge of C++ to have a solid understanding of C, particularly including pointers. For C++ itself, I would definitely expect a sold understanding of all of the OO concepts including inheritance.ParticleGrl's suggestion of
Your best bet is probably to describe the projects you have done with C++ in your resume, and bring example code you've written to the interview. That will give the interviewer something to focus on.
is a very good one.
 
  • Like
Likes 1 person
  • #4
ParticleGrl said:
So I've had to craft some technical questions for interview, and one of the questions I always ask for people who claim knowledge of an object oriented language is to give a brief description of inheritance. That seems high-level enough that you should probably have some idea what that means. I try to avoid asking about specific classes.

Your best bet is probably to describe the projects you have done with C++ in your resume, and bring example code you've written to the interview. That will give the interviewer something to focus on.

You might want to consider looking at data mining/analyst jobs, where a HEP experiment knowledge of statistics will be highly useful, and you can try to steer the interviewers to numerical/statistical questions.

I'd like to hear as many of these interview questions as you can be bothered to write out?
 
  • #5
phinds said:
I would absolutely expect anyone claiming knowledge of C++ to have a solid understanding of C, particularly including pointers.
I disagree. What you are talking about is what I call C±; others call it "C with classes". They are both intentionally derogatory names. A good C++ programmer will eschew the use of raw pointers. This is particularly so with C++11.

Aside: C++11 is a rather different language than the C++ from a decade ago (C++98/03).


Some things I would expect anyone who claims to know how to program in C++:
  • What is inheritance? How does it work in C++?
    If the interviewee answered this at well I would ask about the rule of three (rule of five in C++11). If they answered this well, I'd ask about throwing an exception in a destructor, when a destructor should be declared virtual, and how to write a good copy constructor and assignment operator.
  • A spacecraft takes 500+ commands. This was implemented as a switch statement with 500+ cases. How would you write this to avoid the switch statement?


Getting back to the original post, you asked two very different questions, Doofy: "When can you claim to 'know' C++?", and "What level of programming knowledge is needed for a technical (e.g. quantitative analyst) position?"

When I interview someone for an avionics position I expect strong knowledge of computer programming and of C++. Acronym check: I'll ask about RTTI, RAII, and maybe SFINAE. I'll also ask about generic (non-C++) concepts such as deadlock and priority inversion.

When I interview someone for an aerospace engineering position, I know from experience that most aerospace engineers have not learned how to program. They might have learned how to sling tiny bits of code, and only in Matlab. The few who do know C++ at all are worth a lot. The very, very few who know aerospace engineering upside down and who know C++ beyond the C± are golden.
 
  • #6
Here are paraphrases of some questions I used recently:

1. If I tell you class X inherits from list, what do I mean? What would it look like to implement that in C++?
2. You find yourself modifying the destructor for class X, what other important class functions should you look at?
3. If I gave you a large data set consisting of (standard insurance stuff), and asked you to predict (feature of standard insurance stuff), what would your approach be? What if features A &B were strongly correlated?
He suggested he would first do a random forest model, and I asked him lots of questions about how to pick out variable importance from a random forest. I also asked about pruning decision trees, etc.

We also went through some code he provided, and I asked about his choice of random number generator in a monte-carlo algorithm, and I asked for a high level overview of the parts of the code he didn't write.
 
  • #7
I imagine "know C++" means very different things depending on the type of job you're applying for. At my current job, just my ability to make simple Python/Matlab scripts to do calculations, make graphs, process text files, etc. is considered "knowing how to program."

I think the best policy is to just be honest. Definitely put your C++ ability on your resume because it might enough for what some employers are looking for (I would probably say "have experience with C++" and then detail exactly what that experience was). Different jobs require different levels of programming ability, and you don't want to miss out on a job that you would have been experienced enough for just because you didn't put it on your resume. If they need someone more experienced, they'll either figure that out from your resume or from an interview.
 
  • #8
OK thanks all, the responses have been part encouraging, part discouraging. This confirms that I have a lot to learn. For most of the interview questions mentioned here my response would be to stare blankly. I intend to practice this in my spare time. If anyone knows of any websites with particularly useful practice problems, please speak up.
 
  • #9
You should understand the basics of C++: Inheritance, the rule of three, overloading, and overriding. You don't need to know how to write a template that deduces whether a class is polymorphic or not.

It might be better to learn another language rather than to learn the depths of C++. Something like python or scala or perl so you can glue existing applications together, or write a quick and dirty prototype that may well do the job permanently.

You aren't looking for a job as a top notch programmer who also knows a bit about numerical analysis. You are going for a job as a top notch numerical analyst who also knows a bit about programming.
 

FAQ: Jobs for physics PhD's / At what point can you claim to know C++ ?

What types of jobs can a physics PhD holder get?

Physics PhD holders can pursue a variety of career options, including academic research positions, industry jobs in fields such as engineering, data science, and finance, and government roles in areas such as national defense and space exploration.

Are there specific industries that value a physics PhD?

Yes, industries such as technology, healthcare, and renewable energy are known to highly value the analytical and problem-solving skills of physics PhD holders. These industries often have a high demand for individuals with a strong background in physics and mathematics.

What skills do I need to have in addition to my physics PhD to be competitive in the job market?

In addition to technical skills in physics, it is important for job seekers to have strong communication, teamwork, and project management skills. Familiarity with programming languages such as C++ can also make you more competitive in the job market.

At what point can I claim to know C++ as a physics PhD?

It is difficult to pinpoint an exact point at which you can claim to know C++ as it depends on individual learning abilities. However, after completing a course or project that requires significant use of C++, you can confidently say that you have a solid understanding of the language.

Are there any resources or courses I can take to learn C++ as a physics PhD?

Yes, there are various online resources and courses available to learn C++ as a physics PhD. Some popular options include online tutorials, coding bootcamps, and university courses. It is important to research and choose a resource that best fits your learning style and goals.

Similar threads

Replies
4
Views
3K
Replies
37
Views
7K
Replies
3
Views
2K
Replies
10
Views
888
Replies
10
Views
643
Replies
4
Views
2K
Back
Top