Serving the Quantitative Finance Community

  • 1
  • 2
  • 3
  • 4
  • 5
  • 7
 
User avatar
J
Posts: 1
Joined: November 1st, 2001, 12:53 am

Lecture on C++ for Interviews

May 27th, 2004, 9:11 pm

QuoteOriginally posted by: Ouyang95% of quants put c++ programming on their resumes, but less than 5% can actually do semi-serious coding in c++. Do I just have an unrepresentative sample?How to evaluate if a person can do semi-serious C++ coding? Any example?
 
User avatar
DominicConnor
Topic Author
Posts: 41
Joined: July 14th, 2002, 3:00 am

Lecture on C++ for Interviews

May 28th, 2004, 7:17 am

To me, "semi serious" means tactical programming.A lump of code written in a day or two, and with little value beyond the task for which it is written.The obvious test is therefore to put the candidate in front of a PC with the normal tools and help files, and tell him to knock up a bit of code. A nice little test would be to make them write a moving average function.Input:Array of doubles, Window SizeOutputArray of averagesI'd bet 1/3 of those with C++ on their CV could not write this in (say) 10 minutes.
 
User avatar
mj
Posts: 12
Joined: December 20th, 2001, 12:32 pm

Lecture on C++ for Interviews

May 28th, 2004, 12:44 pm

only 1/3 ?!
 
User avatar
daveangel
Posts: 5
Joined: October 20th, 2003, 4:05 pm

Lecture on C++ for Interviews

May 28th, 2004, 12:48 pm

I think thats his bid ... where u offered DCFC ?
knowledge comes, wisdom lingers
 
User avatar
DominicConnor
Topic Author
Posts: 41
Joined: July 14th, 2002, 3:00 am

Lecture on C++ for Interviews

May 28th, 2004, 2:37 pm

Could be 50%.An interesting one would be to see if they have any sort of error checking, comments, etc.
 
User avatar
daveangel
Posts: 5
Joined: October 20th, 2003, 4:05 pm

Lecture on C++ for Interviews

May 28th, 2004, 3:05 pm

flipping wide spread.. u sure u arent an options market maker ?
knowledge comes, wisdom lingers
 
User avatar
hazerider
Posts: 0
Joined: July 24th, 2003, 3:45 pm

Lecture on C++ for Interviews

May 28th, 2004, 4:03 pm

Last time I interviewed, I was asked to start writing a VBA-based pivot table function on paper. Granted, not C++, but syntax wasn't the issue. I thought it was a very good litmus test. Another time I was asked to start writing an implemention of a C++ matrix class. Also a very good question, because you can go really deep into C++ features from there. I think a C++ interview prep course should probably be "case study" based liek this.
 
User avatar
Fulvio
Posts: 0
Joined: April 9th, 2004, 11:01 pm

Lecture on C++ for Interviews

May 28th, 2004, 5:31 pm

I interviewed a few junior software engineers some years ago. I used to ask them to draft on paper a specification (header) for a class "stack", using any syntax they wanted to use. Then I would ask a few questions about how they would use that class in very simple scenarios, avoiding on purpose any references to the class implementation. I was surprised how much insight that simple exercise would give me into their programming skills.
 
User avatar
DominicConnor
Topic Author
Posts: 41
Joined: July 14th, 2002, 3:00 am

Lecture on C++ for Interviews

June 1st, 2004, 8:28 am

How many did well in your test ?
 
User avatar
weaves
Posts: 0
Joined: August 20th, 2004, 1:54 pm

Lecture on C++ for Interviews

January 28th, 2005, 2:56 pm

I saw DCFC last night at the Financial World Bookshop for Andreas Binder's presentation and he told me about this forum topic.I've often been asked C++ language features in vetting phone interviews. I discovered, retrospectively, that Bjarne Stroustrop did cover many of them in his Technical FAQ.http://www.research.att.com/~bs/http:// ... htmlHere's a sample of some I've been asked."Give two or more reasons why initialisation parameters should be specified with constructors?""Why must the assignment operator be passed a reference?""What is the meaning of the keyword 'mutable' and which cast operator's usage does it affect?""When using classes extended from an abstract base class, at what stage in building a program would it become apparent that a abstract method was missing?""Why would one use an auto_ptr?"--My answers would have been:Only in the initialisers is it possible to pass parameters that define an object's future behaviour: in particular, the initializer can specify which of its parent class's constructors it should use. It is also possible to pass parameters that have been attributed as const to the object. These are possible because initialisation is a distinct phase in the construction of an object that occurs after the class has been initialised.The assignment operator must be passed a reference otherwise it would not be possible to determine if an object is being assigned to itself.The mutable keyword applied to an attribute indicates that changes in the attribute's value do not affect the const correctness of a method invocation on the object. Consequently, it's possible to avoid use the const_cast operator.Unimplemented methods are reported in the link phase of a build.auto_ptr is a container object which holds an object created with new. When the stack frame of the auto_ptr definition is exited, the contained object is deleted. This greatly simplifies resource management code.
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Lecture on C++ for Interviews

