Archive for May, 2008

Recent C++ Interview Questions

Sunday, May 11th, 2008

Fortunately my search for a job seems to have come to an end. For those want some kind of measure of how long it takes for a masters/PhD qualified developer/analyst/team leader with 10 years experience to get a job: the answer is a bit short of a month in the current market. In some cases my education actually hindered with one proven example of a company binning the resume when they saw the ongoing PhD work mentioned - only in Australia.

The main problem I have is that I don’t have any J2EE (which I’ll fix once my PhD is finished by taking a certification) as there is lots of java work around. It shits annoys me because there is nothing in J2EE that I don’t know about but if you can’t show commercial experience you’re screwed. Especially with clueless recruiters in the way shortlisting people.

c++ is very scarce at the moment. My estimation would be about a dozen jobs available at most at any one time and the companies interviewing for them are being ridiculously picky and very slow to hire.

Getting to the point of this post, I’ll list some of the questions I got on a few job interviews. I’m doing this in the spirit of giving people a good idea of what gets asked these days for c++ jobs in Australia. I’m not identifying the companies that asked them so I’m hardly poisoning the recruitment process. This blog is also quasi-anonymous so a recruiter that has inside information on me shouldn’t be able to put 2 and 2 together either and give their next candidate an unfair advantage. I’m doing it because I was really unsure of what the process was going to be like given how long I’ve been out of the permanent job market. This interview came to me as quite a shock given the questions asked in the last round of interviews I took when I last went for a permanent job (7+ years ago). Yes, this post does relate to an earlier one.

Here are some questions that I got for a fairly senior c++ position at a medium sized company. I considered them an excellent set of questions that certainly made me think. They are mostly in order to the best of my memory. They range from modern c++ then to a bit of SQL along to some team leading and finishing with a little behavioural.

1. Why would you declare a destructor virtual?

2. When would you inherit or use templates?

3. Whats wrong with using the default copy constructor all the time?

4. Tell me about what design patterns you have used.

5. What unit testing or test driven development have you done?

6. What do you need to do to manage a multi-threaded application?

7. How do you debug a multi-threaded application?

8. How do you prevent a race condition in a multi-threaded application?

9. What was the last profiler you used?

10. What version of gcc did you last use?

11. Whats your favourite dev environment?

12. What do you know about the STL?

13. What did you find most useful in Boost?

14. Demonstrate iterating through a map in STL. Write code on paper.

15. Demonstrate a breadth first search in pseudocode (this was actually shown as how do i iterate this tree in this order - where a binary tree was shown numbered such that a BFS was required - so you actually needed to know what a BFS was as well)

16. What have you done with .NET?

17. Consider the following code:

new

third_party_function();

delete

where would you add exception handling to deal with errors the third party function?

18. Consider the database table with the following values:

+———-+
| red |
| green |
| blue |
| red |
| green |
+———-+

How do you stop multiples from being entered in future?
How do you return only the duplicate values?
How do you return just the unique values?

19. What are the 4 types of cast in c++?

20. What do you have on your desk?

21. What would you do if you were managing a person who was given a week to do a job and then at the end of the week asked for a few more days and then a few days after that still hadn’t finished?

22. What would you do if there were two jobs that needed doing and only a week to do them in and only one person with which to do it?

23. What do you do outside of work?

24. Tell me a joke.

A Fix for Flash Sound in Ubuntu 8.04 Hardy Heron

Sunday, May 11th, 2008

After an upgrade, sound in flash stopped on a few on my machines.

Easy fix:

In Synaptic, install libflashsupport and restart firefox.

That should be it.

Inner City Pressure

Friday, May 2nd, 2008

Sir Humphrey is alive and well and working at VicRoads

Thursday, May 1st, 2008

char_sirhumphrey.gif

Jim Hacker: Humphrey, the National Health Service is an advanced case of galloping bureaucracy!
Sir Humphrey: Oh no minister… Certainly not galloping; a gentle canter at the most.

I have never seen a system like this.

To change your licence (car, boat, motorcycle, etc) over from an interstate one requires you to make an appointment with VicRoads. No, you can’t just walk in and fill in a form and do it over the counter like anywhere else on the planet. You need an appointment. You also have to make separate appointments to change registration over as well. I have three licenses: car, boat and motorcycle. I own two registered vehicles: a car and a trailer. This to VicRoads is a completely unusual occurrence and has never happened before.

To change these things over requires me to make four (yes, 4) separate appointments.

l2d.jpg

It has taken me the best part of an entire day just to make appointments to change licenses and registration over. Not change the licenses, just make appointments to do it. I have yet to spend a separate afternoon filling these appointments. This apparently I should be thankful for as the Vogon I was dealing with was surprised to get them all in one afternoon for me a mere two weeks in the future. A very polite vogon, I must admit, but still a Vogon administering a ridiculous system.

The phone waits to make an appointment are at least 30 minutes. Calls drop out. They accidentally hang up on you when they try to pull you off hold (happened twice). The girl I finally spoke to in full needed to get special dispensation from a supervisor to allow me to make appointments for both a car and boat licence. The software wouldn’t allow her to make two appointments for two licenses (because you can’t possibly do both at the same time) as it obviously doesn’t differentiate between the different kinds of license. “You can’t change a license twice!” The business logic exclaims with an exasperated look.

vogon.jpg

I never thought that I would consider the RTA superior to anything. NSW’s licensing system now appears to be a shining beacon of competence and efficiency compared to this. I have lived in Tasmania and even they manage to do this without needing a vast army of bureaucrats filling in little appointment schedules that takes the same amount of time to do as would the actual work. Perhaps our Tasmanian friends ejected their Golgafrinchans, who went and founded VicRoads and Melbourne at the same time (If you read the history of Batman and Fawkner, Melbourne’s own Romulus and Remus, there may actually be some truth to my insult).

brazil.jpg

For the love of mike, if you must have this Dickensian appointment system, let one person handle most or all of the transactions at the same time. In every case its 95% the same information typed into the same terminal.

Apparently the office scenes in Brazil were not shot on a UK soundstage but filmed in situ in Melbourne.