5 ms·
Oh God I know the answers to all those interview questions and I remember using all those features and it seems like an unimaginable Cthulhoid horror now.
by Eliezer 14y ago
Oh God I know the answers to all those interview questions and I remember using all those features and it seems like an unimaginable Cthulhoid horror now.
- DanWaterworth 14y agoSame here. After I finished reading the article, I felt the need to program something in Haskell, just to get rid of the smell.
- ihaveajob 14y agoIt seems like this is the thread where you report 100% success in the questionnaire, so here I am. Actually, I code in C++, ObjC, JS/HTML5 and Python almost on a daily basis. I don't think I could have picked up all the others so quickly if I didn't have a strong C/C++ foundation. It really helps to know what goes on under the hood. For that, I'd say C++ has strong didactic value.
- hexagonc 14y agoYou say, I don't think I could have picked up all the others so quickly if I didn't have a strong C/C++ foundation., but I ask you this: was it the C or the C++ foundation that helped you learn the others? I can see how knowing C could ease the transition to learning JS and ObjC since those both -- superficially at least -- have syntactic similarities to C. But how did knowing C++ help you with those languages, especially Python and HTML? Was it mere familiarity with programming in general that helped or was it something specific to C++?
- oelewapperke 14y agoI would argue that C++ is a language that effectively encompasses all other (imperative) languages. Where other languages have a few options, C++ has all of them. If you know C++ you know everything a cpu is capable of. In practice all ther other languages JS/ObjC/Java/... essentially take C++ and take out parts of the language. This makes it very easy and very fast to get a good understanding of any (imperative) language for a C++ engineer.
- Syssiphus 14y agoMy C++ days are long gone and I too still know the answers to nearly all of the questions. Lucky are the ones who have someone to teach them this stuff. If you have to find it out yourself it is an endless pain. I think I could handle the Great Old Ones. But C++, never again.
- Someone 14y agoI would not know the asnwers, possibly because many of them are phrased horribly. Some examples: "How many ways are there to initialize a primitive data type in C++ and what are they?" I guess the answer is two: implicitly at program startup or through assignment. But then, maybe he wants to differentiate between int j=0, int j(0), what constructors do in x::x : j(0){}, and whatever. "What is name mangling in C++ and why is it used?" There is no name mangling in C++. Some compilers do map names to C-compatible identifiers, but that is not C++'s business. "What is a copy constructor and when is it used, especially in comparison to the equal operator?" I do not have the standard at hand, but I would guess it has an equality operator and an assignment operator, or maybe even just 'assignment'. "What is a Vector?" What is that capital 'V' doing there? Should I assume a "using namespace std" and an "#include <vector>"? "Why should you never throw an exception in a destructor?" There is nothing wrong with throwing an exception in a destructor (well, it is a bit weird). Throwing one from a destructor is the no-no. "What is the proper way to perform a cast in C++?" Another trick question or badly phrased. What are the ways to cast values in C++? When are they appropriate?" or something like it would be better.
- Luyt 14y agoI once got this question from an interviewer, who was a senior dev on the project: "What is a vtable?" My answer was that it was the way in which a C++ compiler makes it possible to do polymorphism (calling base member methods through pointers to derived classes; virtual functions). The interviewer didn't agree with me and said that vtables have nothing to do with polymorphism and moved on to another question (about :: scoping). I didn't start to argue with him, and I got the job.
- jpatte 14y agoThat may be because there are several forms of polymorphism. What you had in mind was subtype polymorphism (aka substitution), while he might have had another form in mind like parametric polymorphism (aka generics). http://en.wikipedia.org/wiki/Polymorphism_(computer_science) http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Btw I assume you meant "calling derived member methods through pointers to base classes" instead.
- Luyt 14y agoYes, you are correct. I meant something like: animal->move_random(), where animal can be a dog, cat, or even a bird (with an extra z coordinate ;-).
- lrobb 14y agoSome of my most enjoyable programming involved writing high performance multithreaded socket services with a copy of Advanced Windows at my side (back when tech books were relevant). I do have a certain amount of nostalgia for the days when all programming was pretty much "close to the machine". Now we spend our time gluing frameworks and libraries together to create apps.