January 30th, 2005, 8:55 pm

QuoteOriginally posted by: weavesQ:"When using classes extended from an abstract base class, at what stage in building a program would it become apparent that a abstract method was missing?"A:Unimplemented methods are reported in the link phase of a build..It's nice to learn answers but you must get the fundamenrtals right (and it starts with learning C, a remark that may not be popular). Coming from an academic/maths background (long ago) I have a good idea of what people know and don't know when exiting the college gates.Answer is WRONG. Officially, abstract methods (Java-speak) are called pure virtual member functiion PVMF in C++. In the above case you will get a COMPILER ERROR, something ..."Unable to create instance of abstract class"Getting this answer wrong probably means programmer has never implemented POLYMORPHISM in C++. So as a savvy interviewer (BTW that's not my job) would conclude that programmer has a lot to learn about OO in C++.P.S. the answer on assignment = is also wrong.It is very important to know the fuindamentals of C as a precondition for C++, for example a good answer to the assignmenet question.
 
User avatar
DominicConnor
Topic Author
Posts: 41
Joined: July 14th, 2002, 3:00 am

Lecture on C++ for Interviews

January 30th, 2005, 11:23 pm

Daniel is right, you do need to know the contest of the answer.However, the C++ environment is large, you can find yourself wasting time whe nthere is something that would make the job easier.On-line help will only assist if you have some idea of the name of the thing you're looking for, and the various books want you to follw their thread.My idea is to use this to poke in various things that people need to know. Smarter students will then go and fill out the framework.Say you want to stop accidental copying of your object. How do you look that up ? Where ?There is some awful trivia hanging about, some useful, some not. One BrainBench test I saw recently asked the poor kid to add up the members of an enumeration. Several questions on that theme. Done C and C++ for a long time, and can't think of any reason good or bad to do it.
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Lecture on C++ for Interviews

January 31st, 2005, 11:41 am

QuoteOriginally posted by: FulvioI interviewed a few junior software engineers some years ago. I used to ask them to draft on paper a specification (header) for a class "stack", using any syntax they wanted to use. Then I would ask a few questions about how they would use that class in very simple scenarios, avoiding on purpose any references to the class implementation. I was surprised how much insight that simple exercise would give me into their programming skills.This is a good way to gain insight into design and how the student is going to tackle the problem.
 
User avatar
filippib
Posts: 0
Joined: July 14th, 2002, 3:00 am

Lecture on C++ for Interviews

January 31st, 2005, 12:39 pm

Let me give you my recipe for hiring a tech:- first I don't ask about programming. I ask them to describe what a computer is made off ( mother board, hard drive processors ... ). Very few mention the bus.- then I ask them what are slowest parts and fastests parts of a computer and to identify the bottlenecks. If the word hardrive appears somewhere then I am happy, I get a good 60% saying immediately processor ....- I ask for an explanation of what virtual memory is. You would be surprised the little number of good answers to this...- I then push the discussion towards the life cycle of the software. If I only get a Dev/Test/Prod scenario with project management it usually puts me off, I wish a would hear about support, troubleshooting, maintenance and fitting to the demand.- only then I ask for some basic C/C++ questions, what's a pointer...I don't beleive in C++ guru's who will just give me what they learnt from the book. If the person answers smartly to the questions above then I am happy to buy him a book for whatever language I will ask him to program into. What I want is a tech who understands what computers are as much as service/clients. In finance we deal with large sets of data, pressure, deliverables not C++ theory, but tht's just my vision I also like the example of fluvio
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Lecture on C++ for Interviews

January 31st, 2005, 1:33 pm

QuoteOriginally posted by: filippibLet me give you my recipe for hiring a tech:- first I don't ask about programming. I ask them to describe what a computer is made off ( mother board, hard drive processors ... ). Very few mention the bus.- then I ask them what are slowest parts and fastests parts of a computer and to identify the bottlenecks. If the word hardrive appears somewhere then I am happy, I get a good 60% saying immediately processor ....- I ask for an explanation of what virtual memory is. You would be surprised the little number of good answers to this...- I then push the discussion towards the life cycle of the software. If I only get a Dev/Test/Prod scenario with project management it usually puts me off, I wish a would hear about support, troubleshooting, maintenance and fitting to the demand.- only then I ask for some basic C/C++ questions, what's a pointer...I don't beleive in C++ guru's who will just give me what they learnt from the book. If the person answers smartly to the questions above then I am happy to buy him a book for whatever language I will ask him to program into. What I want is a tech who understands what computers are as much as service/clients. In finance we deal with large sets of data, pressure, deliverables not C++ theory, but tht's just my vision This profile looks very hardware-oriented. Would this test exclude brilliant OO programmers who do not know what a bus is?