Fatal Exception’s Neil McAllister discusses the use of quizzes and brain-teasers in evaluating potential software development hires, a practice that seems to be on the rise. ‘The company best known for this is Google. Past applicants tell tales of a head-spinning battery of coding problems, riddles, and brain teasers, many of which seem only tangential to the task of software development. Other large companies have similar practices — Facebook and Microsoft being two examples,’ McAllister writes. ‘You’ll need to assess an applicant’s skill in one way or another, but it’s also possible to take the whole interview-testing concept too far. Here are a few thoughts to keep in mind when crafting your test questions, to avoid slamming the door on candidates unnecessarily.’
I have been at this life for a while now.
Yes, tough tests prove who is good and can work under pressure. Too many mamby pamby tests have let the weak rise to the top.
I say it is time for the hardest tests.
LOLWOT
I have been going for a ASP.NET developer job and been asked about WinForms applications in such tests or even the keyword for a particlar exception (I can look this up in the Docs).
I know a lot about ASP.NET Webforms and ASP.NET MVC but only basics about WinForms … I would struggle even answering the most basic questions … Since I don’t work with it on a day to day basis.
I have in the past been asked to do programming problems presented to me … and I have always got the job since I can actually like program stuff …
A bit part of my job is knowing how to google (I am a web developer and IE6&7 can throw up the odd surprise).
Wanky questions don’t help nobody … since people will just learn how to answer them.
Edited 2011-11-03 20:45 UTC
If that is the case your potential employer was simply doing it wrong imo… The point of these types of test screenings should be to determine aptitude, not subject matter expertise. It is ok to ask someone applying for a Java job to write some java code to see how they would choose to solve a problem – but you want to judge them on the overall approach they take, not silly details.
What isn’t ok (and is in fact counter productive) is asking them pointed questions like “what api call do you use for x” or “what is the return type of foo()” – a good programmer does not waste brain cells storing information like this – hopefully he/she users their brain for pattern storage, not stupid details that most IDEs give them on a platter when needed (and if all else fails there is always Google).
My feeling is there is no such thing as an experienced programmer who has only really worked in one or two languages… I’m much more impressed by someone who has actively used 5 or 6 languages but doesn’t remember all the details than by someone who has only used one but knows it backwards and forwards. I know I can throw language 7 at the first person and they will be able to manage. The other one, not so much…
Exactly. All knowing silly details proves is that you have a good memory – not necessarily a bad thing but it certainly doesn’t indicate problem solving ability.
Totally 100% agree,
I think principles about a certain subject is perfectly fine to ask about and maybe some expertise about a certain field they expect you to know about (in my case ASP.NET).
I recently got a new job just explaining what I did and how I did it … no coding … the lead dev knew that I knew what I was going on about and hired me.
I would have been happy to supply coding examples to predefined problem by the potential employer. Which is more telling than odd tests.
With .NET dev explaining why you would want a StringBuilder and want IDisposable does … it pretty much a good gauge of what they know. If they don’t know that and they aren’t Junior Dev … they are a no go.
Edited 2011-11-03 23:38 UTC
I totally agree. I hate questions similar to “what is the 100th decimal in PI?”, or similar “what API call is used for …?”.
I fail such mindless tests. But instead, give me a line of thought that I must complete, or something I must investigate, and chances are I come up with an original solution. I am more of thinking guy, not memorizing stuff.
This is a gross oversimplification, but the point of the brainteasers is to find smart people who happen to program. Not just people who know how to program. We’ve all seen the programmers with X years of experience in .Net, Java or whatever who write absolutely horrible code or who are unable to find a better way of doing something. Sure the code might run just fine from the user’s perspective but it’s an ugly mess underneath. These types of companies also tend to look for people who can innovate, not just write code according to some functional spec designed by a committee.
I say bring on the tests and separate the wheat from the chaff.
life tests everyone
From my experience folks who have the ability to grasp systems engineering concepts, understand how to modularize and where to do it make far better programmers than the ones that know how to bit diddle.
Employing those who live in the weeds requires lots of people who have to micromanage these type programmers. Not cool.
An interview needs to be balanced across a lot of different factors. Clearly, if it’s completely one-sided towards brain teasers, then what you’ll get is lots of idiots who just happened to have spent a lot of time doing brain teasiers. However, they are an important means of evaluating a person’s critical thinking skills, especially if they’re not completely artificial but relevant to the work. A lot of good interview questions are not abstract brain teasers but practical things like “what’s wrong with this code?” The main objective here is find out what the person’s abilities are. For instance, we want to check to see if their resume is accurate, and we want to find out if they are abilities not obvious from the resume.
Another important factor that I’ve seen neglected is personality. It does no good to hire someone who is exceptionally bright if they can’t work well with other people or if they don’t have the patience to see their work all the way through. I’m thinking specifically of one guy I worked with who did not hesitate to let you know how much smarter he is than you are. In my evaluation, he IS gifted in IQ. Unfortunately, no one liked him, and he wrote incredibly buggy code because he felt that unit testing was beneath him. (This guy’s also really rude. During a meeting, he had the gall to shush the director of a major government agency. I don’t care what you you might think of this person — it’s simply very unprofessional to disrespect someone like that publically. I’m not saying I haven’t make similar faux pas in the past, but he’s 10 years older than me.)
Sorry for the rambling. I need some caffeine.
You means someone like Bill Gates or Steve Jobs?
Exceptions, clearly.
No, because Jobs and Gates weren’t hired; they were employers not employees.
Being a dick and driving people to do something vs just plain being a dick are two different things.
The man probably has Aspergers.
The only proven indicator of success in a task is previous experience in a similar task.
Psychometric tests and interviews are almost totally worthless methods of selecting staff.
Universities appoint academics based almost entirely on their publication record. They don’t care what marks you got at high school, what your hobbies are or how well you go in meaningless tests. In fact interviews are largely a formality for senior positions.
Edited 2011-11-03 22:09 UTC
Problem is that if you want to hire new grad, they don’t necessarily have previous work experience. Some have been working on some OSS/hobby project (and usually, they’ll find a job quite easily due to that). For the rest, you could trust their grades, but… yeah, academic grading is very subjective and teacher-dependent so it’s very hard to compare two candidates based on that.
The simple solution is not to hire any new graduates. Wait until they have 2-3 years experience at another organisation.
A better solution, in my experience, is to hire multiple new graduates and inform them that not all of them will be retained after the probation period. Assessment on the actual work you hired them to perform beats every other method of predicting how they will perform ahead of time.
If everyone does this, no new people could ever get any experience.
Why is it that companies often don’t care to actually train their employees? You are frequently expected to know everything coming in, or pick it up on the job. Without any real training along the way, you just get people who go through the machine, never really maturing, even though they have the magic number of years of experience that people like you think matter.
Yeah, that is one extreme. But there is another extreme in software development profession – the person that will not learn anything unless they are trained.
Unfortunately most Indian developers are like that and believe me you don’t want any developers that don’t learn anything outside of their formal job.
Well, there are those who don’t learn anything inside their formal job either. And still get paid.
So … one needs experience before they can get hired into a job … but one needs a job before they can get experience … ? How does that work exactly?
My grades are fairly mediocre… however my Senior project is building a fairly state of the art telepresence robot. Now when I look at alot of the other projects some are just as impressive especially the mechanical guys have some awesome projects. While some are pretty silly (put a photo diode on it and make a light come on type things).
My teachers have been both what I consider the best and worst.. I’ve wanted to puke after and during a few classes :C The teacher was soo bad.
The best teachers have challenged me and given me a fair grade they graded tough but gave me the tools to earn my grades!
You take what you get and move on complaining about it isn’t going to help… besides they aren’t ever suppoesed to get TO those questions you OWN the room when you walk in
Well, there are exceptions to every rule. E.g. we have a new grad, who has the above experience, and has proven to be very good in solving algorithmic issues, codes fast and produces fairly decent code, yet as it turned out later, after he is given a task to solve he goes in “independent” mode, disregarding most of the deadlines, design constraints, etc. producing solutiong to his own liking. When asked to make changes inline to the given constraints to be usable in some integrated system, simply doesn’t do it, or doesn’t do it by the requirements, or doesn’t do it in time (or all the above ). If it was by me, I would’ve let the guy go after the first month, the problem is the boss really likes him, so…
There are circumstances when being a “genius” is not enough.
Hey the Infoworld tests were fun,
I guess I was lucky to start 30+ years ago on the hardware side doing chip design. Although half my life work has been writing code in various languages that revolve around chip design, testing, compilers, layout and simulation and god knows what, I will never land a job as a contemporary software engineer because I guess I am too old school. I would probably flop almost every test out there so now I work on my own pet projects. BTW chip design is done in programming languages too like Verilog or VHDL which would look somewhat like Pascal-C-Ada ish.
In my first job there was no formal interview, a group of 100 odd students from the best Universities in the UK went to a posh hotel where we mingled with the company founders. We asked them various questions in an open forum. If you made an impression, you got a job or maybe they had already decided based on background and CV alone. My experience off campus with another chip company and pointed questions to the US VP Engineering probably got me in. Later I realized they hadn’t even opened their design office so we were really founders in a way. Despite the relaxed interviewing, I think they got some of the best minds available.
Even when I changed companies I only had to talk about previous work but I have noticed the interviewing has gotten progressively harder over the years. Always best to be hired by people you already know though who know what you can do. If you lose your network of fellow engineers, you will fall back to the bottom and be treated like a noob again. And getting screened by young outside recruiters who have no idea of any technology really irks me no end.
If I ever interview again and get asked entry level stuff, I just know I will get weeded out. I suspect there is age or generation discrimination in there too, but eventually it happens to all.
I suspect Google etc face way too many resumes to screen down to the few they want to throw at live managers.
transputer_guy,
I find it ironic, that the same people who built the infrastructure into what it is from scratch, face such a difficult time even landing an interview today.
I think a huge problem in the US is that we’ve completely killed all domestic production of goods to push nearly everyone into services. And now between the combination of offshoring/consolidation/automation/etc, there’s too many people qualified to do far too few jobs.
That is so true!
Actually I have young kids now, and one wants to be an engineer just like her dad although she has never seen him leave for the office. I would strongly encourage her and other kids to stay as far away as possible from hardware or software engineering as possible for many reasons.
The turnover in product life cycles means that whatever you work on, even if it ships as product will be forgotten far sooner than you could imagine. Go through the cycle a few times and soon enough nobody knows what the heck you are talking about, its like a dream world talking with recent grads.
If I could have my career all over I would go into a field where the results and your knowledge base last a few decades, like nuclear engineering (esp thorium LFTR) although most of the uneducated greens would be against it.
So you want the stuff you design to be like COBOL? I’m a computer engineering under grad and I can see what you mean however alot of tech hasn’t even changed in 20 years. Software seems to change in different areas at different rates for instance these days visualization is everything (Xen KVM etc etc…(windows 8 *cough* *cough*)) and ARM is the new “it” cpu.
Well not Cobol for sure. In my own case in VLSI or ASICs really nothing lasts but at the same time a DRAM today still works much like the MK4116 designed 30+ years ago by Schroeder etc. The chips I have worked on though were much shorter lived and all the software I have used or worked on over the last 30 years is really all gone too. After maybe ten cycles of any technology you start to lose interest. Languages like the C family though have staying power.
The ARM was developed just a little after I first started out in 79, I first heard about it around 83. Its success is well deserved though.
Now if I had become a different kind of engineer I could take my kids and maybe grand kids to some place and show them what I was part of. In my first job I often used to visit one of Brunels bridges and walk right past his steam ship too, now that’s engineering.
In the Infoworld quiz mentioned in the article, how many folks here today even knew APL. Some of the questions were pretty historical in nature.
We are of course chatting on opposite side of a hill, only as technology evolves faster the hill gets taller.
Once you have kids though you see things on a much longer term, like where on earth will they get their energy supplies from, it sure won’t be PV or wind to any degree, and that has also tickled the interest of Gates, Allen, Google energy and so on. The software world that revolves around Facebook and the web is just so much bling.
don’t count on this
the only thing holding wind/pv back is the missing energy storage
Energy storage would certainly help, perhaps Isentropic heat storage or metal air batteries but in any case what really matters is the energy density at the source.
Solar and wind pretty much only deliver a few watts/m^2 after factoring in COP. PV is way oversold as so called low $/W under ideal conditions, you have to derate that by 5 to 7 or so to account for normal solar/wind variability. The total energy demands of each western person are on the order of 110 times what they were in stone age times, that’s about 11KW continuous v 100W. Go figure how much land and resources is needed for 11KW continuous 24/7.
Hydrocarbon based energy is many orders denser but should be looked at a solar chemical battery charged up over hundreds of millions of years and being discharged in just 2 centuries, and of course the CO2 emissions are going to hell.
Nuclear binding energy is another million times denser than chemical, and Thorium LFTR solves most of the issues of conventional Uranium designs. Getting off topic though.
smashit,
“don’t count on this
the only thing holding wind/pv back is the missing energy storage”
transputer_guy,
“Energy storage would certainly help, perhaps Isentropic heat storage or metal air batteries but in any case what really matters is the energy density at the source.”
I’ve always thought PV were a cool idea, but I rather doubt the average household could become self sufficient without a significant drop in consumption.
Is energy storage really that big a problem? I don’t know, but that surprises me. If peak wind/solar power production is always below consumption, then the problem of storing excess energy never arises. If we see solar/wind energy production rise above consumption during the day, with energy left over for nighttime, then we have a storage problem.
I can think of some solutions, although I leave it to someone else to compute the relative density and efficiency.
Store energy in the form of heat, to be used to heat homes and water.
Store energy in the form of mechanical potential, such pumping water into hydroelectric reservoirs.
Store energy in superconducting magnetic fields.
Store energy in low friction gyroscopes.
Store energy in super capacitors.
Store energy by synthesizing auto fuel.
Store energy by converting it into matter using a nuclear reactor
Transfer excess energy to the dark side of earth.
If nothing else works, hold energy fiestas during the day for people to do something fun with it, create portals to Xen or something.
Energy storage is a fascinating subject and all the ideas you list have or are being tried but it always comes down to costs and efficiencies. Basically PV/Wind Geothermal, Wave all require great amounts or resources to capture really piddling amounts of fluctuating energy. Sure people can point to any of these sources as the greens always do (I used to as well) and say the earth receives huge x times more solar power than all mankind uses every year so lets just cover parts of the earth with silicon, metal and concrete not realizing that most of these need huge amounts of limited resources like rare earths.
Most of these storage device have varying losses that make the captured energy even more expensive. You end up building a base load gas plant to back up variable supplies, and then wonder why not just use the gas power and kill the variable supply. I am not a fan of gas either as it contributes probably more warming than coal because of lost methane escape, you only ever hear about the half as bad as coal side.
Only Nuclear and preferably Th LFTR can supply 10KW per person with small impact both land and materials at about $2/W 24/7, and it load follows too. So instead of storing intermittent renewable energy you oversupply cheap as possible base electricity and use the excess to charge EVs and manufacture liquid fuels like DME (nuclear diesel) or ammonia, H2 etc, you get electricity and liquid fuels in one shot and also some nice isotopes to boot. google Thorium and it all pops up.
I see the grid as a poor circuit design with mega amp high volt nodes rather than analog uamp, mV circuit I am used to, being designed by greens. So storage is like decoupling capacitors, and we are trying to power civilization with too many crappy sources and fudge it to work. No amount of storage is going to help synthesize cheap fuels, only the millions of years of solar or nuclear can make fuels affordable.
Sorry for going off on a tangent
transputer_guy,
“Energy storage is a fascinating subject and all the ideas you list have or are being tried…”
Gosh, are we really this close to building a Xen portal?
I would think that acquiring sufficient quantities of energy in the first place is a much tougher problem than finding ways to store it’s excess, no? Is the storage problem really a barrier today, or just a potential barrier in the future?
“but it always comes down to costs and efficiencies”
Yes I know. Room temperature superconductors (using carbon nano-tubes?) may offer a solution to the efficiency problem. Economic costs will become more attractive as fossil fuels disappear.
My guess would be that biomatter is already a naturally efficient energy conversion process, but it lacks density, and we’re already cutting down forests unsustainably. I believe we’re going to have to come to terms with the need to significantly lower consumption. This is every bit political as it is technological – for instance, eliminate braindead economic models which encourage short lived products that can’t be serviced and need replacement after only a couple years use.
“I would think that acquiring sufficient quantities of energy in the first place is a much tougher problem than finding ways to store it’s excess, no?”
For fossil fuels we run out of the easy stuff soon enough, there is still plenty of it left but the cost goes up to extract it unless new methods found to do so (that does happen so the run out date keeps sliding back a bit).
With weak renewables it is both more expensive than fossils and is even more expensive after you store and lose maybe half of it in the “battery” and transmission.
The Uranium used in the burn once through cycle only uses about 1% of the energy in U235 and not the 99% U238. If the world went crazy and completely replaced coal and gas with current Ur PWRs like GE AW1000, we run out of the stuff in a few years leaving 99% of it “unburnt”, that is what nuclear waste is, unburnt fuel. Only a breeder reactor can burn up the remainder of U238 and that scares the pants of the anti nukes.
Now Th has the nice benefit that it is 3.5 more common than Ur and can be burnt nearly 100% efficient in one go so a US style lifestyle could be given to 10B people for a 1000 years with known Th reserves. Right now Th is a waste material from rare earth mining nobody wants. It would take about a golfball sized chund of Th to power your entire life.
One of the guys leading the Thorium discussion is Kirk Sorenson. He first worked at Nasa on a team that had to figure out how to provide a long lived energy source for a hypothetical lunar colony. Well every power source we currently use pretty much fails on the moon or any other off earth colony or space ship. Even conventional nuclear fails because it demands lots of water for cooling to make the steam turbine generators work. That work led him to discover the early work done by Alvin Weinberg on LFTRs and it became clear that a Th LFTR could actually provide a self sustaining community with energy and liquid fuels and the moon is loaded with Th too which is easy to prepare as a fuel.
So take a system that works on the moon and build it on earth and you have a system that can support a large population at low impact to the earth.
As for Biofuels, look at those as bio solar panels made of green, only 1% efficient at best, needs lots of infrastructure. It can only be a small supplement.
i just took a look at last years numbers for my home:
3KW continous for 3 people
with 2/3 of it going into heating (i realy should put some solar collectors on the roof)
Yes that’s the idea that most meter savvy people get, mine would be 5700KWh/yr for 5 people so I might think I am using a miserly 1KW continuous for 16hrs for 5 people so where does the 11KW/person come from. Add in gas for heating and that about doubles, still not right. The 11KW come from all the energy sources you are ignoring, like what goes into everything your total life uses plus your share of the gov use.
Look at the total energy the USA uses in all its forms Oil, Coal, Gas, Nuclear, Hydro and in the minute even Solar, Wind, Biomass. Look up Lawrence Livermore labs for some graphs on this, they are staggering and then subtract fossil fuels in 50 years and triple the world population and WTF are we going to do then. I you live in Europe you probably can use the US figures/2.
Its best to keep the math on a per capita base then you can see that your electric bill is only a very few percent of your true energy footprint and sticking solar on your roof will make piddling difference to the big picture. If you want to lower your bills don’t use electric for heating as that’s the most expensive way to do so. Gas/Oil or ground/air heat pumps would help but you probably have no choice. Solar thermal collectors is much better and deal with thermal storage, solar PV for heating would be silly.
Look up prof David Mackay on Without the Hot Air for a energy thrill.
…but when the tests have nothing to do with the role being applied for, it becomes more obvious that the employer is simply trying to cut down on the number of applicants without spending the time needed to assess their actual abilities.
I don’t really blame them though. There are just too many applicants these days to interview fairly on a practical level. When a small company I worked for locally sought to hire one or two new employees, they had a stack of applications that looked like it might have been a thousand resumes. At those quantities, there’s no way to avoid the imposition of arbitrary measures to cut down the stack even if it means the arbitrary elimination of qualified individuals.
According to this, google handles 75000 applicants a week, about 3 times their workforce.
http://www.businessweek.com/news/2011-02-03/google-gets-record-75-0…
Under these conditions, google’s notoriously arbitrary screening process makes sense – it’s physically impossible to interview, much less hire, all the individuals who may actually be qualified.
Looking at back at the 30 years since I finished high school in Australia I have learnt some very important lessons. One is that the academic results you get in high school and university are often a very poor predictor of later successes.
One of my friends didn’t start tertiary studies until he was 23 and attended a very poor quality university as an undergraduate. He is now is now a full Professor at a major university.
Another friend was awarded the highest matriculation results in his state. He studied civil engineering at university with almost perfect grades. He finally ended up running a very small IT consulting operation.
Several my friends failed our army officer training course. One is now worth over $200 million, another is a leading international banker and a third is a very high ranked police officer. Most of those who completed officer training ended up as middle managers in the public service or large companies.
Some of those who went exceptionally well
High academic achievements and innovative, ground breaking spirit don’t seem to be very related. Academic achievements mostly show that you are willing to conform(at least up to a MSc degree, beyond MSc that may change)
Though I haven’t had to do many of them, whenever I’ve been on the interviewer side for software engineering I’ve deliberately been very light on tests and heavy on personality. It’s “What are you like” and not “What do you know.” Ultimately if you’re intelligent and want to learn I don’t much care if you’ve never seen the language you’ll be working in or don’t know best practices. I want someone who knows how to solve problems, ask for help when necessary and who has drive. Probably this doesn’t work for all fields, but my success rate is pretty high so far.
The people I want to exclude are the ones who can’t program at all or don’t care to make things better… and eliminating “Can’t program is all” is trivial with basic conversation.
Oh yes, that link: http://www.joelonsoftware.com/articles/GuerrillaInterviewing3.html
A useful read even if I think he’s a bit off here and there.
I’ve exprienced once the exact opposite of this, having seen and used to various extent quite a number of languages, I’ve been asked about very specific things from 2 different interpreted languages (one of which I knew generally but never used for anything, the other I only used scarcely) and I’ve seen weird faces when I said I don’t know the answers by heart (and these were not a priori listed as requirements either). I personally can’t imagine liking a boss or a job environment where knowing every detail of every language from memory is so important.
I find these tests completely idiotic. It sounds like something from the HR admin came up with. I often interview candidates in a group setting and find that just talking in depth, asking questions, trying to really understand their interest in the subject matter. It becomes clear who’s who. Some engineers do it for the love and some do it because they were smart and didn’t know what else to get a degree in.
Guess not much point in applying there, Intel and AMD are now both very mature, and can only go down from here.
On a another note Foxconn will replace 500,000 Chinese production jobs with 1M robots yet to be built in a new robot science park in Taiwan.
What goes around comes around.
Just the latest fad from companies that really don’t know how to assess who would be an asset to their organization.
Remember “stress interviews”? How about programmer tests?
Having hired people for IT organizations, I’d say there is no substitute for sitting down with candidates and talking with them — for several sessions.
The trouble is, most companies don’t want to spend the time that hiring good employees requires.
So they get some dork who solves a puzzle but can’t get along with people, or a pitbull who passes the programming test and runs over people. Too bad.
I won’t go to interviews where they give you a test with no prior warning, those are freaking ridiculous.
In a real world situation it’s unlikely you would ever
have to deal with a “test” like situation. All those stupid tests do is find people who are good at tests and trivia. I remember in college there where people who were way smarter than me, probably at the genius IQ level and did great at tests, but they could never get their assignments done and didn’t do any better in the class than me.
I went to this one interview and they wanted me to write a program on the spot that could reverse a string without using any additional memory than the string originally used. It’s not easy to do. I simply walked out as the ahole interviewing me was standing over my shoulder critiquing me as I was working. NOT COOL OR PROFESSIONAL. I later looked it up on Google and he was using the Guerrilla Interview tactics by Joel Splosky and it took 3 good programmers half a day to properly solve the reverse a string using no more memory than the string originally uses.
snorkel2,
“I won’t go to interviews where they give you a test with no prior warning, those are freaking ridiculous.”
Logically speaking, they would be impossible to avoid.
“I went to this one interview and they wanted me to write a program on the spot that could reverse a string without using any additional memory than the string originally used.”
Isn’t it simple enough to use two iterators and swapping the characters? But if your going to an interview to do databases, guis, web development, etc then yea the problem doesn’t reflect the job.
The majority of these questions do a terrible job defining border conditions while looking for something specific. One interview I was asked about what was needed for recursion to work. I replied that a stack being needed, the ability to push the current address to the stack and continuing to execute at a new address, and then the ability to returning to old address on the stack. The interviewer was looking for “an exit condition”. So although I could obviously implement a recursive function in my sleep, he thought I failed the question. A far better test would have been to have me write a recursive function on paper.
When the HR manager receives a request to hire some smart people to do programming and that HR manager doesn’t know how to find them. He/she will rip off some tough IQ questions from somewhere and request the candidates to answer them. This kind of tough test show that the company have no idea what kind of candidates they are looking for.
Recently, my company want to open a factory in Philippines and want to hire three Filipino Java Programmers. My company get about 3000 applicants for the three vacancy.
However, the HR manager doesn’t know how to set the test to filter away the unsuitable candidates.
Fortunately, he is humble enough to ask me for help and I prepare 20 questions for him to test their Java knowledge.
I also prepare a simple Java program with errors for the candidates to test their debugging skills.
The right candidate must have knowledge, skills and good attitude. Their attitude can only be tested during their probation.
The test was given in Delphi (pascal), and the solution
involved using a combination of pointers and something else I can’t remember right now.(this was back in 2006)
You couldn’t just reverse the string in the obvious way because the compiler would allocate additional memory to do the swaps. I will see if I can find the link to the article that shows what the real solution for it is.
In the real world with today’s systems, does anyone really care if you use a extra byte to reverse a string?
What’s more important is that you free your resources when using a non garbage collected language.
Read this so you can determine if they are using this bullshit on you during a interview:
http://www.joelonsoftware.com/articles/GuerrillaInterviewing3.html
“Pleasure in the job puts perfection in the work.” Aristotle
It’s more difficult to measure passion and emotional intelligence in an interview.
Some people might not be that quick with an answer but let him sleep on it and they might have a better solution than all the others.
Here is my solution to reversing a string, but it’s no good because it does not do it “in place”, i.e. uses no additional memory than the original string.
var
x,slength:integer;
astring:string;
t:char;
begin
astring:= ‘the cow jumped over the moon’;
slength:= length(astring);
for x := 1 to slength div 2 do
begin
t:= astring[x];
astring[x]:= astring[(slength-x)+1];
//the +1 compensates for pascal strings
//not being 0 based
astring[(slength-x)+1]:=t;
end;
showmessage(astring);
Would this be perfectly acceptable solution in the real world? I would say so, but not to these stupid interview tests.
oh well whatever.
ha ha minor change:
var
x,slength:integer;
astring:string;
t:char;
begin
astring:= ‘the cow jumped over the moon fool’;
slength:= length(astring)+1;
for x := 1 to slength div 2 do
begin
t:= astring[x];
astring[x]:= astring[slength-x];
astring[slength-x]:=t;
end;
showmessage(astring);
end